4. Using the I/O Address Map
ADI16-4(FIT)GY
31
Table 4.5. Example of conversion data for a ±10V range
Input voltage
(
±
10V range)
16-bit conversion data
Offset binary
+9.9997V
FFFFh
:
:
0.00030V
8001h
0.00000V
8000h
-0.00030V
7FFFh
:
:
-10.00000V
0000h
The control port by which conversion data is input assumes the following state:
Starting
I/O
address
D7
D6
D5
D4
D3
D2
D1
D0
Input
Analog Input Status 0
+22
(16h)
0
0
Sampling
Clock Error
Sampling
Clock Input
0
Data Over
Write Error
0
Data Read
Enable
D7
D6
D5
D4
D3
D2
D1
D0
Input
Analog Input (Lower)
+16
(10h)
Conversion
Data7
Conversion
Data6
Conversion
Data5
Conversion
Data4
Conversion
Data3
Conversion
Data2
Conversion
Data1
Conversion
Data0
(LSB)
Analog Input (Upper)
+17
(11h)
Conversion
Data15
(MSB)
Conversion
Data14
Conversion
Data13
Conversion
Data12
Conversion
Data11
Conversion
Data10
Conversion
Data9
Conversion
Data8
Figure 4.22. Input control port for conversion data
Details on analog input and the interrupt status will be described in the following section.
Following are examples in which a sampling process is started in high-level languages:
Following are examples in which conversion data is input
while( !(inp( ADR+22 ) &2 );
LowerAiData = inp( ADR+16 );
UpperAiData = inp( ADR+17 );