chaining 8x HC595

I need the opinion of some experienced developers…

I have connected 64 LEDs to 8 74HC595 according to mbhp_doutx4.pdf.

Observation:

  • Everything works fine - if I ‘ping’ (note on followed by note-off) each led.

  • However if leds are lit, leds 32…63 show random behaviour, even flickering occurs. In this case also leds 0…31 are triggered randomly.

Design notes:

  • Did not use PCB, wired free

  • left away the two 100uF caps

  • LEDs have 1k resistors (instead of 220R)


I looked at the datasheet of the HC595 and saw that it operates quite at high frequencies (serial 100MHz typically). Therefore the 100uF may be important. (I’m on the way to buying them now). But I got a strange feeling that this is not all about it. I wonder if termination of the bus is required.

Any help greatly appreciated.

Urban

Given that it’s on a protoboard the bypass caps are probably more important than ever. Try it with those on, and maybe higher resistance…

  • left away the two 100uF caps

  • LEDs have 1k resistors (instead of 220R)


I looked at the datasheet of the HC595 and saw that it operates quite at high frequencies (serial 100MHz typically). Therefore the 100uF may be important.

typo or you re using 100 uF caps? they should be 100 nF !

Simone

typo or you re using 100 uF caps? they should be 100 nF !

No, typo is on your side here… 4x 100nF I have soldiered, additional 100uF per DOUT PCP I left away.

I’m on a standart PCB v.3 with PIC18F452, OS is MB64.

Coming back soon with more test results, thx for the replies.

Quote from: cimo on Today at 15:15

typo or you re using 100 uF caps? they should be 100 nF !

No, typo is on your side here… 4x 100nF I have soldiered, additional 100uF per DOUT PCP I left away.

this is not a typo, this is a misunderstanding!

from what you write i would double check the connection between the first DOUT4 and the second one, just for the sake of it.

Simone

Now - I did additional testing and capacities seem to be very important for this chaining of serial ports. It is not only the bypass caps it is the connection from one serial out to the next serial in.

I soldered the additional bypass caps but that didn’t change too much.

Then I checked the ground connection if each HC595 and that did improves some things. Still it is sort of unstable - when I touch certain points with my fingertips other LEDs are lit…

Finally - after having a closer look at the design - it was pure nonsense to mount the HC’s freely spaced somewhere on the front panel. Maybe it is best if I redo the whole DOUT stuff on a proper smashtv PCB. Thats because the frequencies involved are critical to wiring.

Still it is sort of unstable - when I touch certain points with my fingertips other LEDs are lit…

That sounds to me more of an unstable track/soldering than a static/grounding issue.

Anyway Smashtv s boards are your best bet

Simone

Im having bad time with my DOUTs too. It worked OK before with 1 or 2 modules but now, when I have 4.. same thing as urban_soul. I also have 100uF and 100nF capacitors even i never use it before for 1 module. Soldering seams OK. I tested each module with DOUT testing app and everything worked OK. I noticed that length of interconnection affect this issue before, so I keep the wires very short. Im too pretty much sure it is some kind of ground problem or such as touching the PCBs with fingers stabilize it. DINs seams much more unforgiving in longer chains than AINs, even I would expect other way. What is left for me to try is to use  bigger, 470uF instead of 100uF capacitor at input and see will it help.

@Sasha

well I have no solution other than mounting all 16 HC595 on one single PCB in your case.

In theory the digital clock signal looks like a pulse wave. A cable has a capacity and also a resistance and acts therefor as lowpass filter. Result: the edges of the clock signal are smeared. For the most important capacity the surface of the cable plays a major role. Ultrathin copper cables should be best suited. (0.1mm)

You can determine the quality of the clock signal with an osci.

Also in theory cable length of less than one meter should be non-critical. (Just a quick guess, I can do the math if you ask me) In practice every soldering point is disturbing too. If the HC595 does not terminate the clock signal correctly (this is very unlikely) reflexions may also occur.

The longer the chain the more likely it is that an error in reading the clock signal occurs. When you touch certain points with your fingertips you change this very unstable reading state.

Strange is that not much people reported these kind of problems. I didn`t noticed it before as I never did big DOUT chains. I was also thinking about trying  to use ferrite beads on interconnection cables as I was thinking it might picking the noise from outside.  ::slight_smile:

Probably not many people have more than 64 LEDs to control. I dont know.

Also in my case I soldered one point in less than one second… bad habit.

Probably not many people have more than 64 LEDs to control. I dont know.

Thats not true. Every LC uses the fullchain of 16 HC595.

I once had a simular problem with flickering. I forgot one PIN 13 to ground on one or two registers. Doublecheck all connections.

btw. It doesn’t matter, if you “freewire” the DOUT chain. As long as the RC/SC/SO Lines are not too long (long= 50cm or more).

Looking back in the troubleshooting section: 99% of all those problems were (are)  bad wires or solders.

greets

Doc

It doesn’t matter, if you “freewire” the DOUT chain. As long as the RC/SC/SO Lines are not too long (long= 50cm or more).

Thanks for that info. Would be nice. Most likely its bad soldiers. Have to look at it with an osci.

Edit: You just edited your post. Good idea. It’ll be our little secret :slight_smile:

!!OFFTOPIC!!

US i was reading your website, it seems interesting stuff, i also like the way you ve built it, getting really tired of fancy sites.

I am going to redesign mine soon and i ll be probably  inpired by yours.

!!BACKTOTOPC!!

There is some big project going on there i see, pictures are a bit blurred though. we love details here! :wink:

Looking back in the troubleshooting section: 99% of all those problems were (are)  bad wires or solders.

I would put this in flashing big letters under the MIDIBOX logo, for my own sake of course.

Edit: You just edited your post. Good idea. It’ll be our little secret :slight_smile:

I didn’t know that editing topics is forbidden in here. For the record - I asked doc kindly to give a referemce. There’s no secret. I then decided to search the forum on my own. Is there anything wrong with it?

@cimo: a can send you the script which turns LateX into a blog. Just send me a email.

hehehe, defensive much?

Who said that editing is forbidden? I certainly didn’t.

What was wrong with it? You might say you “asked doc kindly to give a referemce”, but when I read the post, it sounded more like you were challenging his qualification to give that advice, and rudely, not kindly. My initial reply was to post his postcount.

rudely ? No. plain wrong.

bye

Thanks for proving my point :slight_smile:

Let forum member doc explain by himself if he feels offended by the sentense: ‘May I ask you to give at least one reference’ .  (was up for about 30sec.)

I have never seen a moderator getting into personal flams with newbies. Normally moderators are too busy.

Nobody ask you to post OT nonsense like ‘secrets’ we share. Do you think this is the job of a moderator? If someone throws a stone I have to react. You are the aggressor here.

Did I prove your pov again ? Not so difficult. It’s a self fufilling prophecy.