Atmel ARM-Based Evaluation Kit for SAM4S16C, 32-Bit ARM® Cortex® Microcontroller ATSAM4S-WPIR-RD ATSAM4S-WPIR-RD Data Sheet

Product codes
ATSAM4S-WPIR-RD
Page of 1231
1155
SAM4S Series [DATASHEET]
Atmel-11100G-ATARM-SAM4S-Datasheet_27-May-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.  
 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:  
 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-40.
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-41.
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
C
i
4096
V
ADVREF
-----------------------
V
IN
V
ADVREF
2
-----------------------
×
Gain
2047
+
×
=
C
i
V
IN
Gain
4096
V
ADVREF
-----------------------
1
×
×
=