Datasheet
1133
SAM4S Series [DATASHEET]
11100F–ATARM–29-Jan-14
44.8.4 ADC Transfer Function
The first operation of the ADC is a sampling function relative to a common mode voltage. The common mode voltage
(VCM) is equal to V
ADVREF
/2 when the bits OFFx = 1, in Differential and in Single-ended mode. When the bits OFFx = 0,
sampling is done versus V
ADVREF
/4 for gain = 2, and V
ADVREF
/8 for gain = 4, in Single-ended mode only.
The code in ADC_CDRx is a 12-bit positive integer.
44.8.4.1 Differential Mode
A differential input voltage
V
IN
= V
INP
- V
INN
can be applied between two selected differential pins, e.g. AD0 and AD1.The
ideal code Ci is calculated by using the following formula and rounding the result to the nearest positive integer.
Table 44-39 is a computation example for the above formula, where V
ADVREF
= 3V:
44.8.4.2 Single-ended Mode
A single input voltage
V
IN
can be applied to selected pins, e.g. AD0 or AD1. The ideal code Ci is calculated by using the
following formula and rounding the result to the nearest positive integer.
The single-ended ideal code conversion formula for OFFx = 1 is:
Table 44-40 is a computation example for the above formula, where V
ADVREF
= 3V:
The single-ended ideal code conversion formula for OFFx = 0 is:
Table 44-41 is a computation example for the above formula, where V
ADVREF
= 3V:
Table 44-39. Input Voltage Values in Differential Mode
Ci Gain = 0.5 Gain = 1 Gain = 2
0 -3 -1.5 -0.75
2047 0 0 0
4095 3 1.5 0.75
C
i
4096
V
ADVREF
-----------------------
V
IN
× Gain 2047+×=
Table 44-40. Input Voltage Values in Single-ended Mode, OFFx=1
Ci Gain = 1 Gain = 2 Gain = 4
0 0 0.75 1.125
2047 1.5 1.5 1.5
4095 3 2.25 1.875
Table 44-41. Input Voltage Values in Single-ended Mode, OFFx=0
Ci Gain = 1 Gain = 2 Gain = 4
0000
2047 1.5 0.75 0.375
4095 3 1.5 0.75
C
i
4096
V
ADVREF
-----------------------
V
IN
V
ADVREF
2
-----------------------
–
× Gain 2047+×=
C
i
V
IN
Gain
4096
V
ADVREF
-----------------------
1–××=