Information Technology Reference
In-Depth Information
The format of the low-byte register is
Bit 7-0 Window start address A19-A12
8.3.5 FIRST set up for I/O window
The FIRST window I/O address is made up of a low byte and a high byte. The format of the
high-byte register is
Bit 7-0
A15-A8
The format of the low-byte register is
Bit 7-0
A7-A8
8.3.6 LAST setup for I/O window
The LAST window I/O address is made up of a low byte and a high byte. The format of the
high-byte register is
Bit 7-0
A15-A8.
The format of the low-byte register is
Bit 7-0 A7-A8
8.3.7 Control register for I/O address window
The control register for the I/O address window is made up from a single byte. Its format is
Bit 7, 3
WS1, WS0
Wait states for window 1 and 0.
Bit 6, 2
0WS1, 0WS0
Zero wait states for window 1 and 0.
Bit 5, 1
CS1, CS0
IOIS16 source. Select IOIS16 from PC (1) or select
data size from DS1 and DS0 (0).
Bit 4, 0
DS1, DS0.
Data size: 16-bit (1)/ 8-bit (0).
8.3.8 Examples
A typical application of the PCMCIA socket is to use it for a modem. This is an example of a
program to set up a modem on the COM2 port. For this purpose, the socket must be set up to
map into the I/O registers from 02F8h to 02FFh. The following code will achieve this:
/* load 02f8 into FIRST and 02FFh into LAST registers */
_outp(0x3E0,08h); /* point to FIRST low byte */
_outp(0x3E1,f8h); /* load f8h into FIRST low byte */
_outp(0x3E0,09h); /* point to FIRST high byte */
_outp(0x3E1,02h); /* load 02h into FIRST high byte */
_outp(0x3E0,0Ah); /* point to LAST low byte */
_outp(0x3E1,ffh); /* load ffh into LAST low byte */
_outp(0x3E0,0Bh); /* point to LAST high byte */
_outp(0x3E1,02h); /* load 02h into LAST high byte */
/*setup control register: no wait states, 8-bit data access */
Search WWH ::




Custom Search