LCD Interfacing (8bit Mode)
...................................................................................................................................
Introduction:
This application note describes a simple technique to display characters from both the internal character generator and user designed characters on an LCD character module.The controlling microcontroller is a Atmel 89C52, a derivitive of the popular Intel 8051. The LCD module is connected to the microcontroller through its I/O ports. It could also be connected directly to the data bus with the addition of address decoding logic.
The process of displaying character to this module is divided into three steps. First the module must be initialized. This sets up the built-in LCD controller chip. Second, some user designed characters are uploaded to the CGRAM. This allows the displaying of up to 8 custom characters in addition to the 192 character permanently stored in the module. Lastly, a message consisting of a mix of standard ASCII characters and custom designed characters is displayed on the module.
LCD Pin descriptions
The LCD discussed in this section has 16 pins. The function of each pin is given in Table.
Pin Symbol I/O Description
1 Vss - Ground
2 Vcc - +5V Power supply
3 VEE - Power supply to control Contrast
4 RS I RS = 0 to select command register RS = 1 to select data register
5 R/W I R/W = 0 for write, R/W = 1 for read
6 E I/O Enable
7 DB0 I/O The 8-bit data bus
8 DB1 I/O The 8-bit data bus
9 DB2 I/O The 8-bit data bus
10 DB3 I/O The 8-bit data bus
11 DB4 I/O The 8-bit data bus
12 DB5 I/O The 8-bit data bus
13 DB6 I/O The 8-bit data bus
14 DB7 I/O The 8-bit data bus
15 LED- I Ground for LED backlight
16 LED+ I +5v for LED backlight