Upload
ck-yang
View
323
Download
0
Embed Size (px)
Citation preview
Apr 12, 2023
Lecturer Name [email protected]
Contact Number
IT2001PAEngineering Essentials (2/2)
Chapter 13 - Counters
2
Chapter 13 - Counters
IT2001PA Engineering Essentials (2/2)
Lesson Objectives
Upon completion of this topic, you should be able to: Sketch the output waveform of a basic 4 bit up/down
counter.
Chapter 13 - Counters
IT2001PA Engineering Essentials (2/2)
Specific Objectives
Students should be able to : Identify 2 different types of counter :
Ripple up counter and Ripple down counter
Describe the operation of a 4 bit asynchronous ripple up counter with the aid of a waveform diagram.
Construct the truth table. State the maximum number of count. Describe the operation of a basic 4 bit asynchronous ripple down
counter with the aid of a waveform diagram.
4
Chapter 13 - Counters
IT2001PA Engineering Essentials (2/2)
Binary counting sequence
Used to count the
• number of binary pulses applied
Example:
recycles
Decimal : 0 1 2 3 0
Binary : 00 01 10 11 00
5
Chapter 13 - Counters
IT2001PA Engineering Essentials (2/2)
Calculation of maximum count value of a counter
Let N = number of flip-flops
M = maximum count reached before a counter recycles.
For N number of flip-flops,
• 2 counting states.
Maximum count = 2 - 1
N
N
6
Chapter 13 - Counters
IT2001PA Engineering Essentials (2/2)
Example:
Determine the maximum count for a counter using
• 4 flip-flops
Solution:
N = 4
Maximum count,
M = 2 - 1
= 2 - 1 =
• 5 flip-flops
Solution:
N = 5
Maximum count,
M = 2 - 1
= 2 - 1 =
N
4
N
5
7
Chapter 13 - Counters
IT2001PA Engineering Essentials (2/2)
4-Bit Asynchronous Up Counter
J
K
A
A
CLK
J
K
B
B
CLK
J
K
C
C
CLK
J
K
D
D
CLK
*
*
* All J and K inputs assumed to be 1.
8
Chapter 13 - Counters
IT2001PA Engineering Essentials (2/2)
Truth TableD C B A Number of clock pulses
0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0 1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 0 0 0 0
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 (recycles)
9
Chapter 13 - Counters
IT2001PA Engineering Essentials (2/2)
Counter waveforms
CLOCK
A
B
C
D
Counter-waveforms showing frequency division by 2 for each FF.
10
Chapter 13 - Counters
IT2001PA Engineering Essentials (2/2)
Ripple Up Counter
All counter is first of all cleared to zeroes by
• activating the CLEAR inputs.
Then the counter is clocked to count up.
J
K
A
A
CLK
J
K
B
B
CLK
*
*
* All J and K inputs assumed to be 1.
AB
CLKCLKCLK
To clear FFs to “0”
11
Chapter 13 - Counters
IT2001PA Engineering Essentials (2/2)
Ripple Down Counter
All counter is first of all presetted to ones by
• activating the PRESET inputs.
Then the counter is clocked to count down.
J
K
A
A
CLK
J
K
B
B
CLK
*
*
* All J and K inputs assumed to be 1.
ABPSPS PS
To preset FFs to “1”
12
Chapter 13 - Counters
IT2001PA Engineering Essentials (2/2)
Ripple Down Counter
Ripple Up Counter
BA counts up from 00 --> 01 --> 10 --> 11 --> 00recycles
BA counts down from 11--> 10 --> 01 --> 00 -->11recycles
13
Chapter 13 - Counters
IT2001PA Engineering Essentials (2/2)
3-Bit Asynchronous Down Counter
J
K
A
A
CLK
J
K
B
B
CLK
J
K
C
C
CLK
*
*
* All J and K inputs assumed to be 1.
14
Chapter 13 - Counters
IT2001PA Engineering Essentials (2/2)
Truth Table
C B A Number of clock pulses
1 1 1 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 0 0 1 0 0 0 1 1 1 1 1 0 1 0 1 1 0 0 0 1 1
0 1 2 3 4 5 6
7 8 (recycles) 9 10
11 12
15
Chapter 13 - Counters
IT2001PA Engineering Essentials (2/2)
Counter Waveforms
CLOCK
A
B
C
Counter-waveforms showing frequency division by 2 for each FF.
1
1
1
0
1
0
1 1 1
0 0
1 1 1 1 1 1 1
0 0 00 0 0
1 11 1 1 1
0 0 0 00 0
0 0 0 0 0 0 0 0
1 1 1 1
16
Chapter 13 - Counters
IT2001PA Engineering Essentials (2/2)
Next Lesson