Synchronous Counters, ripple counter & other counters Lecture 2

Slides:



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

Registers and Counters
Homework Reading Machine Projects Labs Tokheim Chapter 9.1 – 9.6
Counters Mano & Kime Sections 5-4, 5-5. Counters Ripple Counter Synchronous Binary Counters –Design with D Flip-Flops –Design with J-K Flip-Flops Counters.
Registers and Counters
CS370 Counters. Overview °Counter: A register that goes through a prescribed series of states °Counters are important components in computers. °Counters.
M.S.P.V.L. Polytechnic College, Pavoorchatram
Asynchronous and Synchronous Counters
Sequential Circuit Introduction to Counter
What is shift register? A shift register is a digital memory circuit found in calculators, computers, and data-processing systems. Bits (binary digits)
Mantıksal Tasarım – BBM231 M. Önder Efe
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.
Design of Counters ..
CHAPTER 3 Counters.  One of the common requirement in digital circuits/system is counting, both direction (forward and backward)  Digital clocks and.
A presentation on Counters
Counters.
A State Element “Zoo”.
Registers and Counters
CS1104 – Computer Organization Aaron Tan Tuck Choy School of Computing National University.
Rabie A. Ramadan Lecture 3
Digital Design: Principles and Practices
2017/4/24 CHAPTER 6 Counters Chapter 5 (Sections )
Princess Sumaya Univ. Computer Engineering Dept. Chapter 6:
Counters By Taweesak Reungpeerakul
Counters. November 5, 2003 Introduction: Counters  Counters are circuits that cycle through a specified number of states.  Two types of counters: 
Counters - I. Outline  Introduction: Counters  Asynchronous (Ripple) Counters  Asynchronous Counters with MOD number < 2 n  Asynchronous Down Counters.
CHAPTER 3 Counters.  One of the common requirement in digital circuits/system is counting, both direction (forward and backward)  Digital clocks and.
Digital Design Lectures 11 & 12 Shift Registers and Counters.
 Counters are sequential circuits which "count" through a specific state sequence. They can count up, count down, or count through other fixed sequences.
Registers and Counters Chapter 6. Digital Circuits 2 Clocked sequential circuits a group of flip-flops and combinational gates connected to form a feedback.
Chapter 1 Counters. Counters Counters are sequential circuits which "count” through a specific state sequence. They can count up, count down, or count.
Counters - II. Outline  Synchronous (Parallel) Counters  Up/Down Synchronous Counters  Designing Synchronous Counters  Decoding A Counter  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 Fundamentals Tenth Edition Floyd Chapter 9.
3 BIT DOWN COUNTER SUBJECT: DIGITAL ELECTONICS CODE: COLLEGE: BVM ENGINEERING COLLEGE COLLEGE CODE:008 ELECTRONICS & TELECOMMUNICATION DEPT.
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.
Sequential logic circuits First Class 1Dr. AMMAR ABDUL-HAMED KHADER.
Shift Register Counters
CS1104 – Computer Organization Aaron Tan Tuck Choy School of Computing National University.
Digital Design: Sequential Logic Blocks
FLIP FLOPS Binary unit capable of storing one bit – 0 or 1
EKT 124 / 3 DIGITAL ELEKTRONIC 1
EKT 221 – Counters.
Prof. Hsien-Hsin Sean Lee
EKT 221 : Digital 2 COUNTERS.
Sequential Logic Counters and Registers
Sequential Circuit: Counter
Dr. Clincy Professor of CS
DR S. & S.S. GHANDHY ENGINEENRING COLLEGE
Sequential Circuit - Counter -
Presented by Ali Maleki Spring Semester, 2009
D Flip-Flop.
University of Maryland Baltimore County Department of Computer Science and Electrical Engineering   CMPE 212 Laboratory (Discussion 12) Hasib Hasan
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.
Asynchronous Counters with SSI Gates
Counters and Registers
Synchronous Sequential Circuits
29-Nov-18 Counters Chapter 5 (Sections ).
CSE 370 – Winter Sequential Logic-2 - 1
EET107/3 DIGITAL ELECTRONICS 1
Chapter 8 Counters Changjiang Zhang
CHAPTER 4 COUNTER.
MTE 202, Summer 2016 Digital Circuits Dr.-Ing. Saleh Hussin
Switching Theory and Logic Design Chapter 5:
Digital Logic Department of CNET Chapter-6
Digital Logic Department of CNET Chapter-6
14 Digital Systems.
Counters.
Presentation transcript:

Synchronous Counters, ripple counter & other counters Lecture 2 Gunjeet Kaur Dronacharya Group of Institutions

Introduction: Counters Counters are circuits that cycle through a specified number of states. Two types of counters: synchronous (parallel) counters asynchronous (ripple) counters Ripple counters allow some flip-flop outputs to be used as a source of clock for other flip-flops. Synchronous counters apply the same clock to all flip-flops.

Synchronous (Parallel) Counters Synchronous (parallel) counters: the flip-flops are clocked at the same time by a common clock pulse. We can design these counters using the sequential logic design process (covered in Lecture #12). Example: 2-bit synchronous binary counter (using T flip-flops, or JK flip-flops with identical J,K inputs). 01 00 10 11

Synchronous (Parallel) Counters Example: 2-bit synchronous binary counter (using T flip-flops, or JK flip-flops with identical J,K inputs). TA1 = A0 TA0 = 1 1 K J A1 A0 C CLK Q Q'

Synchronous (Parallel) Counters Example: 3-bit synchronous binary counter (using T flip-flops, or JK flip-flops with identical J, K inputs). A2 A1 A0 1 A2 A1 A0 1 A2 A1 A0 1 TA2 = A1.A0 TA1 = A0 TA0 = 1

Synchronous (Parallel) Counters Example: 3-bit synchronous binary counter (cont’d). TA2 = A1.A0 TA1 = A0 TA0 = 1 1 A2 CP A1 A0 K Q J

Synchronous (Parallel) Counters Note that in a binary counter, the nth bit (shown underlined) is always complemented whenever 011…11  100…00 or 111…11  000…00 Hence, Xn is complemented whenever Xn-1Xn-2 ... X1X0 = 11…11. As a result, if T flip-flops are used, then TXn = Xn-1 . Xn-2 . ... . X1 . X0

Synchronous (Parallel) Counters Example: 4-bit synchronous binary counter. TA3 = A2 . A1 . A0 TA2 = A1 . A0 TA1 = A0 TA0 = 1 1 K J A1 A0 C CLK Q Q' A2 A3 A1.A0 A2.A1.A0

Synchronous (Parallel) Counters Example: Synchronous decade/BCD counter. T0 = 1 T1 = Q3'.Q0 T2 = Q1.Q0 T3 = Q2.Q1.Q0 + Q3.Q0

Synchronous (Parallel) Counters Example: Synchronous decade/BCD counter (cont’d). T0 = 1 T1 = Q3'.Q0 T2 = Q1.Q0 T3 = Q2.Q1.Q0 + Q3.Q0 1 Q1 Q0 CLK T C Q Q' Q2 Q3

Up/Down Synchronous Counters Up/down synchronous counter: a bidirectional counter that is capable of counting either up or down. An input (control) line Up/Down (or simply Up) specifies the direction of counting. Up/Down = 1  Count upward Up/Down = 0  Count downward

Up/Down Synchronous Counters Example: A 3-bit up/down synchronous binary counter. TQ0 = 1 TQ1 = (Q0.Up) + (Q0'.Up' ) TQ2 = ( Q0.Q1.Up ) + (Q0'. Q1'. Up' ) Up counter TQ0 = 1 TQ1 = Q0 TQ2 = Q0.Q1 Down counter TQ0 = 1 TQ1 = Q0’ TQ2 = Q0’.Q1’

Up/Down Synchronous Counters Example: A 3-bit up/down synchronous binary counter (cont’d). TQ0 = 1 TQ1 = (Q0.Up) + (Q0'.Up' ) TQ2 = ( Q0.Q1.Up ) + (Q0'. Q1'. Up' ) 1 Q1 Q0 CLK T C Q Q' Up Q2

Designing Synchronous Counters Covered in Lecture #12. Example: A 3-bit Gray code counter (using JK flip-flops). 100 000 001 101 111 110 011 010

Designing Synchronous Counters 3-bit Gray code counter: flip-flop inputs. 1 00 01 11 10 Q2 Q1Q0 X JQ1 = Q2'.Q0 1 00 01 11 10 Q2 Q1Q0 X JQ0 = Q2.Q1 + Q2'.Q1' = (Q2  Q1)' 1 00 01 11 10 Q2 Q1Q0 X JQ2 = Q1.Q0' 1 00 01 11 10 Q2 Q1Q0 X KQ2 = Q1'.Q0' 1 00 01 11 10 Q2 Q1Q0 X KQ1 = Q2.Q0 1 00 01 11 10 Q2 Q1Q0 X KQ0 = Q2.Q1' + Q2'.Q1 = Q2  Q1

Designing Synchronous Counters 3-bit Gray code counter: logic diagram. JQ2 = Q1.Q0' JQ1 = Q2'.Q0 JQ0 = (Q2  Q1)' KQ2 = Q1'.Q0' KQ1 = Q2.Q0 KQ0 = Q2  Q1 Q1 Q0 CLK Q2 J C Q Q' K Q2' Q0' Q1'

Decoding A Counter Decoding a counter involves determining which state in the sequence the counter is in. Differentiate between active-HIGH and active-LOW decoding. Active-HIGH decoding: output HIGH if the counter is in the state concerned. Active-LOW decoding: output LOW if the counter is in the state concerned.

Decoding A Counter Example: MOD-8 ripple counter (active-HIGH decoding). 1 2 3 4 5 6 7 8 9 10 Clock A' B' C' HIGH only on count of ABC = 000 HIGH only on count of ABC = 001 A' B' C HIGH only on count of ABC = 010 A' B C' . HIGH only on count of ABC = 111 A B C

Decoding A Counter Example: To detect that a MOD-8 counter is in state 0 (000) or state 1 (001). A' B' C' C A' B' 1 2 3 4 5 6 7 8 9 Clock HIGH only on count of ABC = 000 or ABC = 001 10 Example: To detect that a MOD-8 counter is in the odd states (states 1, 3, 5 or 7), simply use C. C 1 2 3 4 5 6 7 8 9 Clock HIGH only on count of odd states 10

Ring Counters One flip-flop (stage) for each state in the sequence. The output of the last stage is connected to the D input of the first stage. An n-bit ring counter cycles through n states. No decoding gates are required, as there is an output that corresponds to every state the counter is in.

Ring Counters Example: A 6-bit (MOD-6) ring counter. CLK Q0 Q1 Q2 Q3 CLR PRE 100000 010000 001000 000100 000010 000001

Johnson Counters The complement of the output of the last stage is connected back to the D input of the first stage. Also called the twisted-ring counter. Require fewer flip-flops than ring counters but more flip-flops than binary counters. An n-bit Johnson counter cycles through 2n states. Require more decoding circuitry than ring counter but less than binary counters.

Johnson Counters Example: A 4-bit (MOD-8) Johnson counter. CLK Q0 Q1 CLR Q' 0000 0001 0011 0111 1111 1110 1100 1000

Johnson Counters Decoding logic for a 4-bit Johnson counter. A' D' State 0 A B' State 1 B C' State 2 C D' State 3 B' C State 6 A D State 4 C' D State 7 A' B State 5