Rabbit RabbitCore User Manual page 49

C-programmable core module with ethernet, serial flash
Table of Contents

Advertisement

unsigned 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. The A/D converter is enabled the first time this function is called—this will take approxi-
mately 1 second to ensure that the A/D converter capacitor is fully charged.
PARAMETERS
channel is the channel number (0 to 7) corresponding to ADC_IN0 to ADC_IN7
opmode is the mode of operation:
SINGLE—single-ended input
DIFF—differential input
mAMP—4–20 mA input
channel
0
1
2
3
4
5
6
7
* Not accessible on RCM3700 Prototyping Board.
gaincode is the gain code of 0 to 7
User's Manual
SINGLE
+AIN0
+AIN1
+AIN2
+AIN3
+AIN4
+AIN5
+AIN6
+AIN7
Gain Code
Multiplier
0
x1
1
x2
2
x4
3
x5
4
x8
5
x10
6
x16
7
x20
* Applies to RCM3700 Prototyping Board.
DIFF
+AIN0 -AIN1
+AIN1 -AIN0*
+AIN2 -AIN3
+AIN3 -AIN2*
+AIN4 -AIN5
+AIN5 -AIN4*
+AIN6 -AIN7*
+AIN7 -AIN6*
Voltage Range
(V)
0–20
0–10
0–5
0–4
0–2.5
0–2
0–1.25
0–1
mAMP
*
+AIN0
+AIN1*
+AIN2*
+AIN3
+AIN4
+AIN5
+AIN6
+AIN7*
*
43

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the RabbitCore and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Rcm3750

Table of Contents