Industry-Standard Alphanumeric LCD Display Info: Industry-standard character-based LCD displays are based on the Hitachi HD44780 chip, or another pin-compatible chip. They typically have 14 pins. Chips controlling larger displays may have 16 pins. (Some may also have an additional two pins for powering the back-light, if the display has a backlight.) Pinouts are as follows: 14-pin Versions: 1: Vss (Ground) 2: Vcc (+5V) 3: Vee (Contrast adjust) 4: RS (Register Select) (0 = instruction, 1 = data) 5: R/W (0 = Write to LCD, 1 = read from LCD) 6: E (Enable) 7: DB0 8: DB1 9: DB2 10: DB3 11: DB4 12: DB5 13: DB6 14: DB7 ("DB" pins are the data bus.) 16-pin versions: 1: DB7 2: DB6 3: DB5 4: DB4 5: DB3 6: DB2 7: DB1 8: DB0 9: E1 (Enable rows 0 and 1) 10: R/W (0 = Write to LCD, 1 = read from LCD) 11: RS (Register Select) (0 = instruction, 1 = data) 12: Vee (Contrast adjust) 13: Vss (Ground) 14: Vcc (+5V) 15: E2 (Enable rows 2 and 3) 16: NC (Not Connected) Vss is, as usual, Ground. Similarly, Vcc is, as usual, the positive power supply of 5 volts. Vee is not actually a power supply connection; It is usually known as "Contrast adjust", and it is exactly that: A signal which varies the contrast of the LCD according to Vee's voltage. The most important thing you should know about Vee is that unlike any other pin on an industry-standard LCD display, Vee TAKES A NEGATIVE VOLTAGE! Vee is normally between 0 and -5 volts; About -3 volts is typical. If you want the user to be able to adjust the LCD contrast, attaching a potentiometer to Vee should achieve this effect. RS (Register Select) chooses whether data is written to the IR (Instruction Register) or the DR (Data Register). For this reason, the RS pin is sometimes labeled D/I. The display is given commands by sending data to the IR, and the display is written to by sending data to the DR. The picture on the display is stored in DDRAM (Display Data RAM), and the DDRAM is written to via the DR. R/W simply selects whether data is to be written or read from the LCD. If R/W is low, the data on the data bus will be stored in the selected register (either IR or DR). If R/W is high, the data in the selected register is placed on the data bus. Enable is the signal to actually perform a read or write operation. When you want to read or write data on the LCD, first set up the RS and R/W pins, then pulse Enable and it will be performed. If your LCD has an additional two pins for the backlight, one is the positive end and one is the negative (ground) end. Typically, these backlights will operate on about 5 volts as well, but usually they use slightly less; In fact, some backlights have a maximum voltage rating of no more than 4.5 volts, and some may even be 3.5 volts. Beware of this, and think twice about connecting the backlight directly to a 5-volt supply. You should also use a resistor (at least 100 to 200 ohms) with the backlight to provide overload protection. Quick-Start For Industry-Standard Alphanumeric LCD Displays: Connect Vcc to +5V and Vss to Ground. Connect Vee to approximately -3V. Add a potentiometer or trimming resistor to Vee if user-variable contrast is desired. Put 00001111 on the data bus. (In other words, set pins DB7, DB6, DB5, and DB4 low, and set DB3, DB2, DB1, and DB0 high.) This is the command to turn on the display, as well as to turn on the blinking cursor. If you would rather not have the cursor blink, leave DB0 low. If you would rather not have the cursor at all, but just want to turn on the display, leave DB1 low. Ensure that RS is low, so the data will be sent to the IR, not the DR (since this is to perform a command, not to write to the screen). Also make sure that R/W is low, because we want to write this command to the LCD, not read anything from it. Now pulse the Enable pin. A blinking cursor should burst into life in the upper-left corner of the display. Now you can try writing characters to the screen. Put some character code on the data bus. (For example, the code for an exclamation mark is 00100001.) Make RS high so the data gets sent to the DR, not the IR (since we want this to be displayed on the screen). Now pulse the Enable pin again, and the chosen character should appear where the cursor was. The cursor will automatically advance to the next space. You can keep pulsing Enable and creating the same character, or you can make new characters by simply changing the state of the data bus. If everything has worked so far, congratulations, you now know how to send commands and data to your LCD. You should get a list of the command set for your LCD so you can perform other basic commands (like setting where the cursor is, etc.) Have fun.