Presentation is loading. Please wait.

Presentation is loading. Please wait.

Principles & Applications

Similar presentations


Presentation on theme: "Principles & Applications"— Presentation transcript:

1 Principles & Applications
Digital Electronics Principles & Applications Seventh Edition Roger L. Tokheim Chapter 8 Counters ©2008 The McGraw-Hill Companies, Inc. All rights reserved.

2 INTRODUCTION Overview of Counters Characteristics of Counters
Ripple Up Counter Ripple Counter with Waveforms Ripple Down Counter Self-stopping Counter Frequency Division using Counters Using Counter ICs Magnitude Comparators Troubleshooting Hints

3 Overview of Counters Counter-by definition One input (clock)
Outputs follow defined sequence Common tasks of counter Count up or down Increment or decrement count Sequence events Divide frequency Address memory As temporary memory

4 QUIZ 1. A digital counter has a single clock input with many outputs and the counter follows defined sequence such as 000, 001, 010, 011, 100, 101, 110, 111, 000, etc. (True or False) True Several common tasks of a counter are to count up or down, divide frequency, or as temporary memory. (True or False) True

5 Characteristics of Counters
Number of bits (4-bit, 8-bit, etc.) Maximum count 4 bit = 24 = 0000 to 1111 in binary 8 bit = 28 = to in binary Modulus of counter-number of states Decade counter 4-bit 8-bit Up or down counter Asynchronous or synchronous counter Presettable counter Self-stopping counter

6 QUIZ 1. A 4-bit counter will count from binary 0000 to __________.
1111 2. The modulus of a counter is the number of states it will cycle through such as a decade counter has a modulus of __________. 10 3. Counters can be designed to count up or downward or devised to be self-stopping. (True or False) True 4. A 4-bit counter would have modulus of 4 (mod-4 counter) because it is constructed using four flip-flops. (True or False) False

7 Ripple Counter Binary Output Clock Input Pulse 5 Pulse 6 Pulse 8 Pulse 4 Pulse 7 Pulse 1 Pulse 2 Pulse 3 This 4-bit counter has 16 states and will count from binary 0000 through 1111 and then reset back to 0000. The counter has a modulus of 16. On the next clock pulse (8) all FFs will toggle because each will receive a H-to-L pulse- one after another. Watch the count ripple thru the counter. All J-K flip-flops in the TOGGLE MODE PS and CLR inputs are INACTIVE

8 Ripple Counter With Waveforms
Binary Output Clock Input Pulse 5 Pulse 4 Pulse 2 Pulse 3 Pulse 1 Clock input 1s output 2s output 4s output FFs triggered on H-to-L pulse. CLK toggles 1s FF. 1s FF toggles 2s FF. 2s FF toggles 4s FF.

9 QUIZ Q#1- After pulse 1 the output of the mod-16 counter will be binary ___. Q#2- After pulse 2 the output of the mod-16 counter will be binary ___. Q#3- After pulse 8 the output of the mod-16 counter will be binary ___. Q#4- After pulse 15 the output of the mod-16 counter will be binary ___. Pulse 15 Pulse 8 Pulse 2 Pulse 1 Input Pulses

10 Decade Counter All J & K inputs = 1 All PR inputs = 1 0 0 0 1 0 0 0 0
Initial count at 0111 Binary Output Clock Input Pulse 8 Pulse 2 Pulse 1 Pulse 4 Pulse 3 Pulse 7 Pulse 6 Pulse 5 To clear input of each FF Short negative pulse All J & K inputs = 1 All PR inputs = 1 Count is at 1001. Next clock pulse will increment counter for a short time to 1010 which will activate the NAND gate and reset the counter to 0000. To change mod-16 counter to decade counter: Reset count to 0000 after 1001 (9) count. When count hits 1010 reset to 0000. See added 2-input NAND gate that clears all JK FFs to 0 when count hits 1010.

11 QUIZ 0 1 1 0 Q#1- This is a ___ (mod-10, mod-16) up counter.
Q#2- This circuit can be described as a ___ (decade, 4-bit) up counter. Q#3- The ___ gate generates a very short LOW pulse when the count reaches 1010 and resets to counter to 0000. Q#4- After 0110, the counting sequence would be 0111, 1000, 1001, 1010, 1011, 1100, 1101, 1110, 1111, 0000, etc. (T or F) ANS: mod-10 ANS: decade ANS: NAND ANS: False Input pulses To clear input of each FF

12 Down Counter Initial count set at binary 111 0 1 1 0 1 0 1 0 0 1 0 1 1 1 0 1 1 1 Pulse 2 Pulse 5 Pulse 4 Pulse 1 Pulse 3 Changes from Ripple Up Counter are wiring from Q’ outputs (instead of Q outputs) to the CLK input of the next FF.

13 QUIZ 1 1 1 Q#1- This circuit can be described as a 3-bit ripple ___
(down-counter, up-counter). Q#2- This circuit is a self-stopping 3-bit ripple down counter. (T or F) Q#3- The counting sequence of this circuit is 111, 110, 101, 100, 011, 010, 001, 000, 111, 110, 101, 100, etc. (T or F) ANS: down-counter ANS: False ANS: True Input pulses

14 Self-Stopping Down Counter
Watch count on Pulse 8. The count remained at binary 000. 0 1 1 0 1 0 0 0 0 1 0 1 0 0 1 1 0 0 1 1 0 1 1 1 Pulse 8 Pulse 1 Pulse 7 Pulse 2 Pulse 6 Pulse 5 Pulse 4 Pulse 3 This is a 3-bit down counter. The 1s FF is in TOGGLE mode when counting (J & K = 1). The 1s FF switches to HOLD mode when the J and K inputs are forced LOW by the OR gate when the count decrements to The count stops at 000.

15 QUIZ 1 1 1 Q#1- This circuit could be described as a 3-bit ___
(decade, self-stopping) ripple counter. Q#2- The 3-input OR gate generates a ___ (HIGH, LOW) when the count decreases to 000 which stops the count at 000. Q#3- With the count at 111, the OR gate outputs a HIGH which places the left FF in the toggle mode. (T or F) ANS: self-stopping ANS: LOW ANS: True Input pulses

16 Counter Used for Frequency Division
 4 200 Hz  8 400 Hz 100 Hz 50 Hz  2  16 Clock Input 800 Hz

17 QUIZ Frequency? Frequency? Frequency? Frequency? Frequency? 3200 Hz
Q#1- What is the output frequency from the 1s J-K flip-flop with an input frequency of 3200 Hz? Q#2- What is the output frequency from the 2s J-K flip-flop with an input frequency of 3200 Hz? Q#3- What is the output frequency from the 4s J-K flip-flop with an input frequency of 3200 Hz? Q#4- What is the output frequency from the 8s J-K flip-flop with an input frequency of 3200 Hz? Q#5- The 8s output from the 4-bit counter is referred to as the ___ (divide-by-4, divide-by-16) output. ANS: 1600 ANS: 800 ANS: 400 ANS: 200 ANS: divide-by-16 Frequency? Frequency? Frequency? Frequency? Frequency? Clock Input 3200 Hz

18 Using the 7493 Counter IC Counters are available in IC form.
Either ripple (7493 IC) or synchronous (74192 IC) counters are available. ? Hz 400 Hz 100 Hz ? Hz ? Hz 800 Hz 1600 Hz 7493 Counter IC wired as a 4-bit binary counter

19 Magnitude Comparator A magnitude comparator is a combinational logic device that compares the value of two binary numbers and responds with one of three outputs (A=B or A>B or A<B). 74HC85 Magnitude Comparator A = B A < B A > B A(0) A(1) A(2) A(3) B(0) B(1) B(2) B(3) Input binary 0111 Input binary 1111 Input binary 0001 HIGH HIGH Input binary 0110 Input binary 0111 Input binary 1100 HIGH

20 QUIZ Q#1- The 74HC85 Comparator IC compares two 4-bit ___
(binary, decimal) numbers (A and B) and generates one of three outputs including (1) A = B, (2) A > B, or (3) A < B. Q#2- Which output of the comparator IC will be activated with these two 4-bit binary numbers as inputs? Q#3- Which output of the comparator IC will be activated with these two 4-bit binary numbers as inputs? Q#4- Which output of the comparator IC will be activated with these two 4-bit binary numbers as inputs? ANS: binary ANS: A = B ANS: A < B ANS: A > B 74HC85 Magnitude Comparator A = B A < B A > B A(0) A(1) A(2) A(3) B(0) B(1) B(2) B(3) 0101 0101 1101 ? 0101 1011 1010

21 Simple Troubleshooting Hints
Feel top of IC to determine if it is hot Look for broken connections, signs of excessive heat Smell for overheating Check power source Trace path of logic through circuit Know the normal operation of the circuit

22 QUIZ 1. The first three steps in troubleshooting are the use of your senses to (1) feel the top of the ICs for overheating, (2) to __________ for broken connections, and (3) to smell for signs of overheating. look 2. The forth step in troubleshooting is to use a simple handheld instrument called a __________ to check the power sources at each IC. logic probe 3. Your knowledge of the normal operation of the circuit and equipment is very important in troubleshooting. (True or False) True

23 REVIEW Overview of Counters Characteristics of Counters
Ripple Up Counter Ripple Counter with Waveforms Ripple Down Counter Self-stopping Counter Frequency Division using Counters Using Counter ICs Magnitude Comparators Troubleshooting Hints


Download ppt "Principles & Applications"

Similar presentations


Ads by Google