I am having a hard time finding succinct tutorials regrading the initialization of an LCD controller. I have read in the datasheet there is a specific sequence of bits that should be sent to the LCD. Such a initialization sequence is presented here:
I simply cannot follow the information presented here. I can see that the first few steps require the user to power the device, wait a sufficient amount of time, and then set the state of a few data lines. I can understand through the following:
Assuming we use the byte format as follows: D7 D6 D5 D4 RS RW X X
- Power on
- wait >40mS
- Write 0011 0000 => 0x30
- wait >4.1mS
- write 0011 0000 => 0x30
- wait >100uS
- write 0011 0000 => 0x30
After which I have no idea. I have scoured the datasheet and have found little explaining the references to N, I/D, D, B, F, C shown below (some not shown). Further, any tutorial I have read often references a mysterious "Function Set" (i.e. below with Function set: interface is 8 bits long ?) that am unsure about.
The actual LCD model that I have is: WH2004A-CFH-JT# But from what I have read, most LCDs are derivatives of the HD44780
As such, my first attempt at initializing this display was going to be realizing the sequence given in the datasheet for that display.
Are there any good resources that would be recommended? Can anyone explain what the "Function Set is and the associated variables B, C, F, I/D .. etc?
Further, is it that once in 4-bit mode that information is sent to the LCD simply by first presenting the 4-bit nibble of the highest data bits (7, 6, 5, 4), clocking in that data, and then repeating with the lower-bit nibble?