Using an LCD in any hardware project allows the builder to increase the appeal with relative ease. The LCD that is discussed below is a 16 by 2 LCD with enough ram to hold 80 characters. The following information should apply to most standard 16 by 2 LCD (I used an Emerging Technologies LCD while refering to Sharp LM16255 spec sheets).
Connecting the LCD to your Project
The LCD specifies that an MPU (microprocessor unit) is required. This is not the case, for testing purposes I hooked the LCD up to switches on a prototype board ( I would be the first to admit this is not the fastest way to write to the LCD ). I have used an LCD in both a MC 68000 and a FPGA project, discuss circuits required in each case.
FPGA
Connecting a LCD to a FPGA is relatively simple
providing that the FPGA has been programmed correctly. When connecting to an FPGA,
you must insure that the FPGA can provide the required voltage and current to run the
LCD. If the FPGA meets the power requirements then the LCD can be connected to
the designated pins on the FPGA. There are many ways to connect a LCD to an FPGA, in
the documented case there is no data bus or address decoding.
A sample circuit of the contrast circuit is given in the next section.
MC 68000
When connecting a LCD to the 68000, power requirements should not be a
big concern. However, since there will be other peripheral on the 68000 bus (VMEBUS)
there is a need to perform address decoding.
Contrast Control
Contast is fairly simple, just your basic voltage divider. If Vo
is grounded then the contrast is dark and if Vo is five volts then the contrast is
light. The circuit below gives a circuit that allows for adjustable contrast.
Some of the commonly used LCD Commands
LCD Control Commands
The following control commands require that the register select line is
low.
Function Set : %00111000 : $38 :
Sets the LCD for 2 line display.
Home Cursor : %00000001 : $01 : Moves the cursor to
the home position
Clear Display : %00000010 : $02 : Clears the display
ram.
Cursor Mode : %00000110 : $06 : Set cursor to
increment on write and turn off screen shift.
Cursor: :
%00001111: $0f : Enable cursor, make cursor visible, and make
cursor blinking block
Switch Location: %1xxxxxxx: $xx : Last seven bits indicate new
cursor position. $c0 places cursor at beginning of the second line
LCD Character Commands
All character commands require that the register select line is
high. Most standard ASCII characters can be written to the LCD, if a character
is not recognized by the LCD it will come out as a solid block.
Michael Holden 346386
Milton Mah 341428
Korrey Scott 237118