Counters. The simplest circuit for binary counting is a multibit divider.

Similar documents
Experiment 8 Introduction to Latches and Flip-Flops and registers

Logic Design ( Part 3) Sequential Logic (Chapter 3)

RS flip-flop using NOR gate

Sequential logic. Circuits with feedback. How to control feedback? Sequential circuits. Timing methodologies. Basic registers

6. Sequential Logic Flip-Flops

Asynchronous (Ripple) Counters

Combinational vs Sequential

Lecture 8: Sequential Logic

COSC 243. Sequential Logic. COSC 243 (Computer Architecture) Lecture 5 - Sequential Logic 1

Counters

SEQUENTIAL LOGIC. Satish Chandra Assistant Professor Department of Physics P P N College, Kanpur

Sequential Circuits. Sequential Logic. Circuits with Feedback. Simplest Circuits with Feedback. Memory with Cross-coupled Gates.

Flip-Flops. Because of this the state of the latch may keep changing in circuits with feedback as long as the clock pulse remains active.

Digital Fundamentals: A Systems Approach

Figure 30.1a Timing diagram of the divide by 60 minutes/seconds counter

EKT 121/4 ELEKTRONIK DIGIT 1

D Latch (Transparent Latch)

Review of digital electronics. Storage units Sequential circuits Counters Shifters

Digital Fundamentals

Introduction. NAND Gate Latch. Digital Logic Design 1 FLIP-FLOP. Digital Logic Design 1

RS flip-flop using NOR gate

Sequencing. Lan-Da Van ( 范倫達 ), Ph. D. Department of Computer Science National Chiao Tung University Taiwan, R.O.C. Fall,

! Two inverters form a static memory cell " Will hold value as long as it has power applied

Sequential Logic. Sequential Circuits. ! Timing Methodologies " Cascading flip-flops for proper operation " Clock skew

CHAPTER 4: Logic Circuits

Counter dan Register

ELCT201: DIGITAL LOGIC DESIGN

Memory elements. Topics. Memory element terminology. Variations in memory elements. Clock terminology. Memory element parameters. clock.

The outputs are formed by a combinational logic function of the inputs to the circuit or the values stored in the flip-flops (or both).

Logic Design. Flip Flops, Registers and Counters

UNIT-3: SEQUENTIAL LOGIC CIRCUITS

Digital Logic Design ENEE x. Lecture 19

Sequential Logic and Clocked Circuits

CHAPTER 4: Logic Circuits

Chapter 7 Counters and Registers

Registers and Counters

ALGORITHMS IN HW EECS150 ALGORITHMS IN HW. COMBINATIONAL vs. SEQUENTIAL. Sequential Circuits ALGORITHMS IN HW

Digital Systems Laboratory 3 Counters & Registers Time 4 hours

Digital Circuits ECS 371

3 Flip-Flops. The latch is a logic block that has 2 stable states (0) or (1). The RS latch can be forced to hold a 1 when the Set line is asserted.

EET2411 DIGITAL ELECTRONICS

MC9211 Computer Organization

Sequential Circuit Design: Part 1

UNIT III. Combinational Circuit- Block Diagram. Sequential Circuit- Block Diagram

Advanced Devices. Registers Counters Multiplexers Decoders Adders. CSC258 Lecture Slides Steve Engels, 2006 Slide 1 of 20

Chapter 4. Logic Design

LATCHES & FLIP-FLOP. Chapter 7

Agenda. EE 260: Introduction to Digital Design Counters and Registers. Asynchronous (Ripple) Counters. Asynchronous (Ripple) Counters

Name Of The Experiment: Sequential circuit design Latch, Flip-flop and Registers

IT T35 Digital system desigm y - ii /s - iii

EMT 125 Digital Electronic Principles I CHAPTER 6 : FLIP-FLOP

Digital Logic Design Sequential Circuits. Dr. Basem ElHalawany

Logic Circuits. A gate is a circuit element that operates on a binary signal.

PGT104 Digital Electronics. PGT104 Digital Electronics

(Refer Slide Time: 2:00)

Logic and Computer Design Fundamentals. Chapter 7. Registers and Counters

cascading flip-flops for proper operation clock skew Hardware description languages and sequential logic

Scanned by CamScanner

ASYNCHRONOUS COUNTER CIRCUITS

Registers and Counters

Report on 4-bit Counter design Report- 1, 2. Report on D- Flipflop. Course project for ECE533

Digital Fundamentals: A Systems Approach

Chapter 2. Digital Circuits

Chapter 5: Synchronous Sequential Logic

Chapter 5 Flip-Flops and Related Devices

Engr354: Digital Logic Circuits

Chapter 6. sequential logic design. This is the beginning of the second part of this course, sequential logic.

Logic Gates, Timers, Flip-Flops & Counters. Subhasish Chandra Assistant Professor Department of Physics Institute of Forensic Science, Nagpur

Chapter 11 Latches and Flip-Flops

Sequential Logic Basics

EEE2135 Digital Logic Design Chapter 6. Latches/Flip-Flops and Registers/Counters 서강대학교 전자공학과

DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE422) COUNTERS

ELCT201: DIGITAL LOGIC DESIGN

Fundamentals of Computer Systems

YEDITEPE UNIVERSITY DEPARTMENT OF COMPUTER ENGINEERING. EXPERIMENT VIII: FLIP-FLOPS, COUNTERS 2014 Fall

COE 202: Digital Logic Design Sequential Circuits Part 1. Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:

Fundamentals of Computer Systems

Module for Lab #16: Basic Memory Devices

CHAPTER1: Digital Logic Circuits

Chapter 6. Flip-Flops and Simple Flip-Flop Applications

Chapter 3: Sequential Logic Systems

Vignana Bharathi Institute of Technology UNIT 4 DLD

Digital Circuits 4: Sequential Circuits

Unit 11. Latches and Flip-Flops

Sequential Circuit Design: Part 1

Chapter 3 Unit Combinational

VTU NOTES QUESTION PAPERS NEWS RESULTS FORUMS Registers

give sequence to events have memory (short-term) use feedback from output to input to store information

CHAPTER 6 COUNTERS & REGISTERS

FLIP-FLOPS AND RELATED DEVICES

CSE 352 Laboratory Assignment 3

More on Flip-Flops Digital Design and Computer Architecture: ARM Edition 2015 Chapter 3 <98> 98

DIGITAL CIRCUIT LOGIC UNIT 11: SEQUENTIAL CIRCUITS (LATCHES AND FLIP-FLOPS)

Universal Asynchronous Receiver- Transmitter (UART)

DIGITAL CIRCUIT COMBINATORIAL LOGIC

Slide 1. Flip-Flops. Cross-NOR SR flip-flop S R Q Q. hold reset set not used. Cross-NAND SR flip-flop S R Q Q. not used reset set hold 1 Q.

Chapter 6 Registers and Counters

LSN 12 Shift Registers

UNIT IV. Sequential circuit

MUHAMMAD NAEEM LATIF MCS 3 RD SEMESTER KHANEWAL

Transcription:

Counters The simplest circuit for binary counting is a multibit divider. +5 CL 0 1 2 3 Each bit toggles on the downward edge of the preceding bit. The timing is asynchronous. This particular circuit is called a ripple counter. LABOATOY ELECTONIC II 1 of 19

Transients The timing diagram for the ripple counter shows a delay for each transition. 7 6 4 0 8 CL 0 1 2 3 In a ripple counter at a clock edge each data bit much change before the next higher bit can change. The apparent counts that exist during the clock transistion are called transients. LABOATOY ELECTONIC II 2 of 19

3 of 19 LABOATOY ELECTONIC II Output Latches Transients can be eliminated by using -type latches on the outputs. The ripple counter is updated on the falling edge of the clock. The flip-flops are clocked on the rising edge of the clock, long after the values of all bits are set. Transients are suppressed. +5 0 CL 1 2 3

Preset Counter Logic can preselect the early termination of the count to some value n. +5 CL 0 1 2 3 This circuit divides by 10. When the clock causes both 3 and 1 to be high, a clear is sent to all flip-flops. The first case of of this count is at the clock from 9 to 10. Transient problems will affect the operation of this circuit. ata latches will help transients here as well. The set and clear of the flip-flops can be used to preload a starting count. LABOATOY ELECTONIC II 4 of 19

Pulse Generator This circuit uses a counter to generate a periodic narow pulse. 0 1 2 3 4 5 6 7 +5 ENT ENP CL 0 1 2 3 74L163 C L ENT ENP CL 0 1 2 3 74L163 C L Output CL Each 74L163 chip has four internal flip-flops. ENT and ENP are the inputs for the flip-flops. L is the ET input for the flip-flops. The counter is loaded with a value from 0-255 (0-FF H ). With each clock rising edge the count increases by one. When FF H is reached, C goes high. This reloads the counter to repeat the cycle. The output is high for one clock cycle and low for 256- cycles. LABOATOY ELECTONIC II 5 of 19

ynchronous Counters A true synchronous counter requires that all flip-flops be clocked at the same time. 1. Minimize noise since all inputs are well defined 2. educe propagation time 3. Eliminate transient counts The inputs must have additional logic to control each bit as in the divide by 2 n. CL +5 0 1 2 0 is dividing the input clock by 2. 1 is dividing the input clock by 4. It toggles when 0 = 1. 2 is dividing the input clock by 8. It toggles when 1 & 0 = 1. LABOATOY ELECTONIC II 6 of 19

ivide by 3 Other latches can be used to make counters such as this -type divider. CL 1 2 0 1 The truth table shows that the sequence repeats every 3 clock cycles. CL 0 0 1 1 Count 0 0 1 0 0 0->1 1 0 0 1 2 0->1 0 1 0 0 1 0->1 0 0 1 0 0 0->1 1 0 0 1 2 LABOATOY ELECTONIC II 7 of 19

tate igram A state diagram show the sequence between possible outputs. 0 1 3 2 Forbidden states occur when a combination cannot be reached in the sequence. In the ivide by 3 circuit, 0 = 1 and 1 = 1 cannot be reached If it occurs, 0 = 1 and 1 = 0 so the next count is 1. Green ed Compare to a state diagram for traffic signals. Blink Yellow LABOATOY ELECTONIC II 8 of 19

egisters egisters are like latches and have multiple flip-flops on one IC with one clock and clear. Typically there is one output (or output pair /) per input. All are designed to hold a set of bits. A transparent latch is based on flip-flops, and passes the input to the output when enabled and hold the output constant when disabled. A type- register is based on -type flip-flops, and transfers the input to the output only on a specified clock edge. 74L175 0 0 0 CL 0 0 1 1 2 2 0 3 3 Many registers have an enable feature to control whether or not the clock has an effect. If not enabled, the register outputs are held constant. LABOATOY ELECTONIC II 9 of 19

hift egisters A shift register moves a pattern of bits in an array of flip-flops without altering the pattern. This version is a erial In/ Parallel Out (IPO) register. CL IN The truth table show the movement of the bits in the register. 0 1 2 3 CL IN 0 1 2 3 0 0 0 0 0 0->1 1 1 0 0 0 0->1 1 1 1 0 0 0->1 0 0 1 1 0 0->1 0 0 0 1 1 0->1 0 0 0 0 1 LABOATOY ELECTONIC II 10 of 19

Parallel In/ingle Out (PIO) A PIO register loads a set of bits then shifts them serially. 0 1 2 The L is a logic level that intiates a parallel load of input data. L The CL handles the shifting. OUT In this example truth table the input data is 0110. CL CL L 0 1 2 3 OUT 0->1 1 0 1 1 0 0 0->1 0 0 0 1 1 1 0->1 0 0 0 0 1 1 0->1 0 0 0 0 0 0 0->1 0 0 0 0 0 0 LABOATOY ELECTONIC II 11 of 19

Psuedorandom Noise Generator A shift register can be used to generate a seemingly random stream of bits. IN CL 0 1 2 3 4 5 6 7 If the register begins at 0, the input continues to be 0 and there is no change of state. If the register begins at 1, that one bit will shift through the register at each clock cycle. When it reaches 6 and 7 then those two clocks will input a 1 instead of a 0 to the input. Those two consecutive bits clock through and at the end generate a 101 pattern to the input. Only after 255 clock cycles does the number 1 reemerge. The register generates all values from 1-255 in an arbitrary order that is set by the specific feedback through the XO gate. LABOATOY ELECTONIC II 12 of 19

Truth Table with Feedback 2 @ 3 CL 0 = 2 @ 3 1 2 3 Count 0->1 1 0 0 0 1 0->1 0 1 0 0 2 0->1 0 0 1 0 4 0->1 1 0 0 1 9 0->1 1 1 0 0 3 0->1 0 1 1 0 6 0->1 1 0 1 1 13 0->1 0 1 0 1 10 0->1 1 0 1 0 5 0->1 1 1 0 1 11 0->1 1 1 1 0 7 0->1 1 1 1 1 15 0->1 0 1 1 1 14 0->1 0 0 1 1 12 0->1 0 0 0 1 8 LABOATOY ELECTONIC II 13 of 19

Truth Table with Feedback 1 @ 3 CL 0 = 1 @ 3 1 2 3 Count 0->1 1 0 0 0 1 0->1 0 1 0 0 2 0->1 1 0 1 0 5 0->1 0 1 0 1 10 0->1 0 0 1 0 4 0->1 0 0 0 1 8 0->1 1 0 0 0 1 This feedback combination does not go through all 15 possible combinations, but only 7, effectively a 3-bit pseudorandom generator. There are 6 possible feedback choices for 4 bits: 0 = 2 @ 3 gives 15 numbers 0 = 1 @ 3 gives 7 numbers 0 = 0 @ 3 gives 15 numbers 0 = 1 @ 2 gives 7 numbers after 2 is reached 0 = 0 @ 2 gives 7 numbers after 3 is reached 0 = 0 @ 1 gives 3 numbers after 6 is reached LABOATOY ELECTONIC II 14 of 19

tate iagram - Feedback 1 @ 2 The pseudorandom number generator state diagram shows the forbidden and isolated states. 1 3 7 15 9 4 6 14 12 8 11 13 0 2 5 10 0 = 1 @ 2 The pattern sequence here is 6-13-11, a cycle of 3. Most starting points end in this cycle. tarting points at 4, 8, 12 or 0 end up stuck at 0. LABOATOY ELECTONIC II 15 of 19

Memory andom Access Memory (AM) is a selectable register. The basic components of a AM are Input address bits (A i ) Chip select bit (C) Output enable bit (OE) Write enable bit (WE) Input/Output data bits ( i ) Chip select, output enable, and write enable will sometimes come under other names with slightly different function. ome of these include memory enable, read/write, address strobe and data strobe. trobes mean that the memory is controlled by a clock edge rather than a level. AMs are usually specified by the number of possible addresses (2 n where n is the number is address bits) by the number of data bits. For example a chip with 18 address bits and 8 data bits would be a 256 x 8 AM. Note that =2 10 =1024, which is not really 1000, but it is counted that way. M=2 20 and is treated as if it were 10 6. LABOATOY ELECTONIC II 16 of 19

tatic AM (AM) tatic AM uses flip-flops as the basic storage element. The memory position of the flip-flop holds the data and new data is inserted by asserting a 1 or 0 at the flip-flop input while it is enabled. The entire memory chip is nothing more than a huge array of flip-flops. Like any gate circuit, when the power is off, the signals go away, so any data stored would be lost. The biggest advantages of AMs are speed and simplicity. AM Timing A i write read C WE OE i data in data out Battery-Backup AM This is typically designed as an printed circuit card that includes low-power CMO AM and a long-life battery. When the power is off, a special ultra-low power circuit kicks in and preserves the data on the flip-flops. LABOATOY ELECTONIC II 17 of 19

ynamic AM (AM) ynamic AM uses charged capacitors as the basic storage element. A capacitor can hold a charge for a time based on the leakage resistance in parallel with the capacitor. On a chip this is about 10 9 Ω. With a 10 pf capacitance the leakage time constant is 10 ms. ata elect C AMs have the advantage of permitting greater memory density since there is only one FET per bit as opposed to 4 FETs in a gated flip-flop. The disadvantage is primarily the added circuitry needed to make sure that the leaking capacitors are repeatedly recharged. This requires regular reading and rewriting of all the memory bits on the chip. LABOATOY ELECTONIC II 18 of 19

ead-only Memory (OM) OMs are nonvolatile memory chips. V elect ata The transistor in the shaded box either exists or is burned leaving an open connection. If the transistor is present a select gives a 0, otherwise it gives a 1. They are best used for applications where one wants a hardwired pattern to always be present (eg. startup program sequences, character generators, basic system instructions). POM stands for programmable read-only memory. An eraseable POM (EPOM) has circuitry to undo the burned connection. LABOATOY ELECTONIC II 19 of 19