
ACROSSER TECHNOLOGY
24
Function 2 - Perform A/D Conversion and Read Data
Purpose
This function performs an A/D conversion and waits until
data is available. Data is returned in CX register.
Input Arguments
The following input arguments have to be initialized
before calling the function.
AH = 2, specifies function 2.
AL = Channel number. Valid number is 0 to 7 for
differential input or 0 to 15 for single-ended input.
DX = The I/O port base address. Base address can be
located between 100H and 3FCH.
Returns
AL = 0, Good return.
= 2, EOC is always high, can not perform A/D trigger.
= 3, Analog input is out of range (-5V to +5V).
CX = Converted data. The returned data has the
following formats:
CH
D7
D6
D5
D4
D3
D2
D1
D0
0
0
0
SIGN
AD11 AD10
AD9
AD8
CL
D7
D6
D5
D4
D3
D2
D1
D0
AD7
AD6
AD5
AD4
AD3
AD2
AD1
AD0
All manuals and user guides at all-guides.com