INFORMATION FILE FOR HD44102 20x4 CHARACTER LCD =============================================== (C) ARNE ROSSIUS 2006 http://www.elektronik.de.vu HD44102 LCD PINOUT Parallel Pin Port Function ------------------------------------------- 1 14 CS2 2 17 CS1 3 18~25 GND 4 - V_CC (+5V) 5 - V_LCD (approx. -5V) 6 16 RS (Command = 0, Data = 1) 7 18~25 R/W' 8 1 E 9 2 D0 10 3 D1 11 4 D2 12 5 D3 13 6 D4 14 7 D5 15 8 D6 16 9 D7 HD44102 COMMANDS Display off: 0x38 Display on: 0x39 First Page: 0x3E + (Page * 0x40) Start Address: (Page * 0x40) + Y Auto-Decrement: 0x3A Auto-Increment: 0x3B Data: each byte is a column of 8 pixels (7 pixels for the character and one for the cursor). MSB = cursor pixel. Note that address Y=0 is on the right, so increment means writing data from the right to the left. Usually you will want to set the Y address to 49 and then write data from left to right. Also note that there is no "clear display"-command. A datasheet with the complete command list is available at http://www.datasheetarchive.com/search.php?q=HD44102CH HD44102 LCD MEMORY MAP Contr. 1 Contr. 2 /^^^^^^^^\/^^^^^^^^\ ,----------------------, | AAAAAAAAAAAAAAAAAAAA | <- Page 0 | AAAAAAAAAAAAAAAAAAAA | <- Page 1 | AAAAAAAAAAAAAAAAAAAA | <- Page 2 | AAAAAAAAAAAAAAAAAAAA | <- Page 3 '----------------------' \________/\________/ 49......0 49......0 <- Y address Controller 1 (select with CS1 = High) controls the left side of the LCD (first 10 characters in every line), controller 2 controls the right side. It might be a good idea to enable both controllers during initialisation so you only need to send the commands once.