7 Counters PDF
7 Counters PDF
7 Counters PDF
Asynchronous(ripple)counters
Chapter 7
Counters and Registers
Asychronous Counters(Cont.)
Signal Flow
Example
Example
Answer:
3 or 19 or 163
N*16 + 3 (N is unknown)
5
MOD Number
Frequency division
Example
The first step involved in building a digital clock
is to take the 60-Hz signal and feed it into a
Schmitt-trigger, pulse-shaping circuit to produce a
square wave as illustrated in Figure 7-3. The 60HZ
square wave is then put into a MOD-60 counter, which
is used to divide the 60-HZ frequency by exactly 60
to produce a 1-HZ waveform. This 1-HZ waveform is fed
to a series of counters, which then count seconds,
minutes, hours, and so on. How many FFs are required
for the MOD-60 counter?
10
Review Questions
True or False: In an asychronous counter, all FFs
change states at the same time.
Assume that the counter in Figure 7-1 is holding the
count 0101. What will be the count after 27 clock
pulses?
What would be the MOD number of the counter if three
more FFs were added?
11
12
2N
Example
14
Determine the MOD number of the counter in Figure 76(a). Also determine the frequency at the D output
15
16
Decade counter
Any counter has 10 distinct states, no matter what
the sequence.
BCD counter
A decade counter counts in sequence from
0000(zero) through 1001(decimal 9).
17
18
Example
Review Questions
19
20
RESET IN OUTPUT
___ ___
Ro1 Ro2 | Qd Qc Qb Qa
-------------------------1
1 | 0 0 0 0
0
X | COUNT
X
0 | COUNT
21
Example
22
Example
23
24
Example
Example
A way to get a MOD-60 counter is shown below. Explain
how this circuit works.
25
Review Questions
26
27
28
Review Questions
What is the difference between the counting sequence
of an up counter and a down counter?
Describe how an asynchronous down-counter circuit
differs from an up-counter circuit.
29
30
Review Questions
Tclock N t pd
Asychronous counters are not useful at very high
frequencies, especially for large number of bits.
Another problem caused by propagation delays in
asychronous counters occurs when the counter
outputs are decoded, as is discussed later.
31
32
7-6 Synchronous(Parallel)
counters
Circuit operation
Synchronous(parallel) counters
All of the FFs are triggered simultaneously by the
clock input pulses.
Overcome the problem caused by FF propagation
delay.
33
Synchronous
JK FF
J K
Q
0 0 No Change
0 1
0
1 0
1
1 1 Toggle
34
Counter
Q Q J K
0 0
0 d
0 1
1 d
1 0
d 1
1 1
d 0
35
CP
0
1
2
3
4
5
6
Q2
0
0
0
0
1
1
0
Q1
0
0
1
1
0
0
0
Q0
0
1
0
1
0
1
0
J0 K0
1 d
J1 K1
0 d
d 1
1 d
d 1
1 d
d 1
1
d
d
0
0
d
0
1
d
d
J2 K2
0 d
0 d
0
1
d
d
d
d
0
1
36
J0 Q2Q1
Q0
0
1
00
11
Q0
00
Q0
01
11
00
01
10
Q0
11
J2 = Q1Q0
Logic diagram
K0 = 1
00
Q0
01
K2 Q2Q1
10
K1 Q2Q1
J1 = Q2Q0
0
1
J0 = 1
J2 Q2Q1
K0 Q2Q1
00 01 11 10
Q0
d
d
d
d
0
10
J1 Q2Q1
01
11
d
00
01
K
clr
11
Q2
0
0
1
1
0
Q1
0
1
0
1
0
Q0
1
1
1
1
1
J1 K1
1 d
d 0
d 0
d 0
d 1
1 d
d 1
a
clr
J
K
b
clr
clr
K2 = Q0
J0 K0
d 0
10
37
38
J0 Q2Q1
Q0
Synchronous Counter 1 3 5 7 1
CP
0
1
2
3
4
(MSB)
(LSB)
J
CP
K1 = Q0
Qc
Qb
Qa
10
J2 K2
0 d
1 d
d 0
d 1
39
Q0
0
00
01
11
K1 Q2Q1
10
Q0
0
1
J1 = 1
00
01
11
01
J2 = Q1
10
d
K0 = 0
00
01
11
10
Q0
0
11
K2 Q2Q1
10
00
J0 = 1,0
Q0
K0 Q2Q1
10
J2 Q2Q1
0
11
Q0
01
J1 Q2Q1
0
00
K1 = 1
00
01
11
10
K2 = Q1
40
Logic diagram
Qa
CP
(LSB)
K
clr
41
a
set
Qc
Qb
(MSB)
J
K
b
clr
J
K
c
clr
42
(Synchronous Counter)
43
44
45
46
.....(Synchronous Counter)
Advantage of Synchronous
counters over Asychronous
Example
Actual Ics
74ALS160/162, 74HC160/162: Synchronous decade
counters
74ALS161/163, 74HC161/163: Synchronous MOD-16
counters
47
48
Review Questions
What is the advantage of a synchronous counter over
an asynchronous counter? What is the disadvantage?
How many logic devices are required for a MOD-64
parallel counter?
What logic signal drives the J,K inputs of the MSB
flip-flop for the counter of question 2?
49
Example
50
Presettable counters
51
Synchronous Presetting
52
Review Questions
Examples of IC counters
74ALS160, 74ALS161, 74ALS612, 74ALS163
74Hc160, 74HC161, 74HC162, 74HC163
53
54
Example
The 74ALS193/HC193
55
Example
56
57
Multistage Arrangement
58
Review Questions
Describe the function of the input PL and P0 to P3.
Describe the function of the MR input
True or False: The 74HC193 cannot be preset while MR
is active.
What logic levels must be present at CPD, PL and MR
in order for the 74ALS193 to count pulses that appear
at CPU?
What would be the maximum counting range for a fourstage counter made up of 74HC193 Ics?
59
60
10
Active-High Decoding
61
Example
62
Active-LOW Decoding
63
64
Review Questions
How many gates are needed to decode a six-bit counter
fully?
Describe the decoding gate needed to produce a LOW
output when a MOD-64 counter is at the counter of 23.
65
66
11
67
Review Questions
68
69
70
71
72
12
Johnson Counter
Decoding A Johnson Counter
73
74
Review Questions
75
13