Rabbit RabbitCore RCM4200 User Manual page 64

C-programmable analog core module with serial flash and etherne
Table of Contents

Advertisement

int anaIn(unsigned int channel, int opmode, int gaincode);
DESCRIPTION
Reads the value of an analog input channel using the Direct Mode method of addressing
the A/D converter. Note that it takes about 1 second to ensure an internal capacitor on
the A/D converter is charged when the function is called the first time.
PARAMETERS
channel
opmode
channel
0
1
2
3
4
5
6
7
* Not accessible on Prototyping Board.
gaincode
58
anaIn
the channel number (0 to 7) corresponding to LN0 to LN7.
the mode of operation:
SINGLE—single-ended input
DIFF—differential input
mAMP—4–20 mA input
SINGLE
+AIN0
+AIN1
+AIN2
+AIN3
+AIN4
+AIN5
+AIN6
+AIN7
the gain code of 0 to 7 (applies only to Prototyping Board):
Gain
Gain Code
Multiplier
0
×1
1
×2
2
×4
3
×5
4
×8
5
×10
6
×16
7
×20
DIFF
+AIN0 -AIN1
+AIN1 -AIN0*
+AIN2 -AIN3
+AIN3 -AIN2*
+AIN4 -AIN5
+AIN5 -AIN4*
+AIN6 -AIN7*
+AIN7 -AIN6*
Voltage Range
(V)
0–22.5
0–11.25
0–5.6
0–4.5
0–2.8
0–2.25
0–1.41
0–1.126
mAMP
*
+AIN0
+AIN1*
+AIN2*
+AIN3
+AIN4
+AIN5
+AIN6
+AIN7*
RabbitCore RCM4200

Advertisement

Table of Contents
loading

Table of Contents