Atmel Xplained Pro Evaluation Kit ATSAMD20-XPRO ATSAMD20-XPRO Data Sheet

Product codes
ATSAMD20-XPRO
Page of 660
483
Atmel | SMART SAM D20 [DATASHEET]
Atmel-42129K–SAM-D20_datasheet–06/2014
Another important point is that the significant WINLT and WINUT bits are given by the precision selected in the 
Conversion Result Resolution bit group in the Control B register (CTRLB.RESSEL). This means that if 8-bit mode is 
selected, only the eight lower bits will be considered. In addition, in differential mode, the eighth bit will be considered as 
the sign bit even if the ninth bit is zero.
The INTFLAG.WINMON interrupt flag will be set if the conversion result matches the window monitor condition.
28.6.10 Offset and Gain Correction
Inherent gain and offset errors affect the absolute accuracy of the ADC. The offset error is defined as the deviation of the 
actual ADC’s transfer function from an ideal straight line at zero input voltage. The offset error cancellation is handled by 
the Offset Correction register (OFFSETCORR). The offset correction value is subtracted from the converted data before 
writing the Result register (RESULT). The gain error is defined as the deviation of the last output step’s midpoint from the 
ideal straight line, after compensating for offset error. The gain error cancellation is handled by the Gain Correction 
register (GAINCORR). To correct these two errors, the Digital Correction Logic Enabled bit in the Control B register 
(CTRLB.CORREN) must be written to one.
Offset and gain error compensation results are both calculated according to:
In single conversion, a latency of 13 GCLK_ADC is added to the availability of the final result. Since the correction time is 
always less than the propagation delay, this latency appears in free-running mode only during the first conversion. After 
that, a new conversion will be initialized when a conversion completes. All other conversion results are available at the 
defined sampling rate.
Figure 28-8.  ADC Timing Correction Enabled
28.6.11 Interrupts
The ADC has the following interrupt sources:
z
Result Conversion Ready: RESRDY
z
Overrun: OVERRUN
z
Window Monitor: WINMON
z
Synchronization Ready: SYNCRDY
Result
Conversion value
OFFSETCORR
(
) GAINCORR
=
START
CONV0
CONV1
CONV2
CONV3
CORR0
CORR1
CORR2
CORR3