EE345: Introduction to Microcontrollers Register and Counters Prof. Ahmad Abu-El-Haija.

Slides:



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

CSE 205: Digital Logic Design
Registers and Counters
CENG 241 Digital Design 1 Lecture 11
RIPPLE COUNTERS A register that goes through a prescribed sequence of states upon the application of input pulses is called a counter. The input pulses.
Registers and Counters
Logic and Computer Design Fundamentals Registers and Counters
CS370 Counters. Overview °Counter: A register that goes through a prescribed series of states °Counters are important components in computers. °Counters.
COE 202: Digital Logic Design Sequential Circuits Part 4 KFUPM Courtesy of Dr. Ahmad Almulhem.
ENGIN112 L26: Shift Registers November 3, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 26 Shift Registers.
Sequential Circuit Introduction to Counter
Introduction Flip-flops are synchronous bistable devices. The term synchronous means the output changes state only when the clock input is triggered. That.
KU College of Engineering Elec 204: Digital Systems Design
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.
Counters.
Registers and Counters
Chapter 1_4 Part II Counters
1 Sequential Circuits Registers and Counters. 2 Master Slave Flip Flops.
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
P. 4.1 Digital Technology and Computer Fundamentals Chapter 4 Digital Components.
Chapter 6 Registers and Counter
SEQUENTIAL CIRCUITS Component Design and Use. Register with Parallel Load  Register: Group of Flip-Flops  Ex: D Flip-Flops  Holds a Word of Data 
2017/4/24 CHAPTER 6 Counters Chapter 5 (Sections )
Princess Sumaya Univ. Computer Engineering Dept. Chapter 6:
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Lecture 17 Dr. Shi Dept. of Electrical and Computer Engineering.
Registers and Counters by Dr. Amin Danial Asham. References  Digital Design 5 th Edition, Morris Mano.
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.
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.
REGISTER A register is a group of flip-flops. Each flip- flop is capable of storing one bit of informa­ tion. An n-bit register consists of a group of.
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.
Digital System Design using VHDL
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.
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Dr. Shi Dept. of Electrical and Computer Engineering.
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.
Registers and Counters
FIGURE 6.1 Four‐bit register
EKT 221 – Counters.
EKT 221 : Digital 2 COUNTERS.
Sequential Logic Counters and Registers
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
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
Digital Electronics and Logic Design
Presentation transcript:

EE345: Introduction to Microcontrollers Register and Counters Prof. Ahmad Abu-El-Haija

August 13, 2015Digital System Design2 Acknowledgement This presentation is a modified version of lecture notes prepared by Dr. M. Sachdev, University of Waterloo, other slides from unidentified authors, and original slides from the publisher.

August 13, 2015EE345 - Introduction to Microcontrollers3 Contents Registers Shift Registers Ripple Counters Synchronous Counters Other Counters

4 Registers  Register is a group of flip-flops. Each flip-flop is capable of storing one bit of information.  n-bit register has n flip-flops.  Can hold n bits of binary data.  Register may also contain combinational logic that determines how information is transferred into register. A counter is essentially a register that goes through a predetermined sequence of states.

5 4-Bit Register Common clock input triggers all ff’s on positive edge of each pulse, and binary data available at inputs are transferred into register. Clear input is asynchronous

6 Register with Parallel Load  Specific control signal to load n-bit data Load =0, register retains the data Load = 1, register accepts new data.

7 Shift Register  Capable of shifting data in one or both directions Clock controls the shift operation  Figure shows a simple shift register with left to right data shifting capability

8 Serial Data Transfer Serial mode Data is transferred one bit at a time

Serial Transfer Example August 13, 2015EE345 - Introduction to Microcontrollers9

10 Serial Addition  Parallel adders Faster, cost more logic  Serial adders Slower n-bit addition → n clock cycles Less hardware

State Table for Serial Adder August 13, 2015EE345 - Introduction to Microcontrollers11 J Q = x y K Q = x’ y’ = (x + y)’ S = x y Q

12 Second Form of Serial Adder

13 Universal Shift Register

14 Ripple Counters Counters are available in two categories: ripple counters and synchronous counters. In a ripple counter, the flip-flop output transition serves as a source for triggering other flip-flops. In a synchronous counter, the C inputs of all flip-flops receives the common clock. Binary and BCD ripple counters

15 Ripple (Asynchronous) Counter  Counts the binary sequence Negative edge triggered Output of one flipflop → clock to the next Clock skew adds up

Binary Count Sequence August 13, 2015EE345 - Introduction to Microcontrollers16

17 BCD Ripple Counter A decimal counter follows a sequence of ten states and returns to 0 after the count of 9. Counter must reset itself after counting the terminal count. A decimal counter follows a sequence of ten states and returns to 0 after the count of 9. Counter must reset itself after counting the terminal count.

18 Q1 changes state after each clock pulse. Q2 complements every time Q1 goes from 1 to 0 as long as Q8 = 0. When Q8 becomes 1, Q2 remains at 0. Q4 complements every time Q2 goes from 1 to 0. Q8 remains at 0 as long as Q2 or Q4 is 0. Q8 is cleared on the next transition of Q1. BCD Ripple Counter

19 Three-Decade Decimal BCD Counter

20 Synchronous Counter Common clock is applied to all ff’s. Clock skew does not add up. Faster than ripple counters. Design of synchronous binary counter is so simple that there is no need to go through sequential logic design process, but can be used. FF in least significant position is complemented with every pulse. A ff in any other position is complemented when all the bits in lower significant positions = 1.

21 Up-Down Counter  Can count up (0000 →1111) or down (1111 → 0000) binary sequence

22 Synchronous BCD Counter Design a synchronous BCD counter with T flip-flops

23 4-Bit Binary Counter with Parallel Load  Count is inhibited when is Load enabled

August 13, 2015EE345 - Introduction to Microcontrollers24 4-Bit Binary Counter with Parallel Load

25 BCD Counter with Parallel Load

August 13, 2015EE345 - Introduction to Microcontrollers26  A circuit with n flip-flops has 2 n states We may have to design a counter with a given sequence (unused states) Unused states may be treated as don’t care or assigned specific next state Outside noise may cause the counter to enter unused state Must ensure counter eventually goes to the valid state Counter with Unused States

27 Counter with Unused States

28 Ring Counter A ring counter is a circular shift register with only one flip-flop being set at any particular time, all others are cleared. The single bit is shifted from one flip-flop to the next to produce the sequence of timing signals. The timing signals can be generated also by a 2- bit counter that goes through four distinct states. To generate 2 n timing signals, we need either a shift register with 2 n flip-flops or an n-bit binary counter together with an n-to-2 n -line decoder.

29 Generation of Timing Signals

30 Johnson Counter A k-bit ring counter circulates a single bit among the flip-flops to provide k distinguishable states. The number of states can be doubled if the shift register is connected as a switch-tail ring counter. A switch-tail ring counter is a circular shift register with the complement output of the last flip-flop connected to the input of the first flip-flop. In general, a k-bit switch-tail ring counter will go through a sequence of 2k states.

31 Construction of a Johnson Counter Number of states of a ring counter can be doubled

Other Counters August 13, 2015EE345 - Introduction to Microcontrollers32

33 A 2-Bit Asynchronous Counter

34 3-Bit Asynchronous Counter

35 Clocked Asynchronous Decade Counter

36 A Synchronous 3-Bit Binary Counter

37 4-Bit Synchronous Binary Counter

38 3-Bit Counter