EarthLCD ezLED-3 Series User manual

User Manual
ezLCD-3xx Product Family
Version 1.4 June 0, 01
Requires Firmware Version 1.40 or Later
1

Table of Contents
1.0 Introduction..........................................................................................................................................4
2.0 About This Manual...............................................................................................................................5
2.1 One Hundred Dollars - The e.z. wa !..............................................................................................5
3.0 How the ezLCD-30x Works.................................................................................................................6
4.0 Installation and Getting Started............................................................................................................7
4.1 Connect the ezLCD USB to Your PC..............................................................................................7
4.2 Verif the ezLCD USB Flash Drive Operation...............................................................................8
4.3a Installing the USB Driver on a Windows 7 Operating S stem.....................................................8
4.3b Installing the USB Driver on a Windows XP Operating S stem..................................................8
4.4 Run the “Termie” Terminal Program...............................................................................................9
4.5 Verif Connection..........................................................................................................................10
4.6 Flash Drive Access .......................................................................................................................10
5.0 Command our ezLCD with EarthSEMPL........................................................................................11
5.1 ezLCD-30x Grammar....................................................................................................................11
5.2 Creating and Saving Macros.........................................................................................................12
5.3 Alwa s Comment..........................................................................................................................12
6.0 EarthSEMPL Macros.........................................................................................................................13
6.1 STARTUP.EZM - Your Most Important Macro............................................................................14
7.0 Images................................................................................................................................................15
7.1 Resizing an Image in Photoshop...................................................................................................15
7.2 Resizing an Image in Windows Paint............................................................................................16
8.0 Colors.................................................................................................................................................17
8.1 Set Current Color...........................................................................................................................17
8.2 Set Custom Color..........................................................................................................................17
9.0 Drawing..............................................................................................................................................18
9.1 Drawing a single pixel ..................................................................................................................18
9.2 Drawing a line...............................................................................................................................18
9.3 Drawing a box...............................................................................................................................18
9.4 Drawing a circle............................................................................................................................18
9.5 Drawing a circle section................................................................................................................18
9.6 Drawing an arc..............................................................................................................................19
10.0 Fonts and the Print Command..........................................................................................................20
11.0 Widget Themes.................................................................................................................................22
11.1 Diagrams of Widget Themes............................................................................................................24
11.1 Some Non-Widget Commands.........................................................................................................28
12.0 Widgets.............................................................................................................................................31
12.1 Analog Meter Widget – AMETER..............................................................................................32
12.2 Button Widget..............................................................................................................................35
12.3 Touchzone Widget.......................................................................................................................37
12.4 Check Box Widget – CHECKBOX.............................................................................................38
2

12.5 Choice Widget – CHOICE..........................................................................................................40
12.6 Dial Widget – DIAL....................................................................................................................41
12.7 Digital Meter Widget – DMETER..............................................................................................43
12.8 Groupbox Widget - GBOX .........................................................................................................45
12.9 Progress Widget – PROGRESS..................................................................................................46
12.10 Radio Button Widget – RADIO................................................................................................48
12.11 Slider Widget - SLIDER............................................................................................................50
12.12 Static Text Widget – STATIC....................................................................................................52
13.0 Snapshot Command.........................................................................................................................54
14.0 Widget State Command....................................................................................................................55
14.0 Flash Drive File Structure................................................................................................................56
15.0 Ports & Embedding the ezLCD-3xx................................................................................................57
15.1 The ezLCD-3xx Command Port..................................................................................................57
15.2 Command Port Management.......................................................................................................58
16.0 Start Something with our ezLCD-3xx...........................................................................................59
17.0 Warnings, Errata and Gotchas..........................................................................................................60
18.0 Gratis (a note from Rand Schafer).................................................................................................61
Appendix A: ezLCD-30x Connector Pinout............................................................................................62
Appendix B: ezLCD-30x Model Descriptions and Drawings.................................................................63
Appendix C: EarthSEMPL Colors...........................................................................................................65
Appendix D: EarthSEMPL Command Reference Guide.........................................................................67
TABLE 1.............................................................................................................................................67
Appendix E: Upgrading the ezLCD-30x Firmware.................................................................................72
Appendix F: Installing & Using the ezLCD-30x on a MAC (OS X Lion (10.7).....................................74
3

1.0 Introduction
The ezLCD-3xx reflects the most intense effort of our 18 ear histor in the LCD industr and 9th ear
of ezLCD production. We hope ou are as excited about this product as we are! I’d personall like to
dedicate this manual to Michal Sieluz cki, our first ezLCD engineer. He started this product line in
2003 with his winning of a Circuit Cellar Design contest, submitting a design that used an 8 bit micro
to drive a color TFT displa . Michal passed on to the “big lab in the sk ” in the spring of 2011. I know
he’s probabl smiling down at us as he adapts the ezLCD-3xx into that CNC mill he was alwa s
tinkering with in his garage. We hope that ou enjo using our ezLCD-3xx as much as we’ve enjo ed
creating it!
-Rand Schafer
EarthLCD.com CEO & Fire Starter
4

2.0 About This Manual
Congratulations on our purchase of our ezLCD-3xx, the easiest wa to embed a color LCD with (or
without) touchscreen into our existing application, project or new product design. Note while this
manual refers to ezLCD-3xx it is a famil manual for the entire ezLCD-3xx famil of products. The
Appendix will describe the different models. All ezLCD-3xx models support the same I/O connector
pin out and command set. The difference is the LCD panel size, resolution, number of displa able
colors, and whether a touchscreen is included. The ezLCD-3xx is the third generation of ezLCD
developed b EarthLCD.com, a dba of Earth Computer Technologies, Inc. This manual contains
software, hardware and driver installation instructions and the ezLCD-3xx command list. This manual
assumes ou are running Microsoft Windows 7 or Windows XP SP3 on our computer s stem. For and
MAC OS X 10.7 (Lion) see Appendix F. For Linux visit www.EarthLCD.com/ezLCD-30x for more
information.
We’ve written this manual to introduce a whole new generation of ezLCD products not just to our
existing customer base, but also to the Arduino enthusiast, the Maker crowd and engineering students
who are excited about making their projects as d namic and exciting as the smart phone the carr in
their pocket. Advanced users ma want to go straight to section 4.0. If so, check and see if there is an
application note for our host micro on the ezLCD-30x product page at www.EarthLCD.com/ezLCD-
30x.
2.1 One Hundred Dollars - The e.z. way!
Technical documentation here at EarthLCD is a continuous process. Our goal is to provide eas to use
and well documented products. Over our nearl 20 ear histor our best ideas have come from our
customers. We appreciate our suggestions. Please email docs@earthlcd.com with the title of this
manual in our subject line and give us suggestions for making the manual better or general
corrections and ou will be entered into a quarterl drawing for $100 Earth purchase credit!
5

3.0 How the ezLCD-30x Works
The ezLCD-3xx Smart LCD consists of an LCD module and a controller board containing the graphics
processor, memor and interfaces. The ezLCD-3xx contains USB, serial ports, I2C, SPI and I/O pin
interfaces. A 4 megab te USB flash drive on the controller board is used for storing macros, fonts, and
images. The drive also includes drivers, utilities and product documentation. To develop projects and
configure the ezLCD-3xx, ou simpl need a terminal program running on a computer set to 115,200
baud rate, 8 data bits, no parit , one stop bit, local echo and CR=CR+LF. Plugging the ezLCD-3xx into
a USB port achieves the following:
•Powers the ezLCD-3xx
•Connects the ezLCD USB flash dri e to your computer
•Opens a USB CDC COM port connection
The ezLCD-3xx is driven b ASCII commands sent to the Command Port. The Command Port can
be either the USB CDC device or one of two serial ports on the ezLCD I/O connector.
[Note: B default the Command Port is set to USB b the STARTUP macro in the \SYS\MACROS
director of the ezLCD-3xx FlashDrive]
Eventuall , the ezLCD-3xx will be capable of running as a standalone controller. However, man
ezLCD-3xx customers will use the ezLCD-3xx as the user interface in their design and use a
dedicated microcontroller chip or board (PIC, ARM, AVR, Arduino, BASIC Stamp, SBC) to do
their control functions. The microcontroller would t picall communicate to the ezLCD-3xx
through a serial port. The ezLCD-3xx is designed to require the least amount of s stem-dependent
software in order to develop programs as quickl as possible. ASCII commands allow an standard
terminal program to talk to the ezLCD for demonstrating and learning. B configuring a terminal
program to talk to the ezLCD CDC Device (COM Port) ou are able to use our PC to send
commands directl to the Command Port. The Flash Drive allows for bitmaps, macros and fonts to
be stored on the ezLCD-3xx for rapid access. This makes graphics performance independent of host
speed.
A standard USB flash drive interface is automaticall configured on most computers with a USB
port using the built-in MSD driver. The serial interface uses a built-in CDC driver when connected
through the USB. The CDC driver is alread installed in most computers. Under Windows the
driver onl requires the EarthLCD.inf file (which is included on the ezLCD-3xx flash drive) for
configuration.
Unlike LCD’s with built in frame buffers, the ezLCD is a full blown smart LCD client. With it’s
versatile programmabilit , built in widgets, flash based fonts and bitmaps ou can create an analog
meter readout for our project in minutes while onl using a 100 b tes of our host microcontroller
board! Performance is not limited b our host!
6

4.0 Installation and Getting Started
You will need the following before proceeding:
•ezLCD-3xx Smart LCD
•ezLCD-3xx USB Cable or an ezLCD-30x EDK board with USB cable
•A computer with a USB connection (Host)
The 7 steps to install our ezLCD-30x are:
4.1 Connect the ezLCD-3xx USB to Your PC
4. Verify the ezLCD-3xx USB Flash Drive Operation
4.3 Install the USB CDC Driver
4.4 Run the Terminal Program
4.5 Verify Connection
4.6 Flash Drive Access
4.7 “Hello Earth”, Your First ezLCD Program
4.1 Connect the ezLCD SB to Your PC
Connect the USB cable to the ezLCD-30x and then to our PC. The ezLCD-30x will power up and
displa the splash screen (Figure 1). The splash screen appearance will var depending on our
firmware version and ezLCD model. Figure 1 is for a ezLCD-301 with firmware 1.1 and file s stem E.
7
Figure 1

4.2 Verify the ezLCD SB Flash Drive Operation
When ou plug the ezLCD-30x into our PC, a window labeled AutoPlay (Figure 2) will appear on
our computer screen. Select the Open Folder to View Files option.
After clicking on Open Folder to View Files, ou will see a director for the contents of our ezLCD-
30x flash drive. This verifies that the USB flash drive is connected.
4.3a Installing the SB Driver on a Windows 7 Operating System
Note: You must be the computer’s administrator or ha e the password to install
windows dri ers.
Once the ezLCD-30x fails to install automaticall , open up the De ice Manager. The device should be
listed under Other De ices with an exclamation mark next to EarthLCD ezLCD-30x. Right click this
item and select Update Dri er Software.
On the next screen, select Browse my computer for dri er software.
Next, click the Browse button and select the flash drive labeled ezLCD-30x that was automaticall
installed earlier. Click the OK button and click the Next button. This will begin installing the software.
Windows Securit ma prompt ou that Windows can’t verif the publisher of this driver software.
Select the Install this dri er software anyway option. After a moment, the device should be installed
successfull .
When ou click the close button, the device manager should displa our device with a COM port in
parenthesis next to it (Figure 3). Make a note of this for the next step.
4.3b Installing the SB Driver on a Windows XP Operating System
The Welcome to Found New Hardware Wizard will come up first. Click Close to exit the install.
The Flash Driver will install automaticall and the Autoplay window will come up. Close the
Autoplay window and open up the De ice Manager. The device should be listed under Other De ices
with an exclamation mark next to Earth LCD ezLCD-30x. Right click this item and select Update
Dri er.
8
Figure 2

On the following screen, select No, not this time and click the Next button.
Select Install from a list or specific location and click the Next button.
Click the Browse button and select the flash drive labeled ezLCD-30x that was automaticall installed
earlier.
Click the OK button and click the Next button. This will begin installing the software.
The Hardware Installation ma prompt ou that the device has not passed Windows Logo testing to
verif its compatibilit with Windows XP. Click the Continue Anyway button. After a moment, the
device should be installed successfull .
When ou click the Finish button, the device manager will displa our device with a COM port in
parenthesis next to it (Figure 3). Make a note of this COM Port number to use in configuring the
Termie Terminal program in Chapter 4.4.
4.4 Run the “Termie” Terminal Program
Locate the “TERMIE.EXE” serial terminal software program which is located on the ezLCD-30x USB
flash drive and cop the program to our PC then click on it to Run it. Click settings and select the
COM Port number discussed in section 4.3 (Figure 4). Set the Baud rate to 115200, the Data bits to 8,
9
Figure 3
Figure 4

the Parity to None, the Stop bits to One, and make sure to uncheck Monospaced font and Local
echo. Select OK.
For purposes of this manual it is assumed that ou are using ‘Termie’, but most other ASCII terminal
programs will work as long as ou use the same comparable settings .
If ou do not remember the COM port, look in Control Panel/De ice Manager/Port (Figure 3).
4.5 Verify Connection
At the bottom of the Termie program window ou will see a SEND text box. T pe CLS in that box and
press Enter. The ezLCD-30x screen will turn black. T pe PLAY STARTUP and press Enter. The
ezLCD-30x splash screen will re-appear. Your connection test is now complete and ou can begin
programming our ezLCD-30x.
4.6 Flash Drive Access
When accessing the flash drive on the ezLCD-30x ou need to be careful with flash drive access.
1) To avoid problems do not have the flash drive open on the PC while ou are modif ing the contents
with serial commands.
2) When ou finish updating the flash drive contents on the PC, make sure ou eject the drive. The
drive ma be ejected from the PC b right clicking the ezLCD drive letter and clicking EJECT in
Windows Explorer.
3) The flash drive file s stem uses DOS 8.3 format that allows filenames up to 8 characters followed b
a period and a 3 character extension. If ou create a file from the PC with a file name longer that the 8
characters, the ezLCD-30x ou will not be able to access the file without knowing the DOS filename
the PC used to store it. Using the DIR (director ) command from ”Termie” will displa the DOS file
names for ou.
4) If files are changed on the flash drive using the internal ezLCD-30x capabilit , ou must press F5 or
refresh to see the changes on our PC. Example would be “rename serif48.ezf serif50.ezf”. The PC
would continue to show serif48.ezf until ou press F5, refresh or reboot the ezLCD-30x at which time
the PC will then show serif50.ezf.
5) For more information on the Flash File S stem please see section 13.0.
10

5.0 Command your ezLCD with EarthSEMPL
Your ezLCD-30x is reall a computer and like all computers it has a language in which ou can talk to
it in. The ezLCD-30x uses the simplest of languages, which we call Earth Simple Embedded Macro
Programming Language, or EarthSEMPL for short. We will use the terms EarthSEMPL program
and macro interchangeabl in this manual.
5.1 ezLCD-30x Grammar
The s ntax or grammar for EarthSEMPL commands is:
COMMAND {PARAMETER1} {PARAMETER2}...{PARAMETERn}<CR>
EarthSEMPL source code is a free-form ASCII text-line-based language which allows arbitrar use of
white space (spaces or tabs) to format code, rather than column-based or text-line-based restrictions.
ASCII allows almost an editing program to be used for writing our code. Note: ezLCD commands
are not case sensitive (can be upper or lower case letters) except for the ‘ezLCD Upgrade’ command.
Comments ma appear either at the beginning of the line or after a command and must be preceded b
a single apostrohe ( ‘ ) or the command COMMENT.
In the s ntax above, COMMAND is one of the commands from Appendix D.
The PARAMETER can be a number, string, index or comment. Between ever COMMAND and
PARAMETER ou must leave a space, comma or tab.
a) Numbers and indexes inputs are 16 bits and can be decimal, Binar (0b100110111) or Hex (0x3456
or 0h7E54). An number over 16 bits will be truncated.
b) Strings can be an combination of ASCII characters and should be enclosed b a double quote
("String 1”). A string ma also use the back slash as a lead in to an escape character sequence. Current
escape characters supported are;
\n Line Feed
\r Carriage Return
\” Double quote
For example to print a word in quotes on the string ou would print “\”hello\””.
c) Comments start with single quote (') and continue until the end of the line <CR>. 'this is just a
comment
Note: OFF or ON can be used for most commands instead of 0 and 1 for readabilit .
Finall the <CR> represents a carriage return. Note that in our terminal program the carriage return is
sent when ou press enter and is not shown on the screen. If ou use a microcontroller it should send
the carriage return b te (13 decimal or 0D hex) after each command. The carriage return tells
EarthSEMPL to immediatel execute the command ou just t ped. Your terminal program must send a
carriage return after each line of a command and when ou write macros in a text editing program our
11

editor must insert a carriage return after each line of text (Notepad, Wordpad and almost all editors do).
In the included Termie program, it’s important that ou select the Append CR option in SETTINGS.
For Firmware 1.1 and after, ou should select the Append CR-LF option.
5.2 Creating and Saving Macros
EarthSEMPL is an interpreter. This means that the code ou write is executed immediatel which
allows for testing and changing our program immediatel . Although commands run instantl in
command line, the are not saved unless ou assemble them into a file. There are two wa s to save a
macro. One wa is to RECORD it with the ezLCD-30x and the other is to t pe or paste the commands
into an editor on our PC and save as an .ezm file on the ezLCD Flash drive in the
\EZUSER\MACROS director . See Section 6.0 for detailed information on writing macros.
5.3 Always Comment
While the Hello Earth program ma be simple to read and understand for an experienced programmer,
courteous programmers put a comment on ever line. A single quote in a command line tells the
ezLCD-30x command processor to ignore all text after the quote in that line. Your comment should be
a brief description of what that line of code does. So, the Hello Earth program should like this:
‘ezLCD-30x Hello Earth Program
‘Written 9/10/11 by James Harrell
CLS BLACK ‘Clear screen to black
COLOR WHITE ‘Set drawing color to white
FONT SANS7 ‘Set font to SANS7
XY 100 40 ‘Set cursor x=100 y=40
PRINT “HELLO” ‘Print Hello
XY 100 110 ‘Set cursor x=100 y=110
PRINT “EARTH” ‘Print Earth
12

6.0 EarthSEMPL Macros
A macro is a group of commands and can be as short or as long as ou’d like. Macros can be created on
our ezLCD-30x b using the RECORD command. When all the required commands are t ped in for
a macro use the STOP command to stop recording the macro and to save the file.
Studying existing EarthSEMPL macros is the easiest way to learn about your ezLCD. Your
ezLCD includes many examples stored in the \EZSYS\MACROS directory demonstrating the
arious commands. The latest can be downloaded as part of the file system for your ezLCD-3xx
model on it’s product page at the EarthLCD website. The ezLCD-30x latest file system is located
at http://www.earthlcd.com/ezLCD-30x . Note: Substitute your model number for ezLCD-3xx.
The macros can also be created in a text editing program. The Windows application Wordpad works
great for this. To create a macro, open a new document in our text editor and t pe commands just as
ou would in the terminal window. When ou think ou’ve got it right, save the file to the
USER/MACROS folder on our ezLCD-30x USB flash drive as a .txt file, but use .ezm as the file
suffix. Make sure that the file name is 8 characters or less, (not including the “ezm” file suffix). For
example, if ou wanted to save the Hello Earth program from earlier as a macro, ou would enter the
lines of code as the appear in the manual in our text editor and save it. Calling it Hello.ezm is a good
choice, since the word Hello has onl 5 characters.
To run the macro, go back to our terminal program and t pe PLAY HELLO. HELLO EARTH will
appear on our screen exactl as it did when ou t ped the program in line-b -line. To run other
macros just t pe PLAY and the macro name.
One benefit of creating macros with a text editor is that it gives ou the opportunit to test our
programs with the trial-and-error method. For example, if ou’re working out the placement of an item
on screen, ou can enter the XY values, save the macro and run it. If the item placement is off, adjust
the XY values, save the macro and tr again.
Once ou’ve written a program and saved it as a macro, ou can use that macro as a starting point or
template for other macros. You can open up a macro that ou’ve created in our text editor, modif the
code, save it under a new name and ou’ve got a brand new macro.
In addition, there are a number of factor -supplied macros on our ezLCD-30x USB flash drive. Some
are demos and some are tools to help understand the features and capabilities of our ezLCD-30x.
Remember, when ou start creating new macros from existing ones, always make a cop of the macro
into the USER director before ou change an thing.
IMPORTANT NOTE: Sometimes bad macros or not stopping macros b using STOP or the RESET
command will cause the USB port to crash. If ou do a lot of development this wa a separate USB to
serial adapter talking to the ezLCD serial port is recommended. One has been built into the optional
ezLCD-30x-EDK development board.
13

6.1 START P.EZM - Your Most Important Macro
The most important macro on our ezLCD-30x is the startup macro, startup.ezm, which automaticall
runs ever time the ezLCD-30x is powered on. (If ou are familiar with MSDOS it is similar to
autoexec.bat!)
It ma also be used to set default fonts, themes, colors and other ezLCD parameters. Application notes
b EarthLCD will assume ou are using the factor default macro.
Ne er change the default startup macro .
Instead cop the original \EZSYS\MACROS\STARTUP.EZM into the \EZUSER\MACROS
director and then customize it for our application. For images, fonts and macros, including
startup.ezm files, the ezLCD-30x will check the \EZUSER\MACROS director first. If it does not
find it there it will then look in the \EZUSER director .
In rare cases ou ma make our ezLCD inoperable b what ou put in startup.ezm, so we highl
suggest that when ou make a cop of it in the \EZUSER\MACROS director and name it to test.ezm
and run it manuall a few times before changing the name to startup.ezm. T picall when ou develop
an application ou will put it in a macro such as m prog.ezm and during testing run it manuall (t pe
‘pla m prog’ in termie). When done and ou are read to distribute the program ou would add this
line to our startup.ezm in the user director : pla m prog.
14

7.0 Images
The ezLCD-3xx can displa .jpg, .gif and .bmp image files. Example image files are located in our
\EZSYS\IMAGES director . Image files must be kept in our \EZUSER\IMAGES director . To
displa an image file, t pe the command PICTURE or IMAGE into our terminal window followed b
the image name, including the file suffix. The image should match the pixel width and height and
number of colors of the displa characteristics of our ezLCD30x model. To displa properl at full-
screen on an ezLCD-301 all images should be 400 pixels wide b 240 pixels tall, 16 bit color. Images
saved in .gif format offer the smallest file size and fastest load time.
7.1 Resizing an Image in Photoshop
This example is for the ezLCD-301. Other displa s would be slightl different.
Open the image in Photoshop and select the crop tool from the toolbar. With the crop tool selected, set
the width and height ratio of our crop. At the top of the screen are two boxes labeled width and
height. Set the width value to 4 and the height value to 2.4.
Drag the crop tool across our photo diagonall and resize the crop window b grabbing the corner
handles. When ou’re happ with the selected crop area, press Enter to crop the image.
Go to the Image drop-down menu and select Image Size. A dialog box will appear.
Set the Width value to 400 pixels and the Height value to 240 pixels and select OK (Figure 5).
Go to the File menu and select Sa e for Web & De ices. A dialog box will appear.
Set image type to GIF, leave the Transparency button unchecked and set colors to 128. Leave all
other settings at default.
Select Sa e and save to our \EZUSER\IMAGES folder on the ezLCD-30x USB flash drive.
15
Figure 5

7.2 Resizing an Image in Windows Paint
Open the image in Windows Paint. Make sure that under the Paint dropdown menu, Image Properties
the Units option is set to pixels.
Use the Rectangular Selection tool to select the area of the image that ou want to crop. Paint does
not allow for fixed cropping ratios. To overcome this, ou’ll have to watch the pixel dimensions of our
selection box (displa ed at the bottom of the window) as ou size it. To avoid image distortion during
the resize process, do our best to achieve a ratio of 4:2.4. Once ou’ve achieved the desired size,
select the Crop button.
Next, select the Resize button. A dialog box will appear entitled Resize and Skew (Figure 6). Select
Pixels and uncheck the Maintain aspect ratio box. Enter 400 as the horizontal value and 240 as the
vertical value. Select OK.
To confirm that our image has been sized properl , open the Image Properties dialog box again.
When ou’re happ with the appearance of our image, go to the Paint dropdown menu and select
Sa e As. Remember that our file name is limited to 8 characters. Save the image to our
\EZUSER\IMAGES folder as a .gif to ensure the smallest file size possible and fastest load time on
our ezLCD-30x.
16

8.0 Colors
The ezLCD-30x has the abilit to displa up to 65,535 colors simultaneousl . This is referred to as 16-
bit color. You ma input 24-bit colors which the ezLCD-30x converts internall to 16-bit. To ease color
selection, an index of 200 customizable colors are provided internall (see COLORID). The first 168
colors have been preset in our ezLCD-30x, with the remaining colors available for our own custom
colors. Each color has been assigned an index number. The first 16 colors can be referenced b name
or b index. For example, the following two commands will both clear the screen to red:
CLS RED Clear screen to red using color name RED
CLS 4 Clear screen to red using color index number 4
8.1 Set Current Color
To set the current color, t pe COLOR [C] into our terminal program, where {C} is either the color
name or color index number. The current color will remain active until ou change it.
8.2 Set Custom Color
The COLORID command allows ou to set custom colors b entering their RGB values. The first 16
COLORIDs are not changeable.
COLORID [id][R][G][B]
To set a custom color, an index number [id] and RGB values [R][G][B] must be assigned. Use IBM
blue as an example. We know that the RGB values of IBM blue are Red=83, Green=120, and Blue=179
on the RGB scale. To assign IBM blue to color index number 180, t pe the following command:
COLORID 180 83 1 0 179
To test it enter:
CLS 180
The first 168 color values are pre-defined. While it is possible to change the color values from 16
through 168 with the COLORID command, it is not recommended. Instead, use index 169 through 199
for our custom colors. A full list of preset colors with their respective index numbers and color names
can be found in Appendix C.
A macro has been included on our ezLCD-30x which shows the 16 most commonl used colors along
with their color index numbers. T pe PLAY COLORS in our terminal program to run this macro.
17

9.0 Drawing
The ezLCD-3xx has the abilit to draw individual pixels, lines, boxes, circles, circle sections and arcs.
Successive shapes will appear to be la ered on top one another if drawn in the same location. All
shapes are drawn with the current color. To see a demo of some shape examples, t pe PLAY SHAPES
into our terminal program. For more detailed options see the command table in Appendix B.
To draw on the displa ou must first set the current position of the pointer [x][y]. This is done with
the XY [x][y] or XY [align] command. [align] options are LT (Left Top), CT (Center Top), RT (Right
Top), LC (Left Center), CC (Center Center), RC (Right Center), LB (Left Bottom), CB (Center
Bottom), RB (Right Bottom). You can t pe XY <cr> and it will tell ou the current XY position so tr
the different Align options and see what XY is set to. For the ezLCD-301, XY CC follow b XY will
return 199 119. This the center of the screen verticall and horizontall .
Before an drawing, the position must be set. It also can be set from a previous command. Default is
0,0 (upper left corner) after CLS.
9.1 Drawing a single pixel
T ping the command PLOT will modif the pixel at the current position to the current color.
T ping the command PLOT [x][y] will modif the pixel at the [x][y] position to the current color.
9.2 Drawing a line
T ping the command LINE [x][y] draws a line from the current xy position to [x][y], using the current
color and line t pe.
The LINETYPE[option] command gives ou the option to draw a sold, dotted, or dashed line.
Options: 0 = solid, 1= dotted (1 pixel spacing between dots), 2 = dashed (2 pixel spacing
between dashes)
The LINEWIDTH[width] command allows ou to draw either a thin line (width = 1) or a thick line
(width = 3). Onl [width] = 1 or 3 are available.
9.3 Drawing a box
T ping the command BOX [w][h][f] draws a box at current xy position. Replace [w] and [h] with the
desired width and height of the box, in pixels. Replace [f] with either a 0, 1 or f. 0 or no value dictates
an open box, 1 or F dictates a filled box.
9.4 Drawing a circle
T ping the command CIRCLE [r][f] draws a circle at current XY position. Replace [r] with the
desired radius, in pixels. Replace [f] with either a 0, 1 or f. 0 or no value dictates an open circle, 1 or f
dictates a filled circle.
18

9.5 Drawing a circle section
T ping the command PIE [r][s][e] draws a section of a circle (pie slice) at current xy position. Replace
[R] with the desired radius of the section, in pixels. Replace [S] with the start angle at which ou want
the section to start. Replace [e] with the end angle at which ou want the section to end.
9.6 Drawing an arc
T ping the command ARC [R][S][E][F] draws an arc at current XY position. Replace {R} with the desired
radius of the arc, in pixels. Replace [S] with the start angle at which ou want the arc to start. Replace [E]
with the end angle at which ou want the arc to end. Replace [F] with either a 0, 1 or F. 0 or no value
dictates an open circle, 1 or F dictates a filled arc.
19

10.0 Fonts and the Print Command
Your ezLCD-3xx comes with a selection of different fonts pre-installed. T pe the command PLAY
FONTS into our terminal program to run a macro that displa s the factor installed fonts in their
available sizes. The number designation in the font name refers to the height of the font in pixels.
Therefore, the font SANS48 is 48 pixels tall when displa ed on the screen of the ezLCD-3xx.
The ezLCD-30X font converter for windows will allow ou to create and customize new ezLCD fonts
from TrueT pe and OpenT pe fonts. It is available for free download at
http://www.earthlcd.com/ezLCD-301.
To set the current font, t pe the command FONT [font] into our terminal program, where [font] is the
name of the font. It is not necessar to include the font suffix (.ezf). Onl *.ezf can be used.
To test our font, t pe the following into our terminal program:
XY CC ‘goto the center of the screen
FONT NEURO72 ‘select your font file to use
PRINT “HELLO” ‘display the string to screen
The word HELLO will appear in the center of the screen and displa in the NEURO font 72 pixels
tall. The PRINT command alwa s displa s text on the screen of the ezLCD-30x at the current XY
position. When using the PRINT command, be sure to place double quotes around the text ou want to
appear.
In addition to printing at the current XY position, text can also be positioned automaticall to 9
positions relative to the current XY: LT (Left Top), CT (Center Top), RT (Right Top), LC (Left Center),
CC (Center Center), RC (Right Center), LB (Left Bottom), CB (Center Bottom), RB (Right Bottom).
Note: To understand this command visualize our text string as a bitmap or box with characters in it
and this command is positioning the box. Default position is LT. To use this feature, enter the position
information at the end of the PRINT command. For example, we can set the current position to the
center of the screen (XY CC) and then print the text using text justified to the center (PRINT “Hello”
CC):
XY CC ‘set current position to center of screen
PRINT “HELLO” CC ‘print to screen with CC option
20
This manual suits for next models
1
Table of contents