Specifications
The LCD has three control lines, Read/Write, enable and register select. It has a
processor on board with two registers that are accessed via its bus. In this case a 4-bit
bus was used due to a lack of I/O pins available. There are two registers to write too on
the LCD; the first is the control register the second is the data register. These use the
same bus but are selected by the register select control line. The Read/Write control line
is always kept low to signify that the registers are continuously being written to. The
control register allows the user to configure the type of cursor and style of display. It is
also important for being able to move the cursor around the display. To write to the 8-
bits of data to control register the actions taken are shown in figure 24.
Register Select = 0
Enable = 1
Write the high 4 bits of
the data to the data
lines
Toggle the enable low
then high
Register Select = 1
Delay to let data settle
Write the low 4 bits of
the data to the data
lines
Delay to let data settle
Enable = 0
Figure 24 Writing to the LCD command register
The register select is set to 0 to select the command register and the data line is then
enabled. The high 4 bits of the command are written to the data lines and a short delay
is allows the data lines to settle. Toggling the enable line initiates a new write cycle and
the low 4 bits of the command are written to the data lines. A small delay allows the
data to settle and enable is set back to zero and the select line is set to one to select the
data register.
To display characters, the character needs to be written to the data register. This is done
in the same way as writing to control register except that at the start Register select is
set to 1 instead of 0. Before data can be displayed on the screen. the LCD needs to go
through a strict initialisation procedure.
The initialisation of the LCD module is done as shown in figure 25.
53










