Hi all, this is my first post - I've looked around but can't find anyone with the same problem - I'd be hugely grateful for any help. I've been using Arduinos for a while and have successfully used multiple shift registers before using the shiftOut setup but I am definitely no expert!
-
I have 10 x 1m boards set up - each one has 2 shift registers in it. The first one is using all 8 pins and the second is using only 2 pins. So in total I have 10m of track, 20 x 595 shift registers and 100 LEDs.
-
I'm sending out the commands like this (this would be 2 pairs obv):
shiftOut(dataPin, clockPin,MSBFIRST, B00000000);
shiftOut(dataPin, clockPin,MSBFIRST, B00000001);
shiftOut(dataPin, clockPin,MSBFIRST, B00000000);
shiftOut(dataPin, clockPin,MSBFIRST, B00000011);
SCENARIOS (assuming the top of each pair is always B00000000)
- If I send a different bit of data (like above) to each of the second registers - ALL FINE
- If I send the same data to each of the second ones, write for 4 pairs and connect 4 pairs - ALL FINE
- If I send the same data to each of the second ones, write for more than 4 pairs and connect more than 4 pairs - starts doing weird things. The pattern lighting is nothing like what I've written and I just can't work it out.
I'm afraid that after quite a lot of trying, I'm totally stuck.
Just so I'm totally clear, here is the code I'm using for all 10 pairs:
digitalWrite(latchPin, 0);
shiftOut(dataPin, clockPin,MSBFIRST, 0);
shiftOut(dataPin, clockPin,MSBFIRST, 1);
shiftOut(dataPin, clockPin,MSBFIRST, 0);
shiftOut(dataPin, clockPin,MSBFIRST, 1);
shiftOut(dataPin, clockPin,MSBFIRST, 0);
shiftOut(dataPin, clockPin,MSBFIRST, 1);
shiftOut(dataPin, clockPin,MSBFIRST, 0);
shiftOut(dataPin, clockPin,MSBFIRST, 1);
shiftOut(dataPin, clockPin,MSBFIRST, 0);
shiftOut(dataPin, clockPin,MSBFIRST, 1);
shiftOut(dataPin, clockPin,MSBFIRST, 0);
shiftOut(dataPin, clockPin,MSBFIRST, 1);
shiftOut(dataPin, clockPin,MSBFIRST, 0);
shiftOut(dataPin, clockPin,MSBFIRST, 1);
shiftOut(dataPin, clockPin,MSBFIRST, 0);
shiftOut(dataPin, clockPin,MSBFIRST, 1);
shiftOut(dataPin, clockPin,MSBFIRST, 0);
shiftOut(dataPin, clockPin,MSBFIRST, 1);
shiftOut(dataPin, clockPin,MSBFIRST, 0);
shiftOut(dataPin, clockPin,MSBFIRST, 1);
digitalWrite(latchPin, 1);
delay(500);
Can anyone shed any light on this at all - I'm totally confused! Many thanks in advance, Ken