Vous êtes sur la page 1sur 12

Flip-Flops: The Building Block Sequential Logic

Counters

Asynchronous Counters
async = events that DO NOT occur at the
same time

Asynchronous Counters
async = events that DO NOT occur at the
same time

async counter = FFs within the counter


DO NOT have a common clock pulse

async counter = FFs within the counter


DO NOT have a common clock pulse

Asynchronous Counters
async = events that DO NOT occur at the
same time

2-bit Asynchronous Binary Counter

async counter = FFs within the counter


DO NOT have a common clock pulse

2-bit Asynchronous Binary Counter

2-bit Asynchronous Binary Counter

0 0

1 0

0 1

1 1

3-bit Async Bin Counter

3-bit Async Bin Counter

10

3-bit Async Bin Counter Asynchronous Counter a.k.a. Ripple Counter

11

12

Propagational Delay
m d disa ajor v

age! ant

Calculate the delay


Bew are

13

14

Asynchronous Decade Counters


Binary counters count from 0 to 2 (n=no. of FFs) What if ... you need to count just from 0 to 9?
n-1

The Answer
Do partial decoding

15

16

BCD Decade Counters

17

18

(4-bit asynchronous binary counter)

74LS93

(4-bit asynchronous binary counter)

74LS93

19

20

(4-bit asynchronous binary counter)

74LS93
C C CTR DIV 12

CLK A CLK B RO(1) RO(2)

That was async...

Q0 Q1 Q2 Q3

21

22

Synchronous Counter Now, its time for Synchronous counters


FFs in the counter are clocked at the same
time by a common clock pulse. counter...

Lets begin with a 2-bit synchronous binary

23

24

2-bit Synchronous Binary Counter

Whats going on?

25

26

What would we get?

3-bit Synchronous Binary Counter

delay is neglected for simplicity


27 28

4-Bit Sync Bin Counter

29

30

4-bit Synchronous Decade Counter

31

32

Up/Down Sync Counters

Lets make one (3-bit counter)

progressing in either direction (up/down) may be called a bidirectional counter


0 1 2 3 4 5 4 3 2 3 4 5 6 7 6 5 etc... up dn up dn Q0: J0 = K0 = 1 Q1: J1 = K1 = (Q0 UP) + (Q0 DN) Q2: J2 = K2 = (Q0 Q1 UP) + (Q0 Q1 DN)
33 34

Lets make one (3-bit counter)

Lets make one (3-bit counter)


Q0: J0 = K0 = 1 Q2: J2 = K2 = (Q0 Q1 UP) + (Q0 Q1 DN)

Q0: J0 = K0 = 1 Q1: J1 = K1 = (Q0 UP) + (Q0 DN) Q2: J2 = K2 = (Q0 Q1 UP) + (Q0 Q1 DN)
35

Q1: J1 = K1 = (Q0 UP) + (Q0 DN)

36

General Model of a Sequential Circuit

Design of Synchronous Counters

37

38

Step 1: State Diagram

Step 2: Next-state Table

3-bit Gray code counter

The next state is the state that the counter goes to from its present state upon the application of a clock pulse.
39 40

Step 3: Flip-op Transition Table

Step 4: Karnaugh Maps

41

42

Step 4: Karnaugh Maps

Step 5: Logic Expressions for FF Inputs


J0 = Q2Q1+Q2Q1 = Q2 Q1 K0 = Q2Q1+Q2Q1 = Q2 Q1 J1 = Q2Q0 K1 = Q2Q0 K2 = Q1Q0

_ _ _ _

_ J2 = Q1Q0 _ _

43

44

Step 6: Counter Implementation

K0 = Q2Q1+Q2Q1 = Q2 Q1

_ _ J0 = Q2Q1+Q2Q1 = Q2 Q1 _ _

J1 = Q2Q0 K1 = Q2Q0

J2 = Q1Q0 _ _ K2 = Q1Q0

45

Vous aimerez peut-être aussi