These are serial shift registers, indeed, and they would work with the
SPI
port on the '12. Suspect it would be easier to use the 595 because of
its
internal buffer structure that makes it more suitable for SPI. You would
hook up MOSI to the SHIFT CLOCK input of the 74HC595, SCLK to the SHIFT
CLOCK input of the shift register, and SS# (or any convenient port pin, set
up as an output) to the LATCH CLOCK input of the shift register. The minimal
hardware version would be to run the LCD in 4-bit mode, so the shift
register would output the 4 data bits, plus the three control signals
typically needed by the LCD-R/W#, A0 (register select), and E. The data
sheets for the LCD panel (which basically echo the HD44780 data sheet) show
you the signal sequence needed to drive the LCD. The software required is
not theoretically difficult but a little laborious because you're
effectively emulating an old 6800 parallel bus interface, using the SPI bus,
one bus state at a time. Each 8-bit SPI bus transfer must set the three
control signals appropriately, and the four data bits. You could also run
the LCD in 8-bit mode, but then you would need to cascade two 74HC595's
in
series, so that you can build the three control signals.
Hope this is helpful.
Best regards,
Kerry Berland
Silicon Engines
2101 Oxford Road
847-803-6860
Fax 847-803-6870
Des Plaines, IL 60018 USA
-----Original Message-----
From: hc08jb8 [mailto:]
Sent: Thursday, January 08, 2004 11:30 AM
To:
Subject: [68HC12] HCS12 LCD with 74HC164 or 74HC595
Hi All,
I have seen some schematics where a HD44780 based LCD is hooked up
using 74HC164 or 74HC595 (serial shifter chips, I guess), this mode
only uses a few pin resource on the MCU. I did look at the datasheets
of the 164/595 but couldnt figure out much on the software part.
1.) How does the MCU talk to these chips and effectively control the
LCD?
2.) Is it using SPI protocol?
3.) If I need to initialise the LCD and start sending strings to
display, where should I start?
Thanks in advance
Jay
--------------------To learn more about
Motorola Microcontrollers, please visit
http://www.motorola.com/mcu
o learn more about Motorola Microcontrollers, please visit
http://www.motorola.com/mcu
_____
> Service.
|