Connect Arduino to LCD with only 2 pins

sn74hc164.png

Shift registers has been mention again and again to free pins for both input and output. This is just another example. I need a LCD display, some buttons, sd card and two extra pins for softSerial communication. I received my LCD and connected it according to the LiquidCrystal reference at Arduino.cc. 7 wires! Where should I put every ting else? I had previously used shift registers when I played with PICAXE years ago. So I started googling for such a solution. And this came up: http://code.google.com/p/arduinoshiftreglcd/ Only a 10K resistor and a diode, and 5 wires less. Bingo:

Arduino2wirelcd.jpg

And this is not all. You can download the library ShiftRegLCD and use in your Arduino sketches instead of LiquidCrystal with minor changes.

 

How wasteful :stuck_out_tongue:

An analog pin, a batch of resistors, and you could read 8 switches from one pin. :slight_smile:

Yes you are right.If I need

Yes you are right.

If I need more pins I might just do that.

But I can read the state of all buttons. One key can act as a shift or clrl key. Or I could add or replace my buttons with a dipswitsh.

BURN!

BURN!