Flip-flops, like logic gates are defined by their truth table. Flip-flops are controlled by an external clock pulse. C

Similar documents
Notes on Digital Circuits

Notes on Digital Circuits

DIGITAL ELECTRONICS: LOGIC AND CLOCKS

YEDITEPE UNIVERSITY DEPARTMENT OF COMPUTER ENGINEERING. EXPERIMENT VIII: FLIP-FLOPS, COUNTERS 2014 Fall

Introduction. NAND Gate Latch. Digital Logic Design 1 FLIP-FLOP. Digital Logic Design 1

Asynchronous (Ripple) Counters

Digital Circuits I and II Nov. 17, 1999

Decade Counters Mod-5 counter: Decade Counter:

Sequential Digital Design. Laboratory Manual. Experiment #7. Counters

Introduction to Sequential Circuits

Review of digital electronics. Storage units Sequential circuits Counters Shifters

The outputs are formed by a combinational logic function of the inputs to the circuit or the values stored in the flip-flops (or both).

WINTER 14 EXAMINATION

Chapter 5 Synchronous Sequential Logic

The University of Texas at Dallas Department of Computer Science CS 4141: Digital Systems Lab

EET2411 DIGITAL ELECTRONICS

Chapter 5 Flip-Flops and Related Devices

Experiment # 4 Counters and Logic Analyzer

WINTER 15 EXAMINATION Model Answer

Experiment 8 Introduction to Latches and Flip-Flops and registers

Counter dan Register

Sequential Logic and Clocked Circuits

The NOR latch is similar to the NAND latch

BISHOP ANSTEY HIGH SCHOOL & TRINITY COLLEGE EAST SIXTH FORM CXC CAPE PHYSICS, UNIT 2 Ms. S. S. CALBIO NOTES lesson #39

Chapter 6. Flip-Flops and Simple Flip-Flop Applications

Registers & Counters. Logic and Digital System Design - CS 303 Erkay Savaş Sabanci University

CSE Latches and Flip-flops Dr. Izadi. NOR gate property: A B Z Cross coupled NOR gates: S M S R Q M

Registers and Counters

PHYSICS 5620 LAB 9 Basic Digital Circuits and Flip-Flops

Other Flip-Flops. Lecture 27 1

DIGITAL CIRCUIT COMBINATORIAL LOGIC

Introduction to Microprocessor & Digital Logic

ECE 263 Digital Systems, Fall 2015

Chapter. Synchronous Sequential Circuits

Logic. Andrew Mark Allen March 4, 2012

CPE 200L LABORATORY 3: SEQUENTIAL LOGIC CIRCUITS UNIVERSITY OF NEVADA, LAS VEGAS GOALS: BACKGROUND: SR FLIP-FLOP/LATCH

Chapter 4: One-Shots, Counters, and Clocks

Flip-Flops and Related Devices. Wen-Hung Liao, Ph.D. 4/11/2001

B. Sc. III Semester (Electronics) - ( ) Digital Electronics-II) BE-301 MODEL ANSWER (AS-2791)

ELE2120 Digital Circuits and Systems. Tutorial Note 8

DIGITAL ELECTRONICS MCQs

Counters

Logic Design Viva Question Bank Compiled By Channveer Patil

Digital Fundamentals: A Systems Approach

Unit 11. Latches and Flip-Flops

Timing Pulses. Important element of laboratory electronics. Pulses can control logical sequences with precise timing.

DEPARTMENT OF ELECTRICAL &ELECTRONICS ENGINEERING DIGITAL DESIGN

Registers and Counters

Chapter 9 Counters. Clock Edge Output Q 2 Q 1 Q

Sequential Digital Design. Laboratory Manual. Experiment #3. Flip Flop Storage Elements

A clock is a free-running signal with a cycle time. A clock may be either high or low, and alternates between the two states.

RS flip-flop using NOR gate

Final Exam review: chapter 4 and 5. Supplement 3 and 4

EMT 125 Digital Electronic Principles I CHAPTER 6 : FLIP-FLOP

LATCHES & FLIP-FLOP. Chapter 7

Rangkaian Sekuensial. Flip-flop

RS flip-flop using NOR gate

Digital Systems Based on Principles and Applications of Electrical Engineering/Rizzoni (McGraw Hill

3 Flip-Flops. The latch is a logic block that has 2 stable states (0) or (1). The RS latch can be forced to hold a 1 when the Set line is asserted.

Advanced Devices. Registers Counters Multiplexers Decoders Adders. CSC258 Lecture Slides Steve Engels, 2006 Slide 1 of 20

1. Convert the decimal number to binary, octal, and hexadecimal.

Lecture 8: Sequential Logic

SEQUENTIAL LOGIC. Satish Chandra Assistant Professor Department of Physics P P N College, Kanpur

Sequential Logic Counters and Registers

Chapter 2. Digital Circuits

Sequential Logic. E&CE 223 Digital Circuits and Systems (A. Kennings) Page 1

Chapter 1: Switching Algebra Chapter 2: Logical Levels, Timing & Delays. Introduction to latches Chapter 9: Binary Arithmetic

Unit 9 Latches and Flip-Flops. Dept. of Electrical and Computer Eng., NCTU 1

Experiment # 9. Clock generator circuits & Counters. Digital Design LAB

IT T35 Digital system desigm y - ii /s - iii

Name: Date: Suggested Reading Chapter 7, Digital Systems, Principals and Applications; Tocci

Introduction. Serial In - Serial Out Shift Registers (SISO)

More on Flip-Flops Digital Design and Computer Architecture: ARM Edition 2015 Chapter 3 <98> 98

Clocks. Sequential Logic. A clock is a free-running signal with a cycle time.

DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE422) LATCHES and FLIP-FLOPS

Name Of The Experiment: Sequential circuit design Latch, Flip-flop and Registers

Saturated Non Saturated PMOS NMOS CMOS RTL Schottky TTL ECL DTL I I L TTL

ECB DIGITAL ELECTRONICS PROJECT BASED LEARNING PROJECT REPORT ON 7 SEGMENT DIGITAL STOP WATCH USING DECODER

Mission. Lab Project B

Asynchronous Counter

Flip Flop. S-R Flip Flop. Sequential Circuits. Block diagram. Prepared by:- Anwar Bari

UNIT-3: SEQUENTIAL LOGIC CIRCUITS

Fundamentals of Computer Systems

Fundamentals of Computer Systems

WEEK 10. Sequential Circuits: Analysis and Design. Page 1

TRAINING KITS ON DIGITAL ELECTRONIC EXPERIMENTS. Verify Truth table for TTL IC s AND, NOT, & NAND GATES

Chapter 6 Digital Circuit 6-5 Department of Mechanical Engineering

Slide 1. Flip-Flops. Cross-NOR SR flip-flop S R Q Q. hold reset set not used. Cross-NAND SR flip-flop S R Q Q. not used reset set hold 1 Q.

CHAPTER 1 LATCHES & FLIP-FLOPS

Contents Circuits... 1

Sequential Logic Circuit

VU Mobile Powered by S NO Group

Objectives. Combinational logics Sequential logics Finite state machine Arithmetic circuits Datapath

`COEN 312 DIGITAL SYSTEMS DESIGN - LECTURE NOTES Concordia University

Multiplexor (aka MUX) An example, yet VERY useful circuit!

CHAPTER 6 COUNTERS & REGISTERS

Chapter 7 Counters and Registers

successive approximation register (SAR) Q digital estimate

COE 202: Digital Logic Design Sequential Circuits Part 1. Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District UNIT-III SEQUENTIAL CIRCUITS

Transcription:

P517/617 Lec10, P1 eview from last week: Flip-Flops: asic counting unit in computer counters shift registers memory Example: S flip-flop or eset-set flip-flop Flip-flops, like logic gates are defined by their truth table. Flip-flops are controlled by an external clock pulse. S n+1 0 0 n 1 0 0 0 1 1 1 1 undefined S n is the present state of the FF and n+1 will be the output after the clock enables the FF to look at its inputs ( and S). Many FF s change state ( n Æ n+1 ) on the trailing edge of the clock. Note: The state with = S =1 is undefined. The output is not predictable! Example: D flip-flop (Like S but only one input) D lock D 0 0 0 0 1 0 1 0 1 1 1 1 next Example: JK flip-flop JKFF is like the SFF except that both inputs (J and K) can be high (1). J K n+1 0 0 n 1 0 1 J 0 1 0 1 1 n K Most JKFF's have a connection for forcing = 0 (reset) or forcing = 1 (set).

P517/617 Lec10, P2 Example: T (Toggle) flip-flop T flip-flop is like the JKFF with both inputs (J and K) tied to each other. T lock T 0 0 0 0 1 1 1 0 1 1 1 0 next few words about clocking the flip-flops and timing of inputs. Setup time: For each type of flip-flop there is a minimum specified time relative to the clock pulse during which time the input(s) to the FF must be stable (i.e. not change logic levels). Hold time: For each type of flip-flop there is a minimum specified time after changes state that the input(s) to the FF must be stable (i.e. not change logic levels). Example: 74LS112 JK flip-flop (the one we use in lab) This FF changes state () relative to the trailing edge of the clock. The setup time is 20 nsec (2x10-8 sec) while the hold time is ª 0 nsec. The maximum clock speed of this FF is 30 MHz. leading trailing edge edge 5 lock 0 t setup t hold Thus the data on J and K must be stable for at least t setup + t hold. Sometimes circuits with flip-flops are classified according to how the clock is distributed to the FF's. There are two clocking schemes: Synchronous: ll FF's are clocked at the same time. The easiest way to do this is to use one clock and distribute it to all the FF's. synchronous: FF's are clocked at different times, usually by different clocks. Last week's example was an example of this type of circuit. The first FF was clocked by a "clock", while the second FF was clocked by the output () of the first FF.

Example: Divide by 10 ripple down counter (counts from 9 to zero) synchronous counter P517/617 Lec10, P3 +5 +5 clock J S K +5 J S K J S K J S K +5 D J =1 J = D = + D J = 1 J D = + = K = 1 K =1 K = 1 K D =1 high low clock high low = clock for high low = clock for high low = clock for D D count 0 9 8 7 6 5 4 3 2 1 0

P517/617 Lec10, P4 onversion between nalog and Digital Signals Digital to nalog onversion (D): There are two simple circuits commonly used to convert a digital signal to an analog voltage. Weighted esistor Ladder: The circuit is shown below. We assume that the input voltages ( 1, 2, 3, and 4 ) are logic levels. For this example let us use TTL levels and assume a high = 3 and a low = 0. 1 2 3 4 1 2 3 4 0 741 a b out The output voltage is given by: out = b +1 a 1 + 1 + 1 + 1 + 1 0 1 2 3 4 È Î Í 1 + 2 + 3 + 4 1 2 3 If we choose the resistors as follows: 1 = a = 1 kw, 2 = 2 kw, 3 = 4 kw, 4 = 0 = 8 kw and b = 15 kw, then we get the following simple relationship for out : out = 8 1 + 4 2 + 2 3 + 4 Thus if in represents a binary number (e.g. 1001 = 1 2 3 4 with 1 being the highest order bit) then the output voltage varies from 0 to 45 olts (remember 1.. 4 are all either 0 or 3 ). Therefore the digital input 1001 has an analog output of 27 = (3x8 + 3). Unfortunately there are several bad points with this conversion scheme: a) the output can be a large voltage (e.g. 45 ) b) circuit needs 5 high precision resistors (expensive) c) the current (and therefore power) in the resistors varies by 15. 4

P517/617 Lec10, P5 The following circuit fixes up many of these problems: inary Ladder Network (-2 Network): 1 2 3 4 2 2 2 2 2 741 out The output voltage for this circuit is: out = 1 /2 + 2 /4 + 3 /8 + 4 /16 This circuit needs only 2 values of precision resistors compared with the 5 of the previous design. lso the power dissipated in the resistors only varies by a factor of 2, compared with the previous factor of 15. There are still some bad points: a) still need precision components b) the output voltage will usually be a fraction of the input (low noise immunity) For example if in = 1001, then out = 3/2 + 0/4 + 0/8 + 3/16 = 27/16 for TTL logic levels. nalog to Digital onversion (D) Parallel to D conversion ("Flash Encoder" or Flash D) very fast and very simple method use comparators for the conversion Example: one bit D using one comparator in ref out out = 1 (high) if in > ref out = 0 (low) if in < ref How many comparators do we need for a given accuracy? Suppose we want to convert an analog number into a 2 bit digital number. For 2 bits there are 4 possible outcomes (00, 01, 10, 11), it takes 3 comparators.

P517/617 Lec10, P6 Example: 2 bit parallel converter in 1 3 ref Truth Table in Output 2 3 ref < 1 3 0 0 0 0 1 3 < in < 2 3 1 0 0 1 2 3 < in < 1 1 0 2 > 1 1 1 3 ref Logic gates are needed to implement the truth table: MS LS LS = + = ( + ) MS = + = ( + ) = There are several problems with this scheme: 1) need lots of comparators: 2 n - 1 for n bit accuracy. Suppose we want 1 part in 1000 accuracy (0.1%), it takes 10 bits = 2 10-1 = 1023 comparators! 2) the number of logic gates necessary to code the output is large and the logic gets very complicated.

P517/617 Lec10, P7 ounter D (staircase method): Good news: only uses one comparator ad news: much more complicated than parallel method start in ref logic control clock in D counter D oltage outputs 0 1 2 3 4 clock pulse # When D > in the logic circuit stops the clock and the counter outputs a binary number which is just the number of clock pulses. The D could be: an integrator a resistor ladder a voltage reference Problems with this system: a) control logic is complicated (use microprocessors + gates +...) b) time to digitize depends on in. Example: suppose clock runs at 5 MHz, and you want 10 bit accuracy. 10 bits = 1024 clock pulses. an only digitize at about 5 khz, which is fairly slow!

Successive pproximation D: control logic is very complicated, but easy to program, like a binary search. conversion time is almost independent of in, very fast. Example: 5 bit D: The circuit: outputs 0 when D > in (steps 1, 2, 5) outputs 1 when D < in (steps 2, 3) P517/617 Lec10, P8 full scale stop in 0 0 1 1 0 time In order to convert in to a binary number the following steps are followed: a) turn on MS in D and compare with in. 0 if in < MS 1 if in > MS (leave bit on if true) b) turn on next highest bit, leave bit on if D > in. c) repeat until least significant bit is checked (5 in this example). Thus the method requires n comparisons for n bit accuracy. Note: the staircase approach requires 2 n - 1 comparisons parallel D requires 1 step, independent of accuracy Time for a 10 bit conversion for the three methods we have considered: parallel : success pprox. : staircase 1:10:1023