Sie sind auf Seite 1von 5

Serial LCD and VFD

Display Module
Technical Manual Rev 1R0

LCD Alphanumeric display are increasingly becom-


ing popular among microcontroller hobbyists, and for
Serial LCD good reasons. It can display more human readable
with 2 lines x information, does not consume too much power, and
16 characters has price tag that keeps falling, that’s to name a few.
display
Even with the just mentioned advantages, not every-
one 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
Serial LCD
thoughtful timing. This (software generated timing) is
with 4 lines x one programming detail that can give a splitting head-
20 characters ache to even a seasoned programmer.
display
On the hardware side, the LCD Display requires 6 to
10 I/O ports. This, again, may present a heavy bur-
den to a circuit with microcontroller that has a low pin
count.

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,
Serial LCD with 2 lines x 16 characters displaying message on the LCD becomes a simple
VFD Display 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

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


zilog z86E04/08 microcontroller U1. This microcon-
troller 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.
* LCD - Liquid Crystal Display
VFD - Vacuum Flourescent Display
Page 1 of 5 pages ©2009 e Gizmo Mechatronix Central Serial LCD
Page 2 of 5 pages
VCC
D
R1 R2
RES1 RES1
CON1
1 Tx/SCL
2 Rx/SDA
3 GND
4 VCC
VCC
5 LED VCC
Q1 VCC
R4 NPN HEADER 5
+ C4 RES1 VCC LED
C1
CAP 220 uF
Q2
R5 NPN
RES1
C
VCC
VCC VCC
5

R3
RES1 U1 R6 R7 VCC
8 11 RES1 POT1 LCD1
VCC

P31/OE P00/CLR
9 12 1
P32/EPM P01/CLK GND
JP2 2 10 13 2
P33/VPP P02/PGM VDD
3
VLC
(Reserve) 7 15 4
XTAL1/CE P20/D0 RS
1 Y1 6 16 5

©2009 e Gizmo Mechatronix Central


XTAL2 P21/D1 R/W
JUMPER 17 6
P22/D2 E
18 7
P23/D3 D0
CRYSTAL 1 8
C2 C3 P24/D4 D1
2 9
CAP CAP P25/D5 D2
3 10

GND
B P26/D6 D3
4 11
P27/D7 D4
12
D5
Z86E04 13
D6
JP3 2 14

14
D7
15
LED +
(Reserve) 16
LED -
1
JUMPER R8 LCD
RES1
VCC LED

Serial LCD
Figure 2. Schematic diagram of the Serial LCD Module.
Pin Description The serial LCD will work with MCUs operating at 5V
and 3.3V Logic level signals.
CON1

TX
RX
GND
RX TX
UART
VCC GND GND

LED VCC
MICRO-
CONTROLLER

Table 1.
Figure 5. Wiring connection with a MCU. Commu-
Pin ID Description nication is one way, hence only one signal line is
1 TX UART Serial Data Out used.
2 RX UART Serial Data In
3 GND Circuit Ground
4 Vcc +5V Power IN
5 LED +5V LED Backlight supply
RX TX E-Gizmo
RS-232 to TTL
Power Supply GND
VCC
GND
VCC
Converter Kit

DB-9
The serial LCD requires a stable 5V source for op- (-) (+)
To 5V Power Supply
eration. With LCD displays, the module draws about
25mA supply current. Current shoots up to 100mA RS-232 link

with the backlight LED ON. Make sure your 5V power


supply circuit can source this measure of current. The Figure 6. Addition of TTL-RS232 DB-9
LED terminal can be left unconnected if it is not used. converter kit will make the serial LCD
work with a PC COMM port.
PC
or
RS-232 Device
CON1

TX
RX
GND (-)
To 5V Power supply
VCC (+)
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 printf(“\033E”);

The Serial LCD works with the following communica- Note “\033” = ESC character (octal representation)
tions parameters:
4. Turn OFF cursor
Baud Rate: 9600bps
Data Width: 8 bit printf(“\033C0”);
Stop Bit: 1
Parity: None
Handshake: None
Visual Basic 6 Programming Examples
The serial LCD recognize and perform the function of
Figure 7 details the connection required if you wish to
the following control characters:
use the serial LCD with a PC (or with any other RS-
232 equipped device).
Back Space BS (0x08)
– move cursor to the left by one character
Visual Basic access to a COMM port can be conve-
niently implement using VB6 MSCOMM object. The
Horizontal Tab HT (0x09)
following examples assumes you are already familiar
– jump cursor to the right by three characters
with the use of this object. Initialize the MSCOMM
object by selecting your COM port (defaults to COM1)
Carriage Return CR (0x0D)
and then entering the communication parameters as
– move cursor to start of next line from the
previously discussed. Activate the MSCOMM object
current cursor position.
by executing the MSCOMM portopen method.
In addition to this, there are three non printing ESC
mscomm1.portopen= True
character sequence to force the LCD display do some
housekeeping chores:
The following examples assumes you named your
MSCOMM object as mscomm1.
Clear Screen, ESC E (0x1B, 0x45)
– Clear the whole LCD screen
1. Display “hello”
Cursor OFF, ESC C 0 (0x1B, 0x63, 0x30)
mscomm1.output=”hello”
– Turn OFF cursor
2. Display “e-Gizmo” on third line from current cursor
Cursor ON, ESC C 1 (0x1B, 0x63, 0x31)
position
– Turn ON cursor
mscomm1.output=chr(13) + chr(13)
Microcontroller Programming Examples mscomm1.output=“e-Gizmo”
With the serial LCD connected with your microcon- 3. Turn ON Cursor
troller as described, displaying message through the
LCD becomes an effortless task as shown in the fol- mscomm1.output=chr(27) + “C1”
lowing examples in C:

1. Display “Hello” Note: Chr(13) - CR code


Chr(27) - ESC code
printf(“Hello”);

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

Das könnte Ihnen auch gefallen