PCI-DIO48(S)(S) Manual
Page 6-4
Manual 00650-529-1
Programming Example (BASIC)
The following example in BASIC is provided as a guide to assist you in developing your working
software. In this example, the card base address is 2D0 hex and the I/O lines of group 0 are to be
setup as follows:
Port A
= Input
Port B
= Output
Port C Hi
= Input
Port C Lo
= Output
The first step is to configure the control register. Configure bits of the control register as:
D7
D6
D5
D4
D3
D2
D1
D0
1
0
0
1
1
0
0
0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|__Port C Lo=output
|
|
|
|
|
|
|
|
|
|
|
|
|
|______ Port B= output
|
|
|
|
|
|
|
|
|
|
|
|___________ Mode 0
|
|
|
|
|
|
|
|
|
|________________ Port C Hi= input
|
|
|
|
|
|
|
|_____________________ Port A= input
|
|
|
|
|
|__________________________ Mode 0
|
|
|
|_______________________________ Mode 0
|
|___________________________________ Active Mode Set
This corresponds to 98 hex. If the card address is 2D0 hex, use the BASIC OUT command to
write to the control register as follows:
10 BASEADDR=&H2D0
20 OUT B3,&H98