You should be able to get any number of chips to work. I did some work on them here:
You need to chain them by connecting pin 9 of the first chip (Q7') to pin 14 (DS) of the second chip, and then pin 9 of the second chip to pin 14 of the third chip and so on.
I found the sketch a bit confusing, but with your 11 chips something like this should push a pattern onto all of them
[quote author=Nick Gammon link=topic=103839.msg778899#msg778899 date=1335843371]
Can you define "works" for me? You say it works if you disconnect the wire, but "the LEDs blink in an unrecognizable pattern all the way down the board". So it doesn't work? What happens with the wire connected, exactly?
[/quote]Works means LEDs light up in some way, even if not as intended. Doesn't work means LEDs don't light up at all.
David82:
Works means LEDs light up in some way, even if not as intended. Doesn't work means LEDs don't light up at all.
You can check your wiring by simply bypassing the first couple of chips. In other words, connect MOSI not to the first chip but the third one. See what happens then.
I do have Q7 -> DS connections going down the whole array as you described but I also have:
Shift register clock pin of chip one -> Shift register clock pin of chip two going down the whole array AND
Storage register clock pin (latch pin) of chip one -> Storage register clock pin (latch pin) of chip two going down the whole array as per the image below. Is that the wrong way to wire them?
[quote author=Nick Gammon link=topic=103839.msg778909#msg778909 date=1335844444]
You can check your wiring by simply bypassing the first couple of chips. In other words, connect MOSI not to the first chip but the third one. See what happens then.
[/quote]Which pin is MOSI? And what about the other data/latch pin connections going from the arduino to the first chip? They can just be left there while only moving the MOSI jumper?
I'm hoping you made a mistake with your diagram because D13 is SCK (which you have not connected) and D12 is MISO which you have connected but should not have.
And what about the other data/latch pin connections going from the arduino to the first chip? They can just be left there while only moving the MOSI jumper?
Look at the circuit on my page. You parallel up SS and SCK. MOSI (D11 from the Arduino) goes into DS on the first chip. Then the output of that chip (Q7') goes to DS on the second chip. And so on.
I've got it wired as you described and am using the code you recommended but am getting nothing.
Arduino D13 goes to SH_CP 11
Arduino D11 goes to DS 14
Arduino D10 goes to ST_CP 12
What can I do to troubleshoot it?
nope, they don't. I don't have the capacitors and 20k resistor like you show in your diagram. Is that critical? If I unplug the 5V jumper from the arduino, they all light up.
If I unplug the 5V jumper from the arduino, they all light up. Also, if I go back to your original code, they all blink randomly except the LEDs on the first two chips.
If I use the a modified version of your code (pasted below), then each one lights up and stays on, one by one until it gets to the end. Then they just randomly blink in no discernible order. I need to be able to send COM commands (0-87) which would light up any of the LEDs depending on the number entered. Similar to the first example code in the ShiftOut tutorial.
Looks like Christmas lights alternating on and off except even more randomly. What was it supposed to look like? If I pick one, at random, and watch it, it blinks at one rate, turs off briefly, then on for a bit, then back to blinking. Seems to be no pattern to them all. Is there a way I can tell each specific one to turn on or off?
Note that the green wire only goes to pin 14 of the first chip. Then pin 9 of the first chip goes to pin 14 of the second chip (from the right). Then pin 9 of the second chip goes to pin 14 of the third chip, and so on.
With that code the LEDs should alternate exactly every 200 mS. No randomness.
Remember mine wouldn't work at all until I unplugged the 5V jumper going from the arduino to the breadboard. Once I did that, I finally got life out of it. Maybe that is a clue to some other issue. Other than that, Mine is wired just like yours. How about sending COM commands to turn each one on or off individually? Would that be a simple bit of code?
What 5V jumper? You've lost me there. There should be 5 wires going from the Arduino to the breadboard, as pictured above.
This is what it should look like:
If it doesn't, you have a wiring issue.
How about sending COM commands to turn each one on or off individually? Would that be a simple bit of code?
I'm not sure what you mean by COM commands. From where? The 11 x SPI.transfer() instructions will shift out the 11 x 8 bits (88 bits) in about 22 microseconds, much too fast to see. So all you have to do is set up the pattern you want to see in those 11 bytes before shifting it out.
It's hard to demo because I don't have 32 LEDs plugged in.
Say you want every second LED on. Then each byte would be 0xAA. It might be easier to visualize in binary ...
David82:
Remember mine wouldn't work at all until I unplugged the 5V jumper going from the arduino to the breadboard. Once I did that, I finally got life out of it. Maybe that is a clue to some other issue. Other than that, Mine is wired just like yours. How about sending COM commands to turn each one on or off individually? Would that be a simple bit of code?
You cant just chose what you feel like wiring and what not... Things have a reason to be on the schematic, including decoupling caps... Otherwise, its quite normal it wont work properly !!
If I unplug the 5v jumper on the arduino, the LEDs light up and flash/blink. If it's plugged in, nothing works. See green arrow in image below. By COM commands I'm saying I want to be able to use the Serial Monitor to tell each and any individual LED to turn on or off. Once i'ts finally at that level, I can begin to write the software for it.