ez_BasicStamp.txt Driver File Contents (ezLCD_CD-ROM.zip)

Using the ezLCD with the BS2 Basic Stamp 
-----------------------------------------------------------------
 For updates see http://www.earthcomputer.com/basicstamp.html

     1) Hook up ezLCD to 5 volts (3.6 to 6 volts will work also!)

     2) Connect a Basic Stamp output pin P0 to the RX pin of the ezLCD (sorry to those of you who saw P0 to ezLCD Pin E0 on rev A of this page)

     3) Add the ezLCD CONSTANTS file for PBASIC file to your PBASIC program.   ( click here to download) or cut and paste from the bottom of this page

     4) Use PBASIC command  SEROUT 0,16468 (cmd,cmd,cmd) to send inverted serial data to ezlcd with cmd representing the appropriate ezLCD command. Be sure you are running the ezLCD baud rate at 9600 baud which can be set with ROMUTIL.EXE supplied with EzLCD (version shipped after 10/15/04 or downloaded from  http://groups.yahoo.com/group/ezlcd/files/Beta%20%21/ . 

Program away and enjoy the only color lcd compatible with the Basic Stamp!

What does a sample PBASIC command look like? Here's one that sets screen color red and second one outputs message in white font:

SEROUT 0,16468, [SET_COLOR,RED,CLEAR,LIGHT_ON] ' Make screen all red and turn on front light - serial set for 9600 baud 8-bit no parity inverted
SEROUT 0, 16468, [SET_XY,80,80,SET_COLOR,WHITE,SELECT_FONT,1,PRINT_STRING," ezLCD Rocks!",NULL] 'move cursor, set color white & send message
 

What commands are currently available?
********************************************************
PASTE CODE FROM HERE DOWN
'*******************************************************
' 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

 

ezLCD Sample Code
' Note ezLCD-001 shipped before Oct 2004 need to set serial port to 9600 baud using files in F9600.zip 
' Use PBASIC command SEROUT 0,16468 (cmd,cmd,cmd) to send inverted serial data from Basic Stamp pin P0 to ezlcd RX pin only with cmd representing the appropriate ezLCD command.
'example code:
SEROUT 0,16468, [SET_COLOR,RED,CLEAR,LIGHT_ON] ' Make screen all red and turn on front light - serial set for 9600 baud 8-bit no parity inverted
SEROUT 0, 16468, [SET_XY,80,80,SET_COLOR,WHITE,SELECT_FONT,1,PRINT_STRING," ezLCD Rocks!",NULL] 'move cursor, set color white & send message
Download Driver Pack

How To Update Drivers Manually

After your driver has been downloaded, follow these simple steps to install it.

  • Expand the archive file (if the download file is in zip or rar format).

  • If the expanded file has an .exe extension, double click it and follow the installation instructions.

  • Otherwise, open Device Manager by right-clicking the Start menu and selecting Device Manager.

  • Find the device and model you want to update in the device list.

  • Double-click on it to open the Properties dialog box.

  • From the Properties dialog box, select the Driver tab.

  • Click the Update Driver button, then follow the instructions.

Very important: You must reboot your system to ensure that any driver updates have taken effect.

For more help, visit our Driver Support section for step-by-step videos on how to install drivers for every file type.

server: ftp, load: 1.06