Skip navigation

Today, I followed the guide at http://www.arduino.cc/playground/Code/LCD3wires on using a shift register to conserve pins when using an arduino.  As a standard HD44780 LCD requires four data lines, an enable line, a read/write line, and a register select line, it would use at least 7 of the arduino’s 20 input/output pins, some of which you will be using for other purposes.

The board is simple, with half a dozen of the LCD’s 16 pins going to power and ground, for logic and LED backlight power, as well as contrast, although in some conditions you will need a potentiometer for it(pin 3).  The first time I tried to build this, it didn’t work, probably because I used the wrong IC ( I just got 10 74HC595’s from eBay around the time I ordered the LCD).  I used the example that came with the LCD3wire library rather than the example on the site.  I am planning to migrate this to the 74ls164, for which an easier library exists and which uses one less pin, or the 74hc595, which I have more of, and works the same way.

The program displays a random fruit on the first line and the text “Score: 6/7” on the second.  The code needs to be modified so that lines = 2 for a 2 line display(obviously).

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: