Counters Prepared by: Careene McCallum-Rodney. Introduction Counters uses a Toggle Flip Flops to...

18
Counters Prepared by: Careene McCallum- Rodney

Transcript of Counters Prepared by: Careene McCallum-Rodney. Introduction Counters uses a Toggle Flip Flops to...

Page 1: Counters Prepared by: Careene McCallum-Rodney. Introduction Counters uses a Toggle Flip Flops to count either UP or DOWN in binary. A toggle flip flop.

Counters

Prepared by: Careene McCallum-Rodney

Page 2: Counters Prepared by: Careene McCallum-Rodney. Introduction Counters uses a Toggle Flip Flops to count either UP or DOWN in binary. A toggle flip flop.

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.

Page 3: Counters Prepared by: Careene McCallum-Rodney. Introduction Counters uses a Toggle Flip Flops to count either UP or DOWN in binary. A toggle flip flop.

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).

Page 4: Counters Prepared by: Careene McCallum-Rodney. Introduction Counters uses a Toggle Flip Flops to count either UP or DOWN in binary. A toggle flip flop.

Up Counter (0 – 7)

Page 5: Counters Prepared by: Careene McCallum-Rodney. Introduction Counters uses a Toggle Flip Flops to count either UP or DOWN in binary. A toggle flip flop.

Activity 1Draw the block diagram for the

up-counter from 0 – 15, inclusive.

Page 6: Counters Prepared by: Careene McCallum-Rodney. Introduction Counters uses a Toggle Flip Flops to count either UP or DOWN in binary. A toggle flip flop.

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.

Page 7: Counters Prepared by: Careene McCallum-Rodney. Introduction Counters uses a Toggle Flip Flops to count either UP or DOWN in binary. A toggle flip flop.

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

Page 8: Counters Prepared by: Careene McCallum-Rodney. Introduction Counters uses a Toggle Flip Flops to count either UP or DOWN in binary. A toggle flip flop.

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

Page 9: Counters Prepared by: Careene McCallum-Rodney. Introduction Counters uses a Toggle Flip Flops to count either UP or DOWN in binary. A toggle flip flop.

Up Counter (0 – 7)

Timing diagram

Page 10: Counters Prepared by: Careene McCallum-Rodney. Introduction Counters uses a Toggle Flip Flops to count either UP or DOWN in binary. A toggle flip flop.

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

Page 11: Counters Prepared by: Careene McCallum-Rodney. Introduction Counters uses a Toggle Flip Flops to count either UP or DOWN in binary. A toggle flip flop.

Activity 2Draw the timing diagram for the

up-counter from 0 – 11, inclusive.

Page 12: Counters Prepared by: Careene McCallum-Rodney. Introduction Counters uses a Toggle Flip Flops to count either UP or DOWN in binary. A toggle flip flop.

Down Counter (7 – 0)

Page 13: Counters Prepared by: Careene McCallum-Rodney. Introduction Counters uses a Toggle Flip Flops to count either UP or DOWN in binary. A toggle flip flop.

Activity 3Draw the block diagram for the

down-counter from 15 - 0, inclusive.

Page 14: Counters Prepared by: Careene McCallum-Rodney. Introduction Counters uses a Toggle Flip Flops to count either UP or DOWN in binary. A toggle flip flop.

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.

 

Page 15: Counters Prepared by: Careene McCallum-Rodney. Introduction Counters uses a Toggle Flip Flops to count either UP or DOWN in binary. A toggle flip flop.

Down Counter (7 – 0)

Timing Diagram

Page 16: Counters Prepared by: Careene McCallum-Rodney. Introduction Counters uses a Toggle Flip Flops to count either UP or DOWN in binary. A toggle flip flop.

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 

Page 17: Counters Prepared by: Careene McCallum-Rodney. Introduction Counters uses a Toggle Flip Flops to count either UP or DOWN in binary. A toggle flip flop.

Activity 4Draw the timing diagram for the

down-counter from 15 – 5, inclusive.

Page 18: Counters Prepared by: Careene McCallum-Rodney. Introduction Counters uses a Toggle Flip Flops to count either UP or DOWN in binary. A toggle flip flop.