นี่คือไฟล์http://www4.cookman.edu/faculty/banisakher/Digital_pp08.pptในรูปแบบ html
G o o g l e สร้างรูปแบบ html ของเอกสารขึ้นโดยอัตโนมัติขณะที่เรารวบรวมข้อมูลบนเว็บ
© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved
Floyd, Digital Fundamentals, 10th ed
Digital Fundamentals
Tenth Edition
Floyd
Chapter 8
© 2008 Pearson Education
© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved
Floyd, Digital Fundamentals, 10th ed
As you know, the binary count sequence follows a familiar pattern of 0’s and 1’s as described in Section 2-2 of the text.
LSB changes on every number.
The next bit changes on every other number.
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
The next bit changes on every fourth number.
Summary
Counting in Binary
© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved
Floyd, Digital Fundamentals, 10th ed
A counter can form the same pattern of 0’s and 1’s with logic levels. The first stage in the counter represents the least significant bit – notice that these waveforms follow the same pattern as counting in binary.
LSB
MSB
Summary
Counting in Binary
© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved
Floyd, Digital Fundamentals, 10th ed
In an asynchronous counter, the clock is applied only to the first stage. Subsequent stages derive the clock from the previous stage.
Summary
Three bit Asynchronous Counter
The three-bit asynchronous counter shown is typical. It uses J-K flip-flops in the toggle mode.
CLK
K0
J0
Q0
Q0
C
C
C
J1
J2
K1
K2
Q1
Q2
Q1
HIGH
Waveforms are on the following slide…
© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved
Floyd, Digital Fundamentals, 10th ed
Summary
Three bit Asynchronous Counter
CLK
Q0
Q1
Q2
Notice that the Q0 output is triggered on the leading edge of the clock signal. The following stage is triggered from Q0. The leading edge of Q0 is equivalent to the trailing edge of Q0. The resulting sequence is that of an 3-bit binary up counter.
© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved
Floyd, Digital Fundamentals, 10th ed
Summary
Propagation Delay
Asynchronous counters are sometimes called ripple counters, because the stages do not all change together. For certain applications requiring high clock rates, this is a major disadvantage.
Notice how delays are cumulative as each stage in a counter is clocked later than the previous stage.
CLK
Q0
Q1
Q2
Q0 is delayed by 1 propagation delay, Q2 by 2 delays and Q3 by 3 delays.
© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved
Floyd, Digital Fundamentals, 10th ed
Summary
Asynchronous Decade Counter
This counter uses partial decoding to
recycle
the count sequence to zero after the 1001 state. The flip-flops are trailing-edge triggered, so clocks are derived from the Q outputs. Other truncated sequences can be obtained using a similar technique.
Waveforms are on the following slide…
CLK
K0
J0
Q0
C
C
C
J1
J2
K1
K2
Q1
Q2
HIGH
C
J3
K3
Q3
CLR
© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved
Floyd, Digital Fundamentals, 10th ed
Summary
Asynchronous Decade Counter
When Q1 and Q3 are HIGH together, the counter is cleared by a “glitch” on the CLR line.
CLK
Q0
Q1
Q2
Q3
CLR
Glitch
Glitch
© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved
Floyd, Digital Fundamentals, 10th ed
Summary
Asynchronous Counter Using D Flip-flops
D flip-flops can be set to toggle and used as asynchronous counters by connecting Q back to D. The counter in this slide is a Multisim simulation of one described in the lab manual. Can you figure out the sequence?
The next slide shows the scope…
MSB
LSB
Q to D puts D flip-flop in toggle mode
© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved
Floyd, Digital Fundamentals, 10th ed
Summary
CLR
CLK
LSB
MSB
The sequence is 0 – 2 – 1 – (CLR) (repeat)…
Note that it is momentarily in state 3 which causes it to clear.
© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved
Floyd, Digital Fundamentals, 10th ed
Summary
The 74LS93A Asynchronous Counter
The 74LS93A has one independent toggle J-K flip-flop driven by CLK A and three toggle J-K flip-flops that form an asynchronous counter driven by CLK B.
CLK A
K0
J0
Q0
C
C
C
J1
J2
K1
K2
Q1
Q2
C
J3
K3
Q3
CLK B
The counter can be extended to form a 4-bit counter by connecting Q0 to the CLK B input. Two inputs are provided that clear the count.
RO (1)
RO (2)
All J and K inputs are connected internally HIGH
© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved
Floyd, Digital Fundamentals, 10th ed
Summary
Synchronous Counters
In a synchronous counter all flip-flops are clocked together with a common clock pulse. Synchronous counters overcome the disadvantage of accumulated propagation delays, but generally they require more circuitry to control states changes.
K0
J0
Q0
C
C
C
J1
J2
K1
K2
Q0Q1
Q0
Q1
Q2
CLK
HIGH
This 3-bit binary synchronous counter has the same count sequence as the 3-bit asynchronous counter shown previously.
The next slide shows how to analyze this counter by writing the logic equations for each input. Notice the inputs to each flip-flop…
© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved
Floyd, Digital Fundamentals, 10th ed
Summary
Analysis of Synchronous Counters
A tabular technique for analysis is illustrated for the counter on the previous slide. Start by setting up the outputs as shown, then write the logic equation for each input. This has been done for the counter.
K0 = 1
J0 = 1
K1 = Q0
J1 = Q0
K2 = Q0Q1
J2 = Q0Q1
Q2 Q1 Q0
Outputs
Logic for inputs
1. Put the counter in an arbitrary state; then determine the inputs for this state.
0 0 0
0
0
0
0
1
1
2. Use the new inputs to determine the next state: Q2 and Q1 will latch and Q0 will toggle.
0 0 1
0
0
1
1
1
1
3. Set up the next group of inputs from the current output.
Continue like this, to complete the table. The next slide shows the completed table…
0 1 0
4. Q2 will latch again but both Q1 and Q0 will toggle.
© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved
Floyd, Digital Fundamentals, 10th ed
Summary
Analysis of Synchronous Counters
Outputs
Logic for inputs
0 0 0
0
0
0
0
1
1
0 0 1
0
0
1
1
1
1
0 1 0
K0 = 1
J0 = 1
K1 = Q0
J1 = Q0
K2 = Q0Q1
J2 = Q0Q1
Q2 Q1 Q0
1
1
1
1
1
1
1
1
1
1
1
1
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
0 0 0
0
0
0
0
1
1
1
1
0
0
0
0
0
0
1
1
0
0
0
0
1
1
1
1
At this points all states have been accounted for and the counter is ready to recycle…
© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved
Floyd, Digital Fundamentals, 10th ed
Summary
A 4-bit Synchronous Binary Counter
Q0
Q1
Q2
Q3
The 4-bit binary counter has one more AND gate than the 3-bit counter just described. The shaded areas show where the AND gate outputs are HIGH causing the next FF to toggle.
© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved
Floyd, Digital Fundamentals, 10th ed
With some additional logic, a binary counter can be converted to a BCD synchronous decade counter. After reaching the count 1001, the counter recycles to 0000.
This gate detects 1001, and causes FF3 to toggle on the next clock pulse. FF0 toggles on every clock pulse. Thus, the count starts over at 0000.
Summary
BCD Decade Counter
Q0
Q3
© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved
Floyd, Digital Fundamentals, 10th ed
Waveforms for the decade counter:
Summary
BCD Decade Counter
These same waveforms can be obtained with an asynchronous counter in IC form – the 74LS90. It is available in a dual version – the 74LS390, which can be cascaded. It is slower than synchronous counters (max count frequency is 35 MHz), but is simpler.
CLK
Q0
Q1
Q2
Q3
© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved
Floyd, Digital Fundamentals, 10th ed
Summary
A 4-bit Synchronous Binary Counter
The 74LS163 is a 4-bit IC synchronous counter with additional features over a basic counter. It has parallel load, a CLR input, two chip enables, and a ripple count output that signals when the count has reached the terminal count.
Example waveforms are on the next slide…
Data inputs
Data outputs
CLR
LOAD
ENT
ENP
CLK
RCO
Q0
Q1
Q2
Q3
D0
D1
D2
D3
© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved
Floyd, Digital Fundamentals, 10th ed
Summary
Data inputs
Data outputs
CLR
LOAD
ENT
ENP
CLK
RCO
Q0
Q1
Q2
Q3
D0
D1
D2
D3
Clear Preset
Count Inhibit
12 13 14 15 0 1 2
© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved
Floyd, Digital Fundamentals, 10th ed
Summ