Hello, I'm using two 74HC595 serial to parallel shift registers to light up 8 bi-colour LEDS - red and green. I have the CLOCK and LATCH pins wired together to work in parallel but separate DATA pins for each so that one controls the red part and the other green.
The problem is when I shiftOut on the second 74HC595 to set the other colour, it affects the first colour. Here's the code:
pinMode(latchPin, OUTPUT); pinMode(clockPin, OUTPUT); pinMode(dataPinG, OUTPUT); pinMode(dataPinR, OUTPUT); digitalWrite(latchPin, LOW); shiftOut(dataPinR, clockPin, MSBFIRST, 192);//Last two red shiftOut(dataPinG, clockPin, MSBFIRST, 3);//First two green digitalWrite(latchPin, HIGH);
A solution is to wire up the OUTPUT_ENABLE pins to stop one from updating, but does anyone have a software solution? Thanks.