Counters: Ripple, Synchronous and the 74192
Compare ripple and synchronous counters, find the maximum clock rate, build a mod N counter by resetting, and meet the 74192 up down counter.
Counting with flip-flops
A counter is a group of flip-flops that goes through a fixed sequence of states, one step for each clock pulse. A 4 bit binary counter counts 0000, 0001, 0010 and so on to 1111 and then returns to 0000. It has 16 states, so it is called a modulo 16 counter. The count of a counter with n flip-flops runs through 2^n states.
Counters count events, measure time, divide frequencies and make the addresses that step through a memory.
The ripple counter
The simplest counter uses toggle flip-flops. The clock goes to the first flip-flop only. The output of each flip-flop is the clock of the next one. The first flip-flop toggles at every clock pulse, the second toggles when the first falls from 1 to 0, and so on. Each stage divides the frequency by 2.
clock 1000 Hz → Q0 500 Hz → Q1 250 Hz → Q2 125 Hz → Q3 62.5 Hz
A ripple counter is also called an asynchronous counter, because the flip-flops do not all change at the same instant. The 7493 is a common 4 bit ripple counter.
The cost of rippling
Each stage changes only after the previous one, so the delays add up. At the change from 0111 to 1000, the outputs pass through 0110, 0100 and 0000 before they settle. These short wrong values are not visible to the eye, but they can cause false triggering in anything connected to the outputs.
The delay also limits the clock speed. The counter must settle before the next pulse, so the clock period must exceed n × tpd, where tpd is the delay of one flip-flop. With four stages of 20 ns each the limit is 80 ns, so a clock above 12.5 MHz fails.
The synchronous counter
In a synchronous counter all the flip-flops receive the same clock, so all the outputs change together. Each flip-flop is told to toggle or not by logic from the outputs of the flip-flops below it. With JK or T flip-flops, flip-flop k toggles only when all lower outputs are 1.
T0 = 1, T1 = Q0, T2 = Q0 · Q1, T3 = Q0 · Q1 · Q2
The clock period needs to cover only one flip-flop delay plus the delay of the AND gates, so the counter is much faster. There are no wrong values between states. It uses more gates, but it is the usual choice for fast designs.
A mod N counter by resetting
To count to less than 2^n, make the counter clear itself when it reaches a chosen value. For a mod 6 counter that counts 0 to 5, detect the value 6 (0110). When Q2 and Q1 are both 1, no earlier state shows this combination, so a NAND gate of Q2 and Q1 drives the active low clear.
This works with asynchronous clear inputs, but there is a catch. The counter reaches 0110 for a very short time before the clear acts. That short extra state is a glitch. If the output matters to other circuits, use a synchronous design or a counter with a synchronous load.
The 74192 up and down counter
The 74192 is a synchronous 4 bit decade counter, which counts 0 to 9 in BCD, with separate Count Up and Count Down clock inputs. Pin 16 is the supply and pin 8 is ground. It counts up on the rising edge of the up clock, while the down clock input is held high. It counts down on the rising edge of the down clock while the up clock is held high.
- CLR is an active high asynchronous clear. It sets all outputs to 0.
- LOAD is active low. It loads the data inputs A to D into the counter at once.
- CARRY is an active low output that gives a pulse at the count of 9 going up. BORROW is an active low pulse at 0 going down.
- To count to 99, connect CARRY of the units chip to the up clock of the tens chip, and BORROW to the down clock.
By loading a starting value and detecting a final count, you can build a counter with any range. Connect the outputs to a 7447 and a display to show the count.
Test and troubleshoot
- Use a debounced switch for the clock. Each bounce of an ordinary switch counts as a pulse.
- Clear the counter before starting, since it powers up in a random state.
- Hold the unused clock of the 74192 high. A low unused clock stops the count.
- If the count skips, look at the clock first, then at the load and clear pins.
Compare the outputs with the expected sequence after every pulse, and note any difference.
Try it in the virtual lab
SinBench has free 3D benches and interactive demos for this topic. Open one to try the ideas above with real instruments, no sign up needed.
Sequential Circuit Design on a Free Bench
Questions and answers
What is the difference between a ripple counter and a synchronous counter?
In a ripple counter each flip-flop clocks the next, so changes ripple through. In a synchronous counter all flip-flops share one clock and change together, which is faster and free of wrong intermediate values.
What is a modulo N counter?
It is a counter that goes through N states and then repeats. A mod 6 counter counts 0 to 5.
How does a 74192 count up and down?
It has two clock inputs. A rising edge on the up input counts up while the down input is high. A rising edge on the down input counts down while the up input is high.
How can you use a counter to divide frequency?
Each flip-flop in a binary counter divides the frequency by 2. Four stages divide by 16, so a 1.6 kHz clock gives 100 Hz at the last output.
Related topics
Latches and Flip-Flops: SR, D and JK Explained
Learn how SR latches, gated D latches, edge triggered D flip-flops and JK flip-flops work, with tables and equations, and the toggle and debounce uses.
Digital Logic DesignShift Registers: Serial In, Parallel Out and More
Learn how shift registers work: SISO, SIPO, PISO and PIPO types, the universal 74194, ring and Johnson counters and serial to parallel conversion.
Digital Logic DesignBCD to Seven Segment Decoder: The 7447 and Common Anode Displays
Learn how a 7447 drives a common anode seven segment display: BCD input, active low outputs, segment patterns, resistors, the lamp test and ripple blanking.