User’s Manual 45
Before running the LCD_DEMO.C sample program, you will need an LCD based on the
HD44780 (or an equivalent) controller.
LCD_DEMO.C—demonstrates a 4-bit interface to an LCD based on the HD44780 (or an
equivalent) controller.
Connect the LCD to Parallel Port A.
PA0—LCD DB4
PA1—LCD DB5
PA2—LCD DB6
PA3—LCD DB7
PA6—LCD RS Register Select
(0 = command, 1 = data)
PA7—LCD E:normally low, latches
on high to low transition
The R/W pin and DB0–DB3 on
the LCD are grounded. DB0–DB3
are not used with a 4-bit interface.
This sample program only involves writing, and that is why we ground the R/W pin.
VEE is used to control brightness—the simplest thing to do is ground it. If you need to
control the brightness, you can connect a potentiometer between ground and -5 V, with
the arm going to the VEE pin. Check the specs on the LCD before doing this as some
LCDs may require a different connection. VCC is +5 V and VSS is ground.
PA2
PA1
PA3
PA6
PA7
Jackrabbit
Prototyping Board
J3
34
56
910
LCD
DB4
DB5
DB6
DB7
RS
E
DB0
DB1
DB2
DB3
R/W
VCC
VEE
PA0
+5 V
-5 V
VEE
10 kW
Optional Brightness
Control