
float anaInDiff(unsigned int channel, unsigned int gaincode);
Reads the state of differential analog input channels and uses the previously set calibration constants to convert it to volts.
PARAMETERS
channel is the analog input channel number (0 to 7) corresponding to LN0_IN to LN7_IN
channel | DIFF | Voltage Range | |
(V) | |||
|
| ||
0 | +AIN0 | ||
1 | +AIN1 | — | |
|
|
| |
2 | +AIN2 | ||
|
|
| |
3 | +AIN3 | — | |
|
|
| |
4 | +AIN4 | ||
|
|
| |
5 | +AIN5 | — | |
|
|
| |
6 | +AIN6 | — | |
|
|
| |
7 | +AIN7 | — | |
|
|
|
* Accessible on Prototyping Board.
gaincode is the gain code of 0 to 7.
Gain Code | Multiplier | Voltage Range* | ||
(V) | ||||
|
| |||
0 | ×1 | – +22.5 | ||
|
|
|
| |
1 | ×2 | – +11.25 | ||
|
|
|
| |
2 | ×4 | – +5.6 | ||
|
|
|
| |
3 | ×5 | – +4.5 | ||
|
|
|
| |
4 | ×8 | – +2.8 | ||
|
|
|
| |
5 | ×10 | – +2.25 | ||
|
|
|
| |
6 | ×16 | – +1.41 | ||
|
|
| ||
7 | ×20 | |||
|
|
|
|
* Applies to Prototyping Board.
RETURN VALUE
A voltage value corresponding to the voltage differential on the analog input channel. ADOVERFLOW (defined macro =
ADTIMEOUT (defined macro =
SEE ALSO
anaInCalib, anaIn, anaInmAmps, brdInit
User’s Manual | 55 |