Electronics > Beginners
Shift Register Problems
gigavolt:
I have been trying to run a 74HC164 shift register using a 555 timer as a clock at ~1Hz, but have been running into an issue with what looks like double counting of the clock. I can put data onto the shift register using a switch and it will sometimes work well, but often times the data will jump ahead by more than one bit in a single clock cycle. Usually it will jump ahead by two bits instead of one, but I've also seen three and four.
I have tried adding decoupling caps to the IC (0.1uF) and have taken a look at the clock's rising edge (attached) which is faster than the recommended value for the part. I've run out of ideas for debugging the circuit and thought I'd check if anybody here has suggestions.
Psi:
Is it occurring with the 555 as well? or just your switch input.
That's pretty common for a switch, the contacts bounce a lot and get double clocked.
A decoupling cap for VCC isn't enough, you also need to filter the clock input to remove the bounce from the switch.
Put a cap between shift reg input and gnd, then add a resistor to link that to the switch.
Try 20k and 1uF for a 8hz low pass filter, that should filter your mechanical switch enough to smooth it out.
You will want to change those values when clocking from the 555 timer.
gigavolt:
No, the 555 seems as stable as can be. I'm using the switch for the data input, not the clock. If I close and hold the switch and just let the shift register run, then I still see the double clocking issue, so I don't think it's a problem with bounce. I did try adding a tiny low pass filter to clean up the edge of the clock (bringing up the rise time to 400nS), but it didn't help.
garethw:
It may be worth checking all unused inputs are held either high or low (depending on the input). A floating input can cause all sorts of wonderful results.
Gareth
ivaylo:
Or if the front produced by the 555 is too slow the 74 series may be unstable between what’s defined as 0 or 1. Seen it happen...
Navigation
[0] Message Index
[#] Next page
Go to full version