3.3.7Read/Write 8-bit data Register

(Read/Write): wBase+0xc0

Bit 7

Bit 6

Bit 5

Bit 4

Bit 3

Bit 2

Bit 1

Bit 0

D7

D6

D5

D4

D3

D2

D1

D0

Note. Refer to Sec. 3.1 for more information about wBase.

There are eighteen 8-bit I/O port in the OME-PIO-D144. Every I/O port can be programmed as D/I or D/O port. Refer to Sec. 3.3.9 for D/I or D/O selection. When the PC is first power-on, all eighteen ports are used as D/I port.

outp(wBase+0xc0,Val);

/* write to D/O port */

Val=inp(wBase+0xc0);

/* read from D/I port */

3.3.8Active I/O Port Control Register

(Read/Write): wBase+0xc4

Bit 7

Bit 6

Bit 5

Bit 4

Bit 3

Bit 2

Bit 1

Bit 0

D7

D6

D5

D4

D3

D2

D1

D0

Note. Refer to Sec. 3.1 for more information about wBase.

There are eighteen 8-bit I/O port in the OME-PIO-D144. Only one I/O port can be active at the same time.

outp(wBase+0xc4,0);

/*

I/O port_0 is active now

*/

outp(wBase+0xc4,1);

/*

I/O port_1 is active now

*/

outp(wBase+0xc4,17);

/*

I/O port_17 is active now */

Refer to Sec. 2.2 for I/O port location.

OME-PIO-D144 User’s Manual (Ver.2.1, Sep/2001)

----- 31

Page 33
Image 33
Omega OME-PIO-D144 manual Read/Write 8-bit data Register, Active I/O Port Control Register