38
RabbitCore RCM3600
Reads the voltage of an analog input channel by serial-clocking an 8-bit command to the ADS7870 A/D
converter by the 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
len
, the output bit length, is always 12 for 11-bit conversions
unsigned int anaInDriver(unsigned int cmd,
unsigned int len);
Gain Code
Multiplier
0
x1
1
x2
2
x4
3
x5
4
x8
5
x10
6
x16
7
x20
Channel Code
Differential Input
Lines
Channel Code
Single-Ended
Input Lines
*
* Negative input is ground.
4–20 mA
Lines
0
+AIN0 -AIN1
8
AIN0
1
+AIN2 -AIN3
9
AIN1
2
+AIN4 -AIN5
10
AIN2
3
†
† Not accessible on RCM3600 Prototyping Board
+AIN6 -AIN7
11
AIN3
AIN3
4
-AIN0 +AIN1
12
AIN4
AIN4
5
-AIN2 +AIN3
13
AIN5
AIN5
6
-AIN4 +AIN5
14
AIN6
AIN6
-AIN6 +AIN7
15
AIN7
Содержание RabbitCore
Страница 1: ...RabbitCore RCM3600 C Programmable Core Module User s Manual 019 0135 050630 C ...
Страница 6: ...RabbitCore RCM3600 ...
Страница 12: ...6 RabbitCore RCM3600 ...
Страница 92: ...86 RabbitCore RCM3600 ...
Страница 128: ...122 RabbitCore RCM3600 ...
Страница 132: ...126 RabbitCore RCM3600 ...
Страница 136: ...130 RabbitCore RCM3600 ...
Страница 138: ......