Z-World Fox LP3500 User Manual page 60

C-programmable single-board computer
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 ADS7870
device by its Direct Mode method. The conversion begins as soon as the last data bit is transferred.
An exception error will occur if Direct Mode bit D7 is not set.
PARAMETER
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.
len, the output bit length, is always 12 bits.
54
Gain Code
Multiplier
0
1
1
2
2
4
3
5
4
8
5
10
6
16
7
20
Differential
Channel Code
Input Lines
+AIN0 -AIN1
8
+AIN2 -AIN3
9
+AIN4 -AIN5
10
+AIN6 -AIN7
11
Reserved
12
Reserved
13
Reserved
14
Reserved
15
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
Single-Ended
4–20 mA
*
Lines
Input Lines
AIN0
AIN0
AIN1
AIN1
AIN2
AIN2
AIN3
AIN3
AIN4
Reserved
AIN5
Reserved
AIN6
Reserved
AIN7
Reserved
Fox (LP3500)

Advertisement

Table of Contents
loading

Related Products for Z-World Fox LP3500

Table of Contents