Introducing the World's First Color LCD for Basic Stamp Applications!

+

ezLCD-001-EDK.jpg

=

COLOR LCD

on Your

Basic Stamp 2 Project

 

BASIC Stamp

  EzLCD-001 (Shown with eval Board) click it to buy it!    

 

What is it? ezLCD is a low cost intelligent 2.7" 240 x 160 reflective color TFT LCD with LED front light that takes simple commands to display windows type fonts, bitmaps and intelligent graphic commands.

How much does it cost? ezLCD-001 cost $149 and can be bought online at EarthLCD.com

Do I need the ezLCD-001-EDK?  Yes you should buy one because it gives you the eval board with an ezLCD  and cables to hook the ezLCD-001 to hook to a P.C. for programming options, downloading fonts and upgrading firmware. Also there will be many applications for using the ezLCD as a secondary info display on a P.C. Once you have your project done you can use the eval board in the EDK for updating and testing displays. Of course after that you will design your project with direct connections to the headers  on the ezLCD-001 module.

How do I store graphics in a Basic Stamp? You can use the data statement which will let you use the Basic Stamp eeprom. You'll run out of space real quick which is why we implemented the ICON command. This instantly (I mean instant as in quick!) bitmaps that are stored in the flash of the ezLCD board. There is about 48k worth which we fit 23 of various sizes in the demo firmware available at: http://groups.yahoo.com/group/ezlcd/files/Beta%20%21/ . Coolest command 48k bytes of Graphic bitmaps up to 240 x 160 pixels being driven by a frigging PIC Basic Stamp. Hold on to your hats and send me your demo code to post on this page!

How do I hook ezLCD to my BASIC Stamp?        

     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?

'*******************************************************
' 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

Good Basic Stamp ezLCD Works!

 

 

 

 

 

 

by El Paisa (search "ezlcd" on Parallax Forum for more info by clicking picture)

Hit Counter

-------------------------------------------------


This site is a member of WebRing.
To browse visit Here.

--------------------------------------------------

EarthLCD's 10 Year Anniversary!