noise on the latch pin of the 74HC595 ?

Hello guys .

i have been trying to interface the 595 with an atmega328 with arduino bootloader and software . the results are though rather noisy and it seems to be coming from the latch pin . i have it set-up with an 1uf capacitor on the power lines . (also tried to switch that to 0.1uf for the purpose of this application and the results were the same ) . in this application two 595s are placed in series (Qh of the first is wired to Ser of the second )

after sending the signal , the chips do give out a stable output of what i need . the problem is , sometimes , a low after high signal to the Latch clock seems to allow the data to pass through .

the latch flip-flops are positive edge triggered , yet in my application sometimes the triggering happens on a negative edge . i am guessing that's because of noise , maybe the shifting to low level logic is noisy ?

so basically in an example of 10 iteration tests , it would go well 8 times (gets correctly triggered on the positive edge) , yet 2 times it incorrectly triggers on the negative edge instead .

what could be causing this problem ? thank you

Are your signal wires longer than a foot?

Please post your circuit and code.

Hello Mark , thank you very much for your response . and i am sorry for my late feed-back . you actually pointed me in the right direction . i had this all set up on a breadboard . and the wire that was connecting the Arduino to the latch pin was 10cm long . i replaced it with a very short wire (2cm) and weirdly enough , the problem dissapeared and the chip seems to only respond to high clock edges now .

can you explain this phenomena to me please ?

Well 10cm isn’t too long so I’m guessing you may have inadequate decoupling the '595 supply - for logic
chips you always need something like 100nF ceramic capacitor from supply to ground right at
the pins (as close as possible), otherwise a chip can misbehave in strange random and bizarre
ways. Electrolytics are usually too slow to do any useful decoupling at the nanosecond timescale
that logic chips involve, ceramics are usually very low inductance as is requred for decoupling logic.

In general logic signals should be short and always have a ground return path nearby (this is
why a groundplane is used in PCBs). Alternatively ensure there is a hearby ground path (run your
wiring together in a bundle is usually good).

Longer than about a foot and problems of reflection and cross-talk become an issue.

There is a fault in one of the tutorials for the '595, BTW - it shows a capacitor attached to a signal
line (I think the latch signal), which is utterly wrong - any capacitance should be decoupling on the
supply to ground.

MarkT:
Well 10cm isn’t too long so I’m guessing you may have inadequate decoupling the '595 supply - for logic
chips you always need something like 100nF ceramic capacitor from supply to ground right at
the pins (as close as possible), otherwise a chip can misbehave in strange random and bizarre
ways. Electrolytics are usually too slow to do any useful decoupling at the nanosecond timescale
that logic chips involve, ceramics are usually very low inductance as is requred for decoupling logic.

In general logic signals should be short and always have a ground return path nearby (this is
why a groundplane is used in PCBs). Alternatively ensure there is a hearby ground path (run your
wiring together in a bundle is usually good).

Longer than about a foot and problems of reflection and cross-talk become an issue.

There is a fault in one of the tutorials for the '595, BTW - it shows a capacitor attached to a signal
line (I think the latch signal), which is utterly wrong - any capacitance should be decoupling on the
supply to ground.

thank you very much sir .