Counters Prepared by: Careene McCallum-Rodney. Introduction Counters uses a Toggle Flip Flops to...
-
Upload
barbra-mccoy -
Category
Documents
-
view
215 -
download
2
Transcript of Counters Prepared by: Careene McCallum-Rodney. Introduction Counters uses a Toggle Flip Flops to...
Counters
Prepared by: Careene McCallum-Rodney
IntroductionCounters uses a Toggle Flip Flops
to count either UP or DOWN in binary.
A toggle flip flop is needed for each bit in the number.
IntroductionIf you are counting from 0—7,
you will need 3 bits (because the largest number can be represented using 3 bits).
If you are counting from 0—15, you will need 4 bits (because the largest number can be represented using 4 bits).
Up Counter (0 – 7)
Activity 1Draw the block diagram for the
up-counter from 0 – 15, inclusive.
Up Counter (0 – 7)The up counter connects the 2nd
and 3rd TFF to the Q output. ◦What this signifies is that the same
way Q started that’s how the other two TFFs will start.
Up Counter (0 – 7)The first TFF will toggle every 2
clock periods. ◦A clock period is each time the clock
changes its state (i.e. the clock being on 0, 1, 0, 1 is 4 clock periods).
2 clock periods
Up Counter (0 – 7) The second TFF will toggle every 4
clock periods.The third TFF will toggle every 8 clock
periods.
2 clock periods
4 clock periods
8 clock periods
Up Counter (0 – 7)
Timing diagram
Up Counter (0 – 7)State Table
Clk Q0 Q1 Q2 Value in Decimal
1 0 0 0 01 0 0 1 11 0 1 0 21 0 1 1 31 1 0 0 41 1 0 1 51 1 1 0 61 1 1 1 7
Activity 2Draw the timing diagram for the
up-counter from 0 – 11, inclusive.
Down Counter (7 – 0)
Activity 3Draw the block diagram for the
down-counter from 15 - 0, inclusive.
Down Counter (7 – 0)
• The down counter connects the 2nd and 3rd TFF to the Q’ output. • What this signifies is that the
same way Q’ started that’s how the other two TFFs will start.
Down Counter (7 – 0)
Timing Diagram
Down Counter (7 – 0)
STATE TABLE Clk Q0 Q1 Q2 Value in Decimal1 1 1 1 71 0 1 1 61 1 0 1 51 1 0 0 41 0 1 1 31 0 1 0 21 0 0 1 11 0 0 0 0
Activity 4Draw the timing diagram for the
down-counter from 15 – 5, inclusive.