1. Analog to Digital Converter
SUBMITTED TO:- SUBMITTED BY:-
Mr. Peeyush Sanam Madhusudhan Agarwal
2. CONTENTS
Definition
Need of ADC in EMBEDDED
Registers of ADC
Types of ADC
Applications
3. DEFINITION
An analog-to-digital converter, or ADC as it is more
commonly called, is a device that converts analog signals
into digital signals.
OR
An analog-to-digital converter (ADC, A/D, or A to D) is a
device that converts a continuous physical quantity
(usually voltage) to a digital number that represents the
quantity's amplitude
4. 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
An embedded system’s surroundings typically involve
many analog signals.
5. ANALOG-TO-DIGITAL CONVERTERS
Vmax = 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
proportionality
analog to digital
4
3
2
1
time
t1 t2 t3 t4
0100 0110 0110 0101
analog input
(V)
Digital output
6. NEED OF ADC IN
EMBEDDED
The microcontroller is a digital device so it needs
digital input to process.
But a number of input devices available which
gives analog signal.
So its necessary to convert analog signals to
digital signals
Its done by Analog to Digital Circuit inside a
microcontroller.
7. REGISTERS OF ADC
There are four type of register which we use in ADC
A. ADMUX(ADC Multiplexer Selection Register)
B. ADCSRA(ADC Status and Control Register)
C. ADCH Storing the ADC result
D. ADCL
8. ADMUX(ADC MULTIPLEXER SELECTION
REGISTER)
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
REFS1 REFS0 ADLAR MUX 4 MUX 3 MUX 2 MUX 1 MUX 0
0 0 0 0 0 0 0 0 Initial
value
REFS1 REFS0 Vref
0 0 OFF
0 1 5V
1 0 REVERS
E
1 1 2.56V
0 1 0 0 0 0 0 0
9. ADCSRA(ADC STATUS AND CONTROL
REGISTER)
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
ADEN ADSC ADATE ADIF ADIE ADPS2 ADPS1 ADPS0
0 0 0 0 0 0 0 0 Initial
value
ADC
enab
le
ADC
start
convers
ion
Auto
trigge
r
enable
Interru
pt flag
Interr
upt
enable
ADC pre scale
factor
1 1 0 0 0 1 1 1
10. Types of Analog to Digital Converters
1. Counter Type
2. Integrating or Dual Slope
3. Parallel or Flash
4. Successive Approximation
11. Counter Type
Control Logic
D A C
Counter
START
Vin
Comparator
Digital Output
clock
•When START is received,
•control logic initializes the system, (sets counter to 0),
and
•turns on Clock sending regular pulses to the counter.
12. As the Clock sends regular pulses to the counter, the counter outputs
a digital signal to the Digital-to-Analog converter
D A C
Counter
START
Vin
Comparator
Digital Output
clock
Control Logic
13. As the counter counts, its output to the D A C generates a staircase
Control Logic
D A C
Counter
START
Vin
Comparator
Digital Output
clock
ramp to the comparator.
14. As the ramp voltage increases to the comparator, it rises closer and
closer to Vin at which point the comparator shifts states
Control Logic
D A C
Counter
START
Vin
Comparator
Digital Output
clock
15. Once the digital output has been read by the associated circuitry, a new
start signal is sent, repeating the cycle.
Control Logic
D A C
Counter
START
Vin
Comparator
Digital Output
clock
16. Tracking ADC - similar to the counter type except it uses an
up/down counter and can track a varying signal more quickly
Track & Hold Logic
D A C
Up/Down
Counter
Vin
Comparator
Digital Output
clock
17. Vin
-Vref
Integrating or Dual Slope A/D
Control logic
Counter
clock
comparator
integrator
Digital Output
18. Successive-Approximation A/D
D/A Converter
Successive
Approximation
Register
Vref
clock
analog
input
Digital
Outpu
t Data
comparato
r
STRT
At initialization, all bits from the SAR are set to zero, and conversion
begins by taking STRT line low.