Digital Fundamentals

Similar documents
Digital Fundamentals

CHW 261: Logic Design

PGT104 Digital Electronics. PGT104 Digital Electronics

Digital Circuits ECS 371

COEN 312 DIGITAL SYSTEMS DESIGN - LECTURE NOTES Concordia University

LOGIC CIRCUITS. Basic Experiment and Design of Electronics

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

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

Chapter #7: Sequential Logic Case Studies Contemporary Logic Design

DE58/DC58 LOGIC DESIGN DEC 2014

EECS150 - Digital Design Lecture 18 - Counters

EECS150 - Digital Design Lecture 18 - Counters

Chapter 14 Sequential logic, Latches and Flip-Flops

NOTE: The Flatpak version has the same pinouts (Connection Diagram) as the Dual In-Line Package. *MR for LS160A and LS161A *SR for LS162A and LS163A

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

ECE 341. Lecture # 3

Digital Electronics Final Examination. Part A

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

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

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

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

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

Synchronous 4 Bit Counters; Binary, Direct Reset

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

MOSIS REPORT. Spring MOSIS Report 1. MOSIS Report 2. MOSIS Report 3

Exam for Physics 4051, October 31, 2008

Digital Logic Design - Chapter 4

EECS150 - Digital Design Lecture 23 - FSMs & Counters

Digital Electronics. Part A

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

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

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

EE 209 Logic Cumulative Exam Name:

MATC DIGITAL ELECTRONICS LAB ASYNCHRONOUS RIPPLE COUNTERS

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

I. Motivation & Examples

Different encodings generate different circuits

Synchronous Sequential Logic

Decoding A Counter. svbitec.wordpress.com 1

Digital Fundamentals

ELCT201: DIGITAL LOGIC DESIGN

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

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

Experiment 9 Sequential Circuits

Sample Test Paper - I

S.E. Sem. III [ETRX] Digital Circuit Design. t phl. Fig.: Input and output voltage waveforms to define propagation delay times.

Digital Electronics Circuits 2017

Lab 3 Revisited. Zener diodes IAP 2008 Lecture 4 1

Chapter 5 Synchronous Sequential Logic

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

CHW 261: Logic Design

EET 310 Flip-Flops 11/17/2011 1

Up/down binary counter with separate up/down clocks

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

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

74F193 Up/Down Binary Counter with Separate Up/Down Clocks

課程名稱 : 數位邏輯設計 P-1/ /6/11

Sequential vs. Combinational

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

MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI

Chapter 7. Sequential Circuits Registers, Counters, RAM

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

EECS150 - Digital Design Lecture 16 Counters. Announcements

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

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

Fundamentals of Computer Systems

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

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

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

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

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

EECS150 - Digital Design Lecture 25 Shifters and Counters. Recap

Dr. Nicola Nicolici COE/EE2DI4 Midterm Test #2 Nov 22, 2006

CSE370 HW6 Solutions (Winter 2010)

Preparation of Examination Questions and Exercises: Solutions

Digital Electronics. Delay Max. FF Rate Power/Gate High Low (ns) (MHz) (mw) (V) (V) Standard TTL (7400)

Show that the dual of the exclusive-or is equal to its compliment. 7

Layout of 7400-series Chips Commonly Used in. CDA 3101: Introduction to Computer Hardware and Organization

Gates and Flip-Flops

6 Synchronous State Machine Design

74LS195 SN74LS195AD LOW POWER SCHOTTKY

ELCT201: DIGITAL LOGIC DESIGN

Unit 7 Sequential Circuits (Flip Flop, Registers)

Overview of Chapter 4

Sequential Logic Circuits

Introduction to Digital Logic

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

Synchronous Sequential Circuit Design. Digital Computer Design

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

Philadelphia University Student Name: Student Number:

Lecture 3 Review on Digital Logic (Part 2)

DATA SHEET. HEF40163B MSI 4-bit synchronous binary counter with synchronous reset. For a complete data sheet, please also download:

MICROCIRCUITS, DIGITAL, LOW-POWER SCHOTTKY TTL, COUNTERS, MONOLITHIC SILICON. Inactive for new design after 18 April 1997.

Design of Sequential Circuits

Standard Products UT54ACS190/UT54ACTS190 Synchronous 4-Bit Up-Down BCD Counters. Datasheet November

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

Chapter 7 Sequential Logic

Time Allowed 3:00 hrs. April, pages

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

Stop Watch (System Controller Approach)

Transcription:

Digital Fundamentals Tenth Edition Floyd hapter 8 Modified by Yuttapong Jiraraksopakun Floyd, Digital Fundamentals, 10 th 2008 Pearson Education ENE, KMUTT ed 2009

ounting in Binary As you know, the binary count sequence follows a familiar pattern of 0 s and 1 s as described in Section 2-2 of the text. The next bit changes on every fourth number. Summary 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.

ounting in Binary 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 notice that these waveforms follow the same pattern as counting in binary. LSB 0 1 0 1 0 1 0 1 0 0 1 1 0 0 1 1 MSB 0 0 0 0 1 1 1 1

Three bit Asynchronous ounter In an asynchronous counter, the clock is applied only to the first stage. Subsequent stages derive the clock from the previous stage. The three-bit asynchronous counter shown is typical. It uses J-K flip-flops in the toggle mode. HIGH J 0 J Q 1 1 J 2 LK K 0 Q 1 K 1 K 2 Waveforms are on the following slide

Three bit Asynchronous ounter Notice that the output is triggered on the leading edge of the clock signal. The following stage is triggered from. The leading edge of is equivalent to the trailing edge of. The resulting sequence is that of an 3-bit binary up counter. LK 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 0 0 0 0 1 1 1 1 0

Propagation Delay Summary 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. Notice how delays are cumulative as each stage in a counter is clocked later than the previous stage. LK Q 1 1 2 3 4 is delayed by 1 propagation delay, Q 1 by 2 delays and by 3 delays.

Asynchronous Decade ounter This counter uses partial decoding to recycle the count sequence to zero after the 1001 state. The flip-flops are trailing-edge triggered, so clocks are derived from the Q outputs. Other truncated sequences can be obtained using a similar technique. HIGH LR J 0 Q 1 J 1 J 2 J 3 Q 3 LK K 0 K 1 K 2 K 3 Waveforms are on the following slide

Asynchronous Decade ounter When Q 1 and Q 3 are HIGH together, the counter is cleared by a glitch on the LR line. LK 1 2 3 4 5 6 7 8 9 10 Q 1 Glitch Glitch Q 3 LR Glitch

Asynchronous ounter Using D Flip-flops D flip-flops can be set to toggle and used as asynchronous counters by connecting Q back to D. The counter in this slide is a Multisim simulation of one described in the lab manual. an you figure out the sequence? LSB MSB Q to D puts D flip-flop in toggle mode The next slide shows the scope

LK LSB MSB LR Note that it is momentarily in state 3 which causes it to clear. The sequence is 0 2 1 (LR) (repeat)

The 74LS93A Asynchronous ounter The 74LS93A has one independent toggle J-K flip-flop driven by LK A and three toggle J-K flip-flops that form an asynchronous counter driven by LK B. The counter can be extended to form a 4-bit counter by connecting to the LK B input. Two inputs are provided that clear the count. LK B (1) LK A (14) J J 1 J 2 0 J 3 K 0 K 1 K 2 K 3 All J and K inputs are connected internally HIGH RO (1) RO (2) (2) (3) (12) (9) (8) (11) Q 1 Q 3

The 74LS93A Asynchronous ounter

Synchronous ounters Summary In a synchronous counter all flip-flops are clocked together with a common clock pulse. Synchronous counters overcome the disadvantage of accumulated propagation delays, but generally they require more circuitry to control states changes.

Synchronous ounters Summary This 3-bit binary synchronous counter has the same count sequence as the 3-bit asynchronous counter shown previously. LK HIGH J J 1 J 0 2 K 0 Q 1 Q 1 K 1 K 2 The next slide shows how to analyze this counter by writing the logic equations for each input. Notice the inputs to each flip-flop

Analysis of Synchronous ounters 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. Outputs 2. Use the new inputs to determine the next state: and Q 1 will latch and will toggle. Logic for inputs 3. Set up the next group of inputs from the current output. Q 1 J 2 = Q 1 K 2 = Q 1 J 1 = K 1 = 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. will latch again but both Q 1 and will toggle. ontinue like this, to complete the table. The next slide shows the completed table

Analysis of Synchronous ounters Outputs Logic for inputs Q 1 J 2 = Q 1 K 2 = Q 1 J 1 = K 1 = 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 0 0 0 At this points all states have been accounted for and the counter is ready to recycle

A 4-bit Synchronous Binary ounter Q 1 Q 1 FF0 FF1 G1 G 2 FF2 FF3 HIGH J 0 J 1 Q 1 J 2 J 3 Q 3 LK K 0 K 1 Q 1 K 2 K 3 Q 3 The 4-bit binary counter has one more AND gate than the 3-bit counter just described. The shaded areas show where the AND gate outputs are HIGH causing the next FF to toggle. Q 1 Q 3

BD Decade ounter With some additional logic, a binary counter can be converted to a BD synchronous decade counter. After reaching the count 1001, the counter recycles to 0000. HIGH Summary This gate detects 1001, and causes FF3 to toggle on the next clock pulse. FF0 toggles on every clock pulse. Thus, the count starts over at 0000. FF0 FF1 FF2 FF3 Q 3 J 0 J 1 Q 1 J 2 J 3 Q 3 K 0 K 1 Q 1 K 2 K 3 Q 3 Q 3 LK

BD Decade ounter Summary FF1 (Q1) toggle on the next clock pulse only if Q0 = 1 and Q3 = 0 HIGH FF0 FF1 FF2 FF3 J 0 _ Q 3 J 1 Q 1 J 2 J 3 Q 3 K 0 K 1 Q 1 K 2 K 3 Q 3 Q 3 LK

BD Decade ounter Summary Waveforms for the decade counter: LK 1 2 3 4 5 6 7 8 9 10 0 1 0 1 0 1 0 1 0 1 0 Q 1 0 0 1 1 0 0 1 1 0 0 0 0 0 0 0 1 1 1 1 0 0 0 Q 3 0 0 0 0 0 0 0 0 1 1 0 These same waveforms can be obtained with an asynchronous counter in I form the 74LS90. It is available in a dual version the 74LS390, which can be cascaded. It is slower than synchronous counters (max count frequency is 35 MHz), but is simpler.

A 4-bit Synchronous Binary ounter The 74LS163 is a 4-bit I synchronous counter with additional features over a basic counter. It has parallel load, a LR input, two chip enables, and a ripple count output that signals when the count has reached the terminal count. Data inputs D 0 D 1 D 2 D 3 (3) (4) (5) (6) LR LOAD ENT ENP LK (1) (9) (10) (7) (2) TR DIV 16 T = 15 (15) RO (14) (13) (12) (11) Q 1 Q 3 Data outputs Example waveforms are on the next slide

LR LOAD D 0 Data inputs D 1 D 2 D 3 LK ENP ENT Data outputs Q 1 Q 3 RO 12 13 14 15 0 1 2 lear Preset ount Inhibit

Up/Down Synchronous ounters Q0 toggles on every clock pulse for both UP and DOWN Q1 toggles when Q0 = 1 for UP AND when Q0 = 0 for DOWN Q2 toggles when Q0=Q1=1 for UP AND when Q0=Q1=0 for DOWN

Up/Down Synchronous ounters An up/down counter is capable of progressing in either direction depending on a control input. UP/DOWN HIGH J 0 UP. UP FF0 FF1 FF2 J 1 J 2 Q 1 K 0 Q 1 K 1 K 2 LK DOWN. DOWN Example waveforms from Multisim are on the next slide

Up/Down Synchronous ounters Q 1 UP/DOWN ount up ount down

Up/Down Synchronous ounters D 0 D 1 D 2 D 3 Data inputs The 74H190 is a high speed MOS synchronous up/down decade counter with parallel load capability. It also has a active LOW ripple clock output (RO) and a MAX/MIN output when the terminal count is reached. TEN D/U LOAD LK (4) (5) (11) (14) 74H190 (15) (1) (10) (9) TR DIV 10 (3) (2) (6) (7) Q 1 Q 3 D 0 D 1 D 2 D 3 (12) (13) MAX/MIN RO Data outputs Data inputs The 74H191 has the same inputs and outputs but is a synchronous up/down binary counter. TEN D/U LOAD LK (4) (5) (11) (14) 74H191 (15) (1) (10) (9) TR DIV 16 (3) (2) (6) (7) (12) (13) MAX/MIN RO Q 1 Q 3 Data outputs

Synchronous ounter Design

Synchronous ounter Design Most requirements for synchronous counters can be met with available Is. In cases where a special sequence is needed, you can apply a step-by-step design process. The steps in design are described in detail in the text and lab manual. Start with the desired sequence and draw a state diagram and nextstate table. The gray code sequence from the text is illustrated: State diagram: Next state table: 100 000 001 Present State Q 1 Next State Q 1 101 111 110 010 011 0 0 0 0 0 1 0 1 1 0 1 0 1 1 1 1 0 1 1 0 1 1 0 0 0 0 1 0 1 1 0 1 0 1 1 0 1 1 1 0 1 1 1 0 0 0 0 0

Summary Synchronous ounter Design The J-K transition table lists all combinations of present output (Q N ) and next output (Q N+1 ) on the left. The inputs that produce that transition are listed on the right. Each time a flip-flop is clocked, the J and K inputs required for that transition are mapped onto a K-map. An example of the J 0 map is: Q 1 00 01 11 10 0 1 1 0 1 0 X X X X J 0 map Q 1 Q 1 Output Transitions Q N Q N+1 0 0 0 1 1 0 1 1 Flip-Flop Inputs J K 0 X 1 X X 1 X 0 The logic for each input is read and the circuit is constructed. The next slide shows the implementation details of the circuit for the gray code counter

Synchronous ounter Design

Synchronous ounter Design

Synchronous ounter Design J 0 FF0 FF1 FF2 J 1 J Q 1 2 K 0 Q K 1 Q 1 K 2 2 LK The circuit can be checked with Multisim before constructing it. The next slide shows the Multisim result

Q 1

Synchronous 3-bit Up/Down Gray ode ounter

Synchronous 3-bit Up/Down Gray ode ounter

Synchronous 3-bit Up/Down Gray ode ounter

ascaded counters ascading is a method of achieving higher-modulus counters. For synchronous I counters, the next counter is enabled only when the terminal count of the previous stage is reached. HIGH ounter 1 ounter 2 16 TEN T TEN LK Q 1 f in TR DIV 16 TR DIV 16 ƒ in Q 3 Q 1 Q 3 T f out ƒ in 256 a) What is the modulus of the cascaded DIV 16 counters? b) If f in =100 khz, what is f out? a) Each counter divides the frequency by 16. Thus the modulus is 16 2 = 256. b) The output frequency is 100 khz/256 = 391 Hz

ounter Decoding Decoding is the detection of a binary number and can be done with an AND gate. HIGH Summary J 0 J 1 Q 1 J 2 Q 2 K 0 Q Q 0 1 K 1 Q 1 K 2 LK What number is decoded by this gate? 1 1 1 LSB Decoded 4 Q Q 1 0 MSB

Partial Decoding Summary The decade counter shown previously incorporates partial decoding (looking at only the MSB and the LSB) to detect 1001. This was possible because this is the first occurrence of this combination in the sequence. Detects 1001 by looking only at two bits HIGH FF0 FF1 FF2 FF3 J 0 J 1 Q 1 J 2 J 3 Q 3 K 0 K 1 Q 1 K 2 K 3 Q 3 Q 3 LK

Resetting the ount with a Decoder The divide-by-60 counter in the text also uses partial decoding to clear the tens count when a 6 was detected. HIGH LR TR DIV 10 TEN T = 9 RO LR LR TR DIV 6 TEN LK Decode 6 To next counter Q 3 Q 1 Q 3 Q 1 Decode 59 T = 59 To ENABLE of next TR units The divide characteristic illustrated here is a good way to obtain a lower frequency using a counter. For example, the 60 Hz power line can be converted to 1 Hz. tens

ounter Decoding Show how to decode state 5 with an active LOW output. HIGH J 0 Q 0 J 1 Q 1 J 2 Q 2 K 0 K 1 Q 1 Q 1 K 2 LK Notice that a NAND gate was used to give the active LOW output. 1 1 1 LSB Decoded 5 Q 1 MSB

Decoding Glitches Glitches was produced due to the propagation delays from the decoding process Summary

Decoding Glitches

ounter Applications