62
SBC BL2600
Reads the state of an A/D converter input channel. If the access is for an A/D converter single-ended
bipolar channel and the gain code for the given channel has changed from the previous cycle, the
EEPROM will be read to get the calibration constants for the new gain value.
PARAMETER
channel
is the analog input channel number (0 to 7) corresponding to AIN0–AIN7
gaincode
is the gain code of 0 to 7 (use a gain code of 4 for 4–20 mA operation)
RETURN VALUE
A value corresponding to the voltage or current on the analog input channel (0–2047 for 11-bit
conversions).
SEE ALSO
brdInit, anaInConfig, anaInCalib, anaInmAmps, anaInDiff, anaInVolts
int anaIn(int channel, int gaincode);
channel
Single-Ended
Differential
4–20 mA
0
+AIN0
+AIN0 -AIN1
+AIN0
1
+AIN1
—
+AIN1
2
+AIN2
+AIN2 -AIN3
+AIN2
3
+AIN3
—
+AIN3
4
+AIN4
+AIN4 -AIN5
5
+AIN5
—
6
+AIN6
+AIN6 -AIN7
7
+AIN7
—
Gain Code
Macro
Voltage Range
Single-Ended
Unipolar
Single-Ended
Bipolar
Differential
Bipolar
0
GAIN_X1
0–20 V
±10 V
± 20 V
1
GAIN_X2
0–10 V
±5 V
± 10 V
2
GAIN_X4
0–5 V
±2.5 V
± 5 V
3
GAIN_X5
0–4 V
±2 V
± 4 V
4
GAIN_X8
0–2.5 V
±1.25 V
± 2.5 V
5
GAIN_X10
0–2 V
±1 V
± 2 V
6
GAIN_X16
0–1.25 V
—
± 1.25 V
7
GAIN_X20
0–1 V
—
± 1 V
Summary of Contents for BL2600
Page 1: ...SBC BL2600 C Programmable Single Board Computer with Ethernet User s Manual 019 0142_L...
Page 6: ...SBC BL2600...
Page 14: ...8 SBC BL2600...
Page 96: ...90 SBC BL2600...
Page 112: ...106 SBC BL2600...
Page 116: ...110 SBC BL2600...