Digital Circuits ECS 371

Similar documents
Digital Fundamentals

CHW 261: Logic Design

Digital Fundamentals

PGT104 Digital Electronics. PGT104 Digital Electronics

Roger L. Tokheim. Chapter 8 Counters Glencoe/McGraw-Hill

LOGIC CIRCUITS. Basic Experiment and Design of Electronics

ECE 341. Lecture # 3

LOGIC CIRCUITS. Basic Experiment and Design of Electronics. Ho Kyung Kim, Ph.D.

Digital Circuits ECS 371. Dr. Prapun Suksompong Latches and Flip-Flops

King Fahd University of Petroleum and Minerals College of Computer Science and Engineering Computer Engineering Department

EECS150 - Digital Design Lecture 18 - Counters

EECS150 - Digital Design Lecture 18 - Counters

Chapter 14 Sequential logic, Latches and Flip-Flops

S.Y. Diploma : Sem. III [CO/CM/IF/CD/CW] Digital Techniques

10/12/2016. An FSM with No Inputs Moves from State to State. ECE 120: Introduction to Computing. Eventually, the States Form a Loop

ELCT201: DIGITAL LOGIC DESIGN

Sample Test Paper - I

Computers also need devices capable of Storing data and information Performing mathematical operations on such data

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified) State any two Boolean laws. (Any 2 laws 1 mark each)

EECS150 - Digital Design Lecture 17 - Sequential Circuits 3 (Counters)

EECS150 - Digital Design Lecture 16 Counters. Announcements

Q: Examine the relationship between X and the Next state. How would you describe this circuit? A: An inverter which is synched with a clock signal.

ECE/Comp Sci 352 Digital Systems Fundamentals. Charles R. Kime Section 2 Fall Logic and Computer Design Fundamentals

Digital Electronics Final Examination. Part A

Different encodings generate different circuits

Schedule. ECEN 301 Discussion #25 Final Review 1. Date Day Class No. 1 Dec Mon 25 Final Review. Title Chapters HW Due date. Lab Due date.

DE58/DC58 LOGIC DESIGN DEC 2014

EE 209 Logic Cumulative Exam Name:

COEN 312 DIGITAL SYSTEMS DESIGN - LECTURE NOTES Concordia University

Philadelphia University Student Name: Student Number:

Sequential vs. Combinational

I. Motivation & Examples

Shift Register Counters

CS221: Digital Design. Dr. A. Sahu. Indian Institute of Technology Guwahati

EECS150 - Digital Design Lecture 23 - FSMs & Counters

COE 202: Digital Logic Design Sequential Circuits Part 4. Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:

Vidyalankar S.E. Sem. III [ETRX] Digital Circuits and Design Prelim Question Paper Solution

Digital Electronic Meters

S.Y. Diploma : Sem. III [DE/ED/EI/EJ/EN/ET/EV/EX/IC/IE/IS/IU/MU] Principles of Digital Techniques

Exam for Physics 4051, October 31, 2008

Synchronous Sequential Logic

EECS150 - Digital Design Lecture 11 - Shifters & Counters. Register Summary

EET 310 Flip-Flops 11/17/2011 1

WORKBOOK. Try Yourself Questions. Electrical Engineering Digital Electronics. Detailed Explanations of

6 Synchronous State Machine Design

ELCT201: DIGITAL LOGIC DESIGN

Lab 3 Revisited. Zener diodes IAP 2008 Lecture 4 1

Review: Designing with FSM. EECS Components and Design Techniques for Digital Systems. Lec09 Counters Outline.

Delhi Noida Bhopal Hyderabad Jaipur Lucknow Indore Pune Bhubaneswar Kolkata Patna Web: Ph:

Gates and Flip-Flops

Chapter 7 Sequential Logic

Generalized FSM model: Moore and Mealy

Preparation of Examination Questions and Exercises: Solutions

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 7 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering

Review: Designing with FSM. EECS Components and Design Techniques for Digital Systems. Lec 09 Counters Outline.

Reg. No. Question Paper Code : B.E./B.Tech. DEGREE EXAMINATION, NOVEMBER/DECEMBER Second Semester. Computer Science and Engineering

Experiment 9 Sequential Circuits

Sequential Logic Circuits

Digital Logic Design - Chapter 4

Counters. We ll look at different kinds of counters and discuss how to build them

Menu. Excitation Tables (Bonus Slide) EEL3701 EEL3701. Registers, RALU, Asynch, Synch

Digital Signal 2 N Most Significant Bit (MSB) Least. Bit (LSB)

Sequential Logic Worksheet

Philadelphia University Student Name: Student Number:

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

King Fahd University of Petroleum and Minerals College of Computer Science and Engineering Computer Engineering Department

Numbers and Arithmetic

MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI

Sequential Logic. Rab Nawaz Khan Jadoon DCS. Lecturer COMSATS Lahore Pakistan. Department of Computer Science

CSE140: Components and Design Techniques for Digital Systems. Midterm Information. Instructor: Mohsen Imani. Sources: TSR, Katz, Boriello & Vahid

Fundamentals of Digital Design

Lecture 17: Designing Sequential Systems Using Flip Flops

Unit II Chapter 4:- Digital Logic Contents 4.1 Introduction... 4

Chapter 7. Sequential Circuits Registers, Counters, RAM

The Design Procedure. Output Equation Determination - Derive output equations from the state table

Vidyalankar S.E. Sem. III [EXTC] Digital Electronics Prelim Question Paper Solution ABCD ABCD ABCD ABCD ABCD ABCD ABCD ABCD = B

3. Complete the following table of equivalent values. Use binary numbers with a sign bit and 7 bits for the value

Introduction EE 224: INTRODUCTION TO DIGITAL CIRCUITS & COMPUTER DESIGN. Lecture 6: Sequential Logic 3 Registers & Counters 5/9/2010

UNIVERSITY OF BOLTON SCHOOL OF ENGINEERING BENG (HONS) ELECTRICAL & ELECTRONICS ENGINEERING EXAMINATION SEMESTER /2017

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

Chapter 4. Sequential Logic Circuits

Lecture 10: Synchronous Sequential Circuits Design

State and Finite State Machines

ELEC Digital Logic Circuits Fall 2014 Sequential Circuits (Chapter 6) Finite State Machines (Ch. 7-10)

CHW 261: Logic Design

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 9 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering

CPE100: Digital Logic Design I

EECS150 - Digital Design Lecture 25 Shifters and Counters. Recap

Design at the Register Transfer Level

Synchronous Sequential Circuit Design. Digital Computer Design

DM7490A Decade and Binary Counter

SIR C.R.REDDY COLLEGE OF ENGINEERING ELURU DIGITAL INTEGRATED CIRCUITS (DIC) LABORATORY MANUAL III / IV B.E. (ECE) : I - SEMESTER

Digital Electronics Circuits 2017

Digital Logic Appendix A

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

Synchronous 4 Bit Counters; Binary, Direct Reset

Numbers and Arithmetic

ALU, Latches and Flip-Flops

PAST EXAM PAPER & MEMO N3 ABOUT THE QUESTION PAPERS:

Lecture 7: Logic design. Combinational logic circuits

Transcription:

Digital Circuits ECS 371 Dr. Prapun Suksompong prapun@siit.tu.ac.th Lecture 18 Office Hours: BKD 3601-7 Monday 9:00-10:30, 1:30-3:30 Tuesday 10:30-11:30 1

Announcement Reading Assignment: Chapter 7: 7-1, 7-2, 7-4 Chapter 8: 8-1, 8-2 HW6: Chapter 7 Q: 2, 4, 8, 10, 12, 14, 18 Due: 4:30 PM, August 19 (Wednesday) 2

Asynchronous Inputs Most flip-flops have extra inputs that are asynchronous, meaning they affect the output independent of the clock. Two such inputs are normally labeled preset (PRE) and clear (CLR). These inputs are usually active-low. A J-K flip flop with active-low preset and CLR is shown. PRE J Q CLK K Q 8 CLR

9 Example

Some Applications Divide the clock frequency by 2 11

Some Applications Divide the clock frequency by 4 Note that FF B will be synced to the positive-edge of Q A instead of CLK! 12

Counting in Binary We have seen that the binary count sequence follows a familiar pattern of 0 s and 1 s. The next bit changes on every fourth number. 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 LSB changes on every number. The next bit changes on every other number. 14

Counter A counter can form the same pattern of 0 s and 1 s with logic levels. The first stage in the counter represents the least significant bit (LSB) notice that these waveforms follow the same pattern as counting in binary. LSB 0 1 0 1 0 1 0 1 0 0 0 1 1 0 0 1 1 0 MSB 0 0 0 0 1 1 1 1 0 15

16 Ex: 2-bit Asynchronous Binary Counter

Asynchronous counter Counters are classified into two broad categories according to the way they are clocked: 1. asynchronous 2. Synchronous The term asynchronous refers to events that do not have a fixed time relationship with each other and, generally, do not occur at the same time. Asynchronous counters The FFs within the counter do not change states at exactly the same time because they do not have a common clock pulse. 17

Asynchronous counter (con t) Commonly called ripple counters The FFs are connected for toggle operation (J = 1, K = 1) The first FF is clocked by the external clock pulse (CLK). Each successive FF is clocked by the output of the preceding FF. 18

Ex: 3-bit Asynchronous Counter HIGH J 0 Q 0 J Q 1 1 J Q 2 2 CLK C C C K 0 Q 0 Q 1 K 1 K 2 (LSB) CLK Q 0 1 2 3 4 5 6 7 8 0 1 0 1 0 1 0 1 0 Q 1 0 0 1 1 0 0 1 1 0 (MSB) Q 2 0 0 0 0 1 1 1 1 0 19 Recycle back to 0

Propagation Delay Asynchronous counters are sometimes called ripple counters, because the stages do not all change together. For certain applications requiring high clock rates, this is a major disadvantage. The maximum cumulative delay must be less than the period of the clock waveform. Notice how delays are cumulative as each stage in a counter is clocked later than the previous stage. CLK Q 0 Q 1 Q 2 1 2 3 4 20 Q 0 is delayed by 1 propagation delay, Q 1 by 2 delays and Q 2 by 3 delays. It takes three propagation delay times for the effect of the clock pulse, CLK4, to ripple through the counter and change Q 2 from LOW to HIGH.

Modulus The modulus of a counter is the number of unique states through which the counter will sequence. The maximum possible number of states (maximum modulus) of a counter is 2 n, where n is the number of FFs in the counter. Counters can be designed to have a number of states in their sequence that is less than the maximum of 2 n. This type of sequence is called a truncated sequence. To obtain a truncated sequence, it is necessary to force the counter to recycle before going through all of its possible states. 21

Counters with Truncated Sequences One common modulus for counters with truncated sequences is ten (called MOD10). Counters with ten states in their sequence are called decade counters. A decade counter with a count sequence of zero (0000) through nine (1001) is a BCD decade counter because its ten-state sequence produces the BCD code. The BCD decade counter must recycle back to the 0000 state after the 1001 state. We will use a technique called partial decoding. 22

BCD Decade Counter (1) A decade counter requires four FFs. Three FFs are insufficient because 2 3 = 8. Start with 4-bit asynchronous binary counter Want to recycle here! 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 23

BCD Decade Counter (2) This is used to detect the number 10 When Q 1 and Q 3 are HIGH together, the counter is cleared by a glitch on the CLR line. 0 1 2 3 4 5 6 7 8 9 0 24

Q 3 Q 2 Q 1 Q 0 0 0 0 0 0 0 0 0 1 1 0 0 1 0 2 0 0 1 1 3 0 1 0 0 4 0 1 0 1 5 0 1 1 0 6 0 1 1 1 7 1 0 0 0 8 1 0 0 1 9 1 0 1 0 10 1 0 1 1 11 1 1 0 0 12 1 1 0 1 13 1 1 1 0 14 1 1 1 1 15 25 BCD Decade Counter (3) One way to make the counter recycle after the count of nine (1001) is to decode count ten (1010) with a NAND gate and connect the output of the NAND gate to the active-low CLR inputs of the FFs. Partial Decoding: In our circuit, only Q 1 and Q 3 are connected to the NAND gate inputs. The two unique states (Q l = 1 and Q 3 = 1) are sufficient to decode the count of ten because none of the other states (zero through nine) have both Q l and Q 3 HIGH at the same time. HIGH CLK J 0 Q 0 K 0 Q 1 Q 2 J 1 J 2 C C C K 1 K 2 J 3 C K 3 Q 3 10 Decoder CLR

Ex: MOD12 Counter Q 3 Q 2 Q 1 Q 0 0 0 0 0 0 0 0 0 1 1 0 0 1 0 2 0 0 1 1 3 0 1 0 0 4 0 1 0 1 5 0 1 1 0 6 0 1 1 1 7 1 0 0 0 8 1 0 0 1 9 1 0 1 0 10 1 0 1 1 11 1 1 0 0 12 1 1 0 1 13 1 1 1 0 14 1 1 1 1 15 26

74x93 4-Bit Asynchronous Binary Counter Consist of single flip-flop and a 3-bit asynchronous counter. 27

74x93 The counter can be extended to form a 4-bit counter by connecting Q 0 to the CLK B input. Provide gated reset inputs, RO(1) and RO(2). When both of these inputs are HIGH, the counter is reset to the 0000 state. 28

74x93 Applications 74x93 as a MOD10 counter 74x93 as a MOD16 counter Exercise: Show how to connect a 74x93 4-bit asynchronous counter as a MOD12 counter. 74x93 as a MOD12 counter 29

Synchronous Counters The term synchronous refers to events that have a fixed time relationship with each other. A synchronous counter is one in which all the flip-flops in the counter are clocked at the same time by a common clock pulse. Synchronous counters overcome the disadvantage of accumulated propagation delays, but generally they require more circuitry to control states changes. 30

31 Ex: 2-Bit Synchronous Binary Counter

Ex: 3-bit Binary Synchronous Counter This 3-bit binary synchronous counter has the same count sequence as the 3-bit asynchronous counter shown previously. HIGH Q 0 J 0 Q 0 Q Q 1 0 Q J 1 Q 1 J 2 2 C C C K 0 K 1 K 2 CLK 32

Analysis of Synchronous Counters A tabular technique for analysis is illustrated for the counter on the previous slide. Start by setting up the outputs as shown, then write the logic equation for each input. This has been done for the counter. 1. Put the counter in an arbitrary state; then determine the inputs for this state. 2. Use the new inputs to determine the next state: Q 2 and Q 1 will latch and Q 0 will toggle. 3. Set up the next group of inputs from the current output. Outputs Logic for inputs Q 2 Q 1 Q 0 J 2 = Q 0 Q 1 K 2 = Q 0 Q 1 J 1 = Q 0 K 1 = Q 0 J 0 = 1 K 0 = 1 0 0 0 0 0 0 0 1 1 0 0 1 0 0 1 1 1 1 0 1 0 4. Q 2 will latch again but both Q 1 and Q 0 will toggle. Continue like this, to complete the table. The next slide shows the completed table 33

Analysis of Synchronous Counters Outputs Logic for inputs Q 2 Q 1 Q 0 J 2 = Q 0 Q 1 K 2 = Q 0 Q 1 J 1 = Q 0 K 1 = Q 0 J 0 = 1 K 0 = 1 0 0 0 0 0 0 0 1 1 0 0 1 0 0 1 1 1 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 0 0 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 34 0 0 0 At this points all states have been accounted for and the counter is ready to recycle