Asynchronous counters, except for the first block, work independently from a system clock.



Similar documents
DIGITAL COUNTERS. Q B Q A = 00 initially. Q B Q A = 01 after the first clock pulse.

Module 3: Floyd, Digital Fundamental

To design digital counter circuits using JK-Flip-Flop. To implement counter using 74LS193 IC.

WEEK 8.1 Registers and Counters. ECE124 Digital Circuits and Systems Page 1

Experiment # 9. Clock generator circuits & Counters. Eng. Waleed Y. Mousa

Contents COUNTER. Unit III- Counters

ETEC 2301 Programmable Logic Devices. Chapter 10 Counters. Shawnee State University Department of Industrial and Engineering Technologies

Digital Fundamentals. Lab 8 Asynchronous Counter Applications

Counters and Decoders

Design Example: Counters. Design Example: Counters. 3-Bit Binary Counter. 3-Bit Binary Counter. Other useful counters:

CHAPTER IX REGISTER BLOCKS COUNTERS, SHIFT, AND ROTATE REGISTERS

ASYNCHRONOUS COUNTERS

DIGITAL ELECTRONICS. Counters. By: Electrical Engineering Department

Digital Logic Design Sequential circuits

Counters & Shift Registers Chapter 8 of R.P Jain

Asynchronous Counters. Asynchronous Counters

Latches, the D Flip-Flop & Counter Design. ECE 152A Winter 2012

Counters are sequential circuits which "count" through a specific state sequence.

DM74LS169A Synchronous 4-Bit Up/Down Binary Counter

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

DIGITAL TECHNICS II. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute. 2nd (Spring) term 2012/2013

Lecture 8: Synchronous Digital Systems

CHAPTER 11 LATCHES AND FLIP-FLOPS

BINARY CODED DECIMAL: B.C.D.

Decimal Number (base 10) Binary Number (base 2)

Counters. Present State Next State A B A B

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

Registers & Counters

Lesson 12 Sequential Circuits: Flip-Flops

Chapter 8. Sequential Circuits for Registers and Counters

Flip-Flops, Registers, Counters, and a Simple Processor

DEPARTMENT OF INFORMATION TECHNLOGY

Sequential Logic Design Principles.Latches and Flip-Flops

Modeling Latches and Flip-flops

DATA SHEET. HEF40193B MSI 4-bit up/down binary counter. For a complete data sheet, please also download: INTEGRATED CIRCUITS

Digital Logic Design. Basics Combinational Circuits Sequential Circuits. Pu-Jen Cheng

Wiki Lab Book. This week is practice for wiki usage during the project.

Chapter 7. Registers & Register Transfers. J.J. Shann. J. J. Shann

Modeling Sequential Elements with Verilog. Prof. Chien-Nan Liu TEL: ext: Sequential Circuit

Take-Home Exercise. z y x. Erik Jonsson School of Engineering and Computer Science. The University of Texas at Dallas

54LS169 DM54LS169A DM74LS169A Synchronous 4-Bit Up Down Binary Counter

7. Latches and Flip-Flops

Chapter 4 Register Transfer and Microoperations. Section 4.1 Register Transfer Language

NOTE: The Flatpak version has the same pinouts (Connection Diagram) as the Dual In-Line Package.

CS311 Lecture: Sequential Circuits

1.1 The 7493 consists of 4 flip-flops with J-K inputs unconnected. In a TTL chip, unconnected inputs


Flip-Flops and Sequential Circuit Design. ECE 152A Winter 2012

Flip-Flops and Sequential Circuit Design

Lecture-3 MEMORY: Development of Memory:

6-BIT UNIVERSAL UP/DOWN COUNTER

Systems I: Computer Organization and Architecture

Chapter 9 Latches, Flip-Flops, and Timers

Having read this workbook you should be able to: recognise the arrangement of NAND gates used to form an S-R flip-flop.

Memory Elements. Combinational logic cannot remember

Napier University. School of Engineering. Electronic Engineering A Module: SE42205 Digital Design

The string of digits in the binary number system represents the quantity

DM54161 DM74161 DM74163 Synchronous 4-Bit Counters

So far we have investigated combinational logic for which the output of the logic devices/circuits depends only on the present state of the inputs.

74LS193 Synchronous 4-Bit Binary Counter with Dual Clock

(Refer Slide Time: 00:01:16 min)

ECE380 Digital Logic

A Lesson on Digital Clocks, One Shots and Counters

NOTE: The Flatpak version has the same pinouts (Connection Diagram) as the Dual In-Line Package.

Upon completion of unit 1.1, students will be able to

74F168*, 74F169 4-bit up/down binary synchronous counter

DM74LS191 Synchronous 4-Bit Up/Down Counter with Mode Control

Sequential Logic. (Materials taken from: Principles of Computer Hardware by Alan Clements )

NTE2053 Integrated Circuit 8 Bit MPU Compatible A/D Converter

Cascaded Counters. Page 1 BYU

Binary Adders: Half Adders and Full Adders

CSE140 Homework #7 - Solution

SN54/74LS192 SN54/74LS193

Sequential Logic: Clocks, Registers, etc.

2 : BISTABLES. In this Chapter, you will find out about bistables which are the fundamental building blocks of electronic counting circuits.

Fig1-1 2-bit asynchronous counter

54191 DM54191 DM74191 Synchronous Up Down 4-Bit Binary Counter with Mode Control

A Lesson on Digital Clocks, One Shots and Counters

EXPERIMENT 8. Flip-Flops and Sequential Circuits

Master/Slave Flip Flops

A Digital Timer Implementation using 7 Segment Displays

RUTGERS UNIVERSITY Department of Electrical and Computer Engineering 14:332:233 DIGITAL LOGIC DESIGN LABORATORY

Digital Electronics Detailed Outline

DM74LS193 Synchronous 4-Bit Binary Counter with Dual Clock

Design: a mod-8 Counter

Digital Fundamentals

CHAPTER 3 Boolean Algebra and Digital Logic

CDA 3200 Digital Systems. Instructor: Dr. Janusz Zalewski Developed by: Dr. Dahai Guo Spring 2012

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

Today. Binary addition Representing negative numbers. Andrew H. Fagg: Embedded Real- Time Systems: Binary Arithmetic

74AC191 Up/Down Counter with Preset and Ripple Clock

Digital to Analog and Analog to Digital Conversion

exclusive-or and Binary Adder R eouven Elbaz reouven@uwaterloo.ca Office room: DC3576

The 104 Duke_ACC Machine

Digital Design. Assoc. Prof. Dr. Berna Örs Yalçın

IE1204 Digital Design F12: Asynchronous Sequential Circuits (Part 1)

Theory of Logic Circuits. Laboratory manual. Exercise 3

List of Experiment. 8. To study and verify the BCD to Seven Segments DECODER.(IC-7447).

Operating Manual Ver.1.1

Transcription:

Counters Some digital circuits are designed for the purpose of counting and this is when counters become useful. Counters are made with flip-flops, they can be asynchronous or synchronous and they can count in a forward or backward direction. Asynchronous counters Asynchronous counters, except for the first block, work independently from a system clock. Ripple counter The ripple counter is the simplest of all the counters. It belongs to the family of asynchronous counters because the blocks that make it up do not work with the clock at the same time (only the first block receives the clock). The reason why this counter is called a ripple counter is due to the fact the circuit begins counting from the lowest significant bit (LSB) and proceeds to the most significant bit (MSB) by rippling the count through the circuit. The circuit uses any n-bit configuration and it counts up to n -. A B C D UA UA UA UA 7LS07A 7LS07A 7LS07A 7LS07A OFFTIME =.5uS ONTIME =.5uS DELAY = 0ns STARTAL = OPPAL = 0 OFFTIME = s ONTIME =.us DELAY = us STARTAL = OPPAL = 0 -bit ripple counter Ripple counters can be easily implemented with flip-flops which can be configured to work like T flip-flops. The above circuit is a -bit ripple counter that counts from 0000 to. Before the first clock pulse comes (), the circuit is cleared () and its internal count is set to 0000. Each flip-flop has its and inputs tied together to provide the functionality of the T flip-flop (toggle with = and =). This circuit uses active-low logic (the 707A IC has a bubble in front of the symbol).

The disadvantage of this counter is that its simple design does not take into account its internal propagation delay. Higher bits depend on lower bits so this counter is inherently slow. The waveforms for this circuit are the followings: : : UA: UA: UA: UA: 0s us us 6us 8us 0us us us 6us 8us Time Waveforms for the -bit ripple counter Initially, as shown above, the counter s contents are undefined so they are cleared and set to 0000 by. After that, a train of clock pulses increments the count by on every negative edge of the clock. The bits propagate and toggle. When the counter reaches, it overflows to 0000.

Synchronous counters Synchronous counters are directly dependently on a system clock. Binary counter (up) The binary counter is a modified version of the ripple counter. It belongs to the family of synchronous counters because the blocks that make it up work with the clock at the same time (all of them receive the clock). The reason why this counter is called a binary counter is due to the fact the circuit counts from 0 to n - (as opposed to the decimal counter which counts from 0 to 9). A B C D UA UA U5A 7LS08 UA U6A 7LS08 UA 7LS07A 7LS07A 7LS07A 7LS07A OFFTIME =.5uS ONTIME =.5uS DELAY = 0ns STARTAL = OPPAL = 0 OFFTIME = s ONTIME =.us DELAY = us STARTAL = OPPAL = 0 -bit binary counter (up) Binary counters can be easily implemented with flip-flops which can be configured to work like T flip-flops. The above circuit is a -bit binary counter that counts from 0000 to. Before the first clock pulse comes (), the circuit is cleared () and its internal count is set to 0000. Each flip-flop has its and inputs tied together to provide the functionality of the T flip-flop (toggle with = and =). This circuit uses active-low logic (the 707A IC has a bubble in front of the symbol). This binary counter is an improvement over the ripple counter. However, expanding to a higher number of bits requires additional AND gates. For a -bit binary counter, - input AND gates are necessary. Expanding the counter to a 5-bit counter would require additional -input AND gate. This is to say that an n-bit counter will require n flip-flops and n- -input AND gates.

The waveforms for this circuit are as follows: : : UA: UA: U5A:B U5A:A 0s us us 6us 8us 0us us us 6us 8us Time Waveforms for the -bit binary counter (up) Initially, as shown above, the counter s contents are undefined so they are cleared and set to 0000 by. After that, a train of clock pulses increments the count by on every negative edge of the clock. When the counter reaches, it overflows to 0000. PSpice simulates and warns about possible race conditions at all odd microseconds (starting from ). This is due to the fact the AND gates add propagation delay to the upper MSBs. The clock might arrive before the AND gates generate a bit and this might create a wrong counting sequence.

Binary counter (down) This counter is roughly equivalent to the previous. The only difference is that instead of counting up, it counts down ( n - to 0). A B C D UA UA U5A 7LS08 UA U6A 7LS08 UA 7LS07A 7LS07A 7LS07A 7LS07A OFFTIME =.5uS ONTIME =.5uS DELAY = 0ns STARTAL = OPPAL = 0 OFFTIME = s ONTIME =.us DELAY = us STARTAL = OPPAL = 0 -bit binary counter (down) The only difference between the up and down versions of the binary counter is that one of the inputs to the AND gates is now and not like in the previous circuit. The count is still taken from the outputs. 5

The waveforms for this circuit are the followings: : : UA: UA: UA: UA: 0s 5us 0us 5us 0us Time Waveforms for the -bit binary counter (down) Initially, as shown above, the counter s contents are undefined so they are cleared and set to 0000 by. After that, a train of clock pulses decrements the count by on every negative edge of the clock. When the counter reaches 0000, it overflows to. PSpice simulates and warns about possible race conditions at all even microseconds (starting from ). This is due to the fact the AND gates add propagation delay to the upper MSBs. The clock might arrive before the AND gates generate a bit and this might create a wrong counting sequence. 6

Binary counter (up/down) The up and down versions of the binary counter can be combined into a single circuit and form a binary up/down counter. This counter can count from 0 to n - and from n - to 0. A B C OFFTIME = 6uS U-D0 ONTIME = 6uS DELAY = 50ns STARTAL = 0 OPPAL = OFFTIME =.5uS ONTIME =.5uS DELAY = 0ns U5A 7LS0 UA 7LS07A U6A 7LS08 U7A 7LS08 U8A 7LS U9A 7LS08 UA 7LS07A U0A 7LS08 UA 7LS UA 7LS08 UA 7LS07A UA 7LS08 UA 7LS D UA 7LS07A STARTAL = OPPAL = 0 OFFTIME = s ONTIME =.us DELAY = us STARTAL = OPPAL = 0 -bit binary counter (up/down) The up counter is enabled when signal U-D0=. The upper part of the circuit is active and the bottom part is turned off. The down counter is enabled when U-D0=0. The lower part of the circuit is active and the top part is turned off. In order to provide the correct logic and enable/disable a specific part of the circuit to count up or down, this circuit needs additional gates: NOT, AND and OR gates. This circuit can be expanded to any n-bit configuration by adding extra gates ( OR and ANDs). 7

The waveforms for this circuit are the followings: U-D0: : : UA: UA:B UA: 0s us 8us us 6us 0us us 8us us Time Waveforms for the -bit binary counter (up/down) As shown above, the counter starts by counting up (U-D0=). Initially, the counter s contents are undefined so they are cleared and set to 0000 by. After that, a train of clock pulses increments the count by on every negative edge of the clock. After the counter reaches, the counter starts to count down (U-D0=0). The train of clock pulses decrements the count by on every negative edge of the clock until the contents of the counter are 0000. 8

Decimal counter (up) The decimal counter is a modified version of the binary counter. It belongs to the family of synchronous counters because the blocks that make it up work with the clock at the same time (all of them receive the clock). The reason why this counter is called a decimal counter is due to the fact the circuit counts from 0 to 9 (as opposed to the binary counter which counts from 0 to n -). A B C U8A 7LS08 D UA U5A 7LS08 UA U6A 7LS08 UA U7A 7LS08 UA 7LS07A 7LS07A 7LS07A 7LS07A OFFTIME =.5uS ONTIME =.5uS DELAY = 0ns STARTAL = OPPAL = 0 OFFTIME = s ONTIME =.us DELAY = us STARTAL = OPPAL = 0 -bit decimal counter (up) Decimal counters can be easily implemented with flip-flops which can be configured to work like T flip-flops. The above circuit is a -bit decimal counter that counts from 0000 to 00. Before the first clock pulse comes (), the circuit is cleared () and its internal count is set to 0000. Each flip-flop has its and inputs tied together to provide the functionality of the T flip-flop (toggle with = and =). This circuit uses active-low logic (the 707A IC has a bubble in front of the symbol). This decimal counter is a variation of the binary counter. For the same size of bits, if compared to the binary counter, the decimal counter needs additional -input AND gates and a slightly different routing ( feedback lines to the additional gates). For a -bit binary counter, -input AND gates are necessary. 9

The waveforms for this circuit are the followings: : : U8A:B U7A:B U6A:B UA: 0s us us 6us 8us 0us us Time Waveforms for the -bit decimal counter Initially, as shown above, the counter s contents are undefined so they are cleared and set to 0000 by. After that, a train of clock pulses increments the count by on every negative edge of the clock. When the counter reaches 00, it overflows to 0000. PSpice simulates but, unlike for previous counters, no longer warns about possible race conditions because all flip-flops are associated to the same amount of delay produced by the AND gates (except for UA which is constantly held at and therefore immune to race conditions). 0