Advanced Embedded
Systems
ADC (analog-to-digital converter)
Lecture 0802
The AVR Microcontroller and Embedded Systems using Assembly and C
by
M. A. Mazidi, S. Naimi and S. Naimi
1
Analog vs. Digital Signals
Digital computers or embedded systems use
binary (discrete) values.
But in the physical world, everything is analog
(continuous).
Temperature
Pressure
Humidity
Velocity
2
Sensors and need of ADC
A physical quantity (Temperature, Pressure, Humidity,
Velocity etc.) is converted to electrical signals (voltage,
current) using a device called transducer/sensor.
Sensors for temperature, velocity, pressure, light and
many other quantities produce an output that is analog
voltage.
Analog to Digital Converter (ADC) translates the
analog signals to digital numbers so that an embedded
system can read and process them.
3
Microcontroller connection to the ADC
Electrical Electrical
Physical Transducer Signals Signals
A/D
Quantity /Sensor (V,I) (V,I)
Analog Digital
Desired Output Digital Processing
Task Device Device
4
Physical Quantities & System
Example 1: Temperature Control
Digital Processing
Temp Sense A/D Fan
Device
Example 2: Human Voice Amplification
5
Block Diagram of an 8-bit ADC
6
Some Major Characteristics of ADC
Conversion Time
Conversion time is an important factor.
Conversion time is defined as the time it takes the
ADC to convert the analog input to a digital number.
It depends on the clock source connected to the ADC,
in addition, the method used for data conversion and
technology used in fabrication (MOS/TTL).
7
Some Major Characteristics of ADC
Resolution
The ADC has n-bit resolution (n can be 8, 10, 12, 16 etc.)
Higher-resolution ADCs provide a smaller step size
Step size is smallest change that can be measured by ADC
Step size can be controlled by Reference Voltage (Vref)
S
8
Reference Voltage (Vref)
Reference Voltage along
with resolution defines the
step size of ADC.
DOUT
Usually, Vref can go maximum 11
upto Vcc (Supply) of Micro- 10
controller.
01
00 Vin
n
Vref(-)
Vref(+)
Vin ADC Output
(binary number)
Vref
9
Step Size
10
Digital Data Output
n-bit ADC would have n-
bit digital output
n
Vin ADC Output
(binary numbe
Vref
For an 10-bit ADC and Vref = 5 V.
Calculate the D0-D9 output if the analog input is
(a) 5 volts, (b) 2.5 volts, (c) 0.2 volts and (d) 0 V
11