CENG 241 Digital Design 1 Lecture 11

Slides:



Advertisements
Similar presentations
Lecture 23: Registers and Counters (2)
Advertisements

CSE 205: Digital Logic Design
Registers and Counters
Registers and Counters
Logic and Computer Design Fundamentals Registers and Counters
COE 202: Digital Logic Design Sequential Circuits Part 4 KFUPM Courtesy of Dr. Ahmad Almulhem.
Sequential Circuit Introduction to Counter
C HAPTER S IX R EGISTERS AND C OUNTERS 1. A clocked sequential circuit consists of a group of flip-flops and combinational gates connected to form a feedback.
A.Abhari CPS2131 Registers A register is a group of n flip-flops each of them capable of storing one bit of information There are two types of registers:
Mantıksal Tasarım – BBM231 M. Önder Efe
Registers and Counters
Sequential Circuit  It is a type of logic circuit whose output depends not only on the present value of its input signals but on the past history of its.
Counters  A counter is a device which stores (and sometimes displays) the number of times a particular event or process has occurred, often in relationship.
A presentation on Counters
Registers and Counters
Chapter 1_4 Part II Counters
1 Sequential Circuits Registers and Counters. 2 Master Slave Flip Flops.
EE345: Introduction to Microcontrollers Register and Counters Prof. Ahmad Abu-El-Haija.
CSI-2111 Computer Architecture Ipage Sequential circuits, 2nd part v Objectives: To recognize and know to use the principal types of sequential.
Registers & Counters M. Önder Efe
1 Registers and Counters A register consists of a group of flip-flops and gates that affect their transition. An n-bit register consists of n-bit flip-flops.
Registers and Counters
Rabie A. Ramadan Lecture 3
2017/4/24 CHAPTER 6 Counters Chapter 5 (Sections )
Digital Design Lectures 11 & 12 Shift Registers and Counters.
7-6 단일 레지스터에서 Microoperation Multiplexer-Based Transfer  Register 가 서로 다른 시간에 둘 이상의 source 에서 data 를 받을 경우 If (K1=1) then (R0 ←R1) else if (K2=1) then.
 Counters are sequential circuits which "count" through a specific state sequence. They can count up, count down, or count through other fixed sequences.
1 Registers & Counters Logic and Digital System Design - CS 303 Erkay Savaş Sabancı University.
ENG241 Digital Design Week #8 Registers and Counters.
Registers and Counters Chapter 6. Digital Circuits 2 Clocked sequential circuits a group of flip-flops and combinational gates connected to form a feedback.
Chap 5. Registers and Counters. Chap Definition of Register and Counter l a clocked sequential circuit o consist of a group of flip-flops & combinational.
Lecture 21: Registers and Counters (1)
Sequential logic circuits
CHAPTER 6 Sequential Circuits’ Analysis CHAPTER 6 Sequential Circuits’ Analysis Sichuan University Software College.
Registers and Counters
C HAPTER S IX R EGISTERS AND C OUNTERS 1. A clocked sequential circuit consists of a group of flip-flops and combinational gates connected to form a feedback.
COUNTERS Why do we need counters?
Chap 5. Registers and Counters
DIGITAL COMPONENTS. MULTIPLEXERS A multiplexer is a combinational circuit that receives binary information from one of 2 n input data lines and directs.
Fuw-Yi Yang1 數位系統 Digital Systems Department of Computer Science and Information Engineering, Chaoyang University of Technology 朝陽科技大學資工系 Speaker: Fuw-Yi.
Counters and registers Eng.Maha Alqubali. Registers Registers are groups of flip-flops, where each flip- flop is capable of storing one bit of information.
Logic Design (CE1111 ) Lecture 6 (Chapter 6) Registers &Counters Prepared by Dr. Lamiaa Elshenawy 1.
1 Registers A register is a group of n flip-flops each of them capable of storing one bit of information There are two types of registers: parallel and.
Digital Design: With an Introduction to the Verilog HDL, 5e M. Morris Mano Michael D. Ciletti Copyright ©2013 by Pearson Education, Inc. All rights reserved.
FLIP FLOPS Binary unit capable of storing one bit – 0 or 1
Homework Reading Machine Projects Labs Tokheim Chapter 9.1 – 9.6
Registers and Counters
FIGURE 6.1 Four‐bit register
EKT 221 – Counters.
EKT 221 : Digital 2 COUNTERS.
Sequential Logic Counters and Registers
CSCE 211: Digital Logic Design
SLIDES FOR CHAPTER 12 REGISTERS AND COUNTERS
Sequential Circuit: Counter
Dr. Clincy Professor of CS
Registers and Counters
Registers and Counters Register : A Group of Flip-Flops. N-Bit Register has N flip-flops. Each flip-flop stores 1-Bit Information. So N-Bit Register Stores.
COE 202: Digital Logic Design Sequential Circuits Part 4
29-Nov-18 Counters Chapter 5 (Sections ).
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN
Registers and Register Transfers
Computer Architecture and Organization: L02: Logic design Review
6. Registers and Counters
Switching Theory and Logic Design Chapter 5:
Digital Logic Department of CNET Chapter-6
Digital Logic Department of CNET Chapter-6
Registers and Register Transfers
Outline Registers Counters 5/11/2019.
Digital Electronics and Logic Design
Presentation transcript:

CENG 241 Digital Design 1 Lecture 11 Amirali Baniasadi amirali@ece.uvic.ca

This Lecture Chapter 6: Registers and Counters

Registers Sequential circuits are classified based in their function, e.g., registers. Register: A group of flip-flops each storing one bit of information. Registers include flip-flops and gates: flip-flops hold the information, gates control how the information is transferred to the register. Counter is a register that goes through a predetermined sequence of states.

4-bit Register Loads in parallel Clear: Cleans the output to all 0’s.

Register with Parallel Load 1 1 To fully synchronize the system clock signals should arrive at the same time at all flip-flops. Therefore we do not control the clock by gates. I0 I3 I2 I1 1 Load = 1, we load data Load =0, register content does not change

Register with Parallel Load Load =0, register content does not change 1 A0 A3 A2 A1 1 1 1

Shift Registers A register capable of shifting its binary information in one or both directions is called the shift register.

Serial Transfer A digital system is in the serial mode when information is processed one bit at a time. Serial transfer of information from A to B:

Remember 4-bit Parallel Adder Circuit?

Serial Addition Slower compared to parallel addition, but uses less equipment.

Serial Adder vs. Parallel Adder PA uses registers with parallel load, SA uses shift registers. PA uses more FAs compared to SA. Excluding the registers, PA is a combinational circuit, SA is sequential.

Serial Adder: Design Procedure State Table for a Serial Adder: Present State Inputs Next State Output Flip-Flop inputs Q x y Q S J0 K0 0 0 0 0 0 0 x 0 0 1 0 1 0 x 0 1 0 0 1 0 x 0 1 1 1 0 1 x 1 0 0 0 1 x 1 1 0 1 1 0 x 0 1 1 0 1 0 x 0 1 1 1 1 1 x 0 J0=xy K0=x’y’= (x+y)’ S=x XOR y XOR z

Serial 4-bit Parallel Adder Circuit

Universal Shift Register A register capable of shifting in both directions and loading in parallel. Stores Information Controls information transfer Multiplexer Inputs: 0: No Change 1:Shift Right 2:Shift Left 3:Parallel load

Ripple Counters A register that goes trough a prescribed sequence of states is called a counter. There are two groups of counters: Ripple counters and Synchronous counters. Ripple counters: The flip-flop output triggers other flip-flops. Synchronous counters count the clock.

Binary Ripple Counter A binary ripple counter consists of a series of complementing flip-flops, with the output of each flip-flop connected to the next higher order. Examples of complementing flip-flops are T and D (with the output complement connected to the input) flip-flop. Binary Count Sequence A3 A2 A1 A0 0 0 0 0 A0 is complemented with each count pulse 0 0 0 1 A1 is complemented when A0 goes from 1 to 0 0 0 1 0 A2 is complemented when A1 goes from 1 to 0 0 0 1 1 A3 is complemented when A2 goes from 1 to 0 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0

Examples of Binary Ripple Counters

Binary Ripple Counter Count-down counter: A binary counter with reverse count: Starts from 15 goes down. In a count-down counter the least significant bit is complemented with every count pulse. Any other bit is complemented if the previous bit goes from 0 to 1. We can use the same counter design with negative edge flip-flops to make a count-down flip-flop.

BCD Ripple Counter A BCD counter starts from 0 ends at 9.

Logic Diagram of BCD Ripple Counter Q1 is applied to the C inputs of Q2 and Q8 Q2 is applied to the C input of Q4 J and K are connected to either 1 or flip-flop outputs

Logic Diagram of BCD Ripple Counter Verification: Does the circuit follow the states? Q1 is complemented with every count (J=K=1) Q2 complements if Q1 goes from 1 to 0 and Q8 is 0 Q2 remains 0 if Q8 becomes 1 Q4 complements if Q2 goes from 1 to 0 Q8 remains 0 as long as Q2 or Q4 is 0 When Q2 and Q4 are 1, Q8 complements when Q1 goes from 1 to 0. Q8 clears and the next Q1 transition.

Three-Decade Decimal BCD Counter Counts from 0 to 999: When Q8 goes from 1 to 0 the next higher order decade is triggered

4-bit Synchronous Binary Counters A flip-flop is complemented if all lower bits are 1. A3 A2 A1 A0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0

4-bit Up-Down Binary Counters In a down binary counter a) The least significant bit is always complemented b) a bit is complemented if all lower bits are 0. Change an up counter to a down counter: The AND gates should come from the complement outputs instead of the normal one Up = 1, Down =0: Circuit counts up since input comes from Normal output Up = 0, Down =1: Circuit counts down since input comes from Complemented output

Binary Counter with Parallel Load Sometimes we need an initial value prior to the count operation. Initial value: I3 I2 I1 I0

Binary Counter with Parallel Load Count = 1, Load =0 1 1 1 1 1 1 1

Binary Counter with Parallel Load Count = 0, Load =1 1 1 I0 I0 1 I0’ 1 I1 I1 1 1 I1’ 1 I2 1 1 1 I2’ 1 I3 1 1 I3’

BCD counter with parallel load In part a, 1001 is detected. In part b, 1010 is detected. In part a, LOAD is set to 1 and effective next cycle. In part b, counter is immediately cleared

Other Counters: Counters with unused states Present State Next State Flip-Flop Inputs A B C A B C JA KA JB KB JC KC 0 0 0 0 0 1 0 X 0 X 1 X 0 0 1 0 1 0 0 X 1 X X 1 0 1 0 1 0 0 1 X X 1 0 X 1 0 0 1 0 1 X 0 0 X 1 X 1 0 1 1 1 0 X 0 1 X X 1 1 1 0 0 0 0 X 1 X 1 0 X JA=KA=B JB=C, KB=1 JC=B’ KC=1

Other Counters: Counters with unused states What happens if we fall in unused states? In this case, 111 results in 000. 011 results in 100. The Counter is self-correcting.

Other Counters: Ring Counter A ring counter is a counter with ONLY 1 flip-flop set to 1 at any particular time, all other are cleared.

Other Counters: Johnson Counter A 4 flip-flop ring counter that produces 8 states (not 4).

Summary Counters & Registers Reading up to page 269 Homework 5-Chapter 6 problems 6,7,11,15,18,19,23,29 and 30 Due Wednesday July 30th.