41.6.2.6. ADC Resolution
The ADC supports 8-bit, 10-bit or 12-bit resolution. Resolution can be changed by writing the Resolution
bit group in the Control C register (CTRLC.RESSEL). By default, the ADC resolution is set to 12 bits. The
resolution affects the propagation delay, see also
Conversion Timing and Sampling Rate
41.6.2.7. Differential and Single-Ended Conversions
The ADC has two conversion options: differential and single-ended:
If the positive input is always positive, the single-ended conversion should be used in order to have full
12-bit resolution in the conversion.
If the positive input may go below the negative input, the differential mode should be used in order to get
correct results.
The differential mode is enabled by setting DIFFMODE bit in the Control C register (CTRLC.DIFFMODE).
Both conversion types could be run in single mode or in free-running mode. When the free-running mode
is selected, an ADC input will continuously sample the input and performs a new conversion. The
INTFLAG.RESRDY bit will be set at the end of each conversion.
41.6.2.8. Conversion Timing and Sampling Rate
The following figure shows the ADC timing for one single conversion. A conversion starts after the
software or event start are synchronized with the GCLK_ADC clock. The input channel is sampled in the
first half CLK_ADC period.
Figure 41-3. ADC Timing for One Conversion in 12-bit Resolution
CLK_ADC
STATE
START
SAMPLING
MSB
10
9
8
7
6
5
4
3
2
1
LSB
INT
The sampling time can be increased by using the Sampling Time Length bit group in the Sampling Time
Control register (SAMPCTRL.SAMPLEN). As example, the next figure is showing the timing conversion
with sampling time increased to six CLK_ADC cycles.
Figure 41-4. ADC Timing for One Conversion with Increased Sampling Time, 12-bit
CLK_ADC
STATE
START
MSB
10
9
8
7
6
5
4
3
2
1
LSB
INT
SAMPLING
The ADC provides also offset compensation, see the following figure. The offset compensation is enabled
by the Offset Compensation bit in the Sampling Control register (SAMPCTRL.OFFCOMP).
Note:
If offset compensation is used, the sampling time must be set to one cycle of CLK_ADC.
In free running mode, the sampling rate R
S
is calculated by
R
S
= f
CLK_ADC
/ ( n
SAMPLING
+ n
OFFCOMP
+ n
DATA
)
Here, n
SAMPLING
is the sampling duration in CLK_ADC cycles, n
OFFCOMP
is the offset compensation
duration in clock cycles, and n
DATA
is the bit resolution. f
CLK_ADC
is the ADC clock frequency from the
internal prescaler: f
CLK_ADC
= f
GCLK_ADC
/ 2^(1 + CTRLB.PRESCALER)
Atmel SAM L22G / L22J / L22N [DATASHEET]
Atmel-42402E-SAM L22G / L22J / L22N_Datasheet_Complete-07/2016
993