2

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:

enter image description 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?

4

1 回答 1

1
B ->  The character at the the cursor position blinks when B = 1
Blinking is performed by switching between all blank dots and the display character

C ->  The cursor is displayed when C = 1 and is not displayed when C = 0.
The cursor is displayed as 5 dots in the 8th line when the 5 x 7 dot character font is selected and as 5 dots in the 11th line when the 5 x 10 dot character font is selected. 

    enter code here

D ->  The display is ON when D = 1 and OFF when D = 0. The DD RAM contents remain unchanged.    

Function set specifies of 
    1. DL -> number data length (4 bit or 8 bit) 
        Data sent or received in 8 bit lengths (DB7-DB0) when DL = 1
        Data sent or received in 4 bit lengths (DB7-DB4) when DL = 0 
    2.N -> Sets number of display lines.
    3.f -> Sets character font.

After setting function set , set CGRAM Address and DDRAM Address (Refer Data Sheet)

即检查BF标志的读写操作是否执行。

这可能会对您有所帮助...

于 2013-12-23T04:40:36.293 回答