PIO-D96 Series Card
96-channel DIO Board
User Manual, Ver. 2.3, Jun. 2018, PMH-008-23 Page: 44
6.3.7
I/O Selection Control Register
(Write): wBase+0xcc
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
0
0
0
0
0
Port2
Port1
Port0
(Write): wBase+0xdc
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
0
0
0
0
0
Port5
Port4
Port3
(Write): wBase+0xec
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
0
0
0
0
0
Port8
Port7
Port6
(Write): wBase+0xfc
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
0
0
0
0
0
Port11
Port10
Port9
These registers provide the function for configuration digital input/output port of the PIO-D96
series Card. Every I/O port can be programmed to be a DI or a DO port.
Note that all ports are used
as D/I ports when the PC is first turned on.
port?=1
this port is used as a DO port
port?=0
this port is used as a DI port
For example:
outportb(wBase+0xcc,0x03);
/* set port0 ~ port1 as DO ports */
/* set port2 as DI ports */
outportb(wBase+0xdc,0x07);
/* set port3 ~ port5 as D/O ports */
outportb(wBase+0xec,0x00);
/* set port6 ~ port8 as DI ports */