Download presentation
Presentation is loading. Please wait.
Published byMaximilian Horton Modified over 9 years ago
1
1 Lecture #12 EGR 277 – Digital Logic Synchronous Logic Circuits versus Combinational Logic Circuits A) Combinational Logic Circuits Recall that there are numerous ways to describe a combinational logic circuit, including: truth tables Karnaugh maps (minterms) (maxterms) Boolean expressions SOP expressions POS expressions Logic Diagrams Note: Given any one of the descriptions above, we could determine all of the others. Reading Assignment: Chapter 5 in Digital Design, 3 rd Edition by Mano
2
2 Lecture #12 EGR 277 – Digital Logic B) Sequential Logic Circuits Similarly, there are numerous ways to describe a sequential logic circuit, including: State Diagrams State Tables State Equations and Output Equations Input Equations (flip-flop input functions) and Output Equations Logic Diagrams Note: Given any one of the descriptions above, we could determine all of the others. Some of these ways to describe sequential circuits will now be introduced.
3
3 Lecture #12 EGR 277 – Digital Logic State Diagrams This is the most common way to describe a sequential circuit. A state diagram is somewhat like a flowchart that describes the sequence to states through which the circuit might progress. State – a distinct event that is to occur (one event in a sequence) Example: A state might be a single count in a counter. If a counter counts 0, 1, 2, ….., 9 and then repeats, then it has 10 unique states. If four flip-flops were used to store the count, then the flip-flops would store the values 1001 corresponding to state 9. Example: A state might be one step in a machining operation (there might be 5 states corresponding to the operations drill, ream, counterbore, countersink, and polish). Example: A traffic light controller might have three states: Green, Yellow, and Red. Under certain input conditions or at certain times, the controller will change state.
4
4 Lecture #12 EGR 277 – Digital Logic Encoding states – Show how a binary code can be stored in a set of flip-flops. In most cases, Number of flip-flops needed = log2(Number of states) Example: Determine the number of states needed in each case below: Description of circuitNumber of flip-flops required Circuit with 20 states Traffic light controller 3-bit UP/DOWN counter Decade counter
5
5 Lecture #12 EGR 277 – Digital Logic There are two primary types of state diagrams: Mealy model – the next state depends on the inputs applied. Outputs optional. Moore model – the next state is predetermined. There are no inputs, so the circuit advances through a predetermined sequence of states. A B Input/Output C Mealy Model (State A may be followed by State B or State C, depending on the input) Input/Output A B Output Moore Model (State A is always followed by State B)
6
6 Lecture #12 EGR 277 – Digital Logic Examples of state diagrams: A) Modulo-5 (mod-5) counter: B) 3-bit Up/Down counter: C) Traffic Light Controller
7
7 Lecture #12 EGR 277 – Digital Logic State Table A state table provides the same information as the state diagram, but in tabular form. Example: Determine the state table for the state diagram shown below. B C A D 0/0 1/1 1/0 0/0 0/1
8
8 Lecture #12 EGR 277 – Digital Logic State Assignment – Note that the states in the example above do not have binary values associated with them. They must be assigned. How should they be assigned? Example: List possible state assignments for the last problem and repeat the state table using one of the state assignments.
9
9 Lecture #12 EGR 277 – Digital Logic State Assignment Some state diagrams have states indicated by letters or names because there is no numeric value assigned to the states. As an example, there are no natural numeric values for the states in a circuit that controls a traffic light (states, RED, YELLOW, and GREEN). In such cases, numeric values must be assigned to each state. In the case of the traffic light, 2 bits are needed to encode the three states, but various possible codes could be used. For example, RED = 00, YELLOW = 01, and GREEN = 10. There are many other possible state assignments. Which is the best assignment to use? We don’t know. This is a current research topic. Example: List possible state assignments for the last problem and repeat the state table using one of the state assignments.
10
10 Lecture #12 EGR 277 – Digital Logic Determining the State Diagram from a Logic Diagram The state diagram or state table can be found from the logic diagram by assuming an initial state, determining the corresponding flip-flop input values, and then using the truth table for the flip-flop to find the next state. This information can be easily tabulated as in the example below.
11
11 Lecture #12 EGR 277 – Digital Logic Example: Determine the state diagram for the logic diagram shown below. Present State/InputsFlip-flop inputsNext StateOutput xABJAKAJBKBABy 000 001 010 011 100 101 110 111
12
12 Lecture #12 EGR 277 – Digital Logic Sequential Circuit Design Methods Two specific methods will be covered in this chapter: The Excitation Table method The State Equation method Before covering the excitation table method, it is useful to develop excitation tables for each type of flip-flop. Flip-flop Excitation Tables Truth table – defines the output state based on the inputs Excitation table – defines the required inputs to cause a transition from one state to another. JK flip-flop truth tableJK flip-flop excitation table JKQ(t + 1)Q(t)Q(t + 1)JK 00Q00 01001 10110 11Q’11 Example – Complete the excitation table below for the JK flip-flop
13
13 Lecture #12 EGR 277 – Digital Logic Excitation table method – Design Procedure 1.Problem description. 2.Obtain the state table. 3.Use state reduction to reduce the number of states if possible (covered later). 4.Use state assignment to assign binary values to each state if they are symbolic. 5.Determine the number of flip-flops required and assign a letter or number to each. 6.Determine the type of flip-flop to use (SR, JK, D, or T). 7.Derive the circuit excitation table and output table from the state table. 8.Simplify a) the circuit output functions b) the flip-flop input functions 9.Draw the logic diagram. Example: Design a modulo-7 counter (counts 0 to 6 and repeats) using JK flip- flops.
14
14 Lecture #12 EGR 277 – Digital Logic Flip-flop Excitation Tables Q(t)Q(t+1)JKSRDT 000X0X00 011X1011 10X10101 11X0X010 Circuit Excitation Table Present States/InputsNext StateFlip-flop Inputs and Circuit Outputs 000 001 010 011 100 101 110 111
15
15 Lecture #12 EGR 277 – Digital Logic Flip-flop Input Functions and Circuit Output Functions
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.