modulo 8 counter : counts upto 7. so we need three flip

20
Example 1: Design a modulo-8 binary-up counter using T- Flip Flop Modulo 8 counter : Counts upto 7. So we need three Flip-flops for eight states 1

Upload: others

Post on 28-Jul-2022

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Modulo 8 counter : Counts upto 7. So we need three Flip

Example 1: Design a modulo-8 binary-up counter using T- Flip Flop

Modulo 8 counter : Counts upto 7. So we need three Flip-flops for eight states

1

Page 2: Modulo 8 counter : Counts upto 7. So we need three Flip

Modulo-8 counter

2

Page 3: Modulo 8 counter : Counts upto 7. So we need three Flip

3

Modulo-8 counter

Page 4: Modulo 8 counter : Counts upto 7. So we need three Flip

4

Modulo-8 counter

Page 5: Modulo 8 counter : Counts upto 7. So we need three Flip

Example 2:Design a modulo-8 binary-up counter with input x using T- Flip Flop

Modulo 8 counter : Counts upto 7 . So we need three Flip-flops for eight states

5

Page 6: Modulo 8 counter : Counts upto 7. So we need three Flip

Example 2: modulo 8 counter with I/p x

6

Page 7: Modulo 8 counter : Counts upto 7. So we need three Flip

7

Example 2: modulo 8 counter with I/p x

Page 8: Modulo 8 counter : Counts upto 7. So we need three Flip

8

Example 2: modulo 8 counter with I/p x

8

Page 9: Modulo 8 counter : Counts upto 7. So we need three Flip

Example 3: Design a binary-down decade counter using SR- Flip Flop without input x

Decade Counter: Counts up to 9 . So we need four Flip-Flops for ten states

9

Page 10: Modulo 8 counter : Counts upto 7. So we need three Flip

10

Example 3: Binary decade counter

Page 11: Modulo 8 counter : Counts upto 7. So we need three Flip

11

Example 3: Binary decade counter

11

Page 12: Modulo 8 counter : Counts upto 7. So we need three Flip

12

Example 3: Binary decade counter

Page 13: Modulo 8 counter : Counts upto 7. So we need three Flip

13

Example 3: Binary decade counter

Page 14: Modulo 8 counter : Counts upto 7. So we need three Flip

14

A slightly fancier counter

Let’s try to design a slightly different two-bit counter:• Again, the counter outputs will be 00, 01, 10 and 11.

• Now, there is a single input, X. When X=0, the counter value should increment on each clock cycle. But when X=1, the value should decrement on successive cycles.

We’ll need two flip-flops again. Here are the four possible states:

00 01

1011

Page 15: Modulo 8 counter : Counts upto 7. So we need three Flip

15

The complete state diagram and table

00 01

1011

0

0

0

10 1

1

1

Present State Inputs Next State

Q1 Q0 X Q1 Q0

0 0 0 0 1

0 0 1 1 1

0 1 0 1 0

0 1 1 0 0

1 0 0 1 1

1 0 1 0 1

1 1 0 0 0

1 1 1 1 0

• Here’s the complete state diagram and state table for this circuit.

Page 16: Modulo 8 counter : Counts upto 7. So we need three Flip

16

D flip-flop inputs

If we use D flip-flops, then the D inputs will just be the same as the desired next states.

Equations for the D flip-flop inputs are shown at the right.

Why does D0 = Q0’ make sense?

Present State Inputs Next State

Q1 Q0 X Q1 Q0

0 0 0 0 1

0 0 1 1 1

0 1 0 1 0

0 1 1 0 0

1 0 0 1 1

1 0 1 0 1

1 1 0 0 0

1 1 1 1 0

Q0

0 1 0 1

Q1 1 0 1 0

X

Q0

1 1 0 0

Q1 1 1 0 0

X

D1 = Q1 Q0 X

D0 = Q0’

Page 17: Modulo 8 counter : Counts upto 7. So we need three Flip

Example 5: Synthesis Using T Flip-Flops

17

The synthesis using T flip-flops will be demonstrated by designing a binary counter. An n-bit binary counter consists of n flip-flops that can count in binary from 0 to 2n-1. The state diagram of a 3-bit counter is:

Page 18: Modulo 8 counter : Counts upto 7. So we need three Flip

18

Synthesis Using T Flip-Flops

Page 19: Modulo 8 counter : Counts upto 7. So we need three Flip

19

Synthesis using T Flip-Flops

Page 20: Modulo 8 counter : Counts upto 7. So we need three Flip

20

Synthesis Using T Flip-Flops