Analog-to-Digital Conversion

Similar documents
Data Converter Overview: DACs and ADCs. Dr. Paul Hasler and Dr. Philip Allen

Interfacing Analog to Digital Data Converters. A/D D/A Converter 1

Introduction to Mechatronics. Fall Instructor: Professor Charles Ume. Analog to Digital Converter

Decade Counters Mod-5 counter: Decade Counter:

Analog to Digital Converter. Last updated 7/27/18

Analog Input & Output

Analog to Digital Conversion

EECS 373 Design of Microprocessor-Based Systems

Analogue Inputs Resolution Assignment

Converters: Analogue to Digital

WINTER 15 EXAMINATION Model Answer

PHYS 3322 Modern Laboratory Methods I Digital Devices

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

Chapter 14 D-A and A-D Conversion

ระบบคอมพ วเตอร และการเช อมโยง Computer Systems and Interfacing บทท 1 พ นฐานด จ ตอล

INF4420 Project Spring Successive Approximation Register (SAR) Analog-to-Digital Converter (ADC)

AD9884A Evaluation Kit Documentation

B I O E N / Biological Signals & Data Acquisition

CATHODE RAY OSCILLOSCOPE. Basic block diagrams Principle of operation Measurement of voltage, current and frequency

Embedded System Hardware

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous)

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

«Trends in high speed, low power Analog to Digital converters»

Data Conversion and Lab (17.368) Fall Lecture Outline

successive approximation register (SAR) Q digital estimate

Digital Fundamentals. Introduction to Digital Signal Processing

EECS 270 Midterm 2 Exam Closed book portion Fall 2014

4.9 BEAM BLANKING AND PULSING OPTIONS

The Successive Approximation Converter Concept - 8 Bit, 5 Volt Example

ELCT706 MicroLab Session #3 7-segment LEDs and Analog to Digital Conversion. Eng. Salma Hesham

Digital Circuits. Innovation Fellows Program

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

DIGITAL ELECTRONICS MCQs

MBI5152 Application Note

Converting between Analog and Digital Domains

Note 5. Digital Electronic Devices

Tutorial on Technical and Performance Benefits of AD719x Family

Department of Communication Engineering Digital Communication Systems Lab CME 313-Lab

International Islamic University Chittagong (IIUC) Department of Electrical and Electronic Engineering (EEE)

Computer Graphics Hardware

Theory and Practice of Tangible User Interfaces. Thursday Week 3: Analog Input. week. Sensor 1: Potentiometers. Analog input

Experiment 9 Analog/Digital Conversion

Chapter 11 Sections 1 3 Dr. Iyad Jafar

Computer Graphics: Overview of Graphics Systems

Specifications for Thermopilearrays HTPA8x8, HTPA16x16 and HTPA32x31 Rev.6: Fg

Section 6.8 Synthesis of Sequential Logic Page 1 of 8

WINTER 14 EXAMINATION

FMS3810/3815 Triple Video D/A Converters 3 x 8 bit, 150 Ms/s

Digital Signal. Continuous. Continuous. amplitude. amplitude. Discrete-time Signal. Analog Signal. Discrete. Continuous. time. time.

Displays. History. Cathode ray tubes (CRTs) Modern graphics systems. CSE 457, Autumn 2003 Graphics. » Whirlwind Computer - MIT, 1950

The Cathode Ray Tube

Hello and welcome to this presentation of the STM32L4 Analog-to-Digital Converter block. It will cover the main features of this block, which is used

Introduction to Signal Processing D R. T A R E K T U T U N J I P H I L A D E L P H I A U N I V E R S I T Y

ADC Peripheral in Microcontrollers. Petr Cesak, Jan Fischer, Jaroslav Roztocil

Part 1: Introduction to Computer Graphics

Introduction to Digital Logic Missouri S&T University CPE 2210 Introduction and Application Areas

Flip-Flops A) Synchronization: Clocks and Latches B) Two Stage Latch C) Memory Requires Feedback D) Simple Flip-Flop Gate

MIE 402: WORKSHOP ON DATA ACQUISITION AND SIGNAL PROCESSING Spring 2003

CPE 310L EMBEDDED SYSTEM DESIGN (CPE)

nc... Freescale Semiconductor, I

Computer Graphics. Raster Scan Display System, Rasterization, Refresh Rate, Video Basics and Scan Conversion

Swept-tuned spectrum analyzer. Gianfranco Miele, Ph.D

LABORATORY 14: ANALOG TO DIGITAL CONVERSION USING ADC0809

CHAPTER 4 OSCILLOSCOPES

Adding Analog and Mixed Signal Concerns to a Digital VLSI Course

Types of CRT Display Devices. DVST-Direct View Storage Tube

CDK3402/CDK bit, 100/150MSPS, Triple Video DACs

Future of Analog Design and Upcoming Challenges in Nanometer CMOS

THE OPERATION OF A CATHODE RAY TUBE

Video Graphics Array (VGA)

6.111 Project Proposal IMPLEMENTATION. Lyne Petse Szu-Po Wang Wenting Zheng

Data Representation. signals can vary continuously across an infinite range of values e.g., frequencies on an old-fashioned radio with a dial

Transducers and Sensors

THE OPERATION OF A CATHODE RAY TUBE

University of Utah Electrical & Computer Engineering Department ECE1050/1060 Oscilloscope

16 Stage Bi-Directional LED Sequencer

Trial version. Analogue to Digital Conversion in Distance Measurement

The reduction in the number of flip-flops in a sequential circuit is referred to as the state-reduction problem.

Analog input and output

Analog Circuits Prof. Nagendra Krishnapura Department of Electrical Engineering Indian Institute of Technology, Madras. Module - 04 Lecture 12

Digital Electronics II 2016 Imperial College London Page 1 of 8

110 MHz 256-Word Color Palette 15-, 16-, and 24-Bit True Color Power-Down RAMDAC

Workshop III: Analog and Sensors

Lab 1 Introduction to the Software Development Environment and Signal Sampling

Analog-to-Digital Conversion (Part 2) Microcomputer Architecture and Interfacing Colorado School of Mines Professor William Hoff

Contact Image Sensor (CIS) Module. All specifications of this device are subject to change without notice.

Portable USB Potentiostat Low-Current Portable USB Potentiostat Extended Voltage USB Potentiostat

3. Displays and framebuffers

QUICK START GUIDE FOR DEMONSTRATION CIRCUIT /12/14 BIT 10 TO 105 MSPS ADC

Introduction to Data Conversion and Processing

Complete 10-Bit/12-Bit, 25 MHz CCD Signal Processor AD9943/AD9944

TMC3503 Triple Video D/A Converter 8 bit, 80 Msps, 5V

Session 1 Introduction to Data Acquisition and Real-Time Control

TV Character Generator

(Refer Slide Time 1:58)

PESIT Bangalore South Campus

OBSOLETE. CMOS 80 MHz Monolithic (18) Color Palette RAM-DACs ADV478/ADV471

-SQA-SCOTTISH QUALIFICATIONS AUTHORITY HIGHER NATIONAL UNIT SPECIFICATION GENERAL INFORMATION

Data Acquisition Using LabVIEW

Analogue Versus Digital [5 M]

Transcription:

ADC-DAC ผศ.ดร. ส ร นทร ก ตต ธรก ล และ อ.สรย ทธ กลมกล อม ภาคว ชาว ศวกรรมคอมพ วเตอร คณะว ศวกรรมศาสตร สถาบ นเทคโนโลย พระจอมเกล าเจ าค ณทหารลาดกระบ ง Computer Interfacing, KMITL ADC-DAC 1 Analog-to-Digital Conversion Terminology analog: continuously valued signal, such as temperature or speed, with infinite possible values in between digital: discretely valued signal, such as integers, encoded in binary analog-to-digital converter: ADC, A/D, A2D; converts an analog signal to a digital signal digital-to-analog converter: DAC, D/A, D2A An embedded system s surroundings typically involve many analog signals. Computer Interfacing, KMITL ADC-DAC 6-2

V max% = 7.5V 7.0V 6.5V 6.0V 5.5V 5.0V 4.5V 4.0V 3.5V 3.0V 2.5V 2.0V 1.5V 1.0V 0.5V 0V 1111 1110 1101 1100 1011 1010 1001 1000 0111 0110 0101 0100 0011 0010 0001 0000 Analog-to-digital converters analog input (V) 4 3 2 1 time t1 t2 t3 t4 0100 0110 0110 0101 Digital output analog output (V) 4 3 2 1 time t1 t2 t3 t4 0100 1000 0110 0101 Digital input proportionality analog to digital digital to analog Embedded Systems Design: A Unified Hardware/Software Introduction, (c) 2000 Vahid/Givargis Computer Interfacing, KMITL ADC-DAC 6-3 Proportional Signals Simple Equation Vmax 1..1#=#2 n )1 Assume minimum voltage of 0 V. Vmax = maximum voltage of the analog signal a = analog value n = number of bits for digital encoding 2 n = number of digital codes M = number of steps, either 2 n or 2 n 1 d = digital encoding a / Vmax = d / M 0&V 0..0#=#0 Computer Interfacing, KMITL ADC-DAC 6-4

Resolution Let n = 2 Vmax 3=11 M = 2 n 1 r 3 steps on the digital scale d 0 = 0 = 0b00 d Vmax = 3 = 0b11 2=10 3=11 M = 2 n 2=10 4 steps on the digital scale d 0 = 0 = 0b00 d Vmax - r = 3 = 0b11 (no d Vmax ) 1=01 1=01 r, resolution: smallest analog change resulting from changing one bit 0#V 0=00 0=00 Computer Interfacing, KMITL ADC-DAC 6-5 DAC vs. ADC DAC: n digital inputs for digital encoding d analog input for Vmax analog output a x0 x1 Xn-1 Vmax DAC a ADC: Given a Vmax analog input and an analog input a, how does the converter know what binary value to assign to d in order to satisfy the ratio? may use DAC to generate analog values for comparison with a ADC guesses an encoding d, then checks its guess by inputting d into the DAC and comparing the generated analog output a with original analog input a How does the ADC guess the correct encoding? Computer Interfacing, KMITL ADC-DAC 6-6

Applications Audio Speech recognition special effects (reverb, noise cancellation, etc) Video Filtering Special effects Compression Data logging Computer Interfacing, KMITL ADC-DAC 6-7 Digital Signal Processing Vref 0 Analog signal (time varying, continuous) Analog-to- Digital Converter (ADC) Incoming samples 0x030, 0x4A, 0x12, 0xAF, etc. Time Vref 0 new waveform Digital-to- Analog Converter (DAC) 0x0B3, 0x23, 0xCF, 0x78, etc. µprocessor performs computation Time Outgoing samples Computer Interfacing, KMITL ADC-DAC 6-8

Vocabulary ADC (Analog-to-Digital Converter) converts an analog signal (voltage/current) to a digital value DAC (Digital-to-Analog Converter) converts a digital value to an analog value (voltage/current) Sample period for ADC, time between each conversion Typically, samples are taken at a fixed rate Vref (Reference Voltage) analog signal varies between 0 and Vref, or between +/- Vref Resolution number of bits used for conversion (8 bits, 10 bits, 12 bits, 16 bits, etc). Conversion Time the time it takes for a analog-to-digital conversion Computer Interfacing, KMITL ADC-DAC 6-9 Notice the concept of bit weight in the last example: bit 7 = 7.5 V = 15/2 bit 6 = 3.75 V = 15/4 Bit Weight Each bit is weighted with an analog value, such that a 1 in that bit position adds its analog value to the total analog value represented by the digital encoding. Example: -5 V to +5 V analog range, n=8 Digital#Bit 7 10/2%=%5 Bit#Weight#(V) 6 10/4%=%2.5 5 10/8%=%1.25 4 10/16%=%0.625 3 10/32%=%0.313 2 10/64%=%0.157 1 10/128%=%0.078 0 10/256%=%0.039 Computer Interfacing, KMITL ADC-DAC 6-10

Example (continued): -5 V to +5 V analog range, n=8 Bit Weight Analog#(V) Digital#(hex) 45 00 Digital numbers for a few analog values Values shown increment by 6 bits (weight for bit position 5 is 1.25 V) Maximum digital number only approximates the maximum analog value in the range Try (-5) + sum of all bit weights 43.75 20 42.5 40 41.25 60 0 80 1.25 A0 2.5 C0 3.75 E0 540.039%=%4.961 FF Computer Interfacing, KMITL ADC-DAC 6-11 Sample ADC Computations If Vref = 5V, and the 10-bit A/D output code is 0x12A, what is the ADC input voltage? output_code/2 N * Vref = (0x12A)/2 10 * 5 V = 298/1024 * 5 V = 1.46 V (Vin) If Vref = 5V, and the upper 8 bits of the A/D output code is 0xA9, what is the ADC input voltage? output_code/2 N * Vref = (0xA9)/2 8 * 5 V = 169/256 * 5 V = 3.3 V (Vin) If Vref = 4V, and the A/D input voltage is 2.35 V, what is the ADC output code, upper 8-bits? Vin/ Vref * 2 N = 2.35 V/ 4 V * 2 8 =.5875 * 256 = 150.4 = 150 = 0x96 Computer Interfacing, KMITL ADC-DAC 6-12

A 1-bit ADC Vref analog signal Vdd R Vref/2 Vin + - Vout=Vdd is Vin > Vref/2 Vout=0 if Vin < Vref/2 R digital signal comparator Computer Interfacing, KMITL ADC-DAC 6-13 R R R R Vin + - 3/4Vref Vin Vin + - 1/2Vref + - 1/4Vref A B C A 2-bit ADC A B C D1 D0 ------------- 0 0 0 0 0 0 0 1 0 1 0 1 1 1 0 1 1 1 1 1 (other codes don t cares) Encoding logic D[1:0] Computer Interfacing, KMITL ADC-DAC 6-14

ADC Architectures The previous architectures are called Flash ADCs Fastest possible conversion time Requires the most transistors of any architecture N-bit converter requires 2 N -1 comparators. Commercially available flash converters up to 12 bits. Conversion done in one clock cycle Successive approximation ADCs Use only one comparator Take one clock cycle per bit High precision (16-bit converters are available) Computer Interfacing, KMITL ADC-DAC 6-15 Output is Q[N]. Successive Approximation ADC First, set DAC to produce Vref/2. Output of Comparator is Q[N- 1] (MSB) If MSB =1, then Vin between Vref and Vref/2, so set DAC to produce ¾ Vref. If MSB=0, then Vin between Vref/2 and 0, so set DAC to ½ Vref. Output of comparator is now Q[N-2]. Do this for each bit. Takes N cycles. From Computer http://www.allaboutcircuits.com Interfacing, KMITL ADC-DAC 6-16

ADC, DAC Equations ADC: Vin = input voltage, Vref = reference voltage N = number of bits of precision Vref Vin/ Vref * 2 N = output_code output_code/ 2 N * Vref = Vin 1 LSB = Vref/2 N Vin ADC N output code DAC: Vout = output voltage, Vref = reference voltage, N = number of bits of precision Vout/ Vref * 2 N = input_code input_code/ 2 N * Vref = Vout 1 LSB = Vref/2 N input code Vref N DAC Vout Computer Interfacing, KMITL ADC-DAC 6-17 ADC: Digital Encoding Guessing the encoding is similar to finding an item in a list. 1. Sequential search counting up: start with an encoding of 0, then 1, then 2, etc. until find a match. 2 n comparisons: Slow! 2. Binary search successive approximation: start with an encoding for half of maximum; then compare analog result with original analog input; if result is greater (less) than the original, set the new encoding to halfway between this one and the minimum (maximum); continue dividing encoding range in half until the compared voltages are equal n comparisons: Faster, but more complex converter! Takes time to guess the encoding: start conversion input, conversion complete output Computer Interfacing, KMITL ADC-DAC 6-18

ADC using successive approximation Given an analog input signal whose voltage should range from 0 to 15 volts, and an 8-bit digital encoding, calculate the correct encoding for 5 volts. Then trace the successive-approximation approach to find the correct encoding. Assume M = 2 n 1 a / Vmax = d / M 5 / 15 = d / (256-1) d = 85 or binary 01010101 Computer Interfacing, KMITL ADC-DAC 6-19 ADC using successive approximation Step 1-4: determine bits 0-3 ½(V max V min ) = 7.5 volts V max = 7.5 volts. ½(7.5 + 0) = 3.75 volts V min = 3.75 volts. ½(7.5 + 3.75) = 5.63 volts V max = 5.63 volts ½(5.63 + 3.75) = 4.69 volts V min = 4.69 volts. 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 1 0 0 0 0 Embedded Systems Design: A Unified Hardware/Software Introduction, (c) 2000 Vahid/Givargis Computer Interfacing, KMITL ADC-DAC 6-20

ADC using successive approximation Step 5-8: Determine bits 4-7 ½(5.63 + 4.69) = 5.16 volts V max = 5.16 volts. ½(5.16 + 4.69) = 4.93 volts V min = 4.93 volts. ½(5.16 + 4.93) = 5.05 volts V max = 5.05 volts. ½(5.05 + 4.93) = 4.99 volts 0 1 0 1 0 0 0 0 0 1 0 1 0 1 0 0 0 1 0 1 0 1 0 0 0 1 0 1 0 1 0 1 Embedded Systems Design: A Unified Hardware/Software Introduction, (c) 2000 Vahid/Givargis Computer Interfacing, KMITL ADC-DAC 6-21 Constructing ADC Analog input State machine Vmax Vmin DAC Timing control SAR BUF Digital output Comparator SAR SAR: Successive approximation register Computer Interfacing, KMITL ADC-DAC 6-22

Digital-to-Analog Conversion For a particular binary code, output a voltage between 0 and Vref Vref D[7:0] Vout DAC Assume a DAC that uses an unsigned binary input code, with 0 < Vout < Vref. Then D= 0000 0000 Vout = 0V D= 0000 0001 Vout = Vref(1/256 ) (one LSB) D = 0000 0010 Vout = Vref(2/256)... D = 1111 1111 Vout = Vref(255/256) (full scale) Computer Interfacing, KMITL ADC-DAC 6-23 Vout DAC Output Plot Output signal increases in 1 LSB increments. 4/256 Vref 3/256 Vref 2/256 Vref 1/256 Vref 0 1 2 3 Input code Computer Interfacing, KMITL ADC-DAC 6-24

Sample DAC Computations If Vref = 5V, and the 8-bit input code is is 0x8A, what is the DAC output voltage? input_code/2 N * Vref = (0x8A)/2 8 * 5 V = 138/256 * 5 V = 2.70 V (Vout) If Vref = 4V, and the DAC output voltage is 1.25 V, what is the 8-bit input code? Vout/ Vref * 2 N = 1.25 V/4 V * 2 8 = 0.3125 * 256 = 80 = 0x50 (input_code) Computer Interfacing, KMITL ADC-DAC 6-25 Typical DAC Output From http://www.allaboutcircuits.com Computer Interfacing, KMITL ADC-DAC 6-26

DAC Architecture Operational Amplifier can be used to sum voltages. From http://www.allaboutcircuits.com Computer Interfacing, KMITL ADC-DAC 6-27 DAC Architecture (cont) Note ratios of resistors This is a binary code From http://www.allaboutcircuits.com Computer Interfacing, KMITL ADC-DAC 6-28

DAC Architecture (cont) A 3-bit DAC, called an R/2 N R DAC. Resistors are scaled by powers of 2 (this is hard to do in practice). From http://www.allaboutcircuits.com Computer Interfacing, KMITL ADC-DAC 6-29 Another View Resistance values are still R, 2R, 4R From http://www.allaboutcircuits.com Computer Interfacing, KMITL ADC-DAC 6-30

R/2R DAC Via circuit analysis, can prove this is an equivalent circuit. Now only need resistances of R, 2R this is easy to do. This is the most common DAC architecture. From http://www.allaboutcircuits.com Computer Interfacing, KMITL ADC-DAC 6-31 R G B 8 8 8 DAC DAC DAC Red Green Blue High speed video DACs produce RGB signals for color CRT DAC Application Cathode Grid Vertical Deflection Horizontal Deflection Phosper Electron Beams (Red, Green Blue) Computer Interfacing, KMITL ADC-DAC 6-32

What do you have to know? Vocabulary DAC R/2N architecture ADC Flash, Successive approximation architectures STM32 A/D How to configure Acquisition, Conversion time How to start do conversion, read result Computer Interfacing, KMITL ADC-DAC 6-33 ADC (Analog to Digital Converter) Input Computer Interfacing, KMITL ADC-DAC 6-34

Computer Interfacing, KMITL ADC-DAC 6-35