Documente Academic
Documente Profesional
Documente Cultură
Synchronous Counters:
1
FACULTY OF COMPUTER SCIENCE & INFORMATION SYSTEM
2
• Step 1 • Step 4
Describe a general Create flip-flop
excitation table
sequential circuit in transition table.
terms of its basic parts
and its input and • Step 5
outputs. Use K-maps to derive ≡
the logic equations.
• Step 2
Develop state diagram • Step 6
Implement counter 0 1
• Step 3 implementation
Create next state table
(Refer to JK FF truth table
in module 7: page 225) (J-K ff state diagram)
3 4
0 1
Construct the 0 1 Construct the
excitation table excitation table
for D flip-flop for T flip-flop
5 6
2012/2013-I @m 1
11/20/12
T flip flop
state diagram Note:
Exercise 8b.2:
Summary These excitation tables will
1 be used while filling in the
Construct the 0 Excitation tables of flip-flops: flip-flop transition table in
excitation table STEP 4 of designing
for T flip-flop synchronous counter.
7 8
• Step 4:
• Step 2: Draw state diagram • Step 3: Create next state table
Draw flip-flop transition table
FF1 FF0
00 Present State Next State Present State Next State JK Transition
Q1n Q0n Q1n+1 Q0n+1 Q1n Q0n Q1n+1 Q0n+1 J1 K1 J0 K0
11 01 0 0 0 1 0 0 0 1 0 X 1 X
0 1 1 0 0 1 1 0 1 X X 1
1 0 1 1 1 0 1 1 X 0 1 X
10
1 1 0 0 1 1 0 0 X 1 X 1
9 10
11 12
2012/2013-I @m 2
11/20/12
Ex Ex
tr tr
a a
Exercise 8b.3: Design 2-bit synchronous counter that using T flip-flop. Exercise 8b.4: Design 2-bit synchronous counter that using D flip-flop.
Show all steps clearly. Show all steps clearly.
13 14
Note:
While filling in
Design 3-bit Synchronous Counter: the flip-flop
transition table,
J-K Flip-flop refer to the
excitation table.
J2 = Q1Q0 J1 = J0 =
Q1Q0 Q1Q0 Q1Q0
00 01 11 10 Q2 00 01 11 10 Q2 00 01 11 10
0 0 0
1 1 1
K2 = K1 = K0 =
**Fill in the K-maps 17 18
2012/2013-I @m 3
11/20/12
Ex
tr
a
19 20
Ex Ex
tr tr
a a
Exercise 8b.6: Design 4-bit synchronous counter that using J-K flip-flop Exercise 8b.7: Design 3-bit synchronous counter that using J-K flip-flop
with negative edge triggered. Show all steps clearly. based on the state diagram below. Show all steps clearly.
21 22
1 0 0 1 1 0 1
10
1 1 1 0
D1 = Q1Q0 + Q1Q0
23 24
2012/2013-I @m 4
11/20/12
00 0
0
Count up
1 1
11 01
1 1
Count down
0 10 0
25 26
• Step 5: • Step 5:
• Step 4: Implement the circuit. • Step 4: Implement the circuit.
D FF transition table and determine Q1Q0 D FF transition table and determine Q1Q0
Boolean expression. X
00 01 11 10 Boolean expression. X
00 01 11 10
0 0 0 1 0 1
1 1 1 0 1 0
D1 = D1 = X ⊕ Q1⊕ Q0
Q1Q0 Q1Q0
X 00 01 11 10 X 00 01 11 10
0 0 1 0 0 1
1 1 1 0 0 1
D0 = D0 = Q0
27 28
Exercise 8b.9: Draw the circuit for of 2-bit up-down synchronous counter • Design the counter base on the given state diagram using T FF.
using D FF with D1 = X ⊕ Q1⊕ Q0 and D0 = Q0
(Refer previous example: module page 261)
29 30
2012/2013-I @m 5
11/20/12
Ex
tr
a
Exercise 8b.10: Derive the Boolean expression and draw the circuit Exercise 8b.11: Design a counter with the irregular binary count
diagram from the previous example. sequence shown in the state diagram below using
J-K FF.
**Fill in the
Synchronous BCD Decade Counter Present State Next State T FF Transition T0 column
Q3 Q2 Q1 Q0 Q3+ Q2+ Q1+ Q0+ T3 T2 T1 T0
0 0 0 0 0 0 0 1 0 0 0
0 0 0 1 0 0 1 0 0 0 1
0 0 1 0 0 0 1 1 0 0 0
0 0 1 1 0 1 0 0 0 1 1
• Synchronous decade 0 0 1 0 0 0 1 0 1 0 0 0
9 1 0 1 0 1 0 1 1 0 0 0 1
counter counts from 0 to 9
0 1 1 0 0 1 1 1 0 0 0
and then recycles to 0
again. 8 2
0 1 1 1 1 0 0 0 1 1 1
1 0 0 0 1 0 0 1 0 0 0
• 4 FF is required and the 1 0 0 1 0 0 0 0 1 0 0
unused states ie 10 to 15 7 1 0 1 0 X X X X X X X
are taken as don’t care 3 1 0 1 1 X X X X X X X
terms. 6 1 1 0 0 X X X X X X X
4 1 1 0 1 X X X X X X X
5 1 1 1 0 X X X X X X X
1 1 1 1 X X X X X X X
35 36
2012/2013-I @m 6
11/20/12
Q1Q0 Q1Q0
Q3Q2 00 01 11 10 Q3Q2 00 01 11 10
00 00
Self-Test:
01 01
11 11
Fill in the k-map
to simplify the 10 10
equations. Cascaded Counter
T3 = T2 =
Q1Q0 Q1Q0
Q3Q2 00 01 11 10 Q3Q2 00 01 11 10
00 00
01 01
11 11
10 10
T1 = T0 =
37 38
39
40
Basis clock frequency of 1 MHz and you wish to obtain Total MOD = 10 x 10 x 10
100kHz, 10Hz, and 1kHz, a series of cascaded = 100
decade counters can be used. If 1 MHz signal is
divided by 10, the output is 100kHz. Then if the 100
(Total MOD = 10 x 10 = 100) kHz signal is divided by 10, the output is 10kHz.
Further division by 10 gives the 1 kHz frequency.
41 42
2012/2013-I @m 7
11/20/12
2
1
4
43 44
• Step 1:
• Step 3:
Start with the logic schematic from which we can derive excitation
Once we have our output and next-state equations, we can
equations for each flip-flop input.
generate the next-state and output tables as well as state
diagrams.
• Step 2:
To obtain next-state equations, we insert the excitation equations
• Step 4:
into the characteristic equations. The output equations can be
When we reach this stage, we use either the table or the state
derived from the schematic:
diagram to develop a timing diagram which can be verified
through simulation.
45 46
2012/2013-I @m 8
11/20/12
Q0 + = D0 = Cnt ⊕ Q0 = Cnt • Q0 + Cnt • Q0 • Step 4: The state diagram is generated directly from the next-
state table. Next get the timing diagram
Q1+ = D1 = Cnt • Q1 + Cnt • Q1 • Q0 + Cnt • Q1 • Q0
49 50
51 52
• Remember that there is one input X, one output Z, and two flip-
flops Q1Q0.
• The present state Q1Q0 and the input will determine the next
state and the output.
• From the diagram, Z = Q1Q0X
Input, Present State Next State JK FF Transition Output,
Input, Present State Next State Output, X Q1 Q0 Q1+ Q0+ J1 K1 J0 K0 Z
X Q1 Q0 Q1+ Q0+ Z 0 0 0 0 0 0 1 0
0 0 0 0 0 0 1 1 1 0
0 0 1 0 0 1 0 0 0 0
0 1 0 0 0 1 1 1 1 0
0 1 1 0 1 0 0 0 1 0
1 0 0 1 0 1 0 1 0
1 0 1 1 1 0 0 1 0
1 1 0 1 1 1 0 1 1
**Fill in the Z
1 1 1
**Fill in the JK FF transition column 54
53
2012/2013-I @m 9
11/20/12
Exercise 8b.12: Draw the state diagram for the example in previous
slide.
57
2012/2013-I @m 10