LCD Controllers using an HD44780 Display Controller are commonly used for small batch electronic devices, and are popular with electronics fans worldwide. One problem with those controllers is their demand for IO-lines, due too the parallel interface they require at least 7 IO lines.
One solution, if you don’t have enough IO ports to spare, is to use another Display, like serial cellphone displays, which are cheap and color is a great thing to show off. Or you can expand the number of IO lines by using a shift register or TWI device. This is one such implementation using a 74hc164 shift register. It is based on an implementation by Peter Dannegger. If you prefer to use a 4094 cmos shift register, there are also schematics floating around the net.
The idea behind this implementation is to fill the shift register from the microcontroller using hard- or softspi, then toggle the hd44780’s enable pin. While toggling, the data pin determines the R/S state of the display.
The demo software will print a hello world message onto the display, it is written for AVR microcontrollers, it should work – after modifying the ports and pin numbers – on almost any AVR. Peter Daneggers original software is written for 8051 µCs, I don’t know of any code for PICs.
lcd.tar.bz2 (2.30 kiB, 2009-03-31)
lcdshift.pdf (13.73 kiB, 2009-03-31)
lcdshift.sch (94.29 kiB, 2009-03-31)
lcdshift.brd (12.28 kiB, 2009-03-31)