Z-World Fox LP3500 User Manual page 62

C-programmable single-board computer
Table of Contents

Advertisement

int anaIn(unsigned int channel, int opmode,
int gaincode);
Reads the value of an analog input channel using the direct method of addressing the ADS7870 A/D
converter.
PARAMETERS
channel is the analog input channel number (0 to 7) corresponding to AIN0–AIN7
opmode is the mode of operation:
SINGLE—single-ended input line
DIFF—differential input line
mAMP—milliamp input line
channel
gaincode is the gain code of 0 to 7:
RETURN VALUE
A value corresponding to the voltage on the analog input channel, which will be:
0–2047 for 11-bit A/D conversions (signed 12th bit)
ADOVERFLOW (defined macro = -4096) if overflow or out of range
SEE ALSO
anaIn, anaInConfig, anaInDriver
56
SINGLE
0
+AIN0
1
+AIN1
2
+AIN2
3
+AIN3
4
+AIN4
5
+AIN5
6
+AIN6
7
+AIN7
Gain Code
0
1
2
3
4
5
6
7
DIFF
mAMP
+AIN0 -AIN1
+AIN0
+AIN1
+AIN2 -AIN3
+AIN2
+AIN3
+AIN4 -AIN5
+AIN6 -AIN7
Voltage
Range
0–20 V
0–10 V
0–5 V
0–4 V
0–2.5 V
0–2 V
0–1.25 V
0–1 V
Fox (LP3500)

Advertisement

Table of Contents
loading

Related Products for Z-World Fox LP3500

Table of Contents