CE 478: Microcontroller Systems University of Wisconsin-Eau Claire Dan Ernst Analog to Digital (and back again) Interfacing a microprocessor-based system.

Slides:



Advertisements
Similar presentations
EET260 Introduction to digital communication
Advertisements

Analog to Digital Conversion (ADC)
Analog-to-Digital Converter (ADC) And
Lecture 17: Analog to Digital Converters Lecturers: Professor John Devlin Mr Robert Ross.
Digital to Analog and Analog to Digital Conversion
Digital Fundamentals Tenth Edition Floyd Chapter 12.
Announcements Assignment 8 posted –Due Friday Dec 2 nd. A bit longer than others. Project progress? Dates –Thursday 12/1 review lecture –Tuesday 12/6 project.
4-Integrating Peripherals in Embedded Systems (cont.)
LSU 06/04/2007Electronics 71 Analog to Digital Converters Electronics Unit – Lecture 7 Representing a continuously varying physical quantity by a sequence.
5/4/2006BAE Analog to Digital (A/D) Conversion An overview of A/D techniques.
Shuvra Das University of Detroit Mercy
Lecture 9: D/A and A/D Converters
Analogue to Digital Conversion
Interfacing Analog and Digital Circuits
DIGITAL SYSTEMS TCE INTERFACING WITH ANALOG DEVICES (Week 12)
Interfacing with the Analog World Wen-Hung Liao, Ph.D.
1 Dr. Un-ki Yang Particle Physics Group or Shuster 5.15 Amplifiers and Feedback: 3.
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 26.1 Data Acquisition and Conversion  Introduction  Sampling  Signal Reconstruction.
Day of Miscellany ADC/DAC I2C Student presentations.
Analogue to Digital Conversion
Embedded Systems Development and Applications
Introduction to Data Conversion
 Circuit building blocks that compare the strength of two signals (usually Volts) and provide an output signal when one is bigger than the other are.
EET260: A/D and D/A converters
Digital to Analog Converters
1 EECS 373 Design of Microprocessor-Based Systems Prabal Dutta University of Michigan Sampling, ADCs, and DACs Some slides adapted from Mark Brehob, Jonathan.
1 EECS 373 Design of Microprocessor-Based Systems Mark Brehob University of Michigan Sampling, ADCs, and DACs and more Some slides adapted from Prabal.
SIMS-201 Audio Digitization. 2  Overview Chapter 12 Digital Audio Digitization of Audio Samples Quantization Reconstruction Quantization error.
Digital to Analog and Analog to Digital Conversion
Computer Data Acquisition and Signal Conversion Chuck Kammin ABE 425 March 27, 2006.
Digital to Analog Converters
Computer Based Data Acquisition Basics. Outline Basics of data acquisition Analog to Digital Conversion –Quantization –Aliasing.
ADC & DAC Signal Conversions.
ACOE2551 Microprocessors Data Converters Analog to Digital Converters (ADC) –Convert an analog quantity (voltage, current) into a digital code Digital.
1 4-Integrating Peripherals in Embedded Systems (cont.)
Analog to Digital Converters (ADC) 1
Analog to Digital conversion. Introduction  The process of converting an analog signal into an equivalent digital signal is known as Analog to Digital.
Data Acquisition Systems
University of Tehran 1 Interface Design Transforms Omid Fatemi.
Analog to Digital Converters (ADC) Ben Lester, Mike Steele, Quinn Morrison.
Pulse Code Modulation Pulse Code Modulation (PCM) : method for conversion from analog to digital waveform Instantaneous samples of analog waveform represented.
Lecture 15: Digital to Analog Converters Lecturers: Professor John Devlin Mr Robert Ross.
1 EECS 373 Design of Microprocessor-Based Systems Mark Brehob University of Michigan Sampling, ADCs, and DACs and more Some slides adapted from Prabal.
Data Acquisition ET 228 Chapter 15 Subjects Covered Analog to Digital Converter Characteristics Integrating ADCs Successive Approximation ADCs Flash ADCs.
1 Data-Converter Circuits A/D and D/A Chapter 9 1.
Analog/Digital Conversion
Digital to Analog Converter (DAC)
Embedded Systems Design 1 Lecture Set C Interfacing the MCS-51 to: –D/A Converter –A/D Converter.
0808/0809 ADC. Block Diagram ADC ADC0808/ADC Bit μP Compatible A/D Converters with 8-Channel Multiplexer The 8-bit A/D converter uses successive.
Introduction to Data Conversion EE174 – SJSU Tan Nguyen.
EKT 314/4 WEEK 9 : CHAPTER 4 DATA ACQUISITION AND CONVERSION ELECTRONIC INSTRUMENTATION.
Task 2: Define digital and analogue signals
Lecture Notes / PPT UNIT III
Analog-Digital Conversion. Other types of ADC i. Dual Slope ADCs use a capacitor connected to a reference voltage. the capacitor voltage starts at zero.
Analog-Digital Conversion. Analog outputs from sensors and analog front- ends (analog signal conditioning) have to be converted into digital signals.
Digital to analog converter [DAC]
MECH 373 Instrumentation and Measurements
Microprocessors Data Converters Analog to Digital Converters (ADC)
What is a DAC? A digital to analog converter (DAC) converts a digital signal to an analog voltage or current output DAC.
SAR ADC Tao Chen.
Analog-Digital Conversion
EI205 Lecture 13 Dianguang Ma Fall 2008.
Quantization and Encoding
Analog to Digital Converters Electronics Unit – Lecture 7
Lesson 8: Analog Signal Conversion
Conversation between Analogue and Digital System
Sampling and Quantization
Analog-to-digital converter
Chapter 7 Converters.
Presentation transcript:

CE 478: Microcontroller Systems University of Wisconsin-Eau Claire Dan Ernst Analog to Digital (and back again) Interfacing a microprocessor-based system to the real world. Analog and digital signals The bridge: Sampling Theorem Conversion concepts Conversion circuitry

CE 478: Microcontroller Systems University of Wisconsin-Eau Claire Dan Ernst Analog Signals The real world is analog. Signals vary continuously with time. Analog signals take arbitrarily many values. Examples: audio signal from microphone or cassette player video signal from VCR or video camera x/y voltage outputs from joystick time x(t) continuous range

CE 478: Microcontroller Systems University of Wisconsin-Eau Claire Dan Ernst Digital Signals The microprocessor world is digital. Limited number of separate (discrete) values at each time step. Digital signals take only these values, nothing inbetween. Computers: Two values (0 or 1) corresponding to low/high value of electrical property (usually voltage). In general: 2 n values (n-bit representation). time x(t) v1v1 v2v2 v3v3 v4v4 v5v5 v6v6

CE 478: Microcontroller Systems University of Wisconsin-Eau Claire Dan Ernst Analog vs. Digital To compute on a Microprocessor, we need a digital value. And by “compute”, we mean: making decisions based on signals combining multiple signals together analyze the signal for a data transmission generate a modification of the signal

CE 478: Microcontroller Systems University of Wisconsin-Eau Claire Dan Ernst Signal Conversion To interface microprocessors to real-world (analog) systems, we need converters. Digital to Analog Converters (DAC): Convert a digital input (e.g. binary word) to analog output (e.g. current or voltage). Analog to Digital Converters (ADC): Convert an analog input to digital output. analogdigital ADC DAC PP mic speaker mechanical electrical

CE 478: Microcontroller Systems University of Wisconsin-Eau Claire Dan Ernst Analog to Digital Conversion Ideal 2-bit ADC Input range: Analog voltage between 0 and V max Output: 2-bit code 0 V max ¾ V max ½ V max ¼ V max analog input voltage digital output

CE 478: Microcontroller Systems University of Wisconsin-Eau Claire Dan Ernst Conversion of Signals over Time Must hold input signal while converting. “Sample and hold” circuit takes in (samples) analog value and holds it still while A to D conversion is taking place. What is the minimum rate S at which the analog input should be sampled? Minimum sampling rate S determines the minimum acceptable speed of A to D conversion. Sample and hold n-bit ADC n analog digital

CE 478: Microcontroller Systems University of Wisconsin-Eau Claire Dan ErnstSampling Sampling rate must be high enough so that “no information is lost”. What is the information of a signal?

CE 478: Microcontroller Systems University of Wisconsin-Eau Claire Dan Ernst Sampling Theorem Harmonic analysis Signals can be expressed as weighted sums of harmonic functions. Shannon’s Theorem (Nyquist Sampling Theorem) To sample a bandlimited signal x(t) with no loss of information, the sampling rate must be at least twice the frequency of the highest frequency component. Example: Audio signals typically include components up to 20KHz. CDs sample at 44.1KHz. DATs sample at 32, 44.1, or 48KHz.

CE 478: Microcontroller Systems University of Wisconsin-Eau Claire Dan Ernst Basic Converter Characteristics Resolution: Fraction of analog range as defined by the number of bits on the digital side of the converter. An n-bit ADC divides analog voltage range [0, V max ] into _____ sections and its resolution is _____ of V max. Error: Difference between analog value you believe a digital value represents and what that analog value actually is. Even ideal converters introduce some error.

Quantization Error 0 V max ¾ V max ½ V max ¼ V max analog input quantization error Inherent in converting continuous values to a finite number of discrete values. Every voltage in the range [1/2 V max, ¾ V max ) is mapped to “10”. To minimize worst-case error, we assume that “10” means _____ V max. Worst-case error is __________. For normalization, quantization error is expressed in terms of the ideal analog difference represented by a unit change in the digital value, referred to as LSB. Quantization error is always equal to +/- ½ LSB.

CE 478: Microcontroller Systems University of Wisconsin-Eau Claire Dan Ernst ADC #1: Flash Vref R R R R Vin +_+_ priority encoder Vcc 2 Dout +_+_ +_+_

CE 478: Microcontroller Systems University of Wisconsin-Eau Claire Dan Ernst ADC #2: Single-Slope Integration +_+_ Vin n-bit counter CLK EN* Vcc done Start: Reset counter, discharge C. Charge C at fixed current I until Vc > Vin. How should C, I, n, and CLK be related? Final counter value is Dout. Conversion may take several milliseconds. C I

CE 478: Microcontroller Systems University of Wisconsin-Eau Claire Dan Ernst ADC #3: Successive Approximation (1/2) +_+_ Vin DAC Vref n control CLK successive approximation register Dout Binary search to match input voltage. Conversion time > n times DAC settling time. Input should stay stable throughout conversion.

CE 478: Microcontroller Systems University of Wisconsin-Eau Claire Dan Ernst Successive Approximation Algorithm Binary search algorithm Set successive approximation register to 0 For each bit from MSB to LSB do flip bit to 1 if DAC output > Vin, reset bit to 0 Example Vref = 15V, Vin = 10V, 4 bits, binary code = voltage value iterationDAC outcomparisonA 3 A 2 A 1 A 0

CE 478: Microcontroller Systems University of Wisconsin-Eau Claire Dan Ernst DAC #1: Voltage Divider 2-to-4 decoder 2 Din Vout Vref R R R R

CE 478: Microcontroller Systems University of Wisconsin-Eau Claire Dan Ernst DAC #2: R/2R Ladder D3 (MSB)D2D1D0 (LSB) 2R RRR Iout Vref