LCD Character Editor for Parallax LCD panels

The Parallax 2×16 or 4×20 LCD panels are inexpensive and easy to use. While limited to 2 or 4 lines of text, they do provide for 8 definable characters. This allows a bit of ‘graphical’ manipulation but, doing so in code can be a bit tricky.  I have developed a small, Windows based editor that lets you specify the target for the code, the type of output you want and a graphical way of creating your character.

The LCD Character Editor

lcdchared

Using the application is simple: when it starts, you have a blank canvas. Click in the white squares to turn them on. Create your character this way. When you are done, click Add and the code to create the character appears in the large window. There are a few things you need to enter prior to Adding the character.

First, you need to name the character.  That really means assigning it a special character number (0 to 7.) Enter that in the ‘Special Character # box. Next, you need to tell it which platform to gen the code for … either the Basic Stamp, in which case it creates BASIC code or Arduino, which generates C like syntax. Next, select the type of code you want. The Source + Header option will create a nice beginning to a project file in BASIC Stamp mode or some generic starter code for Arduino.  Source Only just gives you the code that actually gets sent to the display. It uses the binary format. Hex Code APPENDS the hex version of the binary code. You can then cut the format you want.

Save and Load does just what they say.

Clear allows you to start a new character. And, since this is a one character at a time deal, that is why you have a choice of inserting the header code or not. You can create as many characters as you need, maybe create a library and import the characters you want into your project.

Finally, EXIT just shuts down the program.

All character files are stored as text files with the .BS2 extension, even for Arduino…sorry Arduino fans. This was an oversight and might get fixed in a later version.

I make no warranty about this application. It is free to use, even for commercial works, but you cannot sell it.

It was developed with Visual Studio 2005 and requires .net 2.5. You should not have to install anything if you are running Vista or better.

Code Samples:

I. BASIC STAMP, Header and Source:

=============================
‘   {$STAMP BS2}
‘   {$PBASIC 2.5}

‘ =========================================================================
‘ —–[ Program Description ]———————————————
‘ —–[ Revision History ]————————————————
‘ —–[ Variablew ]————————————————
baud            VAR     Byte            ‘ baud rate variable
‘ —–[ I/O Definitions ]————————————————-
TX              PIN     0               ‘ serial output to LCD
‘ —–[ Constants ]——————————————————-

#SELECT $STAMP
#CASE BS2, BS2E, BS2PE
    T2400       CON    396
    T9600       CON     84
    T19K2       CON     32
#CASE BS2SX, BS2P
    T2400       CON     1021
    T9600       CON     240
    T19K2       CON     110
#ENDSELECT

baud=T9600

HIGH(TX)
PAUSE(100)

SEROUT TX, baud, [251]

SEROUT TX, baud, [%01110]
SEROUT TX, baud, [%11011]
SEROUT TX, baud, [%01110]
SEROUT TX, baud, [%10101]
SEROUT TX, baud, [%11111]
SEROUT TX, baud, [%10101]
SEROUT TX, baud, [%10001]
SEROUT TX, baud, [%10001]

II. BASIC STAMP, Source Only

SEROUT TX, baud, [248]

SEROUT TX, baud, [%01110]
SEROUT TX, baud, [%11011]
SEROUT TX, baud, [%01110]
SEROUT TX, baud, [%10101]
SEROUT TX, baud, [%11111]
SEROUT TX, baud, [%10101]
SEROUT TX, baud, [%10001]
SEROUT TX, baud, [%10001]

III. BASIC STAMP, Hex Code

SEROUT TX, baud, [0xE]
SEROUT TX, baud, [0x1B]
SEROUT TX, baud, [0xE]
SEROUT TX, baud, [0x15]
SEROUT TX, baud, [0x1F]
SEROUT TX, baud, [0x15]
SEROUT TX, baud, [0x11]
SEROUT TX, baud, [0x11]

IV. Arduino

#include <SoftwareSerial.h>

SoftwareSerial s(2,1); //receive on 2, and transmit on 1 aka ‘PB1′ aka pin 6
void setup() {
s.begin(9600);// set baud rate to 9600 baud
s.write(12);// clear screen
s.write(17);// turn on backlight

s.write(248)

s.write(B01110);
s.write(B11011);
s.write(B01110);
s.write(B10101);
s.write(B11111);
s.write(B10101);
s.write(B10001);
s.write(B10001);

You can download it, free, from here: LCD Char Editor

About these ads

One thought on “LCD Character Editor for Parallax LCD panels

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s