Hiya, folks. Back from a three-week building hiatus with a freshly delivered pile of parts and some ambition. Well, that, and a problem.
I'm testing my comprehension of the operation of a 74HC595 (serial-in shift register with output D-type FFs) by attempting to operate it via SPST pushbutton switches. Since inputs are never supposed to be left floating, I've been using the following debouncer for each input:
+5V ^ | / \\ R (10K nom.) / | 1/6 74HC14 | Schmitt-triggered inverter +--------------------|S>o----------------------> out | | SPST N.O. +-------------------------o o----+ | --- | = C (10nF nom.) ' | | | +--------------------------------+ | --- GNDThe output is low on open, high on closed.
The present configuration is such that three of the above modules have been assembled--one each for the HC595's signal in, clock, and latch inputs, and the register's parallel outs are connected to the cathode leads of LEDs through 1K resistors.
On power-up, all LEDs are on, as expected.
The ensuing expected behavior would be as follows: A press of the clock button would shift in a bit whose value is determined by the pressed/released state of the signal button. After doing this one or more times, pressing the latch button would cause the LEDs to reflect the internal state of the register.
What actually happens currently is similar to what could happen if the clock button is a little shaky; it is as it is supposed to be except that it appears as if the clock key were pressed more than once when pressed only once, variously shifting in between 1 and 5 bits each time.
I've tried varying values for R and C to increase the time constant (to the point of making a visible pause when probed) to no effect. There's a .1uF ceramic cap on each IC's +V pin to ground, close to the +V pin. It's all being constructed on a breadboard, if that helps/hurts.
So, is this a good or bad button debouncer? (If it's good, I have another question: Can the +5V and GND be swapped on it to make it open=high, closed=low?) Do I need to bark up a different tree for this diagnosis?
Thanks PSM