Specifications

Chapter 6 - Samples
Previous page Table of contents Chapter overview Next page
LCD Display
More microcontroller devices are using 'smart
LCD' displays to output visual information. The
following discussion covers the connection of a
Hitachi LCD display to a PIC microcontroller.
LCD displays designed around Hitachi's LCD
HD44780 module, are inexpensive, easy to use,
and it is even possible to produce a readout
using the 8 x 80 pixels of the display. Hitachi
LCD displays have a standard ASCII set of
characters plus Japanese, Greek and
mathematical symbols.
A 16x2 line Hitachi HD44780 display
Each of the 640 pixels of the display must be accessed individually and this is done with a number
of surface-mount driver/controller chips mounted on the back of the display. This saves an
enormous amount of wiring and controlling so that only a few lines are required to access the
display to the outside world. We can communicate to the display via an 8-bit data bus or 4-bit
data bus.
For a 8-bit data bus, the display requires a +5V supply plus 11 I/O lines. For a 4-bit data bus it
only requires the supply lines plus seven extra lines. When the LCD display is not enabled, data
lines are tri-state which means they are in a state of high impedance (as though they are
disconnected) and this means they do not interfere with the operation of the microcontroller when
the display is not being addressed.
The LCD also requires 3 "control" lines from the microcontroller.
The Enable (E) line allows access to the display through R/W and RS lines. When this line is low,
the LCD is disabled and ignores signals from R/W and RS. When (E) line is high, the LCD checks
the state of the two control lines and responds accordingly.
The Read.Write (R/W) line determines the direction of data between the LCD and microcontroller.
When it is low, data is written to the LCD. When it is high, data is read from the LCD.
With the help of the Register select (RS) line, the LCD interprets the type of data on data lines.
When it is low, an instruction is being written to the LCD. When it is high, a character is being
written to the LCD.
Logic status on control lines:
E 0 Access to LCD disabled
1 Access to LCD enabled
R/W 0 Writing data to LCD
1 Reading data from LCD
RS 0 Instruction
1 Character
Writing data to the LCD is done in several steps:
Set R/W bit to low
Set RS bit to logic 0 or 1 (instruction or character)
Set data to data lines (if it is writing)
Set E line to high
Set E line to low
Read data from data lines (if it is reading)
http://www.mikroelektronika.co.yu/english/product/books/PICbook/6_10Poglavlje.htm (1 of 11) [4/2/2003 16:19:08]