11-7
PC-510 user’s manual
EZ I/O
To read ports A and C, issue the following commands:
PORTA = INP(330h)
(port A)
PORTC = INP(333h)
(port B)
≡
Enhanced INT 17h function definitions
This section provides definitions for the following functions: Initialize
EZ I/O 1, Write EZ I/O 1, Read EZ I/O 1, Initialize EZ I/O 2, Write EZ I/O 2,
and Read EZ I/O 2.
Initialize EZ I/O 1
Function:
efh
Subfunction:
00h
Purpose:
To set the directions and to program the initial
values of an EZ I/O port.
Calling registers:
Ah
efh
AL
00h
DI
Port A configuration
xxxxxxxx
xxxxxxxxB
xxxxxxx
Initial data for port A
xxxxxxxxB
direction; 1->output, 0->input
BX
Port B configuration
xxxxxxxx
xxxxxxxxB
xxxxxxxx
Initial data for port B
xxxxxxxxB
direction; 1->output, 0->input
CX
Port C configuration
xxxxxxxx
xxxxxxxxB
xxxxxxxx
Initial data for port C
xxxxxxxxB
direction; 1->output, 0->input
DX
ffffh
Return registers: Carry flag cleared if successful
Carry flag set if error
AL
Error code
Comments:
This function is used to initialize the first EZ I/O (i.e., the
EZ I/O that has the higher I/O address when two EZ I/O
chips are present on a board) before normal use.
Programming example:
/* Inline assembly code for Borland C++ 3.1 */
asm {
mov ax,0ef00h
mov di,00ffh /*port A all outputs, init data=all 0’s */
mov bx,55ffh /*port B all outputs, init data=55h*/
mov cx,0000h /*port C all inputs*
mov dx,0ffffh
int 17h
}
Содержание PC-510
Страница 2: ...O C T A G O N S Y S T E M S Embedded PCs For Extreme Environments PC 510 User s Manual 5171 0505 ...
Страница 7: ...Notice to user PC 510 user s manual ...
Страница 17: ...xii Contents PC 510 user s manual ...
Страница 23: ...About this manual PC 510 user s manual ...
Страница 25: ...Overview of Section 1 PC 510 user s manual ...
Страница 35: ...2 2 Quick start PC 510 user s manual Figure 2 1 PC 510 component diagram ...
Страница 36: ...2 3 PC 510 user s manual Quick start Figure 2 2 PC 510 center to center hole dimensions 331 2 858 ...
Страница 45: ...2 12 Quick start PC 510 user s manual ...
Страница 55: ...3 10 SETUP programs PC 510 user s manual ...
Страница 59: ...4 4 Save and run programs PC 510 user s manual ...
Страница 61: ...Overview of Section 2 PC 510 user s manual ...
Страница 73: ...5 12 Serial ports PC 510 user s manual ...
Страница 77: ...6 4 LPT1 parallel port PC 510 user s manual ...
Страница 83: ...7 6 Console devices PC 510 user s manual ...
Страница 119: ...13 8 CRTs and flat panels PC 510 user s manual ...
Страница 123: ...14 4 GPS interface PC 510 user s manual ...
Страница 125: ...15 2 PC 104 expansion PC 510 user s manual ...
Страница 127: ...Overview of Section 3 PC 510 user s manual ...
Страница 131: ...16 4 Watchdog timer and hardware reset PC 510 user s manual ...
Страница 147: ...18 8 Transferring files remote disks PC 510 user s manual ...
Страница 177: ...21 22 CPU power management PC 510 user s manual ...
Страница 181: ...22 4 Troubleshooting PC 510 user s manual ...
Страница 183: ...Overview of Section 4 PC 510 user s manual ...
Страница 203: ...A 20 Technical data PC 510 user s manual ...
Страница 231: ...B 28 Software utilities PC 510 user s manual ...