Two wire interface for LCD with shift register on Attiny85

In an earlier article “Two wire interface for LCD with shift register“, I discussed  how to make a two wire interface for an LCD and use that on the Arduino.
Obviously if there is any chip  in the AVR arsenal that would benefit from only having two wires necessary for  an LCD, it is the Attiny (85/45/25). It is very well possible to use this interface with an Attiny as well.
As in the linked article I use the LCD interface from F. Malpartida and I use the following program:

#include <LiquidCrystal_SR.h>

LiquidCrystal_SR lcd(0,2,TWO_WIRE);
//                   | |
//                   | \-- Clock Pin
//                   \---- Data/Enable Pin

void setup(){
  lcd.begin(16,2);               // initialize the lcd
  lcd.home ();                   // go home
  lcd.print("LCD with 2 wires");
  lcd.setCursor ( 0, 1 ); // go to position
  lcd.print("on Attiny85");

void loop(){

There are various cores available for the Attiny85 and I have tried a couple. Some will not work with this (a hoist of errors regarding the ‘print.h’ file), but the Attiny core from David Mellis works for me.

IMG_20150316_210709 IMG_20150316_210943 IMG_20150318_091311

I found out that I had some trouble using the I2C port on an Attiny85 if I also used this 2 wire LCD, I am not sure yet where the problem is, maybe some shared timers or maybe  the HC164 needs serious decoupling. Anyway, if you are using I2C on an Attiny, you might as well use an I2C LCD as well.

Leave a Reply

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

You are commenting using your 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