Elton User Manual Rev 1.04
Page 50
The following table uses specific data for input voltage and A/D values based on the ideal case scenario.
NOTE
: Based on convention, the top end of the 3.3V range should correspond to a code of 4096, which
requires 13-bits. Therefore, the maximum A/D code of 4095 corresponds to 1 LSB less than 3.3V
as shown in the following table.
Vin
A/D Code Hex A/D Code Dec
0.0000V
0x000
0
0.0008V
0x001
1
0.0016V
0x002
2
0.0016V
0x002
1.6592
0x7FF
2047
1.6500V
0x800
2048
1.6508V
0x801
2049
1.6508V
0x801
2049
3.2992V
0xFFF
4095
All A/D circuits are susceptible to inherent gain and offset errors depending upon factors such as
temperature. The SAM circuit calibrates some of these errors to provide better accuracy.
The Diamond Systems driver and Programming Library calibrate raw uncorrected data or corrected data
with greater accuracy between the A/D input range of 0V and/or 3.3V.
NOTE
: Due to the inherent characteristics of the microcontroller regarding accuracy readings, the full
input range of 0-3.3V may not be attainable.
In some scenarios, the minimum measurable voltage maybe a few millivolts above 0V, and the
maximum measurable voltage maybe a few millivolts below 3.3V. In other scenarios, the corrected
A/D measurement may exceed 0V or 3.3V.
This is due to software calculations which computes a straight line based on offset and gain
calibration measurements. These extended voltage readings are correct.
A/D sampling can be performed
one channel at a time or in a “scan” of multiple consecutive channels.
In a scan, a small-time delay exists between each sample, because the microcontroller converts the input
voltages individually. The interval between the samples is approximately 1us. Additionally, interrupt
processing can be used to manage a steady stream of A/D samples without the software monitoring each
sample continuously.
A FIFO (First-in, First-out) in the SAM microcontroller stores A/D samples and forwards them to the main
processor in chunks at regular intervals.
Refer to the Programming Reference Manual for more details on A/D sampling methods.