PHY 201 (Blum)1 Other types of flip-flops and counting See Chapter 9 and 10 in Digital principles (Tokheim)

Slides:



Advertisements
Similar presentations
Lecture 23: Registers and Counters (2)
Advertisements

Registers and Counters. Register Register is built with gates, but has memory. The only type of flip-flop required in this class – the D flip-flop – Has.
Sequential Logic ENEL 111. Sequential Logic Circuits So far we have only considered circuits where the output is purely a function of the inputs With.
Sequential Digital Circuits Dr. Costas Kyriacou and Dr. Konstantinos Tatas.
Sequential Logic Building Blocks – Flip-flops
Latches CS370 –Spring 2003 Section 4-2 Mano & Kime.
Flip-Flops, Registers, Counters, and a Simple Processor
Classification of Digital Circuits  Combinational. Output depends only on current input values.  Sequential. Output depends on current input values and.
Digital Logic Chapter 5 Presented by Prof Tim Johnson
Sequential Circuits1 DIGITAL LOGIC DESIGN by Dr. Fenghui Yao Tennessee State University Department of Computer Science Nashville, TN.
CP208 Digital Electronics Class Lecture 11 May 13, 2009.
Dr. ClincyLecture1 Appendix A – Part 2: Logic Circuits Current State or output of the device is affected by the previous states Circuit Flip Flops New.
1 © 2014 B. Wilkinson Modification date: Dec Sequential Logic Circuits – I Flip-Flops A sequential circuit is a logic components whose outputs.
EKT 124 / 3 DIGITAL ELEKTRONIC 1
Sequential circuit Digital electronics is classified into combinational logic and sequential logic. In combinational circuit outpus depends only on present.
EECC341 - Shaaban #1 Lec # 13 Winter Sequential Logic Circuits Unlike combinational logic circuits, the output of sequential logic circuits.
Homework Reading Machine Projects Labs Tokheim Chapter 9.1 – 9.6
ENGIN112 L20: Sequential Circuits: Flip flops October 20, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 20 Sequential Circuits: Flip.
Overview Logic Combinational Logic Sequential Logic Storage Devices SR Flip-Flops D Flip Flops JK Flip Flops Registers Addressing Computer Memory.
Overview Recall Combinational Logic Sequential Logic Storage Devices
Lecture 4: Computer Memory
CS 151 Digital Systems Design Lecture 20 Sequential Circuits: Flip flops.
Revision Mid 2 Prof. Sin-Min Lee Department of Computer Science.
CS370 Counters. Overview °Counter: A register that goes through a prescribed series of states °Counters are important components in computers. °Counters.
COMPUTER ARCHITECTURE & OPERATIONS I Instructor: Hao Ji.
Chapter 3: Sequential Logic Circuit EKT 121 / 4 ELEKTRONIK DIGIT 1.
Counters  A counter is a device which stores (and sometimes displays) the number of times a particular event or process has occurred, often in relationship.
A presentation on Counters
Digital Logic Design CHAPTER 5 Sequential Logic. 2 Sequential Circuits Combinational circuits – The outputs are entirely dependent on the current inputs.
Asynchronous Counter © 2014 Project Lead The Way, Inc.Digital Electronics.
Sequential Circuits Chapter 4 S. Dandamudi To be used with S. Dandamudi, “Fundamentals of Computer Organization and Design,” Springer,  S.
Components used in the the Project J-K Flip Flop Switch Power Alternator 7-Segment Display Coded Decimal (BCD) Display.
Registers and Counters
Asynchronous Counters with SSI Gates
COE 202: Digital Logic Design Sequential Circuits Part 1
Flip Flop
EE2174: Digital Logic and Lab Professor Shiyan Hu Department of Electrical and Computer Engineering Michigan Technological University CHAPTER 9 Sequential.
Rabie A. Ramadan Lecture 3
CS1Q Computer Systems Lecture 11 Simon Gay. Lecture 11CS1Q Computer Systems - Simon Gay2 The D FlipFlop A 1-bit register is called a D flipflop. When.
PHY 201 (Blum)1 Transistor Odds and Ends. PHY 201 (Blum)2 RTL NOR.
Flip Flops 3.1 Latches and Flip-Flops 3 ©Paul Godin Created September 2007 Last Edit Aug 2013.
 Counters are sequential circuits which "count" through a specific state sequence. They can count up, count down, or count through other fixed sequences.
ECA1212 Introduction to Electrical & Electronics Engineering Chapter 9: Digital Electronics – Sequential Logic by Muhazam Mustapha, November 2011.
Sequential Logic Combinatorial components: the output values are computed only from their present input values. Sequential components: their output values.
JK Flip-Flop. JK Flip-flop The most versatile of the flip-flops Has two data inputs (J and K) Do not have an undefined state like SR flip-flops – When.
Synchronous Sequential Circuits by Dr. Amin Danial Asham.
PHY 201 (Blum)1 Transistor Odds and Ends. PHY 201 (Blum)2 RTL NOR.
1 COMP541 Sequential Circuits Montek Singh Feb 1, 2012.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Logic Design Dr. Oliver Faust.
CEC 220 Digital Circuit Design Latches and Flip-Flops Monday, March 03 CEC 220 Digital Circuit Design Slide 1 of 19.
Sequential Logic Computer Organization II 1 © McQuain A clock is a free-running signal with a cycle time. A clock may be either high or.
Synchronous Sequential Logic A digital system has combinational logic as well as sequential logic. The latter includes storage elements. feedback path.
Sahar Mosleh PageCalifornia State University San Marcos 1 More on Flip Flop State Table and State Diagram.
Chapter 6 – Digital Electronics – Part 1 1.D (Data) Flip Flops 2.RS (Set-Reset) Flip Flops 3.T Flip Flops 4.JK Flip Flops 5.JKMS Flip Flops Information.
Chapter5: Synchronous Sequential Logic – Part 1
Synchronous Sequential Circuits by Dr. Amin Danial Asham.
 Flip-flops are digital logic circuits that can be in one of two states.  Flip-flops maintain their state indefinitely until an input pulse called a.
Computer Science 210 Computer Organization
Dr. Clincy Professor of CS
FLIP FLOPS Binary unit capable of storing one bit – 0 or 1
Clocks A clock is a free-running signal with a cycle time.
Computer Organization
Computer Science 210 Computer Organization
Computer Science 210 Computer Organization
Asynchronous Counters with SSI Gates
Dr. Clincy Professor of CS
FLIP-FLOPS.
Sequential Logic.
Digital Electronics and Logic Design
Flip Flops.
Presentation transcript:

PHY 201 (Blum)1 Other types of flip-flops and counting See Chapter 9 and 10 in Digital principles (Tokheim)

PHY 201 (Blum)2 Flip Flops Flip-flops serve as the elementary units for memory in digital systems. Two features are needed: 1.The circuit must be able to “hold” either state (a high or low output) and not simply reflect the input at any given time. 2.But in some circumstances, we must be able to change (to “set” and “reset”) the values.

PHY 201 (Blum)3 Remembrance of states past The way in which the previous state information is held is different for different types of memory In DRAM (dynamic random access memory), the state (1 or 0) is held by a charge (or lack thereof) remaining on a capacitor –Charges tend to leak off of capacitors, which is why DRAM must be periodically refreshed

PHY 201 (Blum)4 SRAM In SRAM (static random access memory) the history dependence is achieved via a feedback mechanism. –Feedback: the return of part of the output to the input of a mechanism, process or system (source: Random House Dictionary). SRAM does not need refreshing, making it faster, but it is more expensive; typically it is reserved for caching and other high-speed situations.

PHY 201 (Blum)5 RS Flip Flop feedback

PHY 201 (Blum)6 Electronics Workbench info on RS flip-flop

PHY 201 (Blum)7 RS Flip Flop The Q output is inverted and fed back in as an input. Similarly the Q’ output is inverted and fed back in as an input. As suggested by the names Q and Q’, these outputs are supposed to be inverses of one another.

PHY 201 (Blum)8 The hold operation The S=0, R=0 is the hold “state”, the flip flop keeps its previous outputs Imagine Q=1 and Q’=0, –Then Not Q’ (which is 1) is ORed with S giving a 1 for the Q output –Then Not Q (which is 0) is ORed with R giving a 0 for the Q’ output –The output is the same as the input (no change)

PHY 201 (Blum)9 RS Flip Flop (hold)

PHY 201 (Blum)10 The hold operation The S=0, R=0 is the hold “state”, the flip flop keeps its previous outputs Imagine Q=0 and Q’=1, –Then Not Q’ (which is 0) is ORed with S giving a 0 for the Q output –Then Not Q (which is 1) is ORed with R giving a 1 for the Q’ output –The output is the same as the input (no change)

PHY 201 (Blum)11 The set operation The S=1, R=0 is the set “state”, the flip flop force Q=1 Imagine Q=0 and Q’=1, –Then Not Q’ (which is 0) is ORed with S giving a 1 for the Q output –Then Not Q (which is now 0) is ORed with R giving a 0 for the Q’ output –The Q output is forced to be (set to) 1

PHY 201 (Blum)12 RS Flip Flop (set) Red input Green initial value Blue eventual value

PHY 201 (Blum)13 The set operation The S=1,R=0 is the set “state”, the flip flop forces Q=1 Imagine Q=1 and Q’=0, –Then Not Q’ (which is 1) is ORed with S giving a 1 for the Q output –Then Not Q (which is 0) is ORed with R giving a 0 for the Q’ output –The Q output is forced to be (set to) 1

PHY 201 (Blum)14 The reset operation The S=0,R=1 is the reset “state”, the flip flop forces Q=0 Imagine Q=0 and Q’=1, –Then Not Q’ (which is 0) is ORed with S giving a 0 for the Q output –Then Not Q (which is 1) is ORed with R giving a 1 for the Q’ output –The Q output is forced to be (reset to) 0

PHY 201 (Blum)15 The reset operation The S=0,R=1 is the reset “state”, the flip flop forces Q=0 Imagine Q=1 and Q’=0, –Then Not Q’ (which is 1) is ORed with S giving a 1 for the Q output –Then Not Q (which is now 0) is ORed with R giving a 1 for the Q’ output –Then Not Q’ (which is now 0) is ORed with S giving a 0 for the Q output –The Q output is forced to be (reset to) 0

PHY 201 (Blum)16 The undesired operation The S=1,R=1 is the undesired “state” Imagine Q=0 and Q’=1, –Then Not Q’ (which is 0) is ORed with S giving a 1 for the Q output –Then Not Q (which is now 0) is ORed with R giving a 1 for the Q’ output –And so on –The Q and Q’ outputs are equal, which is undesired

PHY 201 (Blum)17 Level clocking

PHY 201 (Blum)18 Level clocking Adding an additional layer of AND gates and an extra input makes the flip flop “clocked” What used to be the S input is now S ANDed with CLK, so the set action is now obtained only when S=1 AND CLK=1. This helps control when the setting occurs and keeps this action in sync with other operations occurring in the circuit.

PHY 201 (Blum)19 Edge triggering Two RS flip-flops in a Master-slave arrangement.

PHY 201 (Blum)20 Edge Triggering Feeding the outputs of one clocked RS flip-flop into a second flip-flop in which the clock input is inverted results in an edge-triggered flip flop The first flip-flop acts as a level clocked flip-flop, that is, setting and resetting occur only when the CLK input is 1.

PHY 201 (Blum)21 Edge triggering (cont.) During this period, the second RS flip- flop is getting the inverse of the CLK and so is in the no change state. When the CLK goes to 0, the first flip- flop goes into its no change state and the second flip-flop can be set or reset.

PHY 201 (Blum)22 Edge triggering What is setting or resetting the second flip-flop are the outputs of the first flip- flop and they are held fixed. This way the inputs to the second flip flop can not vary through the course of the clock’s cycle. Whatever they were when the clock switched is what is important.

PHY 201 (Blum)23 JK Flip Flop

PHY 201 (Blum)24 Making an RS into a JK Recall that the R=1, S=1 input into an RS flip flop puts it into the undesired state. An additional feedback mechanism turns this undesired state of the RS flip flop into the “toggle” state of the JK flip flop.

PHY 201 (Blum)25 JK The inputs into the first AND gate are now –J (used to be S), CLK and Q’ for the upper –K (used to be R), CLK and Q for the lower Since Q and Q’ are inverses, at most one of the AND gates will yield a 1.

PHY 201 (Blum)26 The toggle state If J and K and the CLK are all 1, the the outcome is determined by Q and Q’ If Q=1 and Q’=0, then the lower AND gate will produce a 1 and Q’ will be made equal to 1 and Q will be set to 0 (just the opposite of what they were) This is called the toggle state.

PHY 201 (Blum)27 WorkBench JK Help

PHY 201 (Blum)28 Counting DecimalMostLeast Note that the least significant bit toggles every row. The next bit toggles every two rows. The higher bit toggles every four rows. Etc.

PHY 201 (Blum)29 Counting DecimalMostLeast The middle bit toggles every two rows. More precisely, the middle bit toggles as the least bit changes from 0 to 1 (the negative edge).

PHY 201 (Blum)30 Ripple Counter

PHY 201 (Blum)31 Ripple Counter Description The J and K inputs of each flip-flop are all high. Thus each flip-flop will toggle when the clock input goes through a negative edge. The output of one JK flip-flop becomes the clock input of the next JK flip-flop. The when the first flip-flop’s output changes from 1 to 0, the second flip-flop sees a negative edge at its clock input. And so it toggles in response.

PHY 201 (Blum)32 Ripple Counter This flip-flop toggles most often making it the least significant bit.

PHY 201 (Blum)33 Program Counter One use of a counter in a computer is the program counter. The program is stored in memory. After one line of code has been executed, the next line to be executed is typically the next word (or group of words in memory). The program counter “points” to a place in the memory, it is incremented to point to the next location and then it holds that value until the ALU is ready for the next line.