Digital Logic Design Sequential circuits



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

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

Asynchronous Counters. Asynchronous Counters

DIGITAL ELECTRONICS. Counters. By: Electrical Engineering Department

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

Chapter 8. Sequential Circuits for Registers and Counters

Module 3: Floyd, Digital Fundamental

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

Lecture 8: Synchronous Digital Systems

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

Counters and Decoders

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

Counters & Shift Registers Chapter 8 of R.P Jain

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

Contents COUNTER. Unit III- Counters

Lesson 12 Sequential Circuits: Flip-Flops

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

CHAPTER IX REGISTER BLOCKS COUNTERS, SHIFT, AND ROTATE REGISTERS

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

ASYNCHRONOUS COUNTERS

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

Flip-Flops and Sequential Circuit Design

Lecture-3 MEMORY: Development of Memory:

EXPERIMENT 8. Flip-Flops and Sequential Circuits

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

Systems I: Computer Organization and Architecture

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

BINARY CODED DECIMAL: B.C.D.

Asynchronous counters, except for the first block, work independently from a system clock.

Cascaded Counters. Page 1 BYU

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

Modeling Sequential Elements with Verilog. Prof. Chien-Nan Liu TEL: ext: Sequential Circuit

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

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

Counters. Present State Next State A B A B

Chapter 9 Latches, Flip-Flops, and Timers

Upon completion of unit 1.1, students will be able to

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

Memory Elements. Combinational logic cannot remember

Operating Manual Ver.1.1

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

CHAPTER 11 LATCHES AND FLIP-FLOPS

ECE380 Digital Logic

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

DEPARTMENT OF INFORMATION TECHNLOGY

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

Engr354: Digital Logic Circuits

Registers & 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.

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

DM74LS169A Synchronous 4-Bit Up/Down Binary Counter

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

Chapter 5. Sequential Logic

Design: a mod-8 Counter

Digital Electronics Detailed Outline

Master/Slave Flip Flops

Latches, the D Flip-Flop & Counter Design. ECE 152A Winter 2012

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

Layout of Multiple Cells

NOTE: The Flatpak version has the same pinouts (Connection Diagram) as the Dual In-Line Package.

INTEGRATED CIRCUITS. For a complete data sheet, please also download:

CHAPTER 11: Flip Flops

The components. E3: Digital electronics. Goals:

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

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

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

Lab 1: Study of Gates & Flip-flops

Theory of Logic Circuits. Laboratory manual. Exercise 3

Digital Controller for Pedestrian Crossing and Traffic Lights

COMBINATIONAL and SEQUENTIAL LOGIC CIRCUITS Hardware implementation and software design

DATA SHEET. HEF40193B MSI 4-bit up/down binary counter. For a complete data sheet, please also download: INTEGRATED CIRCUITS

Modeling Registers and Counters

Fig1-1 2-bit asynchronous counter

DM74LS191 Synchronous 4-Bit Up/Down Counter with Mode Control

Modeling Latches and Flip-flops

CSE140: Components and Design Techniques for Digital Systems

List of Experiment. 8. To study and verify the BCD to Seven Segments DECODER.(IC-7447).

1.1 The 7493 consists of 4 flip-flops with J-K inputs unconnected. In a TTL chip, unconnected inputs

Digital Fundamentals

Sequential Logic Design Principles.Latches and Flip-Flops

CS311 Lecture: Sequential Circuits

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

L4: Sequential Building Blocks (Flip-flops, Latches and Registers)

SN54/74LS192 SN54/74LS193

Set-Reset (SR) Latch

74LS193 Synchronous 4-Bit Binary Counter with Dual Clock

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

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

74F168*, 74F169 4-bit up/down binary synchronous counter

CHAPTER 3 Boolean Algebra and Digital Logic

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

54191 DM54191 DM74191 Synchronous Up Down 4-Bit Binary Counter with Mode Control

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

Combinational Logic Design Process

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

SN54HC191, SN74HC191 4-BIT SYNCHRONOUS UP/DOWN BINARY COUNTERS

Introduction to CMOS VLSI Design (E158) Lecture 8: Clocking of VLSI Systems

NOTE: The Flatpak version has the same pinouts (Connection Diagram) as the Dual In-Line Package.

DM74LS193 Synchronous 4-Bit Binary Counter with Dual Clock

Transcription:

Digital Logic Design Sequential circuits Dr. Eng. Ahmed H. Madian E-mail: ahmed.madian@guc.edu.eg Dr. Eng. Rania.Swief E-mail: rania.swief@guc.edu.eg Dr. Eng. Ahmed H. Madian

Registers An n-bit register consists of a group n flip - flops capable of storing n bits of binary info. All Flip-flops are connected to one clock source Each flip-flop can store one bit of Info. Clear signal during normal operation is set to high The clear input is useful for clearing all the content of the register to all 0 s Problem: Typically don t want to load every clock Solution: use a external signal to control the operation of the load Dr. Eng. Ahmed H. Madian 2

Registers with Parallel Load 0 0 0 Dr. Eng. Ahmed H. Madian 3

Shift Registers A register capable of shifting its binary information in one or both direction is called a shift register A chain of flip-flops connected in cascade 00 0 Qa Qb Qc SI CLK Qa Qb etc Dr. Eng. Ahmed H. Madian 4

Universal Shift Registers No Change Shift Right Shift Left Parallel Load Need a Clear and Clock S S2 Action 0 0 No Change 0 Shift Right 0 Shift Left Parallel Load Dr. Eng. Ahmed H. Madian 5

Basic Sequential Circuits Ripple Counters. Synchronous Counters. Counters with Unused States. Up/Down Counters Dr. Eng. Ahmed H. Madian 6

Counters A counter is a register that goes through a predetermined sequence of stat es upon the application of clock pulses. Counters are a specific type of sequential circuit. Like registers, the state, or the flip-flop values themselves, serves as the output. The output value increases by one on each clock cycle. After the largest value, the output wraps around back to 0. Counters could be implemented with flip-flops (JK-, D-, T-FFs) current state next state 0 000 00 00 00 2 2 00 0 3 3 0 00 4 4 00 0 5 5 0 0 6 6 0 7 7 000 0 000 00 00 3-bit up-counter 0 0 0 00 Dr. Eng. Ahmed H. Madian 7

Counters Dr. Eng. Ahmed H. Madian 8

JK (or T) Flip flop A JK( or T) flip flop toggles when both inputs are. In this case it effectively counts every second clock pulse: clock J Q K ~Q clock Q You can also say it counts from 0 to and back again. Sometimes called a scale of 2 counter Dr. Eng. Ahmed H. Madian 9

Counter Connect two such flip flops together: Q Q2 clock Complete the timing diagram for Q2 clock Q Q2 Q2Q: 00 0 0 00 Dr. Eng. Ahmed H. Madian 0

Counter (From D-FF) CLK A 0 D Flip-Flop Frequency Divider Dr. Eng. Ahmed H. Madian

4-bit Ripple counter (Asynchronous) e.g. A 4 bit ripple counter using negative edge triggered T and D FFs Asynchronous means each flip flop is triggered by the preceding one. Negative edge Trigger A to toggle Dr. Eng. Ahmed H. Madian 2

BCD Ripple counter Dr. Eng. Ahmed H. Madian 3

Counters Synchronous counters Outputs of all the flipflops change at the same time e.g. a 2-bit synchronous counter clk J K Q Q Q a J K Q Q Q b C 0 Q a 0 Q b 0 00 0 0 00 0 Dr. Eng. Ahmed H. Madian

Synchronous counter using (JK-FF) All flip-flops driven with the same clock If count enable = the count begins The flip-flop of the least significant position (ex. A 0 ) is complemented with every pulse Other flip-flops is complemented when all the bits in the lower position is equal Dr. Eng. Ahmed H. Madian 5

Unused states The examples shown so far have all had 2 n states, and used n flipflops. But sometimes you may have unused, leftover states For example, here is a state table and diagram for a counter that repeatedly counts from 0 (000) to 5 (0). What should we put in the table for the two unused states? Present State Next State Q 2 Q Q 0 Q 2 Q Q 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0?????? 0 00 000 0 00 00 0/27/20 6 Dr. Eng. Ahmed H. Madian 03 6

Unused states can be don t cares To get the simplest possible circuit, you can fill in don t cares for the next states. This will also result in don t cares for the flip-flop inputs, which can simplify the hardware. If the circuit somehow ends up in one of the unused states (0 or ), its behavior will depend on exactly what the don t cares were filled in with. Present State Next State 000 Q 2 Q Q 0 Q 2 Q Q 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 x x x x x x 0 00 0 00 00 Dr. Eng. Ahmed H. Madian 7

or maybe you do care To get the safest possible circuit, you can explicitly fill in next states for the unused states 0 and. This guarantees that even if the circuit somehow enters an unused state, it will eventually end up in a valid state. This is called a self-starting counter. Present State Next State Q 2 Q Q 0 Q 2 Q Q 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00 000 00 00 0 Dr. Eng. Ahmed H. Madian 8

Example Design a 3-bit counter synchronous that could count up or down directions using one control signal Down If Down = it counts down from ( to 000) If Down = 0 it counts up from (000 to ) Dr. Eng. Ahmed H. Madian 9

Up-Down Counter state diagram 00 00 0 000 3-bit up-down counter 00 Down = 0 0 000-> -> 0 -> 0 ->.. Dr. Eng. Ahmed H. Madian 20

Up-Down Counter (From D-FF) Present State Next State Q2(t) Q(t) Q0(t) Q2(t+) Q(t+) Q0(t+) 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Dr. Eng. Ahmed H. Madian 2

D-FF easiest to use 0 Q2 Up-Down Counter (From D-FF) 00 0 Q0 0 Q K-map for D D = Q 0 Q + Q 0 Q Q2 0 00 0 Q0 0 Q K-map for D2 D 2 = Q 2 Q 0 + Q Q 2 +Q 0 Q Q 2 Dr. Eng. Ahmed H. Madian 22

Up-Down Counter (From T-FF) Present State Next State T-FF Input Q2(t) Q(t) Q0(t) Q2(t+) Q(t+) Q0(t+) T2 T T0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Dr. Eng. Ahmed H. Madian 23

D-FF easiest to use Up-Down Counter (From T-FF) T0 = T = Q0 Q2 0 00 0 Q0 0 Q K-map for T2 T2 =Q0 Q Dr. Eng. Ahmed H. Madian 24

Up-Down Counter (From T-FF) Dr. Eng. Ahmed H. Madian 25