float anaInVolts(unsigned int channel,
unsigned int gaincode);
Reads the state of a single-ended analog input channel and uses the previously set calibration constants to
convert it to volts.
PARAMETERS
channel is the channel number (0 to 7) corresponding to ADC_IN0 to ADC_IN7
gaincode is the gain code of 0 to 7.
RETURN VALUE
A voltage value corresponding to the voltage on the analog input channel.
ADOVERFLOW (defined macro = -4096) if overflow or out of range.
ADTIMEOUT (defined macro = -4095) if conversion is incomplete or busy-bit timeout.
SEE ALSO
anaInCalib, anaIn, anaInmAmps, brdInit
48
Single-Ended
Channel Code
Input Lines
0
+AIN0
1
+AIN1
2
+AIN2
3
+AIN3
4
+AIN4
5
+AIN5
6
+AIN6
7
+AIN7
* Negative input is ground.
† Applies to Prototyping Board.
‡ Used for thermistor in sample program.
Gain Code
Multiplier
0
1
2
3
4
5
×10
6
×16
7
×20
* Applies to RCM3400 Prototyping Board.
Voltage Range
*
(V)
0–20
0–20
0–20
0–20
0–20
0–20
0–20
‡
0–2
Voltage Range
(V)
×1
0–20
×2
0–10
×4
0–5
×5
0–4
×8
0–2.5
0–2
0–1.25
0–1
†
*
RabbitCore RCM3400
Need help?
Do you have a question about the RabbitCore RCM3400 and is the answer not in the manual?