Instructables
Picture of 3-Wire HD47780 LCD for less than 1 dollar
In this instructible we will learn how we can hook up an LCD based on the HD44780 chipset to the SPI bus and drive it with only 3 wires for less than $1. Although I will focus on the HD44780 alphanumeric display in this tutorial, the same principle will work pretty much the same for any other LCD which uses an 8 bit parallel data bus, and it can be very easily adapted to suit displays with 16 bit data buses.
The HD44780 (and compatible) based alphanumeric displays are usually available in 16x2 (2 lines consisting of 16 characters) and 20x4 configurations, but can be found in many more forms. The most 'complicated' display would be a 40x4 display, this sort of display is special as it has 2 HD44780 controllers, one for the upper two row and one for the bottom two rows. Some graphic LCDs have two controllers as well.

The HD44780 LCDs are great, they are very cheap, readable and quite easy to work with. But they also have some drawbacks, these displays take up a lot of I/O pins when connected to the Arduino. In simple projects this is not a concern, but when projects get big, with a lot of IO, or where certain pins are needed for things such as an Analog read or PWM, the fact these LCDs require a minimum of 6 pins can become a problem.

But we can solve this problem in a cheap and interesting way.
 
Remove these adsRemove these ads by Signing Up
RagnarR11 month ago

one shift register has few free pins, can these be used for button inputs or maybe even temperature sensors?

ArthurTC (author)  RagnarR11 month ago

The 595 is a serial in -> parallel out device, it can't read in data.

You can use the remaining free pins to turn on LEDs, or for some other purposes, but as digital output only.

pmk2223 months ago

this might be a stupid question but what do you do with the "keywords.txt", "liquidcrystal_spi.cpp", and "liquidcrystal_spi.h" files?

ArthurTC (author)  pmk2223 months ago

I wrote an Arduino library to use with this backpack. You put the files in your Arduino libraries folder.

Even though I have an entry in this contest, I think this is useful and helpful enough to warrant a "hostile" thumbs up, and a vote!
I have voted for both contests you are entered in.
I think I may even use this to add an LCD readout to the LED cube as a diagnostic readout, and information screen (what pattern is running on the cube, or in diag mode, the value os variables being used, etc).
ArthurTC (author)  SuperTech-IT1 year ago
Thanks a lot, I really appreciate it :)

I've updated the article, check out the italic bold text on the last page :)
I've recently bought a similar LCD and found it an I/O hog for my project. This is definitely the solution I was looking for. Keep sharing such great stuff!