Escolar Documentos
Profissional Documentos
Cultura Documentos
CHAPTER 2
Counter
- A counter is a sequential logic circuit consisting
of a set of flip-flops which can go through a
sequence of states.
COUNTER
Introduction (continue)
Counters
Asynchronous counter
(Ripple counter)
Synchronous counters
Asynchronous
High Speed
Slow speed
3
Introduction (continue)
Synchronous
Asynchronous counter
Asynchronous counter
10
Q0 is reciprocal of Q0
The term recycle refers to the transition from final state to original state
Therefore, 2-bit asynchronous counter has four state and consists of two FF
At 4th clock pulse, the counter is recycle to its original state (both FF are LOW)
11
12
13
14
Disadvantages of asynchronous
counter (continue)
Propagation delay occurs through FF0 cause Q0 lags some time compare to CLK
This effect ripples the next FF resulting Q1 delay some time from Q0
The cumulative delay of asynchronous counter is the major disadvantage of this counter
in many applications.
It limits the rate at which the counter can be clocked and creates decoding problems.
The maximum cumulative delay in a counter must be less than the period of the clk
waveform.
15
16
Disadvantages of asynchronous
counter (continue)
Draw the timing diagram for 4-bit asynchronous up counter given below
Eg: If you look closely at the figure below, for a short period of time (50ns) right after
state 011, you see that state 010 occurs before 100. This is obviously not the correct
binary counting sequence and while the human eye is much too slow to see this
temporary state, our digital circuits will be fast enough to detect it. These erroneous
count patterns can generate what are called glitches in the signals that are produced
by digital systems using asynchronous counters. In spite of their simplicity, these
problems limit the usefulness of asynchronous counters in digital applications.
17
18
Each flip-flop has a propagation delay for 10ns. Determine the total propagation
delay time from the triggering edge of a clock pulse until a corresponding
change can occur in the state of Q3. Also determine the maximum clock
frequency at which the counter can be operated.
Answer:
For the total delay time, the effect of CLK8 or CLK16 must propagate through 4
flip-flops before Q3 changes.
tp(tot) = 4 x 10ns = 40ns
* The counter should be operated below this frequency to avoid problems due to
the propagation delay.
19
20
Example
21
Frequency Division
24
Example
25
28
Exercise
Modify MOD-10 asynchronous counter to have MOD-12 and draw the timing
diagram (1100)
0
1.
29
Answer:
30
Exercise (continue)
2.
31
32
Answer:
Synchronous counter
33
Synchronous counter
34
Excitation table
35
36
37
38
39
40
Using JK flip-flop
Using T flip-flop
41
PRESENT
STATE
42
NEXT STATE
FLIP-FLOP INPUTS
Q2
Q1
Q0
Q2
Q1
Q0
J2 K2
J1 K1
J0 K0
0 X
0 X
1 X
0 X
1 X
X 1
0 X
X 0
1 X
1 X
X 1
X 1
X 0
0 X
1 X
X 0
1 X
X 1
X 0
X 0
1 X
X 1
X 1
X 1
Counter implementation
43
44
Q0
PRESENT
STATE
NEXT STATE
Q2Q1
FLIP-FLOP INPUTS
Q0
Q0
0
00
00
00
01
01
01
Q2Q1
Q2Q1
Q2
Q1
Q0
Q2
Q1
Q0
D2
D1
D0
11
11
11
10
10
10
D2 map
D1 map
D0 map
45
46
47
48
Synchronous mod-counter
49
50
Q0
PRESENT
STATE
NEXT STATE
Q2Q1
FLIP-FLOP INPUTS
Q0
Q0
0
00
00
00
01
01
01
Q2Q1
Q2Q1
Q2
Q1
Q0
Q2
Q1
Q0
D2
D1
D0
11
11
11
10
10
10
D2 map
51
D1 map
D0 map
52
Counter implementation
State diagram
NEXT STATE
FLIP-FLOP INPUTS
Q2
Q1
Q0
Q2
Q1
Q0
T2
T1
T0
53
K-maps
Counter implementation
Q0
Q2Q1
54
Q0
Q0
0
00
00
00
01
01
01
11
11
11
10
10
10
T2 map
Q2Q1
T1 map
Q2Q1
T0 map
55
56
Exercise
a)
b)
c)
Topic:
Counter decoding
Decoding glitches
Strobing technique
57
58
Cascaded Counters
62
Synchronous cascading
Answer:
Overall modulus = 10 x 8 =80 = mod-80 counter
Frequency at B = fin/80 = 250Hz
64
Example 2:
How many decade counters are required to convert a clock of 1
MHz to 1 Hz? Draw the circuit.
Answer: fout = fin/10n
1 = (1x106)/10n
n = log (1x106)/log10
n = 6 decade counter
Answer:
(a) the overall modulus for the 3 counter configuration is 8 x 12 x 16
= 1536 = mod-1536
(b) the overall modulus for the 4 counter configuration is 10 x 4 x 7 x
5 = 1400 = mod-1400
65
Decade counter
BCD counter
66
67
68
70
Decoding glitches
Example of glitches
(a)
(b)
Occurs to
Asynchronous counter propagation delay due to ripple effect
Synchronous counter propagation delay from the clock to the Q
output of every flip-flop
Exercise 1