Rabbit RabbitCore RCM3400 User Manual page 49

C-programmable analog core module with 10/100base-t reference design
Hide thumbs Also See for RabbitCore RCM3400:
Table of Contents

Advertisement

unsigned int anaInDriver(unsigned int cmd,
unsigned int len);
Reads the voltage of an analog input channel by serial-clocking an 8-bit command to the A/D converter
by its Direct Mode method. This function assumes that Mode1 (most significant byte first) and the A/D
converter oscillator have been enabled. See anaInConfig() for the setup.
The conversion begins immediately after the last data bit has been transferred. An exception error will
occur if Direct Mode bit D7 is not set.
PARAMETERS
cmd contains a gain code and a channel code as follows.
D7—1; D6–D4—Gain Code; D3–D0—Channel Code
Use the following calculation and the tables below to determine cmd:
cmd = 0x80 | (gain_code*16) + channel_code
Channel Code
0
1
2
3
4
5
6
7*
* Negative input is ground.
† Not accessible on Prototyping Board
len, the output bit length, is always 12 for 11-bit conversions
User's Manual
Gain Code
0
1
2
3
4
5
6
7
Differential Input
Channel Code
Lines
+AIN0 -AIN1
+AIN2 -AIN3
+AIN4 -AIN5
+AIN6 -AIN7
-AIN0 +AIN1
-AIN2 +AIN3
-AIN4 +AIN5
-AIN6 +AIN7
Multiplier
×1
×2
×4
×5
×8
×10
×16
×20
Single-Ended
Input Lines
8
AIN0
9
AIN1
10
AIN2
11
AIN3
12
AIN4
13
AIN5
14
AIN6
15
AIN7
4–20 mA
*
Lines
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 RCM3400 and is the answer not in the manual?

Table of Contents