Digital Fundamentals

Similar documents
Digital Fundamentals

CHW 261: Logic Design

PGT104 Digital Electronics. PGT104 Digital Electronics

Digital Circuits ECS 371

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

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

LOGIC CIRCUITS. Basic Experiment and Design of Electronics

EECS150 - Digital Design Lecture 18 - Counters

EECS150 - Digital Design Lecture 18 - Counters

ECE 341. Lecture # 3

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

DE58/DC58 LOGIC DESIGN DEC 2014

Digital Electronics Final Examination. Part A

EET 310 Flip-Flops 11/17/2011 1

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

Digital Logic Design - Chapter 4

EECS150 - Digital Design Lecture 23 - FSMs & Counters

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

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

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

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

Lab 3 Revisited. Zener diodes IAP 2008 Lecture 4 1

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

Sample Test Paper - I

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

EE 209 Logic Cumulative Exam Name:

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

Experiment 9 Sequential Circuits

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

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

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

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

Digital Electronics Circuits 2017

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

ELCT201: DIGITAL LOGIC DESIGN

CHW 261: Logic Design

6 Synchronous State Machine Design

EECS150 - Digital Design Lecture 16 Counters. Announcements

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

Chapter 14 Sequential logic, Latches and Flip-Flops

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

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

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

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

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

I. Motivation & Examples

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

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

Synchronous 4 Bit Counters; Binary, Direct Reset

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

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

MM74HC161 MM74HC163 Synchronous Binary Counter with Asynchronous Clear Synchronous Binary Counter with Synchronous Clear

Preparation of Examination Questions and Exercises: Solutions

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

EECS150 - Digital Design Lecture 25 Shifters and Counters. Recap

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

COEN 312 DIGITAL SYSTEMS DESIGN - LECTURE NOTES Concordia University

MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI

Exam for Physics 4051, October 31, 2008

Synchronous Sequential Circuit Design. Digital Computer Design

Lecture 9: Digital Electronics

11.1 As mentioned in Experiment 10, sequential logic circuits are a type of logic circuit where the output of

Digital Logic and Design (Course Code: EE222) Lecture 19: Sequential Circuits Contd..

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.

Synchronous Sequential Logic

Stop Watch (System Controller Approach)

Lab #10: Design of Finite State Machines

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

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

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

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

Digital Electronics. Part A

Shift Register Counters

Time Allowed 3:00 hrs. April, pages

Vidyalankar S.E. Sem. III [CMPN] Digital Logic Design and Analysis Prelim Question Paper Solution

Problem Set 9 Solutions

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

Fundamentals of Computer Systems

Different encodings generate different circuits

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

Up/down binary counter with separate up/down clocks

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

Sequential vs. Combinational

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

EECS Components and Design Techniques for Digital Systems. FSMs 9/11/2007

Chapter 7. Sequential Circuits Registers, Counters, RAM

Philadelphia University Student Name: Student Number:

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

ALU, Latches and Flip-Flops

EXPERIMENT Bit Binary Sequential Multiplier

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

Digital Fundamentals

Sequential Circuits Sequential circuits combinational circuits state gate delay

Digital Circuits. 1. Inputs & Outputs are quantized at two levels. 2. Binary arithmetic, only digits are 0 & 1. Position indicates power of 2.

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

per chip (approx) 1 SSI (Small Scale Integration) Up to 99

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

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

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

Unit 7 Sequential Circuits (Flip Flop, Registers)

Transcription:

Digital Fundamentals Tenth Edition Floyd Chapter 9 Sections 9-1 thru 9-5 2009 Pearson Education, Upper 2008 Pearson Saddle River, Education NJ 07458. All Rights Reserved

ET285 Agenda Week 2 Quiz 0: Covered materials and reading assignments from Unit 0. Lecture: Chapter 9, Counters, pp. 458-492 Lab 1 continuation: Experiment 17 in Buchla Section of Supplemental Text to accompany Digital Fundamentals. Assignment: See Instructotr. Prepare for Unit 1 Quiz. (Chapter 9, Section 1-5)

Counting 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. 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.

Counting 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 0 1 1 0 0 1 1 0 MSB 0 0 0 0 1 1 1 1 0

J-K Flip Flop Truth Table Inputs Outputs J K CLK Q Q Comments

Three bit Asynchronous Counter 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. Called asynchronous because the flip-flops are never simultaneously triggered. 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 Waveforms are on the following slide

Three bit Asynchronous Counter Notice that the Q 0 output is triggered on the leading edge of the clock signal. The following stage is triggered from Q0. The leading edge of Q0 is equivalent to the trailing edge of Q0. The resulting sequence is that of an 3-bit binary up counter. CLK 1 2 3 4 5 6 7 8 Q 0 0 1 0 1 0 1 0 1 0 Q 1 0 0 1 1 0 0 1 1 0 Q 2 0 0 0 0 1 1 1 1 0 0 1 2 3 4 5 6 7 0

Flip-Flop Operating Characteristics See next slides

Flip-Flop Operating Characteristics

Flip-Flop Operating Characteristics

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. 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 Q 0 is delayed by 1 propagation delay, Q 2 by 2 delays and Q 3 by 3 delays.

Total Propagation Delay Tp (tot) = Tp1 + Tp2 + Tp3 + Tp4 Maximum Frequency of counter = 1/Tp (tot ) For previous slide example assuming Tp = 10 ns for all F/F Tp (tot) = 4 x 10ns = 40 ns F max = 1/40ns = 25 MHz

Example 9-1 (page 463) 4 bit asynchronous binary counter example

Asynchronous Decade Counters The modulus of a counter is the number of unique states that a counter will sequence through. The maximum modulus of a counter is 2**n (2 n ), where n is the number of flip flops in the counter. MOD(N) A counter can be designed to have less than its maximum modulus and the resulting sequence is called a truncated sequence. A decade counter has ten states (0 thru 9, or 0000 thru 1001) and is considered a truncated counter because it requires 4 flip flops to build which normally would have a maximum of 16 states. MOD10 Useful for digital readouts.

Asynchronous Decade Counter 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 CLR J 0 Q 0 Q 1 Q 2 J 1 J 2 J 3 Q 3 CLK C C C C K 0 K 1 K 2 K 3 Waveforms are on the following slide

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

Example of Asynchronous MOD12 binary counter Cycles on 1100

Asynchronous Counter 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. Can you figure out the sequence? LSB MSB Q to D puts D flip-flop in toggle mode The next slide shows the scope

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

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

74LS93A connected as a modulus-12 counter

Synchronous Counters 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. This 3-bit binary synchronous counter has the same count sequence as the 3-bit asynchronous counter shown previously. Note to Instructor: draw the below circuit on board CLK HIGH J 0 K 0 J 1 Q 0 Q 0 Q 1 Q 0 Q 1 Q J 2 C C C 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 2

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. Outputs 2. Use the new inputs to determine the next state: Q 2 and Q 1 will latch and Q 0 will toggle. Logic for inputs 3. Set up the next group of inputs from the current output. 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

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 0 0 0 At this points all states have been accounted for and the counter is ready to recycle

A 4-bit Synchronous Binary Counter Q 1 Q 0 Q 2 Q 1 Q 0 FF0 FF1 G1 G 2 FF2 FF3 HIGH J 0 Q 0 J 1 Q 1 J 2 Q 2 J 3 Q 3 CLK C C C C K 0 Q 0 K 1 Q 1 K 2 Q 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 0 Q 1 Q 2 Q 3

BCD Decade Counter With some additional logic, a binary counter can be converted to a BCD synchronous decade counter. After reaching the count 1001, the counter recycles to 0000. The 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. HIGH FF0 FF1 FF2 FF3 Q 3 Q 0 J 0 Q 0 J 1 Q 1 J 2 Q 2 J 3 Q 3 C C C C K 0 Q 0 K 1 Q 1 K 2 Q 2 K 3 Q 3 Q 3 CLK

BCD Decade Counter Waveforms for the decade counter: CLK 1 2 3 4 5 6 7 8 9 10 Q 0 0 1 0 1 0 1 0 1 0 1 0 Q 1 0 0 1 1 0 0 1 1 0 0 0 Q 2 0 0 0 0 1 1 1 1 0 0 0 Q 3 0 0 0 0 0 0 0 0 1 1 These same waveforms can be obtained with an asynchronous counter in IC 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. 0

A 4-bit Synchronous Binary Counter The 74LS163 is a 4-bit IC synchronous counter with additional features over a basic counter. It has parallel load, a CLR 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) CLR LOAD ENT ENP CLK (1) (9) (10) (7) (2) C CTR DIV 16 TC = 15 (15) RCO (14) (13) (12) (11) Q 0 Q 1 Q 2 Q 3 Data outputs Example waveforms are on the next slide

CLR LOAD D 0 Data inputs D 1 D 2 D 3 CLK ENP ENT Q 0 Data outputs Q 1 Q 2 Q 3 RCO 12 13 14 15 0 1 2 Clear Preset Count Inhibit

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

Up/Down Synchronous Counters Q 0 Q 1 Q 2 UP/DOWN Count up Count down

Up/Down Synchronous Counters The 74HC190 is a high speed CMOS synchronous up/down decade counter with parallel load capability. It also has a active LOW ripple clock output (RCO) and a MAX/MIN output when the terminal count is reached. The 74HC191 has the same inputs and outputs but is a synchronous up/down binary counter. CTEN D/U LOAD CLK CTEN D/U LOAD CLK (4) (5) (11) (14) (4) (5) (11) (14) 74HC190 C 74HC191 C D 0 D 1 D 2 D 3 (15) (1) (10) (9) CTR DIV 10 (3) (2) (6) (7) Q 0 Q 1 Q 2 Q 3 D 0 D 1 D 2 D 3 (15) (1) (10) (9) CTR DIV 16 (3) (2) (6) (7) Q 0 Q 1 Q 2 Q 3 Data inputs (12) (13) MAX/MIN RCO Data outputs Data inputs (12) (13) MAX/MIN RCO Data outputs

Synchronous Counter Design FF0 FF1 FF2 Q 2 J 0 J 1 J 2 Q 0 Q 1 C C C K 0 Q 0 Q 1 Q 2 K 1 K 2 CLK Omitting the details of a Gray Code Counter design, we get the above (state machine) circuit. The circuit can be checked with Multisim before constructing it. The next slide shows the Multisim result

Q 0 Q 1 Q 2

Cascaded counters Cascading is a method of achieving higher-modulus counters. For synchronous IC counters, the next counter is enabled only when the terminal count of the previous stage is reached. HIGH Counter 1 Counter 2 16 CTEN TC CTEN CLK C Q 0 Q 1 Q 2 f in CTR DIV 16 CTR DIV 16 ƒ in Q C 3 Q 0 Q 1 Q 2 Q 3 TC 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

Modulus 100 counter using 2 cascaded MOD 10 counters

Three MOD 10 counters cascaded to divide F (in) by 1000

Example 9-8 (page 491)

Cascade Counters with Truncated Sequences Normally the cascaded circuit above would be MOD 16 = 65536 = 2**16 To change the circuit to count to 40000 preload the circuit so it starts counting from 25536. 65536 40000 = 25536

Selected Key Terms Asynchronous Modulus Synchronous Terminal count State machine Cascade Not occurring at the same time. The number of unique states through which a counter will sequence. Occurring at the same time. The final state in a counter s sequence. A logic system exhibiting a sequence of states or values. To connect end-to-end as when several counters are connected from the terminal count output of one to the enable input of the next counter.

ET285 Agenda - Week 2 Quiz 0: Covered materials and reading assignments from Unit 0. Lecture: Chapter 9, Counters, pp. 458-492 Lab 1 continuation: Experiment 17 in Buchla Section of Supplemental Text to accompany Digital Fundamentals. Assignment: See Instructor. Prepare for Unit 1 Quiz. (Chapter 9, Section 1-5)