Make Electronics

(nextflipdebug2) #1
Chips, Ahoy! 213

Experiment 22: Flipping and Bouncing

of the left NOR gate goes from positive to negative, as a result of the pull-
down resistor. But the righthand input of this gate is still positive, and one
positive is all it takes to make the NOR maintain its negative output, so nothing
changes. In other words, the circuit has “flopped” in this state.


Now if the switch turns fully to the right and supplies positive power to the
righthand pin of the right NOR gate, quick as a flash, that NOR recognizes that
it now has a positive logical input, so it changes its logical output to negative.
That goes across to the other NOR gate, which now has two negative inputs,
so its output goes positive, and runs back to the right NOR.


In this way, the output states of the two NOR gates change places. They flip,
and then flop there, even if the switch breaks contact or is disconnected again.
The second set of drawings in Figure 4-100 shows exactly the same logic, using
a negatively powered switch and two NAND gates. You can use your 74HC00
chip, specified in the parts list for this experiment, to test this yourself.


Figure 4-100. The schematic from Figure 4-99 can be rewired with NAND gates and a
negative switched input.


Both of these configurations are examples of a jam-type flip-flop, so called be-
cause the switch forces it to respond immediately, and jams it into that state.
You can use this circuit anytime you need to debounce a switch (as long as it’s
a double-throw switch).


A more sophisticated version is a clocked flip-flop, which requires you to set
the state of each input first and then supply a clock pulse to make the flip-flop
respond. The pulse has to be clean and precise, which means that if you supply
it from a switch, the switch must be debounced—probably by using another
jam-type flip-flop! Considerations of this type have made me reluctant to use
clocked flip-flops in this book. They add a layer of complexity, which I prefer to
avoid in an introductory text.


What if you want to debounce a single-throw button or switch? Well, you have
a problem! One solution is to buy a special-purpose chip such as the 4490
“bounce eliminator,” which contains digital delay circuitry. A specific part
number is the MC14490PG from On Semiconductor. This contains six circuits
for six separate inputs, each with an internal pull-up resistor. It’s relatively ex-
pensive, however—more than 10 times the price of a 74HC02 containing NOR
gates. Really, it may be simpler to use double-throw switches that are easily
debounced as described previously.

Free download pdf