February 2, 2014

[Arduino] 3 wires HD44780 lcd display

When using a HD44780U (parallel) LCD display with Arduino we all are facing the pins run-out problem: using at leas 6 pin is not much a big deal on a 14 digital pins board (e.g. Arduino duemilanove).



Casually yesterday i found an awesome IC, the ST M74HC595, the famous (and useful) 8 bit shift register. The M74HC595 is configured as SIPO register, so it accepts a serial input and serves 8 digital output ports. 

An example of this application (mCu output expander) can be found on this awesome STMicroelectronics Application Note.

With a very simple circuit and a lot of modifications on the LiquidCrystal Arduino Library I was able to drive the 16x2 LCD with only 3 Arduino digital pins!




I was developing the code for about half an hour and i uploaded the LiquidCrystal modded library onto Github, click here.

The library only works with the 4 bit interface mode, the LiquidCrystal functions were left pretty much untouched, only the write/command/send/write4bits library methods were modded to use the Serial2Parallel object.

Parts List:
  • 8 bit shift register SIPO, (ST M74HC595)
  • LCD 16x2 display driven by the HD44780 controller
  • (2x) 10KOhm potentiometer
  • Arduino (my own is an ATmega328p duemilanove
my own small lab


right potentiometer is used to control backlight, the contrast trimmer is actually hide by the red/orange cables upside the display

No comments: