'******************************************************* ' ezLCD COMMAND CONSTANTS for PBASIC on Basic Stamp 2 with description - single byte commands unless stated otherwise ' (C) 2004 Earth Computer Technologies, Inc. http://www.EarthLCD.com 'Revised 10/16/04 - added ICON command!! '******************************************************* CLS CON $21 'Clears screen by filling it with the Current Color LIGHT_ON CON $22 'Turns on the light LIGHT_OFF CON $23 'Turns off the light SET_COLOR CON $24 'Sets the Current - 2ND COLOR BYTE REQUIRED ' ' 7 6 5 4 3 2 1 0 ' +-+-+-+-+-+-+-+-+ ' | B | G | R | ' +-+-+-+-+-+-+-+-+ ' blue green red 'SENDING SETCOLOR,GREEN,CLS will fill entire screen with green The following sequence will fill the whole display with green ' ' SET_COLOR 24 hex ' GREEN 00111000 bin ' CLS 21 hex ' RED CON $07 GREEN CON $38 BLUE CON $C0 YELLOW CON $3F WHITE CON $FF BLACK CON $0 GRAY CON $A4 ' SET_BG_COLOR CON $34 'Sets background color - 2 BYTE COMMAND, FOLLOW WITH COLOR SET_XY CON $25 'Sets Current Position - 3 BYTE COMMAND, FOLLOW WITH X & Y COORDINATE PLOT CON $26 'Description: Plots a point at Current Position in Current Color PLOT_XY CON $27 'Plots a point in Current Color, at specified position - 3 BYTE COMMAND, FOLLOW WITH X & Y COORDINATE LINE_TO_XY CON $28 'Draws a line in Current Color, from Current Position to specified position - 3 BYTE COMMAND, FOLLOW WITH X & Y COORDINATE CIRCLE_R CON $29 'Draws a circle in Current Color at Current Position - 2ND RADIUS BYTE REQUIRED CIRCLE_R_FILL CON $39 'Draws a filled circle in Current Color at Current Position - 2ND RADIUS BYTE REQUIRED SELECT_FONT CON $2B 'Selects Current Font - 2 BYTE COMMAND, FOLLOW WITH FONT# PRINT_CHAR CON $2C 'Prints a single character - 2 BYTE COMMAND, FOLLOW WITH CHARACTER PRINT_STRING CON $2D 'Prints null-terminated String - N BYTES REQUIRED - Send ascii string folllowed by NULL (zero byte) NULL CON $0 PRINT_CHAR_BG CON $3C 'Prints a single character on defined background - 2 BYTE COMMAND, FOLLOW WITH CHARACTER PRINT_STRING_BG CON $3D 'Prints null-terminated String on defined background - N BYTES REQUIRED - Send ascii string folllowed by NULL (zero byte) PUT_BITMAP CON $2E 'Puts Bitmap on the screen Starting at Current Position,then UP and RIGHT - N BYTES REQUIRED (CMD+BMP_WIDTH+BMP_HEIGHT+N PIXELS) ' Total number of bytes is: width*height + 3 ARC CON $2F 'Draws an Arc at Current Position in Current Color - 4 BYTE COMMAND+RADIUS+BEGIN_ARC+END_ARC (ARC ANGLE = Angle_deg * 45 / 32 ) H_LINE CON $40 'Draws a horizontal line in Current Color, from Current Position of specified length - 2 BYTE COMMAND, FOLLOW WITH LENGTH V_LINE CON $41 'Draws a vertical line in Current Color, from Current Position of specified length - 2 BYTE COMMAND, FOLLOW WITH LENGTH BOX CON $42 'Draws a box in Current Color, with upper left cornerat Current Position - 3 BYTE COMMAND, FOLLOW WITH X & Y DIMENSIONS BOX_FILL CON $43 'Draws a filled box in Current Color, with upper left corner at Current Position - 3 BYTE COMMAND, FOLLOW WITH X & Y DIMENSIONS ICON CON $57 'Draws an ICON from ezLCD flash in Current Color at Current Position - 2ND ICON # REQUIRED. Bitmaps must be stored in ezLCD ahead of time use ROMUTIL.EXE from P.C. '*************************************************** END ezLCD CONSTANTS