Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Design of Counters
_____________________________________________
9.0 Introduction
Counter is another class of sequential circuits that tally a series of input pulses
which may be regular or irregular in nature. Counter can be divided into
binary/non-binary and synchronous/asynchronous types. Binary counter follows
the binary sequence such as 0 to 1 to 2 to 3 and then repeats. Non binary counter
does not have orderly sequence.
In the chapter the design of counter using various types of flip-flop are
discussed. Attention is paid particularly for the design of counter that can self-
start.
- 143 -
09 Design of Counters
- 144 -
09 Design of Counters
From the timing diagram, it shows there are propagation delays due to transition
from clock pulse to output of flip-flop 0 Q0, from output of flip-flop 0 Q0 to
output flip-flop 1 Q1, and from output of flip-flop 1 Q1 to output flip-flop 2 Q2.
- 145 -
09 Design of Counters
- 146 -
09 Design of Counters
Obtain the truth table of the logic sequence for intended counter to be
designed. Alternatively obtain the state diagram of the counter.
Determine the number and type of flip-flop to be used.
From the excitation table of the flip-flop, determine the input of the flip-
flop.
From the output state, use Karnaugh map for simplification to derive the
circuit output functions and the flip-flop output functions, which is logic
equation.
Check wheather the counter can self-start. If it cannot self-start, it is
necessary re-design.
Draw the logic circuit diagram.
Simulate the circuit using software.
Build the circuit.
From the function tables shown in Fig. 7.4, 7.10, 7.17, and 7.20 of the flip-flops
learnt earlier in Chapter 7, the excitation or characteristic table of SR flip-flop,
D flip-flip, JK flip-flop, and T flip-flop are shown in Fig. 9.7. and 9.8
respectively. Qn is denotes the output of the present state and Q n+1 denotes the
output of next state.
Qn Qn+1 S R Qn Qn+1 D
0 0 0 X 0 0 0
0 1 1 0 0 1 1
1 0 0 1 1 0 0
1 1 X 0 1 1 1
Figure 9.7: Characteristic table of SR and D flip-flop
Qn Qn+1 J K Qn Qn+1 T
0 0 0 X 0 0 0
0 1 1 X 0 1 1
1 0 X 1 1 0 1
1 1 X 0 1 1 0
Figure 9.8: Characteristic table of JK and T flip-flop
- 147 -
09 Design of Counters
A synchronous decade counter will count from zero to nine and repeat the
sequence. The state diagram of this counter is shown in Fig. 9.9.
Since there are ten states, four JK flip-flops are required. The truth tables of
present and next state for the decade counter are shown in Fig. 9.10. Using the
excitation table of JK flip-flop and the outputs of J and K are filled.
0 1 0 1 0 1 1 0 0 X X 0 1 X X 1
0 1 1 0 0 1 1 1 0 X X 0 X 0 1 X
0 1 1 1 1 0 0 0 1 X X 1 X 1 X 1
1 0 0 0 1 0 0 1 X 0 0 X 0 X 1 X
1 0 0 1 0 0 0 0 X 1 0 X 0 X X 1
Figure 9.10: Truth table and state table of a synchronous decade counter
The Karnaugh maps of the input J0, K0, J1, K1, J2, K2, J3, and K3 are shown in
Fig. 9.11, 9.12, 9.13, and 9.14 respectively. The Karnaugh map has included the
ate. The optimized results are at the
bottom of the Karnaugh maps. Note the best approach is to have both J and K
input has same logic function.
- 149 -
09 Design of Counters
Based on the results of Karnaugh maps shown in Fig. 9.11 to 9.14, the analysis
of next state for non sequence state 1010, 1011, 1100, 1101, 1110, and 1111 are
shown in Fig. 9.15.
- 150 -
09 Design of Counters
Based on the results shown in Fig. 9.15, the analysis of the self-start of this
counter indicates that it can self-start. The results are shown in Fig. 9.16.
Thus, the results obtained from the Karnaugh maps shown in Fig. 9.11 to 9.14
are good for the J and K inputs of the decade counter design and the circuit
design of synchronous decade counter is shown in Fig. 9.17.
- 151 -
09 Design of Counters
An asynchronous decade counter will count from zero to nine and repeat the
sequence. Since the JK inputs are fed fom the output of previous flip-flop,
therefore, the design will not be as complicated as the synchronous version. At
the nineth count, the counter is reset to begin counting at zero by a NAND gate.
At the ninth count, the outputs of flip-flop Q3 and Q1 will be high
would reset the flip-flop. The logic design of the counter is shown in Fig. 9.18.
The analysis of asychronous decade counter shows that it would be able to self-
start. If the counter start at non sequence state 1010, it would be reset to 0000
since Q3 and Q1 are at logic 1. If it starts at 1011, would be reset to 0000 since
Q3 and Q1 are at logic 1. If it starts at 1101, it would move to sequence 1110,
1111, and eventually reset to 0000 due Q3 and Q1 are simultaneously at logic 1.
This sequence is happened if it starts at 1110 and 1111.
- 152 -
09 Design of Counters
The state diagram is shown in Fig. 9.20, which shows the sequence of the
counter.
The Karnaugh maps of the inputt S0, R0, S1, R1, S2, and R2 are shown in Fig.
9.21, 9.22, and 9.23 respectively. The simplified results are at the bottom of the
Karnaugh maps.
Note that selection logic input of S and R needs to avoid the situation of
both S and R at any of the sequence states. This is because
the case where the SR flip-flop is designed with NOR gate. For SR flip-flop
designed with NAND gate, simultaneous l
avoided because it would cause undefined output.
- 153 -
09 Design of Counters
With the known output logic functions, the logic design of the synchronous
modulus six counter is shown ing Fig. 9.24.
Non sequence
the counter starts with either of these states, will it eventually enter into the
sequence state of the counter. Changing
sequence states from Karnaugh maps shown Fig. 9.21 to 9.23, the non sequence
states have the next state informations shown in Fig. 9.25.
If the counter starts at states which are not a counter sequence state like 100 and
111, the counter is able to go into valid states of the sequence. The next state of
100 is 000 a valid counter state and the next state of 111 is 101,which is also a
valid state of the counter. Thus, this design, the counter is able to self-start.
The state diagram of 3-bit binary counter is shown in Fig. 9.26. The binary
counter counts from 000 state to 001 to state and reset to 000 state
after 111 state. Based on the state diagram of the T flip-flop shown in Fig. 9.8,
which states a trigger is needed for output change state, the state table for the
sequence of the counter designed using T flip-flop is shown in Fig. 9.27.
The Karnaugh maps of the logic functions for input T2, T1, and T0 are
respectively shown in Fig. 9.28 to 9.30.
T0 = 1
Figure 9.30: Karnaugh map of T0
- 156 -
09 Design of Counters
Based the function equations from the karnaugh map, the design of 3-bit binary
counter using T flip-flop is shown in Fig. 9.31.
The counter has problem of self-start because any start-up state is a sequence
state of the counter.
When power is first applied, the initial states of the flip-flops of the counter are
not predictable. For counters that do not use all the state combinations, it may
start with a non sequence state and never enter into the desired designed
sequence. A self-starting counters is one where every possible state including
those not in the desired count sequence has a sequence of transitions that
eventually leads to a counter sequence state. Let take an example of counter
with state diagram shown in Fig. 9.32. The counter can start with any of the non
sequence state 001, 101 or 110 but eventually it must be able to enter into the
any of the sequence state required by the state diagram.
- 157 -
09 Design of Counters
The state table of the design using T flip-flop is shown in Fig. 9.33.
After replacing the logic 0 and logic 1 and redefined the logic
states of next state for non sequence state, the state table of the design and input
for the T flip-flops is shown in Fig. 9.37.
- 159 -
09 Design of Counters
Note that if the counter starts with no sequence state 001, 101 or 110, it would
eventually enter into the sequence state required in the design in next state,
which are 111, 110, or 011. State 110 is not in the sequence of the design.
However, in next state it would enter 011 state which is in the sequence of the
design. The illustration of the start state and enter into the sequence is shown in
Fig. 9.38.
If the start state does not enter into the sequence of the design in next state,
re-mapping of the Karnaugh map is required.
Figure 9.38: Illustration of non sequence state enters into the sequence state of a sell starting
counter
- 160 -
09 Design of Counters
Figure 9.39: The design of 3-bit count down ripple counter using JK flip-flops
The timing of the count down ripple counter design shown in Fig. 9.39 is shown
in Fig. 9.40.
Figure 9.40: The timing diagram of the 3-bit count down ripple counter shown in Fig. 9.39
Tutorials
9.1. State the procedure for design a synchronous counter.
- 161 -
09 Design of Counters
9.4. The counter circuit is formed by the circuit shown below. Find the
counter sequence and draw the timing of the counter.
- 162 -
09 Design of Counters
9.5. Draw the timing diagrams of the decade counter shown in Fig. 9.17.
9.7. Using the truth table shown in Fig. 9.19, design this counter using T flip-
flop.
9.9. Design an asychronous modulus 3 counter using D flip-flop and show its
timing diagram.
9.10. Design a counter that has sequence 1, 9, 8, and 7 using three T flip-flop.
- 163 -
09 Design of Counters
References
1. Thomas L. Floyd, "Digital Fundamentals", Seventh Edition, Prentice-Hall
International, Inc., 2000.
2. Donald D. Givone, "Digital Principles and Designs", McGraw- Hill 2003.
3. Victor P. Nelson, H. Try Nagle, Bill D. Carroll, and J. David Irwin, "Digital
Logic Circuit Analysis & Design", Prentice-Hall Englewood Cliffs.NJ,
1995.
- 164 -