Chapter 9. Design of Counters

Similar documents
Asynchronous (Ripple) Counters

CSE Latches and Flip-flops Dr. Izadi. NOR gate property: A B Z Cross coupled NOR gates: S M S R Q M

Counter dan Register

Counters

Chapter 6. Flip-Flops and Simple Flip-Flop Applications

RS flip-flop using NOR gate

RS flip-flop using NOR gate

Lecture 8: Sequential Logic

Experiment 8 Introduction to Latches and Flip-Flops and registers

ASYNCHRONOUS COUNTER CIRCUITS

Unit 11. Latches and Flip-Flops

EKT 121/4 ELEKTRONIK DIGIT 1

YEDITEPE UNIVERSITY DEPARTMENT OF COMPUTER ENGINEERING. EXPERIMENT VIII: FLIP-FLOPS, COUNTERS 2014 Fall

Digital Fundamentals: A Systems Approach

Chapter 9 Counters. Clock Edge Output Q 2 Q 1 Q

Synchronous Sequential Logic

SEMESTER ONE EXAMINATIONS 2002

Other Flip-Flops. Lecture 27 1

Chapter 4. Logic Design

Digital Logic Design ENEE x. Lecture 19

Counters. ENT 263 Digital Electronics

(CSC-3501) Lecture 7 (07 Feb 2008) Seung-Jong Park (Jay) CSC S.J. Park. Announcement

CPS311 Lecture: Sequential Circuits

INC 253 Digital and electronics laboratory I

Digital Systems Laboratory 3 Counters & Registers Time 4 hours

Logic Design. Flip Flops, Registers and Counters

Synchronous Sequential Logic. Chapter 5

LAB #4 SEQUENTIAL LOGIC CIRCUIT

CHAPTER 6 COUNTERS & REGISTERS

ELE2120 Digital Circuits and Systems. Tutorial Note 7

2. Counter Stages or Bits output bits least significant bit (LSB) most significant bit (MSB) 3. Frequency Division 4. Asynchronous Counters

Module -5 Sequential Logic Design

EMT 125 Digital Electronic Principles I CHAPTER 6 : FLIP-FLOP

Name Of The Experiment: Sequential circuit design Latch, Flip-flop and Registers

Sequential Digital Design. Laboratory Manual. Experiment #3. Flip Flop Storage Elements

D Latch (Transparent Latch)

Vignana Bharathi Institute of Technology UNIT 4 DLD

BISHOP ANSTEY HIGH SCHOOL & TRINITY COLLEGE EAST SIXTH FORM CXC CAPE PHYSICS, UNIT 2 Ms. S. S. CALBIO NOTES lesson #39

CHAPTER 4: Logic Circuits

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District UNIT-III SEQUENTIAL CIRCUITS

ELE2120 Digital Circuits and Systems. Tutorial Note 8

1. Convert the decimal number to binary, octal, and hexadecimal.

Final Exam review: chapter 4 and 5. Supplement 3 and 4

Sequential Digital Design. Laboratory Manual. Experiment #7. Counters

Digital Design, Kyung Hee Univ. Chapter 5. Synchronous Sequential Logic

1. a) For the circuit shown in figure 1.1, draw a truth table showing the output Q for all combinations of inputs A, B and C. [4] Figure 1.

Introduction. NAND Gate Latch. Digital Logic Design 1 FLIP-FLOP. Digital Logic Design 1

Digital Logic Design Sequential Circuits. Dr. Basem ElHalawany

Asynchronous Counter

Sri Vidya College of Engineering And Technology. Virudhunagar Department of Electrical and Electronics Engineering

EE292: Fundamentals of ECE

Logic. Andrew Mark Allen March 4, 2012

MC9211 Computer Organization

The word digital implies information in computers is represented by variables that take a limited number of discrete values.

Flip Flop. S-R Flip Flop. Sequential Circuits. Block diagram. Prepared by:- Anwar Bari

Chapter. Synchronous Sequential Circuits

Sequential Circuits: Latches & Flip-Flops

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

CHAPTER 4: Logic Circuits

DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE422) LATCHES and FLIP-FLOPS

CHAPTER 1 LATCHES & FLIP-FLOPS

Registers and Counters

The outputs are formed by a combinational logic function of the inputs to the circuit or the values stored in the flip-flops (or both).

Design and Simulation of a Digital CMOS Synchronous 4-bit Up-Counter with Set and Reset

Introduction to Microprocessor & Digital Logic

Experiment # 9. Clock generator circuits & Counters. Digital Design LAB

Review of Flip-Flop. Divya Aggarwal. Student, Department of Physics and Astro-Physics, University of Delhi, New Delhi. their state.

Logic and Computer Design Fundamentals. Chapter 7. Registers and Counters

Introduction. Serial In - Serial Out Shift Registers (SISO)

Flip-Flops and Sequential Circuit Design

MODEL QUESTIONS WITH ANSWERS THIRD SEMESTER B.TECH DEGREE EXAMINATION DECEMBER CS 203: Switching Theory and Logic Design. Time: 3 Hrs Marks: 100

(Refer Slide Time: 2:00)

UNIT-3: SEQUENTIAL LOGIC CIRCUITS

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

Sequential Logic Counters and Registers

LATCHES & FLIP-FLOP. Chapter 7

UNIT IV. Sequential circuit

Chapter 8 Sequential Circuits

REPEAT EXAMINATIONS 2002

Flip-Flops. Because of this the state of the latch may keep changing in circuits with feedback as long as the clock pulse remains active.

LAB 7. Latches & Flip Flops

Dr. Shahram Shirani COE2DI4 Midterm Test #2 Nov 19, 2008

DIGITAL CIRCUIT LOGIC UNIT 11: SEQUENTIAL CIRCUITS (LATCHES AND FLIP-FLOPS)

Switching Theory And Logic Design UNIT-IV SEQUENTIAL LOGIC CIRCUITS

Digital Logic Design I

B.Tech CSE Sem. 3 15CS202 DIGITAL SYSTEM DESIGN (Regulations 2015) UNIT -IV

Chapter 5 Sequential Circuits

Synchronous Sequential Logic

Registers and Counters

Name: Date: Suggested Reading Chapter 7, Digital Systems, Principals and Applications; Tocci

Introduction to Sequential Circuits

Sequential Logic Circuits

Timing Pulses. Important element of laboratory electronics. Pulses can control logical sequences with precise timing.

Review of digital electronics. Storage units Sequential circuits Counters Shifters

Advanced Devices. Registers Counters Multiplexers Decoders Adders. CSC258 Lecture Slides Steve Engels, 2006 Slide 1 of 20

The basic logic gates are the inverter (or NOT gate), the AND gate, the OR gate and the exclusive-or gate (XOR). If you put an inverter in front of

`COEN 312 DIGITAL SYSTEMS DESIGN - LECTURE NOTES Concordia University

CPE 200L LABORATORY 3: SEQUENTIAL LOGIC CIRCUITS UNIVERSITY OF NEVADA, LAS VEGAS GOALS: BACKGROUND: SR FLIP-FLOP/LATCH

ECE 341. Lecture # 2

Part 4: Introduction to Sequential Logic. Basic Sequential structure. Positive-edge-triggered D flip-flop. Flip-flops classified by inputs

Transcription:

Chapter 9 Design of Counters 9.0 Introduction Counter is another class of sequential circuits that tally a series of input pulses which may be regular or irregular in nature. Counter can be divided into binary/non-binary and synchronous/asynchronous types. In the chapter the design of counter using various types of flip-flop are discussed. 9.1 Types of Counter Counter can be broadly divided into sychronous and asynchronous types. Synchronous counter has its flip-flops clocked at the same time, whilst asynchronous counter is not. The clock of the preceeding flip-flop of the asynchronous flip-flop is fed from the output of the previous flip-flop. Asynchronous counter suffers delay problem whilst, sychronous counter will not. Asynchornous oounter is also referred as ripple counter for the reason of delay feeding of the clock pulse from one flip-flop to another. Figure 9.1 and 9.2 respectively shown a modulus 4 synchronous and asynchronous counters. Modulus of a counter is defined as the number of unique states that a counter will sequence through. Figure 9.1: A modulus 4 2-bit synchronous counter - 109 -

9.2 Propagation Delay Figure 9.2: A modulus 4 2-bit asynchrounous counter We have mentioned in earlier in Chapter one that there is propagation delay when data is transmitted from one device to another due to capacitance of the device. The problem associated with propagation delay can be serious. We shall illustrate propagation delay with a 3-bit binary counter and its timing diagram shown in Fig. 9.3 and 9.4 respectively. Figure 9.3: 3-bit (modulus 8) binary counter - 110 -

Figure 9.4: The actual timing diagram of a 3-bit binary counter From the timing diagram, it shows there are propagation delays due to transition from clock pulse to output of flip-flop 0 Q 0, from output of flip-flop 0 Q 0 to output flip-flop 1 Q 1, and from output of flip-flop 1 Q 1 to output flip-flop 2 Q 2. If the output Q 1 is AND ed with output Q 0, the ideal result i.e. the assumption of no propagation delay is shown in Fig. 9.5, whereas the result shown in Fig. 9.6 is different for the case where there is propagation delay. There are glitches for the non-ideal case. Figure 9.5: Ideal result of Q 1 Q 0-111 -

Figure 9.6: Non-ideal result of Q 1 Q 0 In reality, the propagation is in the nanosecond region, which is not as large as it shown in the figure. It is about 10ns for each type. 9.3 Procedure to Design Synchronous Counters The procedure to design a synchronous counter is listed here. Obtain the truth table of the logic sequence for intended counter to be designed. Alternatively obtain the state diagram of the counter. Determine the number and type of flip-flop to be used. From the excitation table of the flip-flop, determine the next state logic. From the output state, use Karnaugh map for simplification to derive the circuit output functions and the flip-flop output functions. Draw the logic circuit diagram. Simulate the circuit using software. Build the circuit. From the function tables shown in Fig. 7.4, 7.10, 7.17, and 7.20 of the flip-flops learnt earlier in Chapter 7, the excitation or characteristic table of SR flip-flop, D flip-flip, JK flip-flop, and T flip-flop are shown in Fig. 9.7. and 9.8 respectively. Q t is denotes the output of the present state and Q t+1 denotes the output of next state. - 112 -

Q t Q t+1 S R Q t Q t+1 D 0 0 0 X 0 0 0 0 1 1 0 0 1 1 1 0 0 1 1 0 0 1 1 X 0 1 1 1 Figure 9.7: Characteristic table of SR and D flip-flop Q t Q t+1 J K Q t Q t+1 T 0 0 0 X 0 0 0 0 1 1 X 0 1 1 1 0 X 1 1 0 1 1 1 X 0 1 1 0 Figure 9.8: Characteristic table of JK and T flip-flop 9.4 Design of Synchronous Counters 09 Design of Counters In this section, designing of various types of synchronous counter using different types of flip-flop are discussed. Using the procedure and function tables mentioned in section 9.2, a step by step ways to design the synchronous counter discussed. 9.4.1 Design of a Synchronous Decade Counter Using JK Flip- Flop A synchronous decade counter will count from zero to nine and repeat the sequence. The state diagram of this counter is shown in Fig. 9.9. Figure 9.9: State diagram of synchronous decde counter - 113 -

Since there are ten states, four JK flip-flops are required. The truth tables of present and next state for the decade counter are shown in Fig. 9.10. Using the excitation table of JK flip-flop and the outputs of J and K are filled. Present State Next State Output Q 3 Q 2 Q 1 Q 0 Q 3 Q 2 Q 1 Q 0 J 3 K 3 J 2 K 2 J 1 K 1 J 0 K 0 0 0 0 0 0 0 0 1 0 X 0 X 0 X 1 X 0 0 0 1 0 0 1 0 0 X 0 X 1 X X 1 0 0 1 0 0 0 1 1 0 X 0 X X 0 1 X 0 0 1 1 0 1 0 0 0 X 1 X X 1 X 1 0 1 0 0 0 1 0 1 0 X X 0 0 X 1 X 0 1 0 1 0 1 1 0 0 X X 0 1 X X 1 0 1 1 0 0 1 1 1 0 X X 0 X 0 1 X 0 1 1 1 1 0 0 0 1 X X 1 X 1 X 1 1 0 0 0 1 0 0 1 X 0 0 X 0 X 1 X 1 0 0 1 0 0 0 0 X 1 0 X 0 X X 1 Figure 9.10: Truth table and state table of a synchronous decade counter The Karnaugh maps of the output J 0, K 0, J 1, K 1, J 2, K 2, J 3, and K 3 are shown in Fig. 9.11, 9.12, 9.13, and 9.14 respectively. The simplified results are at the bottom of the Karnaugh maps. Figure 9.11: Karnaugh maps of J 0 and K 0-114 -

Figure 9.12: Karnaugh maps of J 1 and K 1 Figure 9.13: Karnaugh maps of J 2 and K 2 Figure 9.14: Karnaugh maps of J 3 and K 3-115 -

Based on the results obtained from the Karnaugh maps, the circuit design of synchronous decade counter is shown in Fig. 9.15. Figure 9.15: A synchronous decade counter designed using JK flip-flop 9.4.2 Design of an Asynchronous Decade Counter Using JK Flip- Flop An asynchronous decade counter will count from zero to nine and repeat the sequence. Since the JK inputs are fed fom the output of previous flip-flop, therefore, the design will not be as complicated as the syncrhonous version. At the nineth count, the counter is reset to begin counting at zero. The NAND gate is used to reset the counter at the ninth count. At the ninth count the outputs of flip-flop Q 3 and Q 1 will be high simultaneously. This will cause the output of NAND to go to logic 0 that would reset the flip-flip. The logic design of the counter is shown in Fig. 9.16. Figure 9.16: An asynchronous decade counter - 116 -

9.4.3 Design of a Synchronous Modulus-Six Counter Using SR Flip-Flop The modulus six counter will count 0, 2, 3, 6, 5, and 1 and repeat the sequence. This modulus six counter requires three SR flip-flops for the design. The truth table of a modulus six counter is shown in Fig. 9.17. From the excitation table of SR flip-flop shown in Fig. 9.8, the logic of output S 2, R 2, S 1, R 1, S 0, and R 0 are filled and shown in Fig. 9.8. [Present State Next State Output Q 2 Q 1 Q 0 Q 2 Q 1 Q 0 R 2 S 2 R 1 S 1 R 0 S 0 0 0 0 0 1 0 0 X 1 0 0 X 0 1 0 0 1 1 0 X X 0 1 0 0 1 1 1 1 0 1 0 X 0 0 1 1 1 0 1 0 1 X 0 0 1 1 0 1 0 1 0 0 1 0 1 0 X X 0 0 0 1 0 0 0 0 X 0 X 0 1 Figure 9.17: Truth table and state table of the modulus-six counter The state diagram is shown in Fig. 9.18. Figure 9.18: State diagram of modulus-six counter - 117 -

The Karnaugh maps of the output R 0, S 0, R 1, S 1, R 2, and S 2 are shown in Fig. 9.19, 9.20, and 9.21 respectively. The simplified results are at the bottom of the Karnaugh maps. Figure 9.19: Karnaugh maps of R 0 and S 0 Figure 9.20: Karnaugh maps of R 1 and S 1 Figure 9.21: Karnaugh maps of R 2 and S 2 With the known output logic functions, the logic design of the synchronous modulus six counter is hown ing Fig. 9.21. - 118 -

Figure 9.22: Logic design of synchronous modulus six counters - 119 -

Tutorials 9.1. State the procedure for design a synchronous counter. 9.2. Draw the timing diagrams of the decade counter shown in Fig. 9.14. 9.3. Design a modulus seven synchronous counter that can count 0, 3, 5, 7, 9, 11, and 12 using D flip-flop. 9.4. Using the truth table shown in Fig. 9.16, design this counter using T flipflop. References 1. Thomas L. Floyd, "Digital Fundamentals", Seventh Edition, Prentice-Hall International, Inc., 2000. 2. Donald D. Givone, "Digital Principles and Designs", McGraw- Hill 2003. 3. Victor P. Nelson, H. Try Nagle, Bill D. Carroll, and J. David Irwin, "Digital Logic Circuit Analysis & Design", Prentice-Hall Englewood Cliffs.NJ, 1995. - 120 -