Hardware Reference
In-Depth Information
Your computer's I/O ports enable communications between devices and software in your system.
They are equivalent to two-way radio channels. If you want to talk to your serial port, you need to
know on which I/O port (radio channel) it is listening. Similarly, if you want to receive data from the
serial port, you need to listen on the same channel on which it is transmitting.
Unlike IRQs and DMA channels, our systems have an abundance of I/O ports. There are exactly
65,536 ports—numbered from 0000h to FFFFh—which is a feature of the Intel x86 processor design.
Even though most devices use up to eight ports for themselves, with that many to spare, you won't run
out anytime soon. The biggest problem you have to worry about is setting two devices to use the same
port.
Most modern plug-and-play systems resolve port conflicts and select alternative ports for one of the
conflicting devices.
One confusing issue is that I/O ports are designated by hexadecimal addresses similar to memory
addresses. They are not memory; they are ports. The difference is that when you send data to memory
address 1000h, it is stored in your system's DIMM memory. If you send data to I/O port address
1000h, it is sent out on the bus on that “channel,” and anybody listening in could then “hear” it. If
nobody is listening to that port address, the data reaches the end of the bus and is absorbed by the bus
terminating resistors.
Driver programs are primarily what interact with devices at the various port addresses. The driver
must know which ports the device is using to work with it, and vice versa. That is not usually a
problem because the driver and device come from the same company.
Motherboard and chipset devices usually are set to use I/O port addresses 0h-FFh, and all other
devices use 100h-FFFFh. Table 4.61 shows the commonly used motherboard and chipset-based I/O
port usage.
Table 4.61. Motherboard and Chipset-Based Device Port Addresses
 
Search WWH ::




Custom Search