Hardware Reference
In-Depth Information
Figure 14.1
Alphanumeric LCD. (a) Popular 16
×
2 device. (b) Pinout (with HD44780U microcontroller). (c)
Internal layout (16
×
2 8
×
5-dot blocks). (d) Standard 8
×
5-dot exhibition mode (two lines of 7
×
5
characters). (e) Standard 11
×
5-dot coni guration (single line of 10
×
5 characters).
accessed through the 16 pins listed in i gure 14.1b, which include power, contrast,
control, and data.
Circuit Ports
To use this kind of display, the i rst step is to understand its microcontroller. The
purposes of the signals listed in i gure 14.1b are described below.
E (enable, pin 6): Writing into the LCD controller occurs at the negative edge of E ,
whereas reading occurs at the positive edge.
RS (register select, pin 4): '0' selects the controller's instruction register (for initializa-
tion, for example), whereas '1' selects its data register (for the characters to be displayed
by the LCD).
R/W (read/write, pin 5): '1' for reading, '0' for writing. If R/W = '0', the next negative
edge of E causes the present instruction or data to be written into the controller's
register selected by RS . If R/W = '1', data is read from the controller's register at the
next positive edge of E .
DB (data bus, pins 7-14): Bidirectional eight-bit bus for sending/receiving data or
instructions to/from the LCD controller.
BF (busy l ag, pin 14): The microcontroller sets bit 7 of DB to '1' when it is busy,
informing that writing is not allowed. In practice, the use of this signal can be avoided
by adopting for each instruction a time long enough to guarantee completion.
Search WWH ::




Custom Search