<Wait 15ms>
RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 0 0 0 0 1 1 x x x x x=don't care
RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 0 0 0 0 1 1 x x x x
RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 0 0 0 0 1 1 x x x x
RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 0 0 0 0 1 1 N F x x 8-bit operation N=Number of `lines' 0 for 1/8 duty cycle -- 1 `line' 1 for 1/16 duty cycle -- 2 `lines' F=font, 1 for 5x11 dot matrix 0 for 5x8 dot matrix
RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 0 0 0 0 0 0 1 0 0 0 Display off, cursor off, blink off
RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 0 0 0 0 0 0 0 0 0 1 Clear screen, cursor home
RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 0 0 0 0 0 0 0 1 1 0 Increment cursor to the right when writing, don't shift screen
<INITIALIZATION COMPLETE>
NOTE: Remember to turn the display back on and set up the cursor as desired with a Display On/Off control command.
After the fourth instruction, which switches the module to 4-bit operation, the control bytes are sent on consecutive enable cycles (no delay is required between nibbles). The most significant nibble is sent first, followed immediately by the least significant nibble.
<POWER ON>
<Wait at least 15ms>
RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 0 0 0 0 1 1 n/c n/c n/c n/c
RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 0 0 0 0 1 1 n/c n/c n/c n/c
RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 0 0 0 0 1 1 n/c n/c n/c n/c
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 4-bit operation From now on all transfers must take place in pairs, 1 nibble at a time.
<Wait 40us or till BF=0>
RS R/W DB7 DB6 DB5 DB4 0 0 0 0 1 0 0 0 N F x x N=Number of `lines' 0 for 1/8 duty cycle -- 1 `line' 1 for 1/16 duty cycle -- 2 `lines' F=font 1 for 5x11 dot matrix 0 for 5x8 dot matrix x=don't care
RS R/W DB7 DB6 DB5 DB4 0 0 0 0 0 0 0 0 1 0 0 0 Display off, cursor off, blink off
RS R/W DB7 DB6 DB5 DB4 0 0 0 0 0 0 0 0 0 0 0 1 Clear screen, cursor home
RS R/W DB7 DB6 DB5 DB4 0 0 0 0 0 0 0 0 0 1 1 0 Increment cursor to the right when writing, don't shift screen
<INITIALIZATION COMPLETE>
NOTE: Remember to turn the display back on and set up the cursor as desired with a Display On/Off control command.