74HC595 SR output

For my PV battery charge monitor the LCD (standard/common LCD 16x2, HD44780 interface) and SR (shift register 74HC595), now called DISPLAY, is mounted remote from Arduino and input stuff. To keep the number of wiress between input and DISPLAY low I am using SR at the LCD with 3 data lines and LiquidCrystal595.h, as per the circuit at http://cdn.instructables.com/F3B/7OL2/H … MEDIUM.jpg from http://www.instructables.com/id/Hookup- … /?ALLSTEPS .

#include <LiquidCrystal595.h>    // include the library
LiquidCrystal595 lcd(7,8,9);     // datapin, latchpin, clockpin

void setup() {
    lcd.begin(16,2);             // 16 characters, 2 rows

    lcd.clear();
    lcd.setCursor(0,0);
    lcd.print("Wow. 3 pins!");
    lcd.setCursor(0,1);
    lcd.print("Fabulous");
}

void loop() {
    // not used.
}

The LCD works fine, but I now need 2 more legs for additional outputs, e.g. piezo, LED.

My problem is that I can’t get the unused SR outputs (Q5, Q6…) to work.

I have tried various steps including this from author …

One thing I need to point out though, is that your code (sketch) fails to illuminate the backlight. You’ve responded to others above saying this is achievable by adding EITHER lcd.setLED1Pin(HIGH) OR lcd.setLED2Pin(HIGH) - but for me, ONLY the call to lcd.setLED2Pin(HIGH) illuminates the backlight.

Others seem to be puzzling over this and missing the additional instructions in these comments.

So, just to summarize, you need to add a call to lcd.setLED2Pin(HIGH) just after the call to lcd.begin();

I tried this but get IDE error 'class LiquidCrystal595 has no member named LED1Pin', etc

And this, which I can’t find

I also document how to turn on and off the backlight in my post to transcendtient dated Jun 2, 2013. 4:30 AM

So what I am looking for is how to add/change existing code to get the SR unused Q outputs to function as per Arduino commands, without interference with the LCD 16x2.

Can you help?

Thanks in advance.

Newbie10:
So what I am looking for is how to add/change existing code to get the SR unused Q outputs to function as per Arduino commands, without interference with the LCD 16x2.

Seems to me you can modify the existing library or just use similar methods to write to bits 5 and 6. Of course when using a SR you'll also be writing to all the other bits too but so long as you don't clock the strobe/enable line, those bits should be ignored. I'd leave them all 0's, setting bits 5 and 6 as you desire and then use the *shiftout()* function, same as your SR library does.

http://arduino.cc/en/Reference/ShiftOut

You could declare 4 constants w/the bits set every possible way and then set a variable to the constant desired and shift that variable out. Or just set the variable = 0 and then set the bits 5/6 as desired (and then shift out). Your choice.

http://arduino.cc/en/Reference/BitSet