Overview. Ripple Counter Synchronous Binary Counters

Similar documents
Digital Logic Design Sequential circuits

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

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

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

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

Counters & Shift Registers Chapter 8 of R.P Jain

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

Lecture 8: Synchronous Digital Systems

Module 3: Floyd, Digital Fundamental

Chapter 8. Sequential Circuits for Registers and Counters

Asynchronous Counters. Asynchronous Counters

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

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

Lesson 12 Sequential Circuits: Flip-Flops

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

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

Systems I: Computer Organization and Architecture

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

DIGITAL ELECTRONICS. Counters. By: Electrical Engineering Department

Counters and Decoders

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

Contents COUNTER. Unit III- Counters

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

Flip-Flops and Sequential Circuit Design

CHAPTER IX REGISTER BLOCKS COUNTERS, SHIFT, AND ROTATE REGISTERS

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

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

Engr354: Digital Logic Circuits

BINARY CODED DECIMAL: B.C.D.

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

Lecture-3 MEMORY: Development of Memory:

Memory Elements. Combinational logic cannot remember

DEPARTMENT OF INFORMATION TECHNLOGY

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

Operating Manual Ver.1.1

Sequential Logic Design Principles.Latches and Flip-Flops

Upon completion of unit 1.1, students will be able to

EXPERIMENT 8. Flip-Flops and Sequential Circuits

Digital Electronics Part I Combinational and Sequential Logic. Dr. I. J. Wassell

ENEE 244 (01**). Spring Homework 5. Due back in class on Friday, April 28.

Counters. Present State Next State A B A B

Cascaded Counters. Page 1 BYU

ASYNCHRONOUS COUNTERS

ECE380 Digital Logic

Chapter 9 Latches, Flip-Flops, and Timers

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

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

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

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

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

Digital Electronics Detailed Outline

CHAPTER 11 LATCHES AND FLIP-FLOPS

(1) /30 (2) /30 (3) /40 TOTAL /100

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

Chapter 5. Sequential Logic

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

Gray Code Generator and Decoder by Carsten Kristiansen Napier University. November 2004

CpE358/CS381. Switching Theory and Logical Design. Class 10

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

COMBINATIONAL and SEQUENTIAL LOGIC CIRCUITS Hardware implementation and software design

The components. E3: Digital electronics. Goals:

L4: Sequential Building Blocks (Flip-flops, Latches and Registers)

SEQUENTIAL CIRCUITS. Block diagram. Flip Flop. S-R Flip Flop. Block Diagram. Circuit Diagram

CHAPTER 3 Boolean Algebra and Digital Logic

DIGITAL TECHNICS II. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute 5. LECTURE: REGISTERS AND RELATED

Master/Slave Flip Flops

Lab 1: Study of Gates & Flip-flops

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

DM74LS169A Synchronous 4-Bit Up/Down Binary Counter

Fig1-1 2-bit asynchronous counter

LAB #4 Sequential Logic, Latches, Flip-Flops, Shift Registers, and Counters

Registers & Counters

Combinational Logic Design Process

CHAPTER 11: Flip Flops

Binary Adders: Half Adders and Full Adders

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

Digital Fundamentals

Digital Controller for Pedestrian Crossing and Traffic Lights

EE 42/100 Lecture 24: Latches and Flip Flops. Rev B 4/21/2010 (2:04 PM) Prof. Ali M. Niknejad

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

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

Lecture 10: Sequential Circuits

Digital Logic Elements, Clock, and Memory Elements

SECTION C [short essay] [Not to exceed 120 words, Answer any SIX questions. Each question carries FOUR marks] 6 x 4=24 marks

Copyright Peter R. Rony All rights reserved.

Course Requirements & Evaluation Methods

NTE2053 Integrated Circuit 8 Bit MPU Compatible A/D Converter

DATA SHEETS DE COMPONENTES DA FAMÍLIA LÓGICA TTL GATES AND INVERTERS POSITIVES NAND GATES AND INVERTERS DESCRIÇÃO

Theory of Logic Circuits. Laboratory manual. Exercise 3

CSE140 Homework #7 - Solution

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

Chapter 2 Logic Gates and Introduction to Computer Architecture

CS311 Lecture: Sequential Circuits

CSE140: Components and Design Techniques for Digital Systems

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

We r e going to play Final (exam) Jeopardy! "Answers:" "Questions:" - 1 -

Sequential Circuit Design

Lecture 11: Sequential Circuit Design

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

Transcription:

Counters

Overview Ripple Counter Synchronous Binary Counters Design with D Flip-Flops Design with J-K Flip-Flops Serial Vs. Parallel Counters Up-down Binary Counter Binary Counter with Parallel Load BCD Counter, Arbitrary sequence Counters Counters in VHDL Chapter 5-ii: Registers (5.4-5.7) 2

Counters A counter is a register that goes through a predetermined sequence of states upon the application of clock pulses. Counters are categorized as: Ripple Counters: The FF output transition serves as a source for triggering other FFs. No common clock. Synchronous Counter: All FFs receive the common clock pulse, and the change of state is determined from the present state. Chapter 5-ii: Registers (5.4-5.7) 3

Example: A 4-bit Upward Counting Ripple Counter Less Significant Bit output is Clock for Next Significant Bit! (Clock is active low) Recall... Chapter 5-ii: Registers (5.4-5.7) 4

Example (cont.) The output of each FF is connected to the C input of the next FF in sequence. The FF holding the least significant bit receives the incoming clock pulses. The J and K inputs of all FFs are connected to a permanent logic 1. The bubble next to the C label indicates that the FFs respond to the negative-going transition of the input. Chapter 5-ii: Registers (5.4-5.7) 5

Operation: Example (cont.) The least significant bit (Q 0 ) is complemented with each negative-edge clock pulse input. Every time that Q 0 goes from 1 to 0, Q 1 is complemented. Every time that Q 1 goes from 1 to 0, Q 2 is complemented. Every time that Q 2 goes from 1 to 0, Q 3 is complemented, and so on. Chapter 5-ii: Registers (5.4-5.7) 6

A 4-bit Downward Counting Ripple Counter Use direct Set (S) signals instead of direct Reset (R), in order to start at 1111. Alternative designs: Change edge-triggering to positive (details in class) Connect the complement output of each FF to the C output of the next FF in the sequence (homework!) Chapter 5-ii: Registers (5.4-5.7) 7

Using D Flip-Flops Replace each JK flip-flop with the above D flip-flop and its corresponding combinational logic. Chapter 5-ii: Registers (5.4-5.7) 8

Synchronous Binary Counters The design procedure for a binary counter is the same as any other synchronous sequential circuit. The primary inputs of the circuit are the CLK and any control signals (EN, Load, etc). The primary outputs are the FF outputs (present state). Most efficient implementations usually use T- FFs or JK-FFs. We will examine JK and D flipflop designs. Chapter 5-ii: Registers (5.4-5.7) 9

Synchronous Binary Counters: J-K Flip Flop Design of a 4-bit Binary Up Counter Chapter 5-ii: Registers (5.4-5.7) 10

Synchronous Binary Counters: J-K Flip Flop Design of a Binary Up Counter (cont.) Chapter 5-ii: Registers (5.4-5.7) 11

Synchronous Binary Counters: J-K Flip Flop Design of a Binary Up Counter (cont.) Chapter 5-ii: Registers (5.4-5.7) 12

Synchronous Binary Counters: J-K Flip Flop Design of a Binary Up Counter (cont.) Chapter 5-ii: Registers (5.4-5.7) 13

Synchronous Binary Counters: J-K Flip Flop Design of a Binary Up Counter (cont.) logic 1 Q 0 J C K J Q0 = 1 K Q0 = 1 J C K Q 1 J Q1 = Q 0 K Q1 = Q 0 J C K Q 2 J Q2 = Q 0 Q 1 K Q2 = Q 0 Q 1 J C K Q 3 J Q3 = Q 0 Q 1 Q 2 K Q3 = Q 0 Q 1 Q 2 CLK Chapter 5-ii: Registers (5.4-5.7) 14

Synchronous Binary Counters: J-K Flip Flop Design of a Binary Up Counter with EN and CO EN = enable control signal, when 0 counter remains in the same state, when 1 it counts CO = carry output signal, used to extend the counter to more stages J Q0 = 1 EN K Q0 = 1 EN J Q1 = Q 0 EN K Q1 = Q 0 EN J Q2 = Q 0 Q 1 EN K Q2 = Q 0 Q 1 EN J Q3 = Q 0 Q 1 Q 2 EN K Q3 = Q 0 Q 1 Q 2 EN C0 = Q 0 Q 1 Q 2 Q 3 EN Chapter 5-ii: Registers (5.4-5.7) 15

Synchronous binary counters using D flip-flops D Q0 = Q 0 EN D Q1 = Q 1 ( Q 0 EN) D Q2 = Q 2 ( Q 0 Q 1 EN ) D Q3 = Q 3 ( Q 0 Q 1 Q 2 EN ) C0 = Q 0 Q 1 Q 2 Q 3 EN JK-FF equations See Figure 5-11 compare with Figure 5-11: JK-based design calls for 4 AND gates D-based design calls for 4 AND and 4 XOR gates Chapter 5-ii: Registers (5.4-5.7) 16

Serial Vs Parallel Counters If serial gating (chain of gates, info ripples through) is used serial counter (ex. Fig. 5-11a) If serial gating is replaced with parallel gating (this is analogous with ripple-logic replaced with carry-lookeahead logic in our adder designs) parallel counter (ex. Fig. 5-11b) Advantage of parallel over serial counter: faster in certain occasions (1111 0000) Chapter 5-ii: Registers (5.4-5.7) 17

Up-Down Binary Counter clock UD n-bit Up-Down Counter Q 0 Q 1 Q n-1 UD = 0: count up UD = 1: count down Chapter 5-ii: Registers (5.4-5.7) 18

Up-Down Binary Counter (cont.) UD Q2 Q1 Q0 Q2.D Q1.D Q0.D 0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 0 1 0 0 1 1 0 0 1 1 1 0 0 0 1 0 0 1 0 1 0 1 0 1 1 1 0 0 1 1 0 1 1 1 0 1 1 1 0 0 0 UD Q2 Q1 Q0 Q2.D Q1.D Q0.D 1 0 0 0 1 1 1 1 0 0 1 0 0 0 1 0 1 0 0 0 1 1 0 1 1 0 1 0 1 1 0 0 0 1 1 1 1 0 1 1 0 0 1 1 1 0 1 0 1 1 1 1 1 1 1 0 Up-Counter Down-Counter Chapter 5-ii: Registers (5.4-5.7) 19

Up-Down Binary Counter (cont.) UD Q2 Q1 Q0 00 01 11 10 00 01 11 10 Fill-in the Karnaugh maps for Q2.D, Q1.D, and Q0.D, simplify, and derive the logic diagram using (a) D-FFs and (b) T-FFs Chapter 5-ii: Registers (5.4-5.7) 20

Binary Counter with Parallel Load (Next slide) gives the logic diagram and symbol of a 4-bit synchronous binary counter with parallel load capability. The function table for this binary counter is Load Count Operation 0 0 Nothing 0 1 Count 1 x Load Chapter 5-ii: Registers (5.4-5.7) 21

Chapter 5-ii: Registers (5.4-5.7) 22

BCD counter The binary counter with parallel load can be converted into a synchronous BCD counter by connecting an external AND gate to it. Chapter 5-ii: Registers (5.4-5.7) 23

BCD counter (cont.) The counter starts with an all-zero output. As long as the output of the AND gate is 0, each positive clock pulse transition increments the counter by one. When the output reaches the count of 1001, both Q 0 and Q 3 become 1, making the output of the AND gate equal to 1. This condition makes Load active, so on the next clock transition, the counter does not count, but is loaded from its four inputs. The value loaded then is 0000. Chapter 5-ii: Registers (5.4-5.7) 24

Arbitrary Sequence Counter Given an arbitrary sequence, design a counter that will generate this sequence. Procedure: Derive state table/diagram based on give sequence Simplify (using K-maps, etc) Draw logic diagram Example: Use D-FFs to draw the logic diagram for sequence generator (counter) for: 0 7 6 1 0 (000 111 110 001 000) Chapter 5-ii: Registers (5.4-5.7) 25