Recent Changes - Search:
ECG Home

GitHub

People

Publications

Calendar

Projects

Fall 2017

Older Courses

Spring 2017

Fall 2016

Spring 2016

Fall 2015

Spring 2015

Fall 2014

Spring 2014

Fall 2013

Spring 2013

Fall 2012

Spring 2012

Fall 2011

Spring 2011

Fall 2010

Spring 2010

Fall 2009

Spring 2009

Fall 2008

Spring 2008

Fall 2007

HOWTOs

edit SideBar

CVRBytecode

Additional CAVRIT Opcodes

To use the new opcodes, add the following line to the CricketLogo configuration file:
print c 1 hexprint c 1 pattern c 2 clearlcd c 0 setpin c 1 clearpin c 1 sensor r 1 switch r 1

	Name:		print
Bytecode: 0x49, 73
Arguments: One, 16-bit number to print
Returns: None
Description: Prints the decimal value of a 16-bit number to the LCD.
Name: hexprint
Bytecode: 0x4A, 74
Arguments: One, 16-bit number to print
Returns: None
Description: Prints the hexadecimal value of a 16-bit number to the LCD.
Name: pattern
Bytecode: 0x4B, 75
Arguments: Two in the form: pattern <character> <digit>
Where <character> is a 16-bit number constructed to
display a certain pattern (see section on LCD programming)
and <digit> is a value between 1 and 6.
Returns: None
Description: Writes the specified pattern to the LCD at the digit
specified. It is recommended that the user run the
clearlcd opcode prior to this command to ensure
that the screen will properly display the character.
Name: clearlcd
Bytecode: 0x4C, 76
Arguments: None
Returns: None
Description: Clears all data from the LCD screen and the text buffer.
Name: setpin
Bytecode: 0x4D, 77
Arguments: One number from 0-3. The actual pin that is modified will be from
pins 4-7 on PORTB.
Returns: None
Description: Sets one of the pins from 4-7 on PORTB to output a digital one.
Name: clrpin
Bytecode: 0x4E, 78
Arguments: One number from 0-3. The actual pin that is modified will be from
pins 4-7 on PORTB.
Returns: None
Description: Sets one of the pins from 4-7 on PORTB to output a digital zero.
Edit - History - Print - Recent Changes - Search
Page last modified on March 01, 2007, at 11:43 PM