MODULE 11- DESIGN OF SYNCHRONOUS SEQUENTIAL COUNTERS AND STATE MACHINES

Similar documents
Lecture 8: Synchronous Digital Systems

Asynchronous Counters. Asynchronous Counters

ENEE 244 (01**). Spring Homework 5. Due back in class on Friday, April 28.

Module 3: Floyd, Digital Fundamental

Counters and Decoders

Experiment # 9. Clock generator circuits & Counters. Eng. Waleed Y. Mousa

To design digital counter circuits using JK-Flip-Flop. To implement counter using 74LS193 IC.

Digital Logic Design Sequential circuits

ETEC 2301 Programmable Logic Devices. Chapter 10 Counters. Shawnee State University Department of Industrial and Engineering Technologies

Having read this workbook you should be able to: recognise the arrangement of NAND gates used to form an S-R flip-flop.

Upon completion of unit 1.1, students will be able to

SEQUENTIAL CIRCUITS. Block diagram. Flip Flop. S-R Flip Flop. Block Diagram. Circuit Diagram

Lesson 12 Sequential Circuits: Flip-Flops

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

DIGITAL ELECTRONICS. Counters. By: Electrical Engineering Department

Digital Logic Design. Basics Combinational Circuits Sequential Circuits. Pu-Jen Cheng

Counters are sequential circuits which "count" through a specific state sequence.

Flip-Flops and Sequential Circuit Design. ECE 152A Winter 2012

Flip-Flops and Sequential Circuit Design

Digital Electronics Detailed Outline

Digital Controller for Pedestrian Crossing and Traffic Lights

ASYNCHRONOUS COUNTERS

Sequential Logic. (Materials taken from: Principles of Computer Hardware by Alan Clements )

DIGITAL COUNTERS. Q B Q A = 00 initially. Q B Q A = 01 after the first clock pulse.

Counters & Shift Registers Chapter 8 of R.P Jain

Systems I: Computer Organization and Architecture

CHAPTER IX REGISTER BLOCKS COUNTERS, SHIFT, AND ROTATE REGISTERS

CHAPTER 11: Flip Flops

Cascaded Counters. Page 1 BYU

Contents COUNTER. Unit III- Counters

So far we have investigated combinational logic for which the output of the logic devices/circuits depends only on the present state of the inputs.

BINARY CODED DECIMAL: B.C.D.

Master/Slave Flip Flops

CHAPTER 11 LATCHES AND FLIP-FLOPS

Theory of Logic Circuits. Laboratory manual. Exercise 3

The components. E3: Digital electronics. Goals:

Design Example: Counters. Design Example: Counters. 3-Bit Binary Counter. 3-Bit Binary Counter. Other useful counters:

University of St. Thomas ENGR Digital Design 4 Credit Course Monday, Wednesday, Friday from 1:35 p.m. to 2:40 p.m. Lecture: Room OWS LL54

WEEK 8.1 Registers and Counters. ECE124 Digital Circuits and Systems Page 1

Engr354: Digital Logic Circuits

Take-Home Exercise. z y x. Erik Jonsson School of Engineering and Computer Science. The University of Texas at Dallas

EE 42/100 Lecture 24: Latches and Flip Flops. Rev B 4/21/2010 (2:04 PM) Prof. Ali M. Niknejad

DIGITAL TECHNICS II. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute

Combinational Logic Design Process

DIGITAL TECHNICS II. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute 5. LECTURE: REGISTERS AND RELATED

Lecture-3 MEMORY: Development of Memory:

We r e going to play Final (exam) Jeopardy! "Answers:" "Questions:" - 1 -

Gray Code Generator and Decoder by Carsten Kristiansen Napier University. November 2004

Chapter 2 Logic Gates and Introduction to Computer Architecture

LAB #4 Sequential Logic, Latches, Flip-Flops, Shift Registers, and Counters

DIGITAL TECHNICS II. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute. 2nd (Spring) term 2012/2013

Chapter 9 Latches, Flip-Flops, and Timers

Simplifying Logic Circuits with Karnaugh Maps

Gates, Circuits, and Boolean Algebra

Copyright Peter R. Rony All rights reserved.

SECTION C [short essay] [Not to exceed 120 words, Answer any SIX questions. Each question carries FOUR marks] 6 x 4=24 marks

CHAPTER 3 Boolean Algebra and Digital Logic

Traffic Light Controller. Digital Systems Design. Dr. Ted Shaneyfelt

DEPARTMENT OF INFORMATION TECHNLOGY

(Refer Slide Time: 00:01:16 min)

Lecture 12: More on Registers, Multiplexers, Decoders, Comparators and Wot- Nots

CS311 Lecture: Sequential Circuits

Course Requirements & Evaluation Methods

Operating Manual Ver.1.1

Let s put together a Manual Processor

Memory Elements. Combinational logic cannot remember

Digital Electronics Part I Combinational and Sequential Logic. Dr. I. J. Wassell

Design Verification & Testing Design for Testability and Scan

Digital Logic Elements, Clock, and Memory Elements

CDA 3200 Digital Systems. Instructor: Dr. Janusz Zalewski Developed by: Dr. Dahai Guo Spring 2012

Binary Adders: Half Adders and Full Adders

IE1204 Digital Design F12: Asynchronous Sequential Circuits (Part 1)

(1) /30 (2) /30 (3) /40 TOTAL /100

Napier University. School of Engineering. Electronic Engineering A Module: SE42205 Digital Design

Decimal Number (base 10) Binary Number (base 2)

MICROPROCESSOR. Exclusive for IACE Students iacehyd.blogspot.in Ph: /422 Page 1

Chapter 7 Memory and Programmable Logic

Chapter 7. Registers & Register Transfers. J.J. Shann. J. J. Shann

CpE358/CS381. Switching Theory and Logical Design. Class 10

COMBINATIONAL and SEQUENTIAL LOGIC CIRCUITS Hardware implementation and software design

Chapter 5. Sequential Logic

PROGRAMMABLE LOGIC CONTROLLERS Unit code: A/601/1625 QCF level: 4 Credit value: 15 OUTCOME 3 PART 1

Philadelphia University Faculty of Information Technology Department of Computer Science Semester, 2007/2008.

Chapter 8. Sequential Circuits for Registers and Counters

EXPERIMENT 8. Flip-Flops and Sequential Circuits

Digital Fundamentals

8-ch RAID0 Design by using SATA Host IP Manual Rev1.0 9-Jun-15

2011, The McGraw-Hill Companies, Inc. Chapter 5

Wiki Lab Book. This week is practice for wiki usage during the project.

Programming A PLC. Standard Instructions

Registers & Counters

Flip-Flops, Registers, Counters, and a Simple Processor

A Comparison of Student Learning in an Introductory Logic Circuits Course: Traditional Face-to-Face vs. Fully Online

Karnaugh Maps. Circuit-wise, this leads to a minimal two-level implementation

Microprocessor & Assembly Language

PROGETTO DI SISTEMI ELETTRONICI DIGITALI. Digital Systems Design. Digital Circuits Advanced Topics

1. True or False? A voltage level in the range 0 to 2 volts is interpreted as a binary 1.

Chapter 4 Register Transfer and Microoperations. Section 4.1 Register Transfer Language

EE360: Digital Design I Course Syllabus

Transcription:

Introduction to Digital Electronics Module 11: Design of Sequential Counters and State Machines 1 MODULE 11- DESIGN OF SYNCHRONOUS SEQUENTIAL COUNTERS AND STATE MACHINES OVERVIEW: A synchronous sequential counter is a counter where each flip flop is clocked at the same time, and has a memory of where it has been and uses that history to progress to its next designed state. This class of counter not only includes counters that count in a strict progression in an ordered sequence, it also includes counters that can count in any possible sequence. The only restraint is that each state or possible counting number can only be used once in a sequence before the sequence is repeated. There can be unused states or numbers that the counter never generates. These are called forbidden states. If the counting circuit even accidentally ends up in one of these forbidden states because of some electrical trauma such as a power fluctuation, the counter is designed to go to the reset or normal starting state on the next clock signal. The family of state machines includes synchronous sequential counters, and a class of counters that have outside generated control variables and can have several different transition paths dictated by the external control variables. The ability to externally change the counter s programmed or designed counting path using external control variables is the basis of the modern computer. There can be a separate state machine counting sequence for each binary combination of the control variables. A state machine with three counter variables (also called state variables), and two input variables (also called control variables), can have four possible counting paths with up to eight possible counts in each path. CONCEPT 11.1: BASIC STATE COUNTERS DO NOT REQUIRE EXTERNAL CONTROL VARIABLES A basic State counter uses one flip flop for each state variable or count variable that is fed back to the inputs of the control logic. There needs to be enough state variables to generate enough combinations to complete the desired number of steps. Each flip flop is parallel clocked or clocked by the same flip flop at the same time. Outside of the clock, the only other external input that the counter may have is a set or clear that is used to start the counter in its reset or desired starting state.

Introduction to Digital Electronics Module 11: Design of Sequential Counters and State Machines 2 CONCEPT 11.2: DESIGNING A BASIC STATE COUNTER The design of a basic state counter requires several tools. First you must map out the desired count sequence using a State Graph. A state graph has one circle for every possible state. If the counter has three state variables, the state graph will have eight circle. A four state variable design will start with a state graph that has sixteen circles and so on. The state graph transition path is next converted to a State Table. The state table is a matrix of how the state machine progresses from its present state to the next state as mapped by the state graph. The first set of columns tabulates a straight binary progression of the present state variables in much the same way as a truth table. There is one additional column that maps the states as S0 = 000, S1 = 001, and so on. The columns to the right are the next state columns that contain the destination state as mapped by the state graph. The final set of columns contain the control variables or the inputs to the flip flops or memory devices needed to force them to transition to the next state. For D flip flops, the D inputs must be the same as the next state. To make a state machine that uses D flip flops, the D inputs must have a combinational logic circuit that will cause the correct next state to be present on the D input for each present state. The best way to understand how to design a state counter is to follow a step by step procedure to design one. We will design a state counter that will count up in even steps as 0 2 4 6 0 2, and so on. 1. DRAW THE STATE GRAPH SHOWING THE COUNTER TRANSITION PATH

Introduction to Digital Electronics Module 11: Design of Sequential Counters and State Machines 3 2. CREATE A STATE TABLE THAT MAPS THE STATE GRAPH Notice that the D control variables are exactly the same as the next state variables. This is only true for the D flip flop. J-K flip flops must have the right combinations of J and K inputs to make the flip flop transition from the present state to the next state. 3. WRITE THE DESIGN EQUATIONS FOR THE FLIP FLOP INPUTS Here A, B, and C are the outputs of the flip flops which are fed back to the Combinational logic circuits which create the next state inputs on the D control variable inputs of the same flip flops. This is what makes the flip flops transition to the correct next state. 4. SIMPLIFY THE DESIGN LOGIC FOR THE CONTROL VARIABLE INPUTS If you are designing the state machine using programmable logic, there is no need to simplify the combinational logic circuits because the programmable logic device will have more than enough gates and inputs to cover the unsimplified equations. If you are going to build the design using discrete components, you might want to simplify the design using Karnaugh Maps.

Introduction to Digital Electronics Module 11: Design of Sequential Counters and State Machines 4 The design equations above simply to: J-K flip flop designs reduce much more than D flip flop designs because the J-K flip flops have don t care variables in their design equations. There would be six control variables for each of the J s and K s for each flip flop, but the control variable equations for each would reduce few or no gates. 5. DESIGN THE LOGIC FROM THE CONTROL VARIABLE EQUATIONS There are no external input variables that will change the counter. It will just continue to count the 0 2 4 6 0.... sequence it was designed to count without ever changing its order.

Introduction to Digital Electronics Module 11: Design of Sequential Counters and State Machines 5 CONCEPT 11.3: DESIGNING A STATE COUNTER OR STATE MACHINE WITH INPUT VARIABLES The design process for designing a state machine is basically the same as designing a state counter. The main difference is that the state machine has input variables which allow outside influences to change the state machine transition path. The design equations for the control variable inputs now have to consider input variables as well as state variables. The state graph can have multiple paths dictated by the input variables. The state tables will have separate sections for each combination of input variables. Each unique combination of input variables becomes a separate design problem. When they are combined together, the resulting design is a state machine that has multiple paths selected by external controls. The best way to understand how to complete a state machine design with external input variables is to design such a machine. Add to the earlier design an input variable X. If X=0, the sequence is 0 2 4 6 0 as before. If X = 1, make the sequence 1 3 5 7 1. The design steps will be similar to the original design but now much include the input variable X. 1. CREATE THE STATE GRAPH

Introduction to Digital Electronics Module 11: Design of Sequential Counters and State Machines 6 2. MAP THE STATE GRAPHS INTO THE STATE TABLE 3. WRITE THE CONTROL VARIABLE DESIGN EQUATIONS 4. DESIGN THE CIRCUIT FROM THE CONTROL VARIABLE EQUATIONS Even after simplifying the equations, the circuit is quite complicated. This is a good candidate for a pal design.