Chips, Ahoy! 173
Experiment 18: Reaction Timer
FundAmentAls
Counters and seven-segment displays
Most counters accept a stream of pulses and distribute
them to a series of pins in sequence. The 4026 decade
counter is unusual in that it applies power to its output pins
in a pattern that is just right to illuminate the segments of a
7-segment numeric display.
Some counters create positive outputs (they “source”
current) while others create negative outputs (they “sink”
current). Some seven-segment displays require positive
input to light up the numbers. These are known as “common
cathode” displays. Others require negative input and are
known as “common anode” displays. The 4026 delivers posi-
tive outputs and requires a common cathode display.
Check the data sheet for any counter chip to find out how
much power it requires, and how much it can deliver. CMOS
chips are becoming dated, but they are very useful to hob-
byists, because they will tolerate a wide range of supply
voltage—from 5 to 15 volts in the case of the 4026. Other
types of chips are much more limited.
Most counters can source or sink only a few milliamps of
output power. When the 4026 is running on a 9-volt power
supply, it can source about 4mA of power from each pin.
This is barely enough to drive a seven-segment display.
You can insert a series resistor between each output pin of
the counter and each input pin of the numeric display, but
a simpler, quicker option is to use just one series resistor
for each numeral, between the negative-power pin and
ground. The experiment that I’m describing uses this short-
cut. Its disadvantage is that digits that require only a couple
of segments (such as numeral 1) will appear brighter than
those that use many segments (such as numeral 8).
If you want your display to look bright and professional,
you really need a transistor to drive each segment of each
numeral. An alternative is to use a chip containing multiple
“op amps” to amplify the current.
When a decade counter reaches 9 and rolls over to 0, it
emits a pulse from its “carry” pin. This can drive another
counter that will keep track of tens. The carry pin on that
counter can be chained to a third counter that keeps track
of hundreds, and so on. In addition to decade counters,
there are hexadecimal counters (which count in 16s), octal
counters (in 8s), and so on.
Why would you need to count in anything other than tens?
Consider that the four numerals on a digital clock each count
differently. The rightmost digit rolls over when it reaches
- The next digit to the left counts in sixes. The first hours
digit counts to 10, gives a carry signal, counts to 2, and gives
another carry signal. The leftmost hours digit is either blank
or 1, when displaying time in 12-hour format. Naturally there
are counters specifically designed to do all this.
Counters have control pins such as “clock disable,” which
tells the counter to ignore its input pulses and freeze the
display, “enable display,” which enables the output from the
chip, and “reset,” which resets the count to zero.
The 4026 requires a positive input to activate each control pin.
When the pins are grounded, their features are suppressed.
To make the 4026 count and display its running total you
must ground the “clock disable” and “reset” pins (to suppress
their function) and apply positive voltage to the “enable
display” pin (to activate the output). See Figure 4-36 to see
these pins identified.
Assuming that you succeed in getting your counter to drive the numeric dis-
play, you’re ready to add two more counters, which will control the remaining
two numerals. The first counter will count in ones, the second in tens, and the
third in hundreds.
In Figure 4-37, I’ve continued to use arrows and numbers to tell you which pins
of the counters should be connected to which pins of the numeric display. Oth-
erwise, the schematic would be a confusing tangle of wires crossing each other.
At this point, you can give up in dismay at the number of connections—but
really, using a breadboard, it shouldn’t take you more than half an hour to
complete this phase of the project. I suggest you give it a try, because there’s