Interface Serial DISPLAY
Interface Serial DISPLAY
USER MANUAL
Adapter Version V1A, V1B - Software V1.2.1
Through out this manual the RS232 to HD44780 compatible LCD controller interface is
referred to as simply the “Adapter”
INDEX Page
Index 1
Command Summary 3
Hardware Description 11
Revisions, changes 23
-1-
RS232 Serial to HD44780 compatible LCD controller interface
Interface board shown component side up. Larger image at rear of this manual.
Caution - Please be extremely careful that your power connections are made
properly. Reverse power or incorrect power will likely cause immediate failure.
Note the location of PIN 1 of the 18 pin connector it is NOT the first pin but rather the
third pin as noted in the drawing above. The first two pins are for LED backlight
supply. On the three pin input/power connector “GND” is the common for both the
+5dvdc supply and the RS232 signal.
For those having used adapters such as this in the past much of what you see here should
be intuitive. Most RS232 signals from microprocessors will be TTL non-inverted. The
enclosed jumper should then be between the center post and the NON INVerted pin
shown in the drawing. If connecting to a personal computer most often the signal needs
INVerting, the jumper would then be from the INVerting terminal to the center terminal.
This is the only jumper required. For testing the jumper can be placed across the TEST
pins (shown above). This will cause a reset of parameters within the microprocessor as
well as generating a continuous string of repeating characters across the display. TEST
continues until the jumper is removed and power is disconnected and restored. There are
three User Control Outputs. Pins 1-3 of the 8 pin dual row connector. Pin 8 (bottom left
of the connector in the drawing above) is the return path for the Output Pins. Note these
are connected directly to the microprocessor and are therefore current limited to a few
milliamps. An LED could be controlled directly but not such high current items as relays.
For software commands if you have used the P.H. Anderson pic controller you will find
the commands used here very similar and in many applications find little modification of
your existing software will be needed, removal of time delays being most common. The
adapter is shipped in the 4x20 display mode, 9600 baud, 8 bit mode, medium display
intensity and heartbeat LED on. Any of these parameters can be easily changed via
software commands. Some require a power down - power up to adapt the display to the
changes made. The adapter can be used with most known display types from 1x6 to the
4x20. If the addressing remains consistent across the display, the display should function.
Displays that will not function are those one or two line displays with split addressing or
a non-sequential address on the same row of characters.
-2-
RS232 Serial to HD44780 compatible LCD controller interface
COMMAND SUMMARY
ENTER COMMANDS EXAMPLE
?a Home Cursor “?a”
?Gyxx LCD row(y) and column(xx) configuration “G420” or “G106”
Change baud 1=300, 2=1200, 3=2400, 4=9600,
?vmvx 5=19200 (change is immediate) “vmv3” =2400 baud
Cursor style x=0 none, =1 blink+underline, =2 blink,
?cx =3 underline. “?c0” = no cursor
?f Clear Screen and cursor to row 0 column 0 “?f”
?Bxx Set Backlight intensity hex 01 to FF, 01=dark “?B80” = medium
Select screen visible at turn on 0=blank,
?Sx 1=default/config and 2=user defined “?S2” = defined screen
Define a line of user screen, characters should be equal
to row defined in ?Gyxx above, pad with spaces if
needed.
Columns equal to columns defined in ?Gyxx starting
?Cx with column 0. “?C0 This is a line “
?i Move cursor forward “?i”
?h Move cursor backward “?h”
?j Move cursor to same column one row up “?j”
?k Move cursor to same column one row down “?k”
Move cursor one space left and empty that space.
?b Destructive backspace. “?b”
?l Clears current line “?l”
?m Cursor to start of current line – carriage return “?m”
?n Cursor to start of next line, that line cleared “?n”
Move cursor to xx position starts with zero and two
?xxx digits are required. “?x05”
?yx Move cursor to y row, y starts with zero “?y1”
?sx Set tab at x position, one digit allowed “?x5”
?t Move to tab position, current line no wrap “?t”
“?D0000a00110e000000”
?Dx Define custom characters, x is character (0-7) creates a smiley face
?R Reload custom characters – used after a change “?R”
?Hx Take user output pin to high level x=1,2 or 3 “?H3”
?Lx Take user output pin to a low level x=1,2,or 3 “?L3”
?Zx Toggles the heartbeat LED on/off x=1= on, all else off “?Z1”
?Ix Selects LCD Interface x=4= 4bit, all else 8 bit ?I4”
?? Sends a question mark? to the display “??”
Multiple commands are acceptable “?y2?x05Hello World?n”
-3-
RS232 Serial to HD44780 compatible LCD controller interface
?a Home Cursor
This command returns the cursor to row 0, column 0. It does not clear the screen.
-4-
RS232 Serial to HD44780 compatible LCD controller interface
?Cx Define the line(s) making up the User Defined Startup Screen
Requires in addition to the ?C at least a single digit representing the line to be edited 0 to
a maximum of 3. The entry needed here will be dependant upon the size of the display
you have selected in the ?G command. If you have selected a 1x40 display you will be
expected to enter a ?C0 followed by 40 characters of your choice. I.e.
?C0b bbbbbbbThisb
b isb
b ab
b controllerb
b test! bbbbbbbbbbbbbbbbbbbb The bb represent spaces and must be
included if needed to complete a line. After the last character is entered the display will
blank and display the changed user line as well as all others stored in memory (at least
that portion which will fit the defined display size). If desired the command can be sent in
its entirety command plus data or fragmented in shorter segments. The command could
be sent first followed by the data on the next line.
-5-
RS232 Serial to HD44780 compatible LCD controller interface
No parameters required. Cursor is shifted one space to the right. There is no effect on
existing test. If at the end of a line the cursor will wrap – move to the start of the next
line. If at the end of the display the cursor will wrap to the start of the display.
?h Moves Cursor Backward one space
No parameters required. Cursor is shifted one space to the left. There is no effect on
existing text. If at the beginning of a line the cursor will wrap to the end of the preceding
line. If at the beginning of the display the cursor will wrap to the end of the display.
-6-
RS232 Serial to HD44780 compatible LCD controller interface
forward or backward as long as the command would cause the cursor to stay on the
current line.
-7-
RS232 Serial to HD44780 compatible LCD controller interface
5V or some negative voltage or perhaps AC of some sort. Pin eight of the eight pin
connector is the GND or return path for these outputs.
-8-
RS232 Serial to HD44780 compatible LCD controller interface
In this example we desire to create a smiley face. The heavy line grid represents our
actual 5x7 pixel character display area. In this area we have put an x in the pixels we
wish to display as black. Now it is a simple matter to generate a binary table from each
row. For instance row 2 or byte 2 would start with the three mandatory zeros, then from
our pixel plot the next 5 pixels going horizontally are off, on, off, on, and off or
expressed in binary 01010 we add the three preceding blank spaces and get binary
00001010 converted to hex is 0a. This hex digit is what the Adapter expects when
programming your custom characters. The command for creating our smiley face would
be D0000a00110e000000. D is the command, the next digit tells the software we are
working on the first of the eight possible characters (numbering starts with zero) then the
next 16 alphanumerics are the hex numbers from top to bottom in the above chart. Really
pretty easy once you work through a few characters. It is easiest to use a table like the
one above so here is blank table for your own use.
-9-
RS232 Serial to HD44780 compatible LCD controller interface
These are:
Baud Rate
Display Size
Data Interface lines to HD44780 (4 or 8)
Initial Screen type to be displayed
Cursor style
LED Backlight Brightness level
User created custom characters
User created custom screen
Once selected these values should remain as set until changed by user interaction.
During power up these parameters are loaded from EEPROM. Also during power up all
custom characters (0-7) are loaded into the HD44780.
Some values are reset to a default mode during the TEST sequence.
These are:
- 10 -
RS232 Serial to HD44780 compatible LCD controller interface
Hardware
Please refer to the Adapter pictorial locate at the end of the Users Manual during the
following discussion.
During hardware design versatility for the end user was of primary concern. The circuit
was designed for an easy connecting of a standard .1”spacing power/data input
connector. Easily switchable input signal conditioning between inverting and non
inverting inputs. An user selectable onboard heartbeat LED. An easily entered parameter
restoring test mode. Crystal controlled microprocessor clock for very accurate baud rates.
Finally attention was given to the varied and different connection methods the Adapter
would have with manufactured LCD displays. Of all the different attachment methods,
one of the first to consider is whether to make the mounting to the back of the LCD semi-
permanent or temporary. By attaching a female socket connector to the Adapter and a set
of male header pins to the LCD display, the adapter can be unplugged and tried with
various LCD displays. The connectors used in this method, though, allow the adapter to
sit fairly high above the LCD and might make this method less desirable. The cleanest
method is just to solder a single male header to both the Adapter and the LCD. This
allows the adapter to sit so close to the LCD that all one needs is a small square of double
sided tape to hold the Adapter securely in place. Ultimately the choice is yours. The
Adapter is supplied with one snapable 16 pin male header. If desired the 16 pin male
header can be separated into two seven pin connectors to allow direct connect to a 14 pin
LCD.
Note also there are TWO versions of the 14 pin dual inline connector. One version starts
from pin one and counts down the row of 7 pins then back up the other row of seven pins
ending with pin 14 across from the pin1. This is the numbering scheme used on
integrated circuits. Version 1A uses this scheme. The other version, which is probably
more common, has staggered counting. Pin two is across from pin 1, pin 3 is below pin 1
and so the first row is numbered 1,3,5,7,9,11,13 and the second row is numbered
2,4,6,8,10,12,14. Version 1 of the board uses this scheme.
While on the subject of connecting to an LCD some important information needs you
attention. Many displays use a standard 14 pin inline connection. All signals required for
display of data are conveyed through these pins in eight bit interface mode. This is
relatively standardized.
(1.) GND
(2.) V+
(3.) Vcon
(4.) RS
(5.) R/!W
(6.) E
(7.) DB0
(8.) DB1
(9.) DB2
(10.) DB3
(11.) DB4
(12.) DB5
(13.) DB6
(14.) DB7
- 11 -
RS232 Serial to HD44780 compatible LCD controller interface
There are two more pins used sometimes at the end of the 14 signal pins, sometimes at
the beginning of the 14 signal pins and sometimes completely separate from the 14 signal
pins. These are used for the LED backlight. Most common is a 16 pin connection with
pins 15 (V+) and 16 (V-) delivering power to the LED backlight. However some displays
have moved these pins 15 and 16 to a place in front of the 14 row of signal pins. The
adapter is designed to work with both. However in giving this versatility the connecter on
the adapter is slightly more complex. If working with an LCD display with the LCD
backlight power connections place at the front of the 14 pin signal pins the Adapter is a
direct connection to the LCD. This shown in the image below (fig 1). The LCD display is
a Datavision 16244-68 2x16 display with a yellow-green LED backlight. Two more
images follow one of the Datavsion LCD (fig 2) by itself and another showing a closeup
of the pins connection (fig 3) and their numbering scheme.
Figure 1 - The adapter is slightly elevated to make the connector pins more obvious (Version 1 Adapter)
- 12 -
RS232 Serial to HD44780 compatible LCD controller interface
Figure 3 - The Datavision 16244-68 2x16 LCD module. Closeup of the connecting pins. Note the pins
16 and 15 precede the pin 1. The Adapter is a direct connect for this module
If the display has the more common 14 pin connection with the LED backlight at the end
of the 14 pins, then the Adapter is shifted LEFT two positions relative to the LCD
connections. This is shown in the attached image (fig 4).
- 13 -
RS232 Serial to HD44780 compatible LCD controller interface
Figure 4 – The more normal connection with the LED backlight being driven by pins 15 and 16 at the end
of the row of 14 signal pins. (Version 1 Adapter)
Please refer to you display datasheet and the pin out of the Adapter to make sure you are
connecting your display properly. Irreversible damage can be done to the Adapter, The
LCD or both if improperly connected. The Adapter is not designed to handle the high
voltage of an electroluminescent display (EL display). Please do not attached the LED
outputs to EL display inputs. The requirements for an electroluminescent display are
quite different.
- 14 -
RS232 Serial to HD44780 compatible LCD controller interface
- 15 -
RS232 Serial to HD44780 compatible LCD controller interface
3 Pin Signal
Pin Number Description
1 Non Inverting (Square PCB Land)
2 Common
3 Inverting
2 Pin Test
Pin Number Description
1 Test (Square PCB Land)
2 Common
3 Pin Input
Pin Number Description
1 Signal
2 +5VDC Supply
3 Common for Supply and RS232 Signal
- 16 -
RS232 Serial to HD44780 compatible LCD controller interface
Permanent attachment of the Adapter to the Datavison 2x16 Display
The Adapter in
action, here a project
is monitoring the
temperature and
voltage of a motor.
Notice on the left the
incoming 5vdc power
and single signal
wire. (The protective
film, still on in this
photograph, diffuses
the display)
- 17 -
RS232 Serial to HD44780 compatible LCD controller interface
- 18 -
RS232 Serial to HD44780 compatible LCD controller interface
Top down view of the Adapter mounted to a 2x16 LCD Display. Notice how close the
tabs of the LCD retainer are to the board. The two tabs under the Adapter were bent over
to prevent their touching the Adapter. (Version 1A Adapter)
- 19 -
RS232 Serial to HD44780 compatible LCD controller interface
The ADAPTER and an Emerging Displays SPC 1 94V LCD Display
Here is an image of a Rev 1B Adapter attached to a 14 pin dual inline Emerging Display
SPC 1 94V. Note the red and black wires for the backlight LED of the display. These are
“plugged” into socket pins 14 (+) and 15 (-) of the Adapter.
In this oblique view notice that this adapter has both an 18 pin inline female header
socket and a dual row 14 pin female header socket attached. This gives the user a lot of
flexibility in the interchange of LCD displays.
- 20 -
RS232 Serial to HD44780 compatible LCD controller interface
Finally here is the end view of the Adapter and the Emerging Displays unit. The adapter
was raised slightly to make the connection more obvious. The user can “fill” the area
between the adapter and the LCD display with a few squares of layered double sided
foam tape to make the installation more permanent.
- 21 -
RS232 Serial to HD44780 compatible LCD controller interface
- 22 -
RS232 Serial to HD44780 compatible LCD controller interface
- 23 -