Decade Counters Mod-5 counter: Decade Counter:

Similar documents
Counters

WINTER 15 EXAMINATION Model Answer

MODULE 3. Combinational & Sequential logic

RS flip-flop using NOR gate

UNIT-3: SEQUENTIAL LOGIC CIRCUITS

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified)

Chapter 4. Logic Design

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified) WINTER 2018 EXAMINATION MODEL ANSWER

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

Sequential Digital Design. Laboratory Manual. Experiment #7. Counters

CHAPTER 6 COUNTERS & REGISTERS

Experiment 8 Introduction to Latches and Flip-Flops and registers

Logic Design Viva Question Bank Compiled By Channveer Patil

WINTER 14 EXAMINATION

Module -5 Sequential Logic Design

Chapter 3: Sequential Logic Systems

Digital Fundamentals: A Systems Approach

CHAPTER 4: Logic Circuits

Chapter 7 Counters and Registers

Analogue Versus Digital [5 M]

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

CHAPTER 4: Logic Circuits

Flip Flop. S-R Flip Flop. Sequential Circuits. Block diagram. Prepared by:- Anwar Bari

ASYNCHRONOUS COUNTER CIRCUITS

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

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

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.

Asynchronous (Ripple) Counters

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

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

BISHOP ANSTEY HIGH SCHOOL & TRINITY COLLEGE EAST SIXTH FORM CXC CAPE PHYSICS, UNIT 2 Ms. S. S. CALBIO NOTES lesson #39

2. Counter Stages or Bits output bits least significant bit (LSB) most significant bit (MSB) 3. Frequency Division 4. Asynchronous Counters

EKT 121/4 ELEKTRONIK DIGIT 1

RS flip-flop using NOR gate

Vignana Bharathi Institute of Technology UNIT 4 DLD

Asynchronous Counter

(CSC-3501) Lecture 7 (07 Feb 2008) Seung-Jong Park (Jay) CSC S.J. Park. Announcement

B. Sc. III Semester (Electronics) - ( ) Digital Electronics-II) BE-301 MODEL ANSWER (AS-2791)

Counter dan Register

MODEL QUESTIONS WITH ANSWERS THIRD SEMESTER B.TECH DEGREE EXAMINATION DECEMBER CS 203: Switching Theory and Logic Design. Time: 3 Hrs Marks: 100

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

VTU NOTES QUESTION PAPERS NEWS RESULTS FORUMS Registers

ELE2120 Digital Circuits and Systems. Tutorial Note 8

Chapter 6 Registers and Counters

Solution to Digital Logic )What is the magnitude comparator? Design a logic circuit for 4 bit magnitude comparator and explain it,

DIGITAL ELECTRONICS MCQs

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

Scanned by CamScanner

UNIVERSITI TEKNOLOGI MALAYSIA

Final Exam review: chapter 4 and 5. Supplement 3 and 4

1. Convert the decimal number to binary, octal, and hexadecimal.

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

QUICK GUIDE COMPUTER LOGICAL ORGANIZATION - OVERVIEW

MC9211 Computer Organization

Chapter 2. Digital Circuits

Long and Fast Up/Down Counters Pushpinder Kaur CHOUHAN 6 th Jan, 2003

Sequential Logic Circuits

THE KENYA POLYTECHNIC

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous)

Digital Circuits 4: Sequential Circuits

ECB DIGITAL ELECTRONICS PROJECT BASED LEARNING PROJECT REPORT ON 7 SEGMENT DIGITAL STOP WATCH USING DECODER

St. MARTIN S ENGINEERING COLLEGE

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad ELECTRICAL AND ELECTRONICS ENGINEERING

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

Review of digital electronics. Storage units Sequential circuits Counters Shifters

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

Section 6.8 Synthesis of Sequential Logic Page 1 of 8

Registers and Counters

1 Hour Sample Test Papers: Sample Test Paper 1. Roll No.

1. a) For the circuit shown in figure 1.1, draw a truth table showing the output Q for all combinations of inputs A, B and C. [4] Figure 1.

Logic Design. Flip Flops, Registers and Counters

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District UNIT-III SEQUENTIAL CIRCUITS

TYPICAL QUESTIONS & ANSWERS

TIME SCHEDULE. MODULE TOPICS PERIODS 1 Number system & Boolean algebra 17 Test I 1 2 Logic families &Combinational logic

Registers and Counters

Other Flip-Flops. Lecture 27 1

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

MODULAR DIGITAL ELECTRONICS TRAINING SYSTEM

MODU LE DAY. Class-A, B, AB and C amplifiers - basic concepts, power, efficiency Basic concepts of Feedback and Oscillation. Day 1

Find the equivalent decimal value for the given value Other number system to decimal ( Sample)

Chapter 9 Counters. Clock Edge Output Q 2 Q 1 Q

EE292: Fundamentals of ECE

Unit 11. Latches and Flip-Flops

Switching Theory And Logic Design UNIT-IV SEQUENTIAL LOGIC CIRCUITS

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

Chapter 5: Synchronous Sequential Logic

PHYSICS 5620 LAB 9 Basic Digital Circuits and Flip-Flops

ME 515 Mechatronics. Introduction to Digital Electronics

Lecture 8: Sequential Logic

Synchronous Sequential Logic

Chapter 3. Boolean Algebra and Digital Logic

Experiment # 9. Clock generator circuits & Counters. Digital Design LAB

CHAPTER1: Digital Logic Circuits

UNIT IV. Sequential circuit

Digital Systems Laboratory 3 Counters & Registers Time 4 hours

The basic logic gates are the inverter (or NOT gate), the AND gate, the OR gate and the exclusive-or gate (XOR). If you put an inverter in front of

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified) MODEL ANSWER

Fig1-1 2-bit asynchronous counter

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

Chapter 3 Unit Combinational

Transcription:

Decade Counters We can design a decade counter using cascade of mod-5 and mod-2 counters. Mod-2 counter is just a single flip-flop with the two stable states as 0 and 1. Mod-5 counter: A typical mod-5 counter is shown below. Fig (a) shows the truth table, and how the count increases from 000 to 100, and then back to 000. A typical arrangement consisting of JK flip flops is shown in Fig (b). Working: The FF A toggles every time as long as C is zero. If C is 1 then it remains reset at next clock. This is achieved by keeping K A tied to 1 while J A is connected to C. (C means C-bar). FF B toggles every time A goes from 1 to 0. This is achieved by keeping both J B & K B and tied to 1, while clock input is driven by A. FF C toggles every time BA transitions from 11 to 00. This is achieved by ANDing B with A, and connecting the output to J C, while K C is tied to 1, and FF C is triggered by Clock. The resulting timing waveforms are shown in Fig (b). The modular logic block reference is shown in Fig (d). Decade Counter: The decade counter (mod-10) is used more often. The reason for its popularity stems from the fact that the numbers system that is widely used is the decimal number system. In order to count from 0 to 9 we require 4 flip-flops. One can count 0 to 15 using 4 flip-flops. Out of these 16 states, we should skip 6 states, i.e. after 9 th count, the counter has to reset and fresh count has to start. The counting sequence is summarized by the state diagram shown in the figure below. 1

The truth table, timing diagrams and circuit connections are shown below in Fig a,b & c respectively. The counter is a binary counter, i.e. the count sequence increments sequentially from 0000 to 1001. A is mod-2 FF/counter, while FFs BCD from mod-5 counter. This arrangement is called a cascade of 2x5 counters. Another arrangement of decade counter is possible, 5x2 counter which is shown below. The count sequence as shown in the truth table is a biquinary sequence, and not a binary sequence. Eg: 1000 means ( 1 =5 + 000 =0) = 6, and ( 1 =5 + 100 =4) = 9. The MSB is either 0/1 which is 0/5, while last three bits are 3-bit binary numbers. 2

7490 Decade Counter: Decade counters are available commercially as monolithic ICs. One of them is shown below. It can be operated either as a binary decade counter or as a biquinary decade counter, based on the way inputs A and B are connected. If Q A is connected to input B, then we have a binary counter. If Q D is connected to input A, then we have a biquinary counter. Also keenly observe the MSB and LSB outputs in both cases. (Q A Q B Q C Q D ) from the truth table. 3

The importance of using IC decade counters is demonstrated in the figure below, where we show a cascade of three 7490 decade counters. The LSB (rightmost IC) is always clocked by an external clock pulse, which increments the count from 0000 (Decimal 0) for every clock pulse. Once the count reaches 1001 (Decimal 9), the negative going pulse of output D ( 1 to 0, since 1001 to 0000 ) increments the middle counter by 1. So every time the LSB counter counts ten, the middle counter increments. Similarly the MSB counter increments every time middle counter goes from 1001 to 0000. Thus we can call this cascade as Hundreds, Tens, and Units counters. We thus have a decimal counter capable of counting from 000 to 999. We can cascade any number of such counters, which are widely used as voltage meters, counters etc. Presettable Counters: The 74163 is a synchronous presettable binary up counter. It is a 16-pin DIP and its pinout is shown below. The 74163 is a synchronous presettable binary counter which features an internal lookahead carry and can be used for high-speed counting. Synchronous operation is provided by having all flip-flops clocked simultaneously on the positive-going edge of the clock (CK). The outputs (Q A to Q D ) of the counters may be preset to a HIGH or LOW level. A LOW level at the Load input disables the counting action and causes the data at the data inputs (A to D) to be loaded into the counter on the positive-going edge of the clock. For the 74163 the clear function is synchronous and active when low. A LOW level at the clear input sets all four outputs of the flip-flops to LOW level after the next positive- 4

going transition on the clock (CK) input. The look-ahead carry simplifies serial cascading of the counters. Both enable inputs (P and T) must be HIGH to count. The synchronous reset feature enables the designer to modify the maximum count with only one external NAND gate. The look-ahead carry simplifies serial cascading of the counters. Both enable inputs (P and T) must be HIGH to count. An example of a decade counter is shown below, using NAND gate logic to control input clear. The dotted states are the omitted states, and rest are all stable states (0 to 9). Another popular counter is the 74193 Synchronous Up-Down Counter. Its logical diagram with state diagram (+ sequence) is shown below. It can count UP/DOWN based on whether the clock is given to CP U /CP D. The preset inputs are P A to P D while the outputs are Q A to Q D. The carry out is taken from either TC U or TC D. MR is the master reset, while PL is the asynchronous, active low, preset load control input. An example of decade counter using NAND gate and PL is shown below. The difference from previous counter (74163) is that, 74193 has an asynchronous PL. So the moment the logic evaluates to 15 ( 1111 ), the counter loads preset input 1001 without waiting for the clock edge. Thus 15 is an unstable state, and is also referred to as a glitch. (shown in dotted circle) 5

Counter design as a synthesis problem We need to design a modulo-6 counter, the counting states (memory values) of which are shown in state transition diagram. We need three memory elements or flipflops for this as with n flip-flop we can get at most 2 n number of different counting states. We shall consider the design challenge as that of a finite state machine. Let us select JK flip flops, and try to list the state transition diagram, and also the required values of inputs J & K for all flip flops. C n B n A n C n+1 B n+1 A n+1 J C K C J B K B J A K A 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 0 1 1 0 X X 0 1 X 0 1 1 1 0 0 1 X X 1 X 1 1 0 0 1 0 1 X 0 0 X 1 X 1 0 1 0 0 0 X 1 0 X X 1 The observation of J A and K A leads us to the solution J A =K A =1. We shall use K-map technique to solve for other inputs as shown below. 6

The final circuit diagram is shown below. The carry out (Y) is generated by ANDing of complement outputs of all flip flops. Whenever the counter transitions from 101 to 000, the complement outputs are 111. 7

D/A Conversion and A/D Conversion A digital-to-analog converter, or simply DAC, is a semiconductor device that is used to convert a digital code into an analog signal. Digital-to-analog conversion is the primary means by which digital equipment such as computer-based systems are able to translate digital data into real-world signals that are more understandable to or useable by humans, such as music, speech, pictures, video, and the like. It also allows digital control of machines, equipment, household appliances, and the like. Binary equivalent weight: The fraction of weight pushed by a binary digit across voltage. The requirement of conversion from digital to analog for a 3 bit system is shown below. If the number of bits increases, the bit weights also modify as shown below for a 4-bit DAC method. For a 3-bit system the LSB weight is 1/7, and for a 4-bit system it is 1/15. Thus, in general the weight of LSB starts from 1 / (2 n -1). The requirement is that of a resistive ladder that can generate voltages as shown below. The resistor divider must do two things to change the digital input into an equivalent analog output voltage. 8

The 2 0 bit must be changed to +1V, and 2 1 bit must be changed to +2V, and 2 2 bit must be changed to +4V. These three voltages representing the digital bits must be summed together to form the analog output voltage. We shall study 2-methods for this resistive divider, Variable Resistor and Binary Ladder Networks. Variable Resistive Divider The variable resistive divider network shown below is for a 3-bit DAC. The LSB has a resistance of R 0, while all successive resistors are half of their previous resistor. R L is load resistor which is very large to prevent loading, and can thus be ignored in calculations. An example for input of 001; is shown below with connections and necessary voltage equations using Millers theorem. Thus the analog output is +1 V which is desired for a digital input of 001, which is 1 LSB. In general for any other digital input, the value of analog output is given by the following expression. Disadvantages: Difficulty in choosing resistors, and uneven current distribution (LSB has lowest current, while MSB has highest current). 9

Binary Ladder Network The binary ladder is a resistive network whose output voltage is a properly weighted sum of the digital inputs. It consists of only R and 2R values of resistors, and the current is uniform for all inputs. The example input of 1000 leads to the following circuit simplifaication, and hence output voltage. Similarly, the analog outputs for each bit as weight can be calculated, and is shown in below table. In general for any other digital input, the value of analog output is given by the following expression. 10

4-bit D/A Converter The actual circuitry of DAC includes other components apart from resistive divider as shown below for a 4-bit D/A converter. The registers load the inputs to the resistive divider, while the level amplifiers ensure appropriate voltage levels to minimize errors during conversion. D/A Accuracy and Resolution The accuracy of the D/A converter is primarily a function of the accuracy of the precision resistors used in the ladder and the precision of the reference voltage supply used. Accuracy is the measure of how close the actual output voltage is to the theoretical output voltage. Resolution, on the other hand, defines the smallest increment in voltage that can be discerned, which is LSB. Resolution is primarily a function of the number of bits in the digital input signal. 11

Simultaneous A/D Conversion The process of converting an analog voltage into an equivalent digital signal is known as analog-to-digital conversion. There are various techniques for conversion, based on conversion time and hardware resources needed. Some of them even use a D/A converter in the architecture. The concept of simultaneous conversion is the simplest one. Shown below is the logic for A/D conversion. The three comparators are connected to the analog input voltage simultaneously, while their other inputs are V/4, V/2 and 3V/4 as shown. If the input analog voltage is between 0 and V/4, then all the comparators output are 0. The outputs change as shown in the table (b). This circuit can detect four voltage ranges, and thus needs only 2-bits. The final arrangement of decoding the three comparator outputs to two binary output signals is shown below. Since the analog input is simultaneously converted to digital output, this converter is also called Flash A/D Converter. It is the fastest of all A/D comparators. Disadvantage: As the number of bits increase the number of comparators needed also increases. For eg: A 10-bit ADC needs 2 10-1=1023 comparators, which is unmanageable. 12

Counter type A/D Converter This architecture needs a single comparator and a DAC as shown below. The counter starts with all 0 s, and is incremented till it becomes equal to the analog input. This is achieved by first converting the counter output to analog using a DAC, and using a comparator as shown. Once the DAC output becomes either equal or slightly greater than analog input voltage, the comparator stops further increment of counter, and the counter is now the digital equivalent of analog input. Disadvantage: Conversion time is very slow, and has a worst case value of 2 n comparisons. Also every time the counter begins from all 0 s. For eg: A 10-bit ADC needs 1024 comparisons. If each comparison needs one clock period, then for a 1 MHz clock the conversion time is 1024 μs. Continuous A/D converter The need to start from all 0 s for the counter does not arise, if we can track the new analog input to be converted from our previous count itself. In this case, we may need an up/down counter. The necessary circuit arrangement is shown below. (Tracking ADC) 13

Disadvantage: Even though the conversion time is just one clock cycle once the circuit tracks the analog input, we cannot use a single ADC to convert multiple channels of analog input, where we essentially use a multiplexer. Since we lose the tracking information once we multiplex to another analog input. The solution is SAR ADC. Successive Approximation Converter The circuit diagram and logic explanation (hunting) is shown below. The only change in this design is a very special counter circuit known as a successiveapproximation register. Instead of counting up in binary sequence, this register counts by trying all values of bits starting with the most-significant bit and finishing at the leastsignificant bit. Throughout the count process, the register monitors the comparator s output to see if the binary count is less than or greater than the analog signal input, adjusting the bit values accordingly. The way the register counts is identical to the trialand-fit method of decimal-to-binary conversion, whereby different values of bits are tried from MSB to LSB to get a binary number that equals the original decimal number. The advantage to this counting strategy is much faster results: the DAC output converges on the analog signal input in much larger steps than with the 0-to-full count sequence of a regular counter. A/D Accuracy and Resolution Since the A/D converter is a closed-loop system involving both analog and digital systems, the overall accuracy must include errors from both the analog and digital positions. In determining the overall accuracy it is easiest to separate the two sources of error. Quantization error: The error inherited in any digital system due to the size of the LSB. Differential linearity: It is the measure of the variation in voltage-step size that causes the converter to change from one state to the next. 14