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

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

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

Registers and Counters

Registers and Counters

Counter dan Register

Asynchronous (Ripple) Counters

Module -5 Sequential Logic Design

Counters

DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE422) COUNTERS

Experiment 8 Introduction to Latches and Flip-Flops and registers

Logic Design. Flip Flops, Registers and Counters

EET2411 DIGITAL ELECTRONICS

Chapter 7 Counters and Registers

Digital Systems Laboratory 3 Counters & Registers Time 4 hours

Other Flip-Flops. Lecture 27 1

RS flip-flop using NOR gate

Chapter 6 Registers and Counters

Lecture 12. Amirali Baniasadi

Chapter 4. Logic Design

RS flip-flop using NOR gate

CHAPTER 6 COUNTERS & REGISTERS

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

EKT 121/4 ELEKTRONIK DIGIT 1

VTU NOTES QUESTION PAPERS NEWS RESULTS FORUMS Registers

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

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

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

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

UNIVERSITI TEKNOLOGI MALAYSIA

MC9211 Computer Organization

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

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

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

Scanned by CamScanner

Digital Fundamentals: A Systems Approach

The University of Texas at Dallas Department of Computer Science CS 4141: Digital Systems Lab

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

IT T35 Digital system desigm y - ii /s - iii

Vignana Bharathi Institute of Technology UNIT 4 DLD

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

Decade Counters Mod-5 counter: Decade Counter:

Serial In/Serial Left/Serial Out Operation

Figure 30.1a Timing diagram of the divide by 60 minutes/seconds counter

Registers and Counters

LAB 7. Latches & Flip Flops

SEQUENTIAL LOGIC. Satish Chandra Assistant Professor Department of Physics P P N College, Kanpur

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified)

CHAPTER 4: Logic Circuits

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

LATCHES & FLIP-FLOP. Chapter 7

INC 253 Digital and electronics laboratory I

Registers and Counters

CHAPTER 4: Logic Circuits

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

Dev Bhoomi Institute Of Technology Department of Electronics and Communication Engineering PRACTICAL INSTRUCTION SHEET

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

Digital Fundamentals. Lab 5 Latches & Flip-Flops CETT Name: Date:

ELE2120 Digital Circuits and Systems. Tutorial Note 8

Chapter 2. Digital Circuits

Registers & Counters. Logic and Digital System Design - CS 303 Erkay Savaş Sabanci University

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

CSC Computer Architecture and Organization

CHAPTER1: Digital Logic Circuits

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

Universal Asynchronous Receiver- Transmitter (UART)

Unit 11. Latches and Flip-Flops

Sequential Logic Counters and Registers

AC103/AT103 ANALOG & DIGITAL ELECTRONICS JUN 2015

Chapter 3 Unit Combinational

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

Long and Fast Up/Down Counters Pushpinder Kaur CHOUHAN 6 th Jan, 2003

UNIT IV. Sequential circuit

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

UNIT III. Combinational Circuit- Block Diagram. Sequential Circuit- Block Diagram

MODULE 3. Combinational & Sequential logic

Asynchronous Counter

ASYNCHRONOUS COUNTER CIRCUITS

Digital Circuits ECS 371

UNIT-3: SEQUENTIAL LOGIC CIRCUITS

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

Digital Logic Design Sequential Circuits. Dr. Basem ElHalawany

Sequential Logic Basics

Flip-Flops and Sequential Circuit Design

Switching Theory And Logic Design UNIT-IV SEQUENTIAL LOGIC CIRCUITS

Today 3/8/11 Lecture 8 Sequential Logic, Clocks, and Displays

Solution to Digital Logic )What is the magnitude comparator? Design a logic circuit for 4 bit magnitude comparator and explain it,

Digital Fundamentals: A Systems Approach

Slide 1. Flip-Flops. Cross-NOR SR flip-flop S R Q Q. hold reset set not used. Cross-NAND SR flip-flop S R Q Q. not used reset set hold 1 Q.

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

PHYSICS 5620 LAB 9 Basic Digital Circuits and Flip-Flops

Chapter 5 Flip-Flops and Related Devices

CS T34-DIGITAL SYSTEM DESIGN Y2/S3

Digital Logic Design ENEE x. Lecture 19

Logic Design Viva Question Bank Compiled By Channveer Patil

Chapter 3: Sequential Logic Systems

EET 1131 Lab #10 Latches and Flip-Flops

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

More on Flip-Flops Digital Design and Computer Architecture: ARM Edition 2015 Chapter 3 <98> 98

Flip-Flops and Related Devices. Wen-Hung Liao, Ph.D. 4/11/2001

Review : 2 Release Date : 2019 Last Amendment : 2013 Course Code : SKEE 2742 Procedure Number : PK-UTM-FKE-(0)-10

Transcription:

The Islamic University of Gaza Engineering Faculty Department of Computer Engineering Spring 2018 ECOM 2022 Khaleel I. Shaheen Sequential Digital Design Laboratory Manual Experiment #7 Counters

Objectives To be familiar with different types of counters, and their design and applications. Theoretical Background Counters A counter is a sequential circuit that goes through a prescribed sequence of states upon the application of input pulses. The input pulses (count pulses) of the counter is clock pulses, or from some external source, and may occur at prescribed intervals of time or at random. Counters can be classified into two broad categories according to the way they are clocked: 1. Asynchronous (ripple) counters: the first FF is clocked by the external clock pulse, and then each successive FF is clocked by the Q or Q output of the previous FF. 2. Synchronous counters all FFs are simultaneously triggered by the same clock. The counter follows the binary number sequence or other sequence of states. A counter that follows the binary sequence is called a binary counter. An n-bit binary counter consists of n flipflops and can count in binary from 0 to 2 n -1. First: Synchronous counters If the "clock" pulses are applied to all the flip-flops in a counter simultaneously, then such a counter is called as synchronous counter. Binary Up Counter It can be seen above, that the external clock pulses (pulses to be counted) are fed directly to each of the J-K flip-flops in the counter chain and that both the J and K inputs are all tied together in toggle mode, but only in the first flip-flop, flip-flop FFA (LSB) are they connected HIGH, logic 1 allowing the flip-flop to toggle on every clock pulse. Then the synchronous counter follows a predetermined sequence of states in response to the common clock signal, advancing one state for each pulse. 2

The J and K inputs of flip-flop FFB are connected directly to the output QA of flip-flop FFA, but the J and K inputs of flip-flops FFC and FFD are driven from separate AND gates which are also supplied with signals from the input and output of the previous stage. These additional AND gates generate the required logic for the JK inputs of the next stage. Binary Down Counter As well as counting up from zero and increasing or incrementing to some preset value, it is sometimes necessary to count down from a predetermined value to zero allowing us to produce an output that activates when the zero count or some other pre-set value is reached. 3

Bidirectional Counters Bidirectional counters are capable of counting in either the up direction or the down direction through any given count sequence Bidirectional counters, also known as Up/Down counters, are capable of counting in either direction through any given count sequence and they can be reversed at any point within their count sequence by using an additional control input as shown below. Generally, most bidirectional counter chips can be made to change their count direction either up or down at any point within their counting sequence. This is achieved by using an additional input pin which determines the direction of the count, either Up or Down and the timing diagram gives an example of the counters operation as this Up/Down input changes state. BCD Counters A 4-bit decade synchronous counter can also be built using synchronous binary counters to produce a count sequence from 0 to 9. A standard binary counter can be converted to a decade (decimal 10) counter with the aid of some additional logic to implement the desired state sequence. After reaching the count of 1001, the counter recycles back to 0000. We now have a decade or Modulo-10 counter. 4

The additional AND gates detect when the counting sequence reaches 1001, (Binary 10) and causes flip-flop FFD to toggle on the next clock pulse. Flip-flop FFA toggles on every clock pulse. Thus, the count is reset and starts over again at 0000 producing a synchronous decade counter. We could quite easily re-arrange the additional AND gates in the above counter circuit to produce other count numbers such as a Mod-12 counter which counts 12 states from 0000 to 1011 (0 to 11) and then repeats making them suitable for clocks, etc. Ring counter A ring counter is a type of counter composed of a circular shift register. The output of the last shift register is fed to the input of the first register. Johnson counter Synchronous counter where the complement of the output of the last shift register is connected to the input of the first register and circulates a stream of ones followed by zeros around the ring as shown in the figure below. 5

6

Second: Asynchronous (ripple) counters Asynchronous Counters use flip-flops that are serially connected together so that the input clock pulse ripples through the counter giving them the name of ripple counter. Binary Ripple Counter A binary ripple counter consists of a series connection of complementing flip flops, with the output of each flip flop connected to the CLK input of the next higher order flip-flop. The flip flop holding the least significant bit receives the incoming count pulses. The logic diagram of a 3-bit ripple up counter is shown in figure. The toggle (T) flip-flop are being used. But we can use the JK flip-flop also with J and K connected permanently to logic 1 or using D flip-flop with input is connected to the complemented output. External clock is applied to the clock input of flip-flop A and Q A output is applied to the clock input of the next flip-flop. 7

Operation Condition Initially all the FFs are in the reset state After 1st negative clock edge After 2nd negative clock edge After 3rd negative clock edge Operation Q 2Q 1Q 0 = 000 initially As soon as the first negative clock edge is applied, FF-0 will toggle and Q 0 will be equal to 1. Q 0 is connected to clock input of FF-1. Since Q 0 has changed from 0 to 1, it is treated as the positive clock edge by FF-1. There is no change in Q 1 because FF-1 is a negative edge triggered FF. Q 2Q 1Q 0 = 001 after the first clock pulse. On the arrival of second negative clock edge, FF-0 toggles again and Q 0 = 0. The change in Q 0 acts as a negative clock edge for FF-1. So, it will also toggle, and Q 1 will be 1. Q 2Q 1Q 0 = 010 after the second clock pulse. On the arrival of 3rd negative clock edge, FF-A toggles again and Q 0 become 1 from 0. Since this is a positive going change, FF-1 does not respond to it and remains inactive. So Q 1 does not change and continues to be equal to 1. Q 2Q 1Q 0 = 011 after the third clock pulse. 8

(غير مطلوب) BCD Ripple Counter A decimal counter follows a sequence of ten states and returns to 0 after the count of 9. Such counter must have at least four flip-flops to represent each decimal digit, since a decimal digit is represented by a binary code with at least four bits. The sequence of states in a decimal counter is indicated by the binary code used to represent a decimal digit. If BCD is used, the sequence of states is as shown in the state diagram in the figure. This is similar to a binary counter, except that the state after 1001 (code for decimal 9) is 0000 (code for decimal 0). The logic diagram of a BCD ripple counter is shown in figure 9.5. The four outputs are designed by the letter symbol Q with a numeric subscript equal to the binary weight of the corresponding bit in the BCD code. The flip-flops trigger on the negative edge. Note that the output Q1 is applied to the Clk inputs of both Q2 and Q8 and the output of Q2 is applied to the Clk input of Q4. The J and K inputs are connected either to a permanent 1 signal or to outputs of flip-flops, as shown in the diagram. The following are the conditions for each flip-flop state transition: 1. Q1 is complemented on the negative edge of every count pulse. 2. Q2 is complemented if Q8 = 0 and Q1 goes from 1 to 0. Q2 is cleared if Q8 = 1 and Q1 goes from 1 to 0. 3. Q4 is complemented when Q2 goes from 1 to 0. 4. Q8 is complemented when Q4Q2 = 11 and Q1 goes from 1 to 0. Q8 is cleared if either Q4 or Q2 is 0 and Q1 goes from 1 to 0. 9

Other presentation of BCD ripple counter will be as follows: 1. We need four flip-flops, for example JK flip flops where J and K are high. 2. Count from 0-9, so when counter reaches 9 it will make the 10 to be 0. 3. Decimal 10 = (1010) 2, clear = D C' B A' 4. Take ones as inputs of NAND and take output of NAND to CLR. 10

Counter ICs Synchronous Binary counter (74LS93) Synchronous BCD counter with parallel load (74LS160) Synchronous UP/Down BCD counter with parallel load (74LS190) 11

Lab Work Equipments required Circuit Wizard Simulation Software. KL-31001 trainer kit. IC 7404(NOT), IC 7408(AND), IC 7432(OR), IC 7400(NAND), IC 7402(NOR). Connecting wires and Breadboard. The Datasheets of the IC s. Implementation Use Circuit Wizard to design, test and simulate the circuits in the examples above, then implement the circuits practically in the laboratory. Exercises: 1. Implement a ripple down counter from 15 to 0 using JK flip flops with negative edge triggered. 2. Design the 74LS160 to count in the sequence (4,5,6,7,8). Good Luck 12