Professional Documents
Culture Documents
Lecture 14
Synchronous Counters
11 10
The Hashemite University 15
Synchronous Up Binary
Counters – Example II
Next fill the state diagram which contains the
present state, the next state, and the inputs of the
flip flops (both T and D flip flops).
Fill the inputs of the flip flops based on the
excitations tables.
Q1 Q0 Q1(t+1) Q0(t+1) T1 T0 D1 D0
0 0 0 1 0 1 0 1
0 1 1 0 1 1 1 0
1 0 1 1 0 1 1 1
1 1 0 0 1 1 0 0
D0 Q0 D1 Q1
Q0' Q1'
1 T0 Q0 T1 Q1 T2 Q2
Clk
The Hashemite University 20
Synchronous Down-Binary
Counters – Home Exercise
Design a synchronous counter that counts as
follows: 7, 6, …, 2, 1, 0, 7, … using JK flip flops.
Sol:
We need 3 flip flops, m = 3, Q2Q1Q0.
+ve edge triggered flip flops.
Draw the state diagram:
111 011
1 J0 Q0 J1 Q1 J2 Q2 J3 Q3
K0 K1 K2 K3
Clk
Or
1 J0 Q0 J1 Q1 J2 Q2 J3 Q3
K0 K1 K2 K3
0 1 1 0
1
11 10
0
1 J0 Q0 J1 Q1
K0 Q 0' K1 Q 1'
Clk
1 T0 Q0 T1 Q1 T2 Q2
Clk
110 101
The Hashemite University 38
Example II … cont.
Fill the state table.
Present State Next State Flip Flops Inputs
Q2 Q1 Q0 Q2(t+1) Q1(t+1) Q0(t+1) T2 T1 T0
0 0 0 X X X X X X
0 0 1 X X X X X X
0 1 0 0 1 1 0 0 1
0 1 1 1 0 0 1 1 1
1 0 0 1 0 1 0 0 1
1 0 1 1 1 0 1 0 1
1 1 0 0 1 0 1 0 0
1 1 1 X X X X X X
111 011
The Hashemite University 41
Example III … cont.
Fill the state table.
Continue the solution.
Present State Next State Flip Flops Inputs
Q2 Q1 Q0 Q2(t+1) Q1(t+1) Q0(t+1) T2 T1 T0
0 0 0 X X X
0 0 1 1 0 0
0 1 0 0 0 1
0 1 1 1 1 1
1 0 0 0 1 1
1 0 1 X X X
1 1 0 X X X
1 1 1 0 1 0
The Hashemite University 42
Simplified Design Procedure for Irregular
Synchronous Mod-n Counters with Direct
Inputs Flip Flops (Initial State is 0) I
If the flip flops that are used in the design are
supported with a Reset or Clear input (when
activated the flip flop is reset Q = 0) this can
simplify the design of mod-n irregular synchronous
counters.
For example: if you want to design a mod-5 counter
(counts from 0 to 4) where you use T flip flops with
active low reset input.
In this example the states greater than 4 are not
allowed to appear.
Exactly after reaching state 4 (when state 5 appears)
all flip flops must reset (return to their initial state 0).
1 T0 Q0 T1 Q1 T2 Q2
1 T0 Q0 T1 Q1 T2 Q2
Clk
Q0
Q1
Q2