Chp1 - Latches and Flip-flops

download Chp1 - Latches and Flip-flops

of 44

Transcript of Chp1 - Latches and Flip-flops

  • 8/2/2019 Chp1 - Latches and Flip-flops

    1/44

    1

    CHAPTER 1

    LATCHES & FLIP-FLOPS

  • 8/2/2019 Chp1 - Latches and Flip-flops

    2/44

    2

    Outcome

    After learning this chapter, student should be able to;

    Recognize the difference between latches and flip-

    flops

    Analyze the operation of the flip flop

    Draw the output timing diagram (waveform) for singleand combination of latches and flip-flops Troubleshoot basic flip-flops circuits

  • 8/2/2019 Chp1 - Latches and Flip-flops

    3/44

    3

    Terminology

    Multivibrator

    A class of digital circuits in which the output is connected backto the input (i.e. it is fed back to the input, commonly referred

    to as feedback) to produce either two stable states, one stablestate, or no stable states, depending on the configuration.

    Bistable

    Having two stable states. Latches and flip-flops are bistablemultivibrators

    LatchAn asynchronous bistable multivibrator, used for storing 1 bit

    Flip-FlopA synchronous bistable multivibrator, used for storing 1 bit

  • 8/2/2019 Chp1 - Latches and Flip-flops

    4/44

    4

    Teminology (continue..)

    AsynchronousThere is no fixed timing relationship

    SynchronousThere is a fixed timing relationship, usually through the use of

    a clock pulse

    Edge-triggered Flip-FlopA type of flip-flop in which the input data are entered and

    appear on the output on the same clock edge, either the

    positive or negative edge

  • 8/2/2019 Chp1 - Latches and Flip-flops

    5/44

    5

    Introduction: Comparison between combinationalcircuits and sequential circuits

    Characteristics ofcombinational circuits are;

    Output depends only to current input

    No feedback from output of the system

    Unable to remember past values

    Logic gatesAND, OR, XOR, NOT

  • 8/2/2019 Chp1 - Latches and Flip-flops

    6/44

    6

    Introduction (continue..)

    Fundamental of sequential circuits

    Characteristics ofsequential circuits are;

    Output depends not only on current input but also on past

    input values

    Output from the system is feedback as new input

    Capable of storing binary information : memory

    Latches, flip-flops and logic gates

    Generic block diagram of sequential circuit

  • 8/2/2019 Chp1 - Latches and Flip-flops

    7/44

    7

    Introduction (continue..)

    Multivibratorany digital circuit employing feedback.

    Sequential/Multivibrator devices are categorized as;

    Bistable

    Two stable states, SET and RESET

    Latches and flip-flops

    Monostable

    Has one stable state

    Timer

    Astable

    No stable state Oscillator (to generate periodic pulse waveforms for timing

    purposes. )

    Fig: inverter with feedback

  • 8/2/2019 Chp1 - Latches and Flip-flops

    8/44

    8

    Latches

    Latches are bistable multivibrator

    A two stable states digital circuit that produces HIGH or LOW

    depending on the input

    For gated (enabled) latches, the output are controlled by the

    enable (EN) input

    It is level triggered, means that any input changes during the EN

    is active, the output will be affected

    The operation will be observed by examining the timing diagram

  • 8/2/2019 Chp1 - Latches and Flip-flops

    9/44

    9

    Latches (continue..)

    Four types;

    S-R latch

    Gated S-R latch

    S-R latch

    Gated D latch

  • 8/2/2019 Chp1 - Latches and Flip-flops

    10/44

    10

    S-R (Set-Reset) Latch

    Logic circuit Symbol

    Truth table

  • 8/2/2019 Chp1 - Latches and Flip-flops

    11/44

    11

    S-R Latch Timing Diagram

  • 8/2/2019 Chp1 - Latches and Flip-flops

    12/44

    12

    S-R (Set-Reset) Latch

    Truth table

    Logic circuit Symbol

  • 8/2/2019 Chp1 - Latches and Flip-flops

    13/44

    13

    S-R Latch Timing Diagram

  • 8/2/2019 Chp1 - Latches and Flip-flops

    14/44

    14

    Gated S-R Latch

    Logic circuit Symbol

    Truth table

  • 8/2/2019 Chp1 - Latches and Flip-flops

    15/44

    15

    Gated S-R Latch Timing Diagram

  • 8/2/2019 Chp1 - Latches and Flip-flops

    16/44

    16

    Gated D latch

    Logic circuit Symbol

    Truth table

    1

  • 8/2/2019 Chp1 - Latches and Flip-flops

    17/44

    17

    Gated D Latch Timing Diagram

    1

  • 8/2/2019 Chp1 - Latches and Flip-flops

    18/44

    18

    How does S-R latch works?

    By using DeMorgans Theorem

    The equivalent logic circuit

    NAND gate Negative-OR gate

  • 8/2/2019 Chp1 - Latches and Flip-flops

    19/44

    19

    How does S-R latch works? (continue..)

    Change both S and R to 1, therefore both Qand Qare still the

    same as previous value

    Assume that S = 0 and R = 1, therefore Q= 1 and Q= 0

  • 8/2/2019 Chp1 - Latches and Flip-flops

    20/44

    20

    How does S-R latch works? (continue..)

    Change both S and R to 1, therefore both Qand Qare still the

    same as previous value

    Now, change S = 1 and R = 0, therefore Q= 0 and Q= 1

  • 8/2/2019 Chp1 - Latches and Flip-flops

    21/44

    21

    How does S-R latch works? (continue..)

    Now, set both input to 0, hence, both Q and Q are 1 which is

    invalid

    This state should be avoided since the changing state from

    invalid is unpredictable. Prove it!!!

  • 8/2/2019 Chp1 - Latches and Flip-flops

    22/44

    22

    Gated D Latch Exercises

    1

  • 8/2/2019 Chp1 - Latches and Flip-flops

    23/44

    23

    Latch applications

    SR and D latches are among the simplest and least expensivetypes of memory elements used in logic circuits.

    Fig: Typical use of latches in a computers input/output circuits

  • 8/2/2019 Chp1 - Latches and Flip-flops

    24/44

    24

    Edge-Triggered Flip-Flops

    Flip-flops are synchronous bistable multivibrator.

    Synchronous means the output changes state only occur at

    a triggering point called clock

    Edge-triggered can be either positive (rising) edge or negative

    (falling) edge of the clock

    Edge triggered flip-flops change state either at positive ornegative clock

    Clock input for flip-flops

  • 8/2/2019 Chp1 - Latches and Flip-flops

    25/44

    25

    Edge-Triggered Flip-Flops (continue..)

    Four types;

    S-R flip flops

    D flip-flops

    J-K flip-flops

    T flip-flops

    Positive-edge triggered Negative-edge triggered

  • 8/2/2019 Chp1 - Latches and Flip-flops

    26/44

    26

    Edge-Triggered S-R Flip-Flop

    Positive-edge S-R FF

  • 8/2/2019 Chp1 - Latches and Flip-flops

    27/44

    27

    Edge-Triggered S-R Flip-Flop Exercises

  • 8/2/2019 Chp1 - Latches and Flip-flops

    28/44

    28

    Edge-Triggered D Flip-Flop

    Positive-edge D FF

  • 8/2/2019 Chp1 - Latches and Flip-flops

    29/44

    29

    Edge-Triggered D Flip-Flop Exercises

  • 8/2/2019 Chp1 - Latches and Flip-flops

    30/44

    30

    Edge-Triggered J-K Flip-Flop

    Positive-edge J-K FF

  • 8/2/2019 Chp1 - Latches and Flip-flops

    31/44

    31

    Edge-Triggered J-K Flip-Flop Exercises

  • 8/2/2019 Chp1 - Latches and Flip-flops

    32/44

    32

    Edge-Triggered T Flip-Flop

    Positive-edge T FF

  • 8/2/2019 Chp1 - Latches and Flip-flops

    33/44

    33

    Edge-Triggered T Flip-Flop Exercises

  • 8/2/2019 Chp1 - Latches and Flip-flops

    34/44

    34

    Latch and Flip-Flop Exercise

    Draw the output waveform for the JK flip flop and D latch whose

    input are as given

  • 8/2/2019 Chp1 - Latches and Flip-flops

    35/44

    35

    Master Slave Flip-Flops

    Introduced to overcome timing problem that might be occurred

    to flip-flop

    Two similar flip-flops are connected with different clock

    The output is stable even though input changes

    Qo Q1

  • 8/2/2019 Chp1 - Latches and Flip-flops

    36/44

    36

    Asynchronous Preset and Clear

    Most integrated circuit FF have asynchronous inputs

    These input change the FF output without clock triggering

    Normally label as preset (PRE) and clear (CLR)

    For example, take the T FF

    /PRE /CLR OUTPUT

    0 0 Invalid

    0 1 Q = 1 (Set)

    1 0 Q = 0 (Reset)

    1 1 Flip-flop normaloperation

  • 8/2/2019 Chp1 - Latches and Flip-flops

    37/44

    37

    Flip-Flop Operating Characteristics

    Propagation Delay Times

    Required time interval for output signal to occur after aninput signal has been applied

    Set-up Time

    Minimum time interval for the signal to retain the value

    before clock pulse is triggered

    CLK

    Q

    tPLH

    CLK

    Q

    tPHL

    50%

    D

    CLK

    ts

  • 8/2/2019 Chp1 - Latches and Flip-flops

    38/44

    38

    Flip-Flop Operating Characteristics

    Hold time

    Minimum time interval for the signal to retain the value afterclock pulse is triggered

    Maximum Clock Frequency

    Highest rate at which a flip-flop can respond to the input

    signal

    CLK

    D

    th

    fmax

  • 8/2/2019 Chp1 - Latches and Flip-flops

    39/44

    39

    Flip-Flop Operating Characteristics (continue..)

    Power Dissipation

    Total power consumption of the flip-flops

    For example, a 7474 chip has two D flip-flops which each ofthe flip-flop operates at +5Vdc and draws 5mA

    P = Vcc x Icc = 5 x 5 = 25mW

    PT= 2 x 25 mW = 50mW

    I = 50mW/5V = 10mA

    Therefore, the chip must be supplied by +5Vdc supplywith at least 10mA of current.

    Pulse Width Minimum clock pulse width is smallest time between HIGH

    and LOW

  • 8/2/2019 Chp1 - Latches and Flip-flops

    40/44

    40

    Flip-Flop Applications

    Parallel data storage

    You will learn more in

    Chapter 3

  • 8/2/2019 Chp1 - Latches and Flip-flops

    41/44

    41

    Flip-Flop Applications (continue..)

    Frequency division

  • 8/2/2019 Chp1 - Latches and Flip-flops

    42/44

    42

    Flip-Flop Applications (continue..)

    Counting You will learn more in Chapter 2

  • 8/2/2019 Chp1 - Latches and Flip-flops

    43/44

    43

    Exercises

    (a) What is the difference between latch andflip-flop operation?

    (b) List 3 applications of flip-flops. Explainbriefly each of the application of the flip-flops.

    (c) Give the definition and describe the

    propagation delay time in flip-flopoperating characteristics.

  • 8/2/2019 Chp1 - Latches and Flip-flops

    44/44

    44

    Exercises (Continue)

    (d) For negative edge triggered J-K flip-flop with preset (/PRE) and(/CLR) inputs, determine the Q output for the input shown in thetiming diagram in Figure Q1(d). Assume Q starts with 1 and theinput J and K always 1.