• Instruction command register • Data register • When RS = 0 → instruction command register • When RS = 1 → data register VSS, VEE – for power supply VDD – for ground When RW = 0 → write information to LCD RS – Register Select When RW = 1 → read information from LCD RW – Read/Write E – Enable D0 - D7 – data/command pins Code (HEX) Command to LCD instruction register
0x01 Clear display screen
0x10 Shift cursor position to left
0x14 Shift cursor position to right
0x0E Display ON, cursor blinking
0x80 Put cursor to the beginning of the the 1st line
0xC0 Put cursor to the beginning of the 2nd line
0x90 Put cursor to the beginning of the 3rd line
0xD0 Put cursor to the beginning of the 4th line
0x38 Enable lines
Sending commands and data to LCD • Initialize the LCD • Enable LCD lines (0x38) • Turn display on and cursor blinking (0x0E) • Sending commands • Make RS = 0 (select instruction command register) • Send signal to E (enable) • Place command on D0 – D7 • Wait for about 1 ms to let the LCD module run that command • Sending data • Make RS = 1 (select data register) • Send signal to E (enable) • Place data on D0 – D7 • Wait for about 1 ms let the LCD module to write that data on the LCD screen Diagram of 4x16 LCD which shows address of each pixel box