Presentation is loading. Please wait.

Presentation is loading. Please wait.

MTE 202, Summer 2016 Digital Circuits Dr.-Ing. Saleh Hussin

Similar presentations


Presentation on theme: "MTE 202, Summer 2016 Digital Circuits Dr.-Ing. Saleh Hussin"— Presentation transcript:

1 MTE 202, Summer 2016 Digital Circuits Dr.-Ing. Saleh Hussin
Lecture 7 MTE 202, Summer 2016 Digital Circuits Dr.-Ing. Saleh Hussin Lecture 9: Flip-Flop Applications (Counters) Dr.-Ing. Saleh Hussin -Digital Circuits-2016

2 Flip-Flop Characteristic Tables
Lecture 9 D Q D Q(t+1) 1 Reset Set J K Q(t+1) Q(t) 1 Q’(t) J Q K No change Reset Set Toggle T Q T Q(t+1) Q(t) 1 Q’(t) No change Toggle Dr.-Ing. Saleh Hussin -Digital Circuits-2016

3 Dr.-Ing. Saleh Hussin -Digital Circuits-2016
Ripple Counters Lecture 11 Ripple ↔ Asynchronous Using T Flip-Flop T Q CLR Q3 Q2 Q1 Q0 CLK 1 CLK Q0 Q1 Q2 Q3 Dr.-Ing. Saleh Hussin -Digital Circuits-2016

4 Dr.-Ing. Saleh Hussin -Digital Circuits-2016
Ripple Counters Lecture 11 Using D Flip-Flop Q3 Q2 Q1 Q0 D Q D Q D Q D Q CLK CLK Q0 Q1 Q2 Q3 1 2 Dr.-Ing. Saleh Hussin -Digital Circuits-2016 3 4 5 6 7 8 9

5 Analysis of Clocked Sequential Circuits
Lecture 9 Analysis of Clocked Sequential Circuits Determine number of flip flops Determine number of Inputs Determine the input equation for the F.F. State (transition) Equation Draw a Transition Table. Draw State Transition Diagram (STD). Dr.-Ing. Saleh Hussin -Digital Circuits-2016

6 Analysis of Clocked Sequential Circuits
Lecture 9 Analysis of Clocked Sequential Circuits State Equations: The behavior of a clocked sequential circuit can be described algebraically by means of state equations. A state equation specifies the next state as a function of the present state and inputs. Dr.-Ing. Saleh Hussin -Digital Circuits-2016

7 Analysis of Clocked Sequential Circuits
Lecture 9 Analysis of Clocked Sequential Circuits Present State Input Next State Output State Table: The time sequence of inputs, outputs, and flip-flop states can be enumerated in a state table (sometimes called a transition table ). The state table consists of four sections labeled present state, input, next state, and output . The present-state section shows the states of flip-flops at any given time t . The input section gives a value of input for each possible present state. The next-state section shows the states of the flip-flops one clock cycle later, at time t + 1. The output section gives the value of output at time t for each present state and input condition. Dr.-Ing. Saleh Hussin -Digital Circuits-2016

8 State Transition Diagram (STD)
Digital Electronics Lesson 3.4 State Machine Design State Transition Diagram (STD) State Machine Design Transition Arc (For Input X=0) S0 Qa Qb X /Y X/Y Input Variable (X)/ Output Variable (Y) State (S0) State “Bubble” Transition Arc (For Input X=1) Present State Variables (Qa & Qb) Dr.-Ing. Saleh Hussin -Digital Circuits-2016 Project Lead The Way, Inc. Copyright 2009

9 State Transition Diagram
A state graph shows the sequence of states that the state machine will transition to on each clock transition. Each state “bubble” is labeled (S0, S1, S2). Each transition arc is labeled with the value(s) of the input variable(s) that make the transition occur and also is shown the outputs. The state variable are the present state of the flip-flops. Each state is assigned state variables. The number of state variables is determined by the number of states according the following function: States <= 2( state variables) There will be the occasion when a design has unused states. For example, if your design requires 6 states, you will need 3 state variables (6 <= 23). Thus, there will be a total of eight states (23 = 8), and only six will be used. Dr.-Ing. Saleh Hussin -Digital Circuits-2016

10 Analysis of Clocked Sequential Circuits
Lecture 9 Analysis of Clocked Sequential Circuits Example 1: Dr.-Ing. Saleh Hussin -Digital Circuits-2016

11 Analysis of Clocked Sequential Circuits
Lecture 9 Analysis of Clocked Sequential Circuits The State State = Values of all Flip-Flops Example A B = 0 0 A B = 0 1 A B = 1 0 A B = 1 1 Dr.-Ing. Saleh Hussin -Digital Circuits-2016

12 Analysis of Clocked Sequential Circuits
Lecture 9 Analysis of Clocked Sequential Circuits 1- State Equations A(t+1) = DA = A(t) x(t)+B(t) x(t) = A x + B x B(t+1) = DB = A’(t) x(t) = A’ x y(t) = [A(t)+ B(t)] x’(t) = (A + B) x’ Dr.-Ing. Saleh Hussin -Digital Circuits-2016

13 Analysis of Clocked Sequential Circuits
Lecture 9 Analysis of Clocked Sequential Circuits 2- State Table (Transition Table) Present State Input Next State Output A B x y 1 A(t+1) = A x + B x B(t+1) = A’ x y(t) = (A + B) x’ t t t+1 Dr.-Ing. Saleh Hussin -Digital Circuits-2016

14 Analysis of Clocked Sequential Circuits
Lecture 9 Analysis of Clocked Sequential Circuits 2- State Table (Transition Table) Simplified Present State Next State Output x = 0 x = 1 A B y 1 A(t+1) = A x + B x B(t+1) = A’ x y(t) = (A + B) x’ t t+1 t Dr.-Ing. Saleh Hussin -Digital Circuits-2016

15 Analysis of Clocked Sequential Circuits
Lecture 9 Analysis of Clocked Sequential Circuits 3- State Diagram Present State Next State Output x = 0 x = 1 A B y 1 AB input/output 0/0 1/0 0/1 0 0 1 0 0/1 1/0 0/1 1/0 0 1 1 1 1/0 Dr.-Ing. Saleh Hussin -Digital Circuits-2016 15 / 60

16 Dr.-Ing. Saleh Hussin -Digital Circuits-2016
Synchronous Counters Lecture 11 Counter: a sequential circuit that cycles through a sequence of states. Binary counter: follows the binary sequence. An n-bit binary counter (with n flip-flops) counts from 0 to 2n-1. Example 2: Design a 3-bit binary counter using T flip-flops. 001 000 111 010 011 100 110 101 Dr.-Ing. Saleh Hussin -Digital Circuits-2016

17 Dr.-Ing. Saleh Hussin -Digital Circuits-2016
Synchronous Counters Lecture 11 Example 2: A 3-bit binary counter (using T flip-flops). TA2 = A1.A0 TA1 = A0 TA0 = 1 1 A2 CLK T Q A1 A0 Dr.-Ing. Saleh Hussin -Digital Circuits-2016

18 Dr.-Ing. Saleh Hussin -Digital Circuits-2016
Synchronous Counters Lecture 11 Example 3: Design a counter with non-binary sequence using JK flip-flop 000  001  010  100  101  110 and back to 000 001 000 010 100 110 101 Dr.-Ing. Saleh Hussin -Digital Circuits-2016

19 Dr.-Ing. Saleh Hussin -Digital Circuits-2016
Synchronous Counters Lecture 11 Example 3: Counter with non-binary sequence: JA = B JB = C JC = B' KA = B KB = 1 KC = 1 CP A 1 J Q Q' K B C Dr.-Ing. Saleh Hussin -Digital Circuits-2016


Download ppt "MTE 202, Summer 2016 Digital Circuits Dr.-Ing. Saleh Hussin"

Similar presentations


Ads by Google