How many output 595 shift register I can use in series ?

Hello, I intend to use an atmega with arduino bootloader, and im willing to use 12 shift registers.

Is it possible to conect 12 595's in series ? (using digital pins)

Thank you

In theory there's no limit realistic to the number of shift registers you can put in series. Obviously you have to get the wiring right but that's not too hard and there are several examples around.

In practice you''ll need to watch the load time. If you're using shiftOut then it's “bit banging” under the hood and that can be quite slow. If you use the SPI interface to blast your bits down the wire then it can easily go at then times the speed!

The importance of this depends of how fast you want to update your output values. If, like me, you're doing analogue simulation using PWM (old school) or BAM (bit angle modulation, lots of fun!) then you'll need something a little faster!

Hope this helps!

There is no limit as to how many you can daisy chain, other than the memory requirements and time needed to set all the outputs (more outputs require more time).
That being said 12 shift registers are no big deal. It can easily be done.

Im not interested about the speed (i just hope it has less than 1sec lag) , as all the outputs will be led indicators.
ive made some eagle pcb here
so far so good i hope

Shpaget:
There is no limit as to how many you can daisy chain,

Yes there is. Both the clock and the latch pins of all the shift registers need to be connected to one arduino pin each. The number of logic inputs one arduino output can drive is determined by the technology of the shift register. If you exceed this you will have to buffer these two lines in batches of n, where n is less than the number of gates you can drive with one pin.

in other words I can drive 12 595's with 3 uC digital pins , right ?

You might also want to add some decoupling caps to your design. One 0.1uF for every Vcc input on each IC.

why should i complicate even more the board by adding one cap on each ic, instead of increasing the total capacitance of the one filter cap ?

just asking dont be insulted

thebadtall:
why should i complicate even more the board by adding one cap on each ic, instead of increasing the total capacitance of the one filter cap ?

just asking dont be insulted

Because you want it to work properly and don't want to come back here in a week or two saying 'I am using x shift registers to do xyz, but I'm getting intermittent behaviour, can anyone help' :stuck_out_tongue:

Any idea what the first answer to such a question might be? :wink:

thebadtall:
why should i complicate even more the board by adding one cap on each ic, instead of increasing the total capacitance of the one filter cap ?

It doesn't work that way. You want a capacitor near each chip so it can supply immediate extra power. Think of it like the tank on your toilet -- each one in your house has its own reservoir; you don't have a big tank on the roof for all your bathrooms.

Good luck!

thebadtall:
why should i complicate even more the board by adding one cap on each ic, instead of increasing the total capacitance of the one filter cap ?

just asking dont be insulted

Because that is the most effective means to cut down the digital switching noise from the source of the noise, at the chips, using bypass filter caps of the appropriate size, not too small or larger then needed.

Lefty

thebadtall:
in other words I can drive 12 595's with 3 uC digital pins , right ?

What sort of 595s are you talking about? TTL, LS HC or what?

well allright but instead of one on each ic cant I use one 0,22 on 4? also that cap should be electrolytic or unpolarised ?
its not about cost , just I want to have it with as less parts as possible because I will
make the pcb's using toner transfer and want to have thick trace for upper and down layer

about the 595's im talking about the 74HC595 ic by the way that its used on the arduino playground example

No. As has been pointed out, the decoupling cap needs to go as close to the power pins of each IC as possible. It is small and fast, to keep the IC supply rail propped up to cope with very short transients.

Just 0.1uF ceramic cap at each IC.

Read this
http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html
For best results decouple every chip with a 0.1uF ceramic capacitor, other types will not work as well.

You have to have a low impedance path from power and ground pins to the decoupling
capacitor for it to work properly. That means short wide traces (ideally groundplane). Its
not the resistance that matters at all (never an issue with logic chips), its the inductance
that matters at these speeds, and shorter wider traces have less inductance. The timescales
involved are a few ns.

Every logic chip needs decoupling, its not optional.

okey, considering your information and knowlege
i have now made this , putting 0,1uF ceramic capacitor near each IC

Thank you very much for your info and help.

In general, you should consider using ground (and power) planes or fills instead of traces. Try to avoid right-angle traces as well, especially for high(er)-speed signals.

You're using vias on a board you will be making with toner transfer? Brave. :wink:

The decoupling thing comes up almost daily around here. If you haven't had enough finger-wagging, just browse back a few pages to read plenty of other threads about why you need them.

A Rule of thumb for me when I was designing boards was that as suggested use a copper pour for Vcc on one side of the board and Gnd on the other... If that proves difficult... then pre route the two planes It looks like the router wasn't assisted by pre routing and locking power and ground. using a star topology. Power and ground rails should be about 2 to 3 X the width of the signal (control) 'wires' when a good ground plane isn't possible. Even thicker doesn't hurt. Neither would buffering the data every second or third chip. This is done to break up the loading on the Arduino and thus increase it's speed capabilities. The other end is the necessity of the 100 nF caps.
There is a LOT of talk about missing caps but you will never hear about too many bypasses..
The other thing is that holes are nearly free, SMD pads are free and it's most expensive to add a hole or 'scrape a pad' later to add missing bypasses but costs nothing to not add the part.
Smaller 'distributed' caps work better than big ones in one place. The reason is that each trace or wire also represents an inductance which becomes a loss of decoupling and a noisy and unstable board.
By-passes, in production are cheap and when hand made they are soldered on the pcb first.
There are a great many concerns involved in even a low speed (< 20 MHz) PCB besides parts placement and being able to get the autorouter to run to completion...
In my experience wires (PCB traces) are either transmission lines or just wires and can be routed at pretty much any angle depending on the rules for wires (constant width) and transmission lines [striplines] (constant impedance). Transmission line effects don't usually come in to play until the frequency approaches 50 MHz and above and there is becomes most important for many things... including 16, 32, 64 bit buss's and is the reason why many high speed mother boards have what looks like weird bus wiring... where some 'wires are actually 'squiggled' about. this done is to equalize bus line length so that signals reach the same point at the same time with minimal reflections from impedance mismatches... Generally a PCB is as complex as the job it has to do.

Doc

I have a board with 12 TPIC6B595s on it, 74HC595 is similar, but with much lower drive capacity.
I have daisy chained 2 of these boards for 20 shift registers total, 4 MHz SPI control signals.
Decoupling caps are key as GM says.
http://www.crossroadsfencing.com/BobuinoRev17/