
Hercules III User Manual Rev A.2
www.diamondsystems.com
Page
69
To convert the A/D value to the corresponding input voltage, use the following formulas.
14.8.1
Conversion Formula for Bipolar Input Ranges
Input voltage = A/D value / 32768 * Full-scale input range
Example:
Given, Input range is
5V and A/D value is 17761.
Therefore,
Input voltage = 17761 / 32768 * 5V = 2.710V.
For a bipolar input range,
1 LSB = 1/32768 * Full-scale voltage.
The table, below, shows the relationship between A/D code and input voltage for a bipolar input range (VFS = Full
scale input voltage).
A/D Code
Input Voltage Symbolic Formula
Input Voltage for
5V Range
-32768
-V
FS
-5.0000V
-32767
-V
FS
+ 1 LSB
-4.9998V
...
...
...
-1
-1 LSB
-0.00015V
0
0
0.0000V
1
+1 LSB
0.00015V
...
...
...
32767
V
FS
- 1 LSB
4.9998V
14.8.2
Conversion Formula for Unipolar Input Ranges
Input voltage = (A/D value + 32768) / 65536 * Full-scale input range
Example:
Given, Input range is 0-5V and A/D value is 17761.
Therefore,
Input voltage = (17761 + 32768) / 65536 * 5V = 3.855V.
For a unipolar input range, 1 LSB = 1/65536 * Full-scale voltage.
The following table illustrates the relationship between A/D code and input voltage for a unipolar input range (VFS
= Full scale input voltage).
A/D Code
Input Voltage Symbolic Formula
Input Voltage for
−
5V Range
-32768
0V
0.0000V
-32767
1 LSB (V
FS
/ 65536)
0.000076V
...
...
...
-1
V
FS
/ 2 - 1 LSB
2.4999V
0
V
FS
/ 2
2.5000V
1
V
FS
/ 2 + 1 LSB
2.5001V
...
...
...
32767
V
FS
- 1 LSB
4.9999V