Slide12 Counters

download Slide12 Counters

of 12

Transcript of Slide12 Counters

  • 8/2/2019 Slide12 Counters

    1/12

    Sequential LogicCounters

    1

    Flip-Flops: The Building Block

    2

    Asynchronous Counters

    async = events that DO NOT occur at thesame time

    async counter = FFs within the counter

    DO NOT have a common clock pulse

    3

    Asynchronous Counters

    async = events that DO NOT occur at thesame time

    async counter = FFs within the counter

    DO NOT have a common clock pulse

    4

  • 8/2/2019 Slide12 Counters

    2/12

    Asynchronous Counters

    async = events that DO NOT occur at thesame time

    async counter = FFs within the counterDO NOT have a common clock pulse

    5

    2-bit AsynchronousBinary Counter

    6

    2-bit Asynchronous Binary Counter

    7

    2-bit Asynchronous Binary

    Counter

    0

    0

    0

    1

    1

    0

    1

    1

    8

  • 8/2/2019 Slide12 Counters

    3/12

    3-bit Async Bin Counter

    9

    3-bit Async Bin Counter

    10

    3-bit Async Bin Counter

    11

    Asynchronous Counter

    a.k.a.Ripple Counter

    12

  • 8/2/2019 Slide12 Counters

    4/12

    Propagational Delay

    majord

    isadvan

    tage!

    13

    Calculate the delay

    Bewa

    re

    14

    Asynchronous DecadeCounters

    Binary counters

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

    15

    The Answer

    Do partial decoding

    16

  • 8/2/2019 Slide12 Counters

    5/12

    BCD Decade Counters

    17 18

    74LS93(4-bit asynchronous binary counter)

    19

    74LS93(4-bit asynchronous binary counter)

    20

  • 8/2/2019 Slide12 Counters

    6/12

    74LS93(4-bit asynchronous binary counter)

    CTR DIV 12

    CCLK A

    CCLK B

    RO(1)

    RO(2)

    Q0 Q1 Q2 Q3

    21

    That was async...

    22

    Now, its time for

    Synchronous counters

    23

    Synchronous Counter

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

    Lets begin with a 2-bit synchronous binarycounter...

    24

  • 8/2/2019 Slide12 Counters

    7/12

    2-bit SynchronousBinary Counter

    25

    Whats going on?

    26

    What would we get?

    delay is neglected for simplicity

    27

    3-bit Synchronous Binary Counter

    28

  • 8/2/2019 Slide12 Counters

    8/12

    4-Bit Sync Bin Counter

    29 30

    4-bit Synchronous

    Decade Counter

    31 32

  • 8/2/2019 Slide12 Counters

    9/12

    Up/Down Sync Counters

    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

    33

    Lets make one

    (3-bit counter)

    Q0: J0 = K0 = 1

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

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

    34

    Lets make one

    (3-bit counter)

    Q0: J0 = K0 = 1

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

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

    35

    Lets make one

    (3-bit counter)

    Q0: J0 = K0 = 1

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

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

    36

  • 8/2/2019 Slide12 Counters

    10/12

    Design of SynchronousCounters

    37

    General Model of aSequential Circuit

    38

    Step 1: State Diagram

    3-bit Gray code counter

    39

    Step 2: Next-state Table

    The next state is the state that the counter goesto from its present state upon the application of aclock pulse.

    40

  • 8/2/2019 Slide12 Counters

    11/12

    Step 3: Flip-flopTransition Table

    41

    Step 4: Karnaugh Maps

    42

    Step 4: Karnaugh Maps

    43

    Step 5: Logic Expressions forFF Inputs

    K1 = Q2Q0

    J0 = Q2Q1+Q2Q1 = Q2 Q1_ _

    K0 = Q2Q1+Q2Q1 = Q2 Q1_ _

    J1 = Q2Q0_

    J2 = Q1Q0_

    K2 = Q1Q0_ _

    44

  • 8/2/2019 Slide12 Counters

    12/12

    Step 6: Counter Implementation

    J0 = Q2Q1+Q2Q1 = Q2 Q1_ _

    K0 = Q2Q1+Q2Q1 = Q2 Q1_ _

    K1 = Q2Q0

    J1 = Q2Q0

    _J2 = Q1Q0

    _

    K2 = Q1Q0_ _

    45