You are on page 1of 5

Serial LCD and VFD

Display Module
Technical Manual Rev 1R0

Serial LCD
with 2 lines x
16 characters
display

Serial LCD
with 4 lines x
20 characters
display

LCD Alphanumeric display are increasingly becoming popular among microcontroller hobbyists, and for
good reasons. It can display more human readable
information, does not consume too much power, and
has price tag that keeps falling, thats to name a few.
Even with the just mentioned advantages, not everyone is over eager to have this component plugged
into their circuit. The reason is well known- it is
notoriously tricky to work it in a program. The LCD
want pulses arriving at just the right time. It requires a
number of code functions that need to be coded with
thoughtful timing. This (software generated timing) is
one programming detail that can give a splitting headache to even a seasoned programmer.
On the hardware side, the LCD Display requires 6 to
10 I/O ports. This, again, may present a heavy burden to a circuit with microcontroller that has a low pin
count.

Serial LCD with 2 lines x 16 characters


VFD Display

e-Gizmo serial LCD/VFD module allows you to use


LCD and VFD display with incredible ease, hiding
the troublesome details away from you. With this kit,
displaying message on the LCD becomes a simple
task of printing the message through your MCU
UART port. Whether you are a busy programmer or
a clueless novice, you will quickly appreciate the ease
of use this kit has to offer.

Schematic Description

* LCD - Liquid Crystal Display


VFD - Vacuum Flourescent Display
Page 1 of 5 pages

The circuit (figure 2) is quite simple. It consists of a


zilog z86E04/08 microcontroller U1. This microcontroller performs all the low level functions required to
make your LCD more programmer friendly. R7 allows
you to adjust the LCD contrast to your preference.
Note that R7 does not work with VFD displays. Q1
and Q2 forms the serial interface circuit with the serial
port becoming accessible through CON1 terminal.

2009 e Gizmo Mechatronix Central

Serial LCD

(Reserve)

JP2

1
JUMPER

VCC

R3
RES1

Y1
CRYSTAL
C2
CAP

8
9
10
7
6

C3
CAP

U1
P31/OE
P32/EPM
P33/VPP
XTAL1/CE
XTAL2

Z86E04

VCC

C1
CAP

+ C4
220 uF

11
12
13
15
16
17
18
1
2
3
4

(Reserve)

JP3

R4
RES1

R5
RES1

R6
RES1

VCC

2
1
JUMPER

R1
RES1

Q1
NPN

VCC

R2
RES1

Q2
NPN

Figure 2. Schematic diagram of the Serial LCD Module.

P20/D0
P21/D1
P22/D2
P23/D3
P24/D4
P25/D5
P26/D6
P27/D7

P00/CLR
P01/CLK
P02/PGM

VCC
5
VCC

CON1
1
2
3
4
5

LCD

GND
VDD
VLC
RS
R/W
E
D0
D1
D2
D3
D4
D5
D6
D7
LED +
LED -

LCD1

Tx/SCL
Rx/SDA
GND
VCC
LED VCC

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

HEADER 5

VCC

VCC LED

VCC

R7
POT1

R8
RES1

VCC LED

Page 2 of 5 pages

2009 e Gizmo Mechatronix Central

Serial LCD

GND
14

Pin Description

The serial LCD will work with MCUs operating at 5V


and 3.3V Logic level signals.

CON1
TX
RX
GND
VCC

RX

TX

GND

GND

UART

LED VCC
MICROCONTROLLER

Table 1.
Pin
1
2
3
4
5

ID
TX
RX
GND
Vcc
LED

Description
UART Serial Data Out
UART Serial Data In
Circuit Ground
+5V Power IN
+5V LED Backlight supply

Power Supply
The serial LCD requires a stable 5V source for operation. With LCD displays, the module draws about
25mA supply current. Current shoots up to 100mA
with the backlight LED ON. Make sure your 5V power
supply circuit can source this measure of current. The
LED terminal can be left unconnected if it is not used.

Figure 5. Wiring connection with a MCU. Communication is one way, hence only one signal line is
used.

RX

TX

GND
VCC

GND
VCC

E-Gizmo
RS-232 to TTL
Converter Kit
DB-9

(-)
(+)
To 5V Power Supply

RS-232 link

Figure 6. Addition of TTL-RS232


converter kit will make the serial LCD
work with a PC COMM port.

DB-9

PC
or
RS-232 Device

CON1
TX
RX
GND

(-)

VCC

(+)

To 5V Power supply

LED VCC

Example Connections
The serial LCD is designed to work with ease on
microcontrollers with built in UART peripheral. Of
course, you may also use a UART-less MCU, using
software bit banging technique to synthesize UART
functions. Obviously, bit banging is reserved for more
advanced users, and will not be discussed here.

Page 3 of 5 pages

2009 e Gizmo Mechatronix Central

Serial LCD

Using the Serial LCD


The Serial LCD works with the following communications parameters:

printf(\033E);
Note \033 = ESC character (octal representation)
4. Turn OFF cursor

Baud Rate:
Data Width:
Stop Bit:
Parity:
Handshake:

9600bps
8 bit
1
None
None

The serial LCD recognize and perform the function of


the following control characters:
Back Space BS (0x08)
move cursor to the left by one character
Horizontal Tab HT (0x09)
jump cursor to the right by three characters
Carriage Return CR (0x0D)
move cursor to start of next line from the
current cursor position.
In addition to this, there are three non printing ESC
character sequence to force the LCD display do some
housekeeping chores:
Clear Screen, ESC E (0x1B, 0x45)
Clear the whole LCD screen

printf(\033C0);

Visual Basic 6 Programming Examples


Figure 7 details the connection required if you wish to
use the serial LCD with a PC (or with any other RS232 equipped device).
Visual Basic access to a COMM port can be conveniently implement using VB6 MSCOMM object. The
following examples assumes you are already familiar
with the use of this object. Initialize the MSCOMM
object by selecting your COM port (defaults to COM1)
and then entering the communication parameters as
previously discussed. Activate the MSCOMM object
by executing the MSCOMM portopen method.
mscomm1.portopen= True
The following examples assumes you named your
MSCOMM object as mscomm1.
1. Display hello

Cursor OFF, ESC C 0 (0x1B, 0x63, 0x30)


Turn OFF cursor
Cursor ON, ESC C 1 (0x1B, 0x63, 0x31)
Turn ON cursor

mscomm1.output=hello
2. Display e-Gizmo on third line from current cursor
position
mscomm1.output=chr(13) + chr(13)
mscomm1.output=e-Gizmo

Microcontroller Programming Examples


With the serial LCD connected with your microcontroller as described, displaying message through the
LCD becomes an effortless task as shown in the following examples in C:
1. Display Hello
printf(Hello);

3. Turn ON Cursor
mscomm1.output=chr(27) + C1

Note:

Chr(13) - CR code
Chr(27) - ESC code

2. Display e-Gizmo on next line


printf(\ne-Gizmo);
3. Clear Display

Serial LCD

2009 e Gizmo Mechatronix Central

Page 4 of 5 pages

Figure 8. Component placement layout.

Figure 9. Copper Foil Pattern.

Page 5 of 5 pages

2009 e Gizmo Mechatronix Central

Serial LCD