74HC595 in parallel

Hi all, I've been lurking around for some time now, but this is my first time posting ^^

I'm making a big led matrix using 9 of those 8x8 bi-color matrices, so I'll have a 24x24x2 led matrix.
Since I'll have to control 1152 led's I'm a little concerned about the refresh rate if I use just one pin to send data to the shift registers, my idea was to control the shift registers in groups of three, three registers controlling the rows, three controlling the red column and three controlling the green column, but the real question is, how can I control these groups simultaneously?
I want to send the data to them at the same time, hoping to improve the frame-rate, does anyone know how can I do that?

Thanks in advance.

Connect all the clock and latch pins together, then run a data line to each shift register.

Something like this will update 8 SRs at the same time.

for (i = 0; i < 8, i++) {
    PORTx = mydata[i];  // organise to SRs are all on the same port
    digitalWrite (clockPin, HIGH);
    digitalWrite (clockPin, LOW);
}

digitalWrite (latchPin, HIGH);
digitalWrite (latchPin, LOW);

If you only want to do 3 then some bit manipulation is called for. And the above needs the data to be stored in an array with all the "0" bits in the first byte, "1" bits in the second byte etc which may or may not be a pain depending on how the data is generated.

You could write the data bits with a series of digitalWrite()s and shifts but I suspect the end result would be no faster than doing N shiftOut()s.

A really fast way to do it is to use the SPI hardware and put your SRs in series.


Rob

Graynomad:
...
A really fast way to do it is to use the SPI hardware and put your SRs in series.

Which is very easy to do! This method will transmit about 1 byte every 1µs (fast spi with FOSC/2, 8MHz bit clock).

Here is a link I posted on the old forum on how to perform software pwm on daisy chained 595s using SPI.
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1278251011

Also, if you don't want to use SPI for some reason, may also check out using direct port manipulation to speed up your shift out.
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1254488619

Good luck and have fun.