Analog To Digital Converters
Analog To Digital Converters
What is ADC?
The real world is analog, but computers are digital ADC converts analog information to digital information Analog signals contain an infinite amount of data ADC samples the data and splits it into finite information.
7 6 5 4 3 2 1 0
1 2 3 4 5 6 7 8 Time
Amplitude
ADC Constraints
Resolution Speed Cost
As with any engineering system these constraints are dependant on each other. Trade-offs must be made.
Advantages
High resolution (10-20 bits) Excellent accuracy (0.01% or better) Excellent noise immunity Low cost Excellent stability (time and temperature)
Disadvantages
Slow (1-10/s)
Uses
Voltmeters Digital panel meters Digital multimeters Etc.
Successive-Approximation
Advantages
Higher speed (10-105/s) Good accuracy (0.1% typ) Reliable conversion technique Medium resolution (8-12 bits)
Disadvantages
Highly susceptible to noise (must prefilter) Higher cost than dual slope integrating converters Accuracy limited by D/A converter
Uses
Signal processing Applications where the input signal is continuously varying at relatively high speed Applications where several inputs entered in rapid succession
Flash (Parallel)
Advantages
Very fast (4-1000ns), useful for high speed applications
Disadvantages
Poor resolution (4-10 bits) High cost ($150 for 6 bits, $3000 for 10 bits) Cost becomes a major factor over 6 bits
Voltage to Frequency
Advantages
Excellent noise reduction
Disadvantages
Slow Generally limited to 10 bits or less
Uses
Digital voltmeters Digital multimeters Applications requiring good noise reduction but not good speed
Ramp Converters
Advantages
Fast Medium resolution (8-12 bits)
Disadvantages
Requires highly accurate ramp source
Comparison
Analog to Digital Converter
Successive-Approximation
Voltage to Frequency
Ramp Converters
Flash (Parallel)
A/D Subsystem
VRH VRL
4 Modes of Operation
Single Channel Single Channel 4-Channel 4 Consecutive Conversions Continuous Conversions 1 Conversion Each Continuous Conversions
A/D Conv.
Port E
PE7/AN7
4-Channel
PE0/AN0
Analog Channels
then
ADR1
ADR2
then
ADR3
then
ADR4
Stop
Channel
Channel
Channel
Channel
then
ADR1 ADR2
then
ADR3
then
ADR4
Overwrite ADRs
then
ADR1
ADR2
then
ADR3
then
ADR4
Stop
CH
CH+1
CH+2
CH+3
then
ADR1 ADR2
then
ADR3
then
ADR4
Overwrite ADRs
*Use Internal R-C Clock when E Clock Frequency is below 750 kHz
Multi-Channel Selection
ADCTL Bits 3-2:
CD 0 CC 0 Channel AN0 AN1 AN2 AN3 AN4 AN5 AN6 AN7 Reserv. Reserv. Reserv. Reserv. VRH Pin VRL Pin VRH /2 Reserv. Register ADR1 ADR2 ADR3 ADR4 ADR1 ADR2 ADR3 ADR4 ADR1 ADR2 ADR3 ADR4 ADR1 ADR2 ADR3 ADR4
A/D Wait and Stop Modes During Wait Mode All A/D conversion stops Immediately After Wait Mode Re-sampling begins A/D circuits are stable and conversions are accurate During Stop Mode All A/D conversion stops Immediately After Stop Mode Re-sampling begins A/D circuits are unstable If DLY is of Option Register is set, conversion is stable Otherwise, conversion stabilizes after 100 microseconds
A/D Converter Characteristics Linearity to LSB for VRL = 0V to VRH = VDD Monotonicity Guaranteed (conversion result never decreases with an increasing input voltage) Maximum Difference: VRH VRL = 5V A/D system stabilization delay after power-up or stop is is about 100 microseconds. Sample and hold capability
Example of ADC
Using Successive Approximation
Example Problem
Problem Statement
Successive Approximation ADC 10-bit resolution or 0.0009765625 of Vref Vin=0.6 Volt and Vref = 1 Volt Find digital value of Vin
Example Problem
Solution
Divide Vref by 2 and Compare Vref/2 with Vin
Example Problem
Calculate the state of MSB
Compare Vin=0.6 V and V= Vref/2= 0.5V 0.6 > 0.5, thus MSB = 1
Example Problem
Calculate the state of MSB-2
Go back to last voltage value that cause an ON (0.5V) and add Vref/8 and compare with Vin.
Vin and (.5 + Vref/8)= 0.625 Vin < 0.625
Example Problem
Calculate the state of MSB-3
Go back to last voltage value that cause an ON (0.5V) and add Vref/16 and compare with Vin.
Vin and (.5 + Vref/16)= 0.5625 Vin > 0.5625