Go Down

### Topic: Maximum Number of 595's ? (Read 4519 times)previous topic - next topic

#### zooto68

##### May 17, 2009, 05:33 pm
I would like to hook up my Arduino to an 8x8 array of 8x8 Dot Matrix Bi-colour modules. Hence making a total of 64 Dot Matrix modules with 8192 LED's in total.

I want to use 74HC595's to drive them and will obviously need 3 per module making a total of 192 Shift Registers in total.

Question is - Has anyone done this before and if so will it work? A lot of data will need to be shifted out for each screen refresh. Will this amount overdo it?

#### RuggedCircuits

#1
##### May 17, 2009, 06:26 pm
One thing I'd worry about is the maximum current handling of each 74HC595 -- datasheet suggests it's only 70mA total for the entire package, so you can't really count on all outputs driving LED's.

I'm also not getting the math on how an 8x8 LED array needs only 3 74HC595's so maybe I'm missing the point entirely (apologies if so).

#### zooto68

#2
##### May 17, 2009, 06:43 pm
You'd only need 2 if it was single colour. One for the anodes and one for the cathodes. As it's bi-colour I'll need 3. I'm using multiplexing.

70mA should be fine, remember you are only displaying one row at a time in each module.

#### zooto68

#3
##### May 17, 2009, 11:58 pm
Like this for example - http://www.vimeo.com/4223943

#### RuggedCircuits

#4
##### May 18, 2009, 12:05 am
That's pretty sweet!

My gut feeling is that if you're doing multiplexing AND trying to scale to 192 74HC595's you will overload the processing capabilities of a single Arduino.

If it were me I'd either do some heavy math computation to estimate how this will scale or use a digital I/O pin being set high when the Arduino is "busy" and low when it's idle then use an oscilloscope to get a sense for how burdened it is in real-time, then estimate how many separate 8x8 displays a single Arduino could handle.

#### florinc

#5
##### May 18, 2009, 01:12 amLast Edit: May 18, 2009, 01:20 am by florinc Reason: 1
This RGB matrix project here
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1238559959/15
concludes that the time spent in ISR (to display (shiftOut) the video memory, I would guess) is 50%. And this is only 1 RGB LED matrix (4 x 595s).
You would also have to spend some time doing heavy bit shifting (for scrolling).
Another aspect is the "video memory": 8192 LEDs means at least 8192 bits, that is 1KB (out of 2).

#### zooto68

#6
##### May 18, 2009, 01:32 am
50% sounds a lot to me. The ISR routine is simply reading the contents of the display buffer then doing a shiftout routine to the 595's. Even though the ISR routine is running around 100 times per second to reduce flicker, in most cases the display won't need to change 100 times per second. As long as the output buffer is changed around 25 times per second it will be seen as smooth motion.

Either way, i'd need to find out what is the maximum number one Atmega168/328 could handle. If I need to use more than one 'core' to get the job done then so be it. One chip could handle a small number of arrays, like 4x4 or something and a central chip could simply spit out data to the relevant display buffers. Of course i've not done this so i'm talking theoretically.

#### florinc

#7
##### May 18, 2009, 01:43 am
I guess you could cut down the shiftOut time (in ISR) by coding in assembly (accessing the ports directly?).
If the display time for 1 RGB is 50%, you can hardly connect 2 RGBs per processor, I would assume.

#### zooto68

#8
##### May 18, 2009, 02:02 am
A lot more than 2 can be connected to an Arduino. Take a look on YouTube, there are lots of examples using multiple arrays.

#### florinc

#9
##### May 18, 2009, 02:09 am
Well, are you sure that they use 595s and just one ATmega328?
Can you point to one example?

#### zooto68

#10
##### May 18, 2009, 03:16 am
Not an Atmega - But here is one with 4 modules - http://www.youtube.com/watch?v=DGhbB2cKexs

Heres one with 3 - http://www.youtube.com/watch?v=078FYPaZ8QE

#### rocketgeek

#11
##### May 18, 2009, 05:05 am
Your output speed will be limited by the processing capabilities of the Arduino. Flashing all of those shift registers is going to take a lot of time. If you divide them into eight strings of 24, writing each cycle is going to take 192 cycles through your loop. Since eight flashes are required to write the entire array once (due to the muxing), you're looking at a minimum of 1536 loop cycles to write to the whole display once. With reasonable amounts of cleverness in C or assembly, you can probably cut the loop execution to and average of four instructions per cycle, or 6144 instructions for a write. That can be accomplished in 0.4 ms, which is probably fast enough for most purposes, but is going to consume most of your computing resources.

#### azi

#12
##### May 18, 2009, 12:59 pm
I am using 8 shift registers per 3 pins, for totally controlling 225 relays, It worked for me event without transistors, just connected straight to the 595 output, but i supply current to shift registers from pc hard disk cable because there is 5V 12A so enought for that many registers. But actually here I don't care much about refresh rate, because relays maximum switch speed is about 8ms

#### Grumpy_Mike

#13
##### May 18, 2009, 03:01 pm
Quote
Of course i've not done this so i'm talking theoretically.

I have just been playing with a single 8X8 matrix multiplexed in software with the Arduino this weekend. No shift registers, column drivers straight off the data pins, row drivers from a demultiplexer (74LS42) so only 4 pins with direct port access. I am having to refresh at a rate of 2mS to stop any flickering.
2ms * 8 = 16mS per frame so about 60Hz, I am not confident about doing more.

#### zooto68

#14
##### May 19, 2009, 02:55 pm
In which case, i'd need some kind of external Circuitry. So the question now becomes - Can anyone tell me what I can use to drive lots of arrays at once for a display? With the Arduino just sendign serial commands maybe?

Go Up