Limits of stringing of 74HCN595's

I'm new to electronics and Arduino but I have been lurking and studying for a little while now and it is time for me to ask: What is the limit of stringing together the 74HCN595s?

I want to control 96 common cathode RGB LED's.

96 RGB LEDs = 288 pins to control.

288 pins / 8 outputs per shift register = 36 shift registers.

Is it possible to connect 36 74HCN595's together? Any obvious difficulties with this setup? Will the code end up being monstrous? Is there an easier way?

What if I multiplied this x8 and I wanted to control 768 LEDs (2304 pins) with 288 74HCN595's??

96 seems pretty simple, just an 8x12 (or 36 for 3 colors) matrix. Five 8-bit shift registers to drive the 36 anodes, one 8 bit shift registerto pull the cathode low on the part you want to turn on.
Repeat 8 times.

I don't think there is any technical reason why you can't extend the shift registers that deep. The code for updating a long shift register is no different than a short one, just more load cycles.

You can get faster updates if you divide up the shift register into shorter segments. That way you could shift bits into more than one register at a time. You could have one shift register (set) for each color, for example, and have them use a common clock pulse.

This brings me to another question: Is it better to put all three RGB anondes on the same shift register?

At first I thought it might be easier but with only 8 outputs and 3 leads per LED there would be no way to get an even number of LEDs per shift register.

I figure that all the reds will be on the "red" leads will be together and all the "green" and "blues will be the same.

So the order the LEDs would be connected to the string of shift registers would be:

Red 0-95, Green 0-95, Blue 0-95

Instead of:

R1, G1, B1, R2, B2, G2

So you're gonna have something like this for efficient control, yes?
(which is an 8x8 triLED matrix with another 8x4 added to the side)

So you have one shift register on the side pulling the cathodes low while 5 along the top drive the anodes high.
You shift out the 5 on top to set up the anodes, then pulse the first row low to make the selected LEDs flash.

Shift out the set of anodes, pulse row 2 low.
Shift out anodes, pulse row 3 low.
For the cathodes, you wouldn't even need a shift out - just clock out a 0, turn the output enable on/off.
Shift the anodes, 1 cathode clock to move the 0 along, pulse the OE.
I would put current limit resistors on the the anode pins, and use a hefty current sinking part on the cathode pins if you plan to drive lots of anodes at the same time.

If instead you plan to only drive 1 anode at a time (or not for it to be off), then a different approach would work - you shift a 1 across with PWM say and hold the cathode low while you work the anodes on across the row.
This would work well for driving 1 device together:
have all the Reds go out of two devices (one for 8, one for the 2nd 4), same for Blue, same for Green - then you drive 3 anodes with PWM for varying color intensity, go to the next, go to the next, working across the row.
Still need decent cathode current sink as you would have 3 LEDs on at once, say 60mA of current worst case.

Please fill us in more on your application, maybe you want more brightness, or just steady on all the time, and multipexing isn't really the way to go.

It is an LED wall. It will need to have the ability to have all LEDs on for extended periods. Max brightness would be good too. :slight_smile:

I was just going to follow this but repeat 36 times.

I had originally drawn up this schematic that multiplexed all the LEDs.

I could only print it to an XPS doc and cant output to a jpeg but I was able screen cap a portion of it.

Basically, all the cathodes are wired in rows and each row has an NPN transistor which is connected to a pin on the Arduino.

The anondes are wired in columns and have NPN transistors on each one, which is controlled by the Arduino. The problem with that it was limiting in the max size of the array.
With the shift registers there is no multiplexing and I can control each color of each LED individually, no?

"With the shift registers there is no multiplexing and I can control each color of each LED individually, no?"
Yes, that is correct.

Get rid of the 1uF cap, that will just screw up your signal.
If you have not bought parts yet, I would not use 74HC595 - go with something that can sink more current, like TPIC6B595.
HC595 seems to be only sped'ed for 6mA - LEDs can typically go 20mA, so if you want max brightness use a part that can deliver it.

Do you have the LEDs already? If not, I would go with common anode, and let the 6B595 pull the individual cathodes low to turn the LED on, vs trying to pump the current out.
I am looking for 16 bit shift registers as well, help you cut down on parts count.

No I don't have the materials yet. I really like those ideas?

What is the advantage of switching the circuit and using the common anodes and using the shift registers to turn the LED on by going low?

edit: Dang those TPIC595's are expensinve. That might be a little overkill at 150 mA per pin. I only need 20-25 mA. Is there something in between?

Or better yet, is there a place where I can see these pins next to similar pins and browse for something that might be more suitable for my application?
This one is good for 24mA. $0.56 at

Lot easier to find parts that can sink higher current vs a part that can source higher current.

I did a search at,,, looking for shift register availability and price and then looking at family type for what they had current wise.
CMOS logic not that good for hight current. Really need what would be considered older style technology, or adding current drive parts to CMOS parts like HC595, HCT595, 4000 series.

I'd rather see you use this part
Good for +/- 24mA of output current, much better than the HC595.
$0.56 at

How does this look?

What do Pin0, Pin1, etc go to? The Arduino?
You are feeding shifting from the bottom one into the top one?
I'd have to review the datasheet again to confirm the shift-out to shift-in connection, but I'd say you have the idea.

I don't know what's going on with Newak and the Fairchild part. Looks like the part has gone into a last-time buy mode (i.e. will no longer be made) and their datasheet will no longer open, and the $0.56 parts are now $2.25! TI has the same part, but only in surface mount, for $1.36 in small quantities.

I'm going to look around some more, see what mouser, digikey, arrow/avnet, gerber have.

Mouser is showing 487 of the Fairchild DIP parts for $1.35 each, go snag some while you can.

Or get a HC595 ($0.56) & ULN2803 (Toshiba $0.45) for slightly less and do some more wiring.

Okay, this is bizarre - I searched for 74ac299PC at Newark, and they have the $0.56 pricce again

GerberElectronics is showing the National Semiconductor version for $0.27.

$50 min order tho. Can buy all 162 they have & not meet that!
Take one for the team, buy 'em all & resell here!
Nice datasheet tho, easy to see where the serial in/out connections are

What do Pin0, Pin1, etc go to? The Arduino?
You are feeding shifting from the bottom one into the top one?
I'd have to review the datasheet again to confirm the shift-out to shift-in connection, but I'd say you have the idea.

Well I just connected everything best I could. I'll be honest I don't fully understand what all the pins do on the 74ACT299. I have a good understanding of what is going on with the 74HC595's thanks to these tutorials:

On the 74ACT299:
I don't understand why there are two function select inputs and why there are two enable inputs.
I don't understand a lot of the inputs to be honest. Which is the latch pin? Which is the data pin?

I still don't understand why this is better than using the 74HC595s but I think I have an idea of what is going on just not as much as with the 74HC595s.

I was thinking about the 74ACT299 and maybe 24mA per output could potentially be too low. I know it can vary but I don't think any 5mm LED will go over 30mA for any color. And, it's a bit hard to tell without physically having the LEDs since a lot of ebay sellers seem to be just copying/pasting the data for their LED's (or that is the way it looks to me). So I think something that can sink 30 mA per pin would be enough to ensure maximum brightness for all LEDs and all LEDs can be on simultaneously.

The 74AC299 is better for its current sink/source capability. The 74HC595 was designed to interface with other logic chips, not for driving LEDs.

24mA will be plenty. Most LEDs have limits of continuous On current approaching 30mA. Don't plan on running them that high.
If you get some 20mA, 5,000mcd LEDs from for 5-6 cents, or from, they will amazingly bright at 20mA.
I just just used some of the reds, 2 in series with 100ohm resistor, and 2 blues in parallel with single 200 ohm resistor, they are bright.
If you are buying 20mcd LEDs, those will not be too bright at all.

I have 20 74ac299s on the way from newark.
download this datasheet
I think it makes it a lot clearer what the connections are.
The part can be parallel loaded (vs just shifting in from 1 pin), and the bits can be shifted left to right, or right to left. So more of a universal part, can be used as a shift-in or as a shift-out register.
I will do some reading and check back in tomorrow. Have a pounding hedache tonight for some reason.

I'm sorry to hear about your headache. :frowning:

What does right shift and left shift mean?

You can shift from Q0 towards Q7, or from Q7 towards Q0.

Ok that was the datasheet for a 54F299 but you are saying to get the 74AC299S right?

So using it as a current sink we are actually using the I/O as inputs?

It says on the datasheet that the DC VCC or ground current per output pin is +/- 50 mA what does that mean?