246
4317I–AVR–01/08
AT90PWM2/3/2B/3B
Figure 21-14. Differential Measurement Range
Example 1:
–
ADMUX = 0xED (ADC3 - ADC2, 10x gain, 2.56V reference, left adjusted result)
–
Voltage on ADC3 is 300 mV, voltage on ADC2 is 500 mV.
–
ADCR = 512 * 10 * (300 - 500) / 2560 = -400 = 0x270
Table 21-2.
Correlation Between Input Voltage and Output Codes
V
ADCn
Read code
Corresponding decimal value
V
ADCm
+ V
REF
/GAIN
0x1FF
511
V
ADCm
+ 0.999 V
REF
/GAIN
0x1FF
511
V
ADCm
+ 0.998 V
REF
/GAIN
0x1FE
510
...
...
...
V
ADCm
+ 0.001 V
REF
/GAIN
0x001
1
V
ADCm
0x000
0
V
ADCm
- 0.001 V
REF
/GAIN
0x3FF
-1
...
...
...
V
ADCm
- 0.999 V
REF
/GAIN
0x201
-511
V
ADCm
- V
REF
/GAIN
0x200
-512
0
Output Code
0x1FF
0x000
V
REF
Differential Input
Voltage (Volts)
0x3FF
0x200
- V
REF
/Gain
/Gain
Содержание AT90PWM2
Страница 344: ...346 4317I AVR 01 08 AT90PWM2 3 2B 3B 31 1 SO24...
Страница 345: ...347 4317I AVR 01 08 AT90PWM2 3 2B 3B 31 2 SO32...
Страница 346: ...348 4317I AVR 01 08 AT90PWM2 3 2B 3B 31 3 QFN32...
Страница 347: ...349 4317I AVR 01 08 AT90PWM2 3 2B 3B...