8-5
6000 Series user’s manual
Analog I/O
Analog to digital conversion
Function:
f8h
Subfunction:
00h
Purpose:
To perform an analog to digital conversion at a specified
A/D channel. This function will perform averaging based on
the last setting done using subfunction 2.
Calling registers:
AH f8h
AL
00h
BL
A/D channel number (0 to 7)
BH range and polarity selection
0 -> 0 to +5V
1 -> -5V to +5V
2 -> 0 to +10V
3 -> -10V to +10V
DX
ffffh
Return registers:
Carry flag cleared if successful
AX
12-bit data corresponding to input voltage or the
average of multiple readings.
Carry flag set if error
AL
Error code
Programming example:
unsigned int atod0Data;
/* Inline assembly code for Borland C++ 3.1 */
asm {
mov ax,0f800h
mov dx,0ffffh
mov bl,0
/*A/D channel 0 */
mov bh,1
/*input range -5V to +5V */
int 17h
mov atodData, ax
}
print(“Data from A/D channel 0 = %04x.\n”,atod0Data);
Digital to analog conversion
Function:
f8h
Subfunction:
01h
Purpose:
To perform a digital to analog conversion at a specified D/A
channel.
Calling registers:
AH f8h
AL
01h
BL
D/A channel number (0 to 1)
CX
12-bit digital input
DX
ffffh
Summary of Contents for 6000 Series
Page 7: ...Notice to user PC 500 user s manual ...
Page 9: ...About this manual 6000 Series user s manual ...
Page 37: ...2 20 Quick start 6000 Series user s manual ...
Page 65: ...5 16 Serial ports 6000 Series user s manual ...
Page 87: ...6 22 EZ I O 6000 Series user s manual ...
Page 103: ...8 8 Analog I O 6000 Series user s manual ...
Page 119: ...14 2 PC 104 expansion 6000 Series user s manual ...
Page 133: ...16 4 Watchdog timer reset and remote reset 6000 Series user s manual ...
Page 139: ...17 6 Serial EEPROM 6000 Series user s manual ...
Page 157: ...21 2 Software utilities 6000 Series user s manual ...
Page 161: ...22 4 Troubleshooting 6000 Series user s manual ...
Page 177: ...A 16 6010 technical data 6000 Series user s manual ...
Page 215: ...D 16 6040 technical data 6000 Series user s manual ...
Page 229: ...F 2 Miscellaneous 6000 Series user s manual ...