counters and registers
DESCRIPTION
Counters and Registers. Wen-Hung Liao, Ph.D. Objectives. Understand several types of schemes used to decode different types of counters. Anticipate and eliminate the effects of decoding glitches. Compare the major differences between ring and Johnson counters. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Counters and Registers](https://reader035.vdocument.in/reader035/viewer/2022062304/56813958550346895da0fa4e/html5/thumbnails/1.jpg)
Counters and Registers
Wen-Hung Liao, Ph.D.
![Page 2: Counters and Registers](https://reader035.vdocument.in/reader035/viewer/2022062304/56813958550346895da0fa4e/html5/thumbnails/2.jpg)
Objectives
Understand several types of schemes used to decode different types of counters.
Anticipate and eliminate the effects of decoding glitches.
Compare the major differences between ring and Johnson counters.
Analyze the operation of a frequency counter and of a digital clock.
Recognize and understand the operation of various types of IC registers.
![Page 3: Counters and Registers](https://reader035.vdocument.in/reader035/viewer/2022062304/56813958550346895da0fa4e/html5/thumbnails/3.jpg)
Cascading BCD Counters
Figure 7-32: a multistage arrangement that counts from 000 to 999.
How does it work?
![Page 4: Counters and Registers](https://reader035.vdocument.in/reader035/viewer/2022062304/56813958550346895da0fa4e/html5/thumbnails/4.jpg)
Synchronous Counter Design
J-K flip-flop excitation table
Transition Present State
Next State J K
00 0 0 0 X
01 0 1 1 X
10 1 0 X 1
11 1 1 X 0
![Page 5: Counters and Registers](https://reader035.vdocument.in/reader035/viewer/2022062304/56813958550346895da0fa4e/html5/thumbnails/5.jpg)
Design Procedure
Step1: Determine the desire number of bits (FFs) and the desired counting sequence.
Step2: Draw the state transition diagram showing all possible states, including those that are not part of the desired counting sequence.
Step 3: Use the state-transition diagram to set up a table that lists all PRESENT states and their NEXT states.
![Page 6: Counters and Registers](https://reader035.vdocument.in/reader035/viewer/2022062304/56813958550346895da0fa4e/html5/thumbnails/6.jpg)
Design Procedure (cont’d)
Step4: Add a column to the above table for each J and K input to produce a circuit excitation table.
Step 5: Design the logic circuits to generate the levels required at each J and K input.
Step 6: Implement the final expressions.
![Page 7: Counters and Registers](https://reader035.vdocument.in/reader035/viewer/2022062304/56813958550346895da0fa4e/html5/thumbnails/7.jpg)
Example
MOD-5 synchronous counter
000001010011100000…
State transition diagram
![Page 8: Counters and Registers](https://reader035.vdocument.in/reader035/viewer/2022062304/56813958550346895da0fa4e/html5/thumbnails/8.jpg)
Present and Next States
![Page 9: Counters and Registers](https://reader035.vdocument.in/reader035/viewer/2022062304/56813958550346895da0fa4e/html5/thumbnails/9.jpg)
Circuit Excitation Table
![Page 10: Counters and Registers](https://reader035.vdocument.in/reader035/viewer/2022062304/56813958550346895da0fa4e/html5/thumbnails/10.jpg)
K-maps
JA=C’, KA=1 (Figure 7-34)
![Page 11: Counters and Registers](https://reader035.vdocument.in/reader035/viewer/2022062304/56813958550346895da0fa4e/html5/thumbnails/11.jpg)
Final Implementation
![Page 12: Counters and Registers](https://reader035.vdocument.in/reader035/viewer/2022062304/56813958550346895da0fa4e/html5/thumbnails/12.jpg)
Step Motor Control
A step motor is a motor that rotates in steps rather than in a continuous motion, typically 15 degrees per step.
Used in positioning of read/write heads on magnetic tapes, in controlling print heads…
Figure 7.37: CW rotation and CCW rotation. Apply the design procedure to generate the
circuit.
![Page 13: Counters and Registers](https://reader035.vdocument.in/reader035/viewer/2022062304/56813958550346895da0fa4e/html5/thumbnails/13.jpg)
Step Motor Control (cont’d)
![Page 14: Counters and Registers](https://reader035.vdocument.in/reader035/viewer/2022062304/56813958550346895da0fa4e/html5/thumbnails/14.jpg)
FIGURE 7-38 (a) K maps for JB and KB; (b) K maps for JA and KA .
![Page 15: Counters and Registers](https://reader035.vdocument.in/reader035/viewer/2022062304/56813958550346895da0fa4e/html5/thumbnails/15.jpg)
Final Implementation
![Page 16: Counters and Registers](https://reader035.vdocument.in/reader035/viewer/2022062304/56813958550346895da0fa4e/html5/thumbnails/16.jpg)
Shift-Register Counters
Use feedback, output of last FF is connected back to the first FF in some way.
Ring counter: circulating shift register. See Figure 7-40. Why is it still a counter?
![Page 17: Counters and Registers](https://reader035.vdocument.in/reader035/viewer/2022062304/56813958550346895da0fa4e/html5/thumbnails/17.jpg)
Four-Bit Ring Counter
![Page 18: Counters and Registers](https://reader035.vdocument.in/reader035/viewer/2022062304/56813958550346895da0fa4e/html5/thumbnails/18.jpg)
State Transition Diagram
MOD-4 Counter Does not require decoding gates
![Page 19: Counters and Registers](https://reader035.vdocument.in/reader035/viewer/2022062304/56813958550346895da0fa4e/html5/thumbnails/19.jpg)
Starting a Ring Counter
Start off with only one FF in the 1 state and all others in the 0 state.
Use PRE and CLR inputs and Schmitt-trigger INVERTERS(page 261-262).
![Page 20: Counters and Registers](https://reader035.vdocument.in/reader035/viewer/2022062304/56813958550346895da0fa4e/html5/thumbnails/20.jpg)
Johnson Counter
Also known as the twisted-ring counter. Same as the ring counter except that the inv
erted output of the last FF is connected to the input of the first FF.
Counting sequence: 000100110111011001000
A MOD-6 counter (twice the number of FFs) Needs decoding gates. Figure 7-62
![Page 21: Counters and Registers](https://reader035.vdocument.in/reader035/viewer/2022062304/56813958550346895da0fa4e/html5/thumbnails/21.jpg)
MOD-6 Johnson Counter
![Page 22: Counters and Registers](https://reader035.vdocument.in/reader035/viewer/2022062304/56813958550346895da0fa4e/html5/thumbnails/22.jpg)
State Transition Diagram
![Page 23: Counters and Registers](https://reader035.vdocument.in/reader035/viewer/2022062304/56813958550346895da0fa4e/html5/thumbnails/23.jpg)
Decoding a Johnson Counter
Each decoding has only two inputs. It can be shown that for any size Johnson
counter, the decoding gates will have only two inputs.
![Page 24: Counters and Registers](https://reader035.vdocument.in/reader035/viewer/2022062304/56813958550346895da0fa4e/html5/thumbnails/24.jpg)
Integrated-Circuit Registers
Parallel in/Parallel Out: 74174 and 74178 Serial in/Serial Out: 4731B Parallel in/Serial
Out:74165,74LS165,74HC165 Serial in/Parallel Out:
74164,74LS164,74HC164
![Page 25: Counters and Registers](https://reader035.vdocument.in/reader035/viewer/2022062304/56813958550346895da0fa4e/html5/thumbnails/25.jpg)
PIPO Register
![Page 26: Counters and Registers](https://reader035.vdocument.in/reader035/viewer/2022062304/56813958550346895da0fa4e/html5/thumbnails/26.jpg)
74ALS174 Wired as a Shift Register
![Page 27: Counters and Registers](https://reader035.vdocument.in/reader035/viewer/2022062304/56813958550346895da0fa4e/html5/thumbnails/27.jpg)
SISO Register
![Page 28: Counters and Registers](https://reader035.vdocument.in/reader035/viewer/2022062304/56813958550346895da0fa4e/html5/thumbnails/28.jpg)
Delay a Digital Signal
![Page 29: Counters and Registers](https://reader035.vdocument.in/reader035/viewer/2022062304/56813958550346895da0fa4e/html5/thumbnails/29.jpg)
PISO Register
![Page 30: Counters and Registers](https://reader035.vdocument.in/reader035/viewer/2022062304/56813958550346895da0fa4e/html5/thumbnails/30.jpg)
SIPO Register
![Page 31: Counters and Registers](https://reader035.vdocument.in/reader035/viewer/2022062304/56813958550346895da0fa4e/html5/thumbnails/31.jpg)
Example 7-23