Presentation on theme: "EET 1131 Unit 10 Flip-Flops and Registers"— Presentation transcript:
1 EET 1131 Unit 10 Flip-Flops and Registers Read Kleitz, Chapter 10.Exam #2 next week.Homework #10 and Lab #10 due in 1.5 weeks.Quiz in 1.5 weeks.-Preview Exam #2.-Do Quiz #9.-Handouts: latch practice sheet & flip-flop practice sheet.
2 Combinational Logic versus Sequential Logic A combinational logic circuit is a circuit whose output depends only on the circuit’s present inputs. (“Has no memory of the past.”)A sequential logic circuit is a circuit whose output may depend on the circuit’s previous states as well as its present inputs. (“Has a memory.”)-Comb: gates, adders, comparators, decoders, enc, MUX, DEMUX, parity. Bell that rings if key in ignition and door open.-Seq: latches, ffs, multivibs, counters, shift regs, memories. Microwave panel that remembers keys pressed before START.2
3 Five Latches and Flip-flops Our textbook refers to all five of these as “flip-flops,” but most people call three of them “latches” and two of them “flip-flops.”NameSection in TextbookTextbook’s name for itSample ChipsS-R latch10-1S-R flip-flop74279Gated S-R latch10-2Gated S-R flip-flopGated D-latch10-3 and 10-4Gated D flip-flop7475D flip-flop10-57474J-K flip-flop10-6 (obsolete master-slave variety; ignore it)747610-7 (modern edge-triggered variety)74LS76-Draw symbols of all 5 latches and flip-flops. (Many also available with active-low inputs).3
4 LatchesA latch is a temporary storage device that has two stable states (bistable). It is a basic form of memory that stores a single bit.The S-R (Set-Reset) latch is the most basic type. It can be constructed from NOR gates or NAND gates. With NOR gates, the latch responds to active-HIGH inputs.RQ1st type of latch: S-R latch.Go thru operation, assuming initially Q=0, ~Q=1, S=0, R=0. Then S=1 & R=0; S=0 & R=0; S=0 & R=1; S=0 & R=0.QSNOR S-R Latch
5 S-R LatchThe S-R latch is in a stable (latched) condition when both inputs are LOW.RSQ1Assume the latch is initially RESET (Q = 0) and the inputs are at their inactive level (0). To SET the latch (Q = 1), a momentary HIGH signal is applied to the S input while the R remains LOW.Latch initially RESET1RSQ1To RESET the latch (Q = 0), a momentary HIGH signal is applied to the R input while the S remains LOW.Latch initially SET1
7 Truth-Table for Gated S-R Latch (active-high inputs) ENSRQCommentsXQ0No change1RESETSETInvalid state-2nd type of latch: Gated S-R latch.-Again, this assumes S and R active-high; another kind has S and R active-low.7
8 Example Solution Gated S-R Latch A gated S-R latch is a variation on the basic S-R latch.The gated latch has an additional input, called enable (EN) that must be HIGH in order for the latch to respond to the S and R inputs.SQENExampleShow the Q output with relation to the input signals. Assume Q starts LOW.QRSolutionKeep in mind that S and R have effect only when EN is HIGH.-Do gated S-R timing diagram.SRENQ
9 A simple rule for the gated D latch is: The gated D latch is similar to the gated S-R latch but combines the S and R inputs into a single D input as shown:DQQDENENQQ-3rd type of latch: Gated D Latch.A simple rule for the gated D latch is:Q follows D when the Enable is active.
10 Gated D-LatchThe truth table for the gated D latch summarizes its operation. If EN is LOW, then there is no change in the output and it is latched.
11 Gated D-LatchQDExampleENDetermine the Q output for the gated D latch, given the inputs shown.Q-Do gated D latch timing diagram.Notice that the Enable is not active during these times, so the output is latched.
12 Two Popular Latch Chips 74279 (Quad active-low S-R latch)7475 (Quad Gated D latch)12
13 Level-Triggered versus Edge-Triggered Gated S-R latches and gated D latches are often called level-triggered devices, because the output can change any time the enable input is at the correct level (HIGH or LOW).Other devices, such as flip-flops, are edge-triggered, because the output can only change when there is a rising or falling edge on the clock input.13
14 The active edge can be positive or negative. Flip-flopsA flip-flop differs from a latch in the manner it changes states. A flip-flop is a clocked device, in which only the clock edge determines when a new bit is entered.The active edge can be positive or negative.-Many digital systems have a master clock that drives and synchronizes everything in the system.Dynamic input indicatorRising edge-triggeredLeading edge-triggeredFalling edge-triggeredTrailing edge-triggered
15 Flip-flopsThe truth table for a positive-edge triggered D flip-flop shows an up arrow to remind you that it is sensitive to its D input only on the rising edge of the clock; otherwise it is latched. The truth table for a negative-edge triggered D flip-flop is identical except for the direction of the arrow.-1st type of flip-flop: D flip-flop-Do two D flip-flop timing diagrams.(a) Positive-edge triggered (b) Negative-edge triggered
16 Flip-flopsThe J-K flip-flop is more versatile than the D flip flop. In addition to the clock input, it has two inputs, labeled J and K. When both J and K = 1, the output changes states (toggles) on the active clock edge (in this case, the rising edge).-2nd type of flip-flop: J-K flip-flop.
17 Example Solution Flip-flops QJExampleCLKDetermine the Q output for the J-K flip-flop, assuming Q is initially high.QKNotice that the outputs change on the rising edge of the clock.SolutionSetToggleSetLatchCLK-Do first J-K timing diagram.JKQ
18 Flip-flopsSynchronous inputs (for example the D or J-K inputs) affect the output on the triggering edge of the clock. Most flip-flops also have other inputs that are asynchronous, meaning they affect the output independent of the clock.PRETwo such inputs are normally labeled PRE (preset) and CLR (clear). These inputs are usually active LOW, as shown here.Other common names for these pins are SET and RESET.QJ-Up to now we’ve only been considering the synchronous inputs.-Note that this involves adding a couple more inputs to the symbol I drew earlier for a J-K flip-flop.-Sometimes the async inputs have different labels (such as ~SET and ~RESET, or ~S and ~R).CLKQKCLR
19 Example Solution Flip-flops Flip-flops PREFlip-flopsFlip-flopsQJExampleCLKDetermine the Q output for the J-K flip-flop, assuming Q is initially high.QKSolutionCLRSetToggleSetResetToggleLatchCLKJ-Do second J-K timing diagram.KSetPREResetCLRQ
20 Two Popular Flip-Flop Chips 7474 (Dual D Flip-Flop)74LS76 (Dual J-K Flip-Flop)20
21 Flip-flop Timing Characteristics Propagation delay time is specified for the rising and falling outputs. It is measured between the 50% level of the clock to the 50% level of the output transition.50% point on triggering edgeCLKCLK50% point50% point on HIGH-to- LOW transition of QQQThe material on this slide and on the next three slides is discussed in Chapter 11, which we’ll skip due to time constraints.50% point on LOW-to-HIGH transition of QtPLHtPHLThe typical propagation delay time for the 74AHC family (CMOS) is 4 ns. Even faster logic is available for specialized applications.
22 Flip-flop Timing Characteristics Another propagation delay time specification is the time required for an asynchronous input to cause a change in the output. Again it is measured from the 50% levels. The 74AHC family has specified delay times under 5 ns.50% pointCLR50% pointPREQ50% pointQ50% pointtPHLtPLH
23 Flip-flop Timing Characteristics Set-up time and hold time are times required before and after the clock transition that data must be present to be reliably clocked into the flip-flop.Setup time is the minimum time for the data to be present before the clock.DCLKSet-up time, tsHold time is the minimum time for the data to remain after the clock.DCLKHold time, tH
24 Flip-flop Timing Characteristics Other timing specifications include maximum clock frequency and minimum pulse widths for various inputs.Consult the following datasheet to compare propagation delays, set-up time, hold time, and maximum clock frequency for a 7474, a 74LS74, and a 74S74:7474 datasheet
25 Flip-flop Applications Output linesQ0Principal flip-flop applications are for temporary data storage, as frequency dividers, and in counters (which are covered in detail in Chapter 12).Q1Q2Typically, for data storage applications, a group of flip-flops are connected to parallel data lines and clocked together. We call such a group of flip-flops a register. Data is stored until the next clock pulse.Parallel data input linesQ3ClockClear
26 Flip-flop Applications For frequency division, it is simple to use a flip-flop in the toggle mode or to chain a series of toggle flip flops to continue to divide by two.HIGHHIGHOne flip-flop will divide fin by 2, two flip-flops will divide fin by 4 (and so on). A side benefit of frequency division is that the output has an exact 50% duty cycle.QAQBfoutJJfinCLKCLKKKfinWaveforms:fout
Your consent to our cookies if you continue to use this website.