4-Bit LCD Interface Notes
4-Bit LCD Interface Notes
Schwartz
Dept. of Electrical and Computer Engineering John A. Martiney, TA
Page 1/7 Revision 0 15-Mar-12
4-bit LCD Interface Notes
LCD Panel Pinouts and Connections to CPU (for data bus connectivity)
Verify that the position of pin 1 on your
LCD board. There should be a 1 next to LCD Board Pinout
pin 1 and a 10 next to pin 10. My LCD
board is arranged as shown to the right.
The register select signal (RS) can be
viewed as an address input and can be LCD
connected directly to the CPUs address
pin A0. This bit selects between the two
addressable registers called Command
(with A0=0) and Data (with A0=1).
The enable pin (E) is the chip select/enable 10 1
for the LCD. A memory mapped decoded
E signal must be created for enabling/disabling this device. The LCD can be considered a write-only device. [If
you want to read from the device, DB7 is the busy flag (BF) that when clear means the LCD is ready for the
next command. If this is done the delays in the below flow chart are unnecessary.]
You can verify that your LCD works properly before connecting your LCD data pins. Give power to the device
and twist the potentiometer one way or the other until you see black lines appear.
Data or commands are read at the falling edge of E.
D3-0
(4-bit operation)
RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
0 0 0 0 1 0 n/c n/c n/c n/c
University of Florida EEL4744 Dr. Eric M. Schwartz
Dept. of Electrical and Computer Engineering John A. Martiney, TA
Page 3/7 Revision 0 15-Mar-12
4-bit LCD Interface Notes
Normal Further Initialization
<Wait 40us or till BF=0>
<INITIALIZATION COMPLETE>
Clear Home
Enable 2-line mode
Write out $01 with a
Write out $28 with a delay between each
delay between each nibble
nibble