Let's Make Robots! | RobotShop

Connect Arduino to LCD with only 2 pins

Free up to 5 pins.

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:

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


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

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

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.