IRQ’S, DMA’S, I/O & PORTS

16. September 1997, 22:33 | by WD Milner | Full Article |

When installing, managing and troubleshooting add-on PC cards it is important to understand how the system communicates with the cards in the expansion slots.

The main system “talks” to the expansion cards through a set of addresses which include a Base address, an input/output (I/O) port address, a Direct Memory Access (DMA) channel, and an Interrupt Request (IRQ) line. Every card features a particular combination of IRQ, DMA, I/O and base address that the system uses to communicate with that card alone, and which all other cards on the expansion buss ignore. When two cards are set to a shared cobination one will be ignored or you will get intermittent performance form one or both cards.

An expansion card uses its assigned IRQ to get the central processor’s attention by interrupting its flow of operations so it can handle whatever the card needs done right away. In general, each card has a different IRQ though some mainboard system resources have fixed IRQ numbers, and some cards can share particular IRQs. While operating systems such as MS/PC-DOS handle this with no problems, others such as Microsoft Windows NT do not permit IRQ sharing.

Each system has 16 IRQs numbered 0-15. Some of these are preassigned to main system resources and some peripherals can only use a limited subset of the list which can, at times, make configuration difficult. The following is a list of IRQ values and their common usage.

Those in Gold are fixed and cannot be reused by peripherals. Those in Teal may be used if their normally assigned device is not present. Otherwise the IRQ line is generally always available.

IRQ 00 - System (System Clock on original PC)
IRQ 01 - Keyboard
IRQ 02 - System Interrupt Controller Bridge (Enhanced Graphics Adapter on original PC)
IRQ 03 - Serial Communications if present (ports 2 and 4 may share)
IRQ 04 - Serial Communications if present (ports 1 and 3 may share)
IRQ 05 - Secondary Printer Port if present (Fixed Disk Drive on original PC)
IRQ 06 - Floppy Drive Controller
IRQ 07 - Primary Printer Port if present
IRQ 08 - System Clock
IRQ 09 - Graphics Adapter
IRQ 10 - AVAILABLE
IRQ 11 - Small Computer Serial Interface (SCSI) Controller if present
IRQ 12 - Buss Mouse if present
IRQ 13 - System Floating Point Unit (FPU) if present
IRQ 14 - Primary Integrated Drive Electronics Controller if present
IRQ 15 - Secondary Integrated Drive Electronics Controller if present

DMA channels are somewhat simpler to manage, as there are only eight of them (numbered 0 to 7) and with the exception of channel 0, which is assigned to the RAM refresh controller, and channel 2, which is the floppy drive controller, they are usually all available for use. Note that under Windows NT channel 4 is also often unavailable. While some expansion cards will tolerate it, in general DMA channels should not be shared. Some types of cards however, such as sound cards, require two DMA channels.

The largest potential for conflict problems in expansion card installation is with I/O addresses. In general these addresses are in blocks, or banks, of 15, 32 or 64 kilobytes. The available address space is 0000 to FFFF though some PCI cards may use addresses beyond the FFFF address space (corresponding to the top of 1 megabyte of memory space). Addresses between 0000 and 9FFF are used by the main system memory (first 640 kilobytes) and housekeeping space hence expansion card address space effectively begins at A000.

Many cards have recommended ranges. For example SCSI cards usually use C800-CFFF while multiport cards can use multiple ranges such as A000-A800 or E000-EFFF. Many cards also load into standard RAM and so do not require a typical I/O address. Careful choice of I/O addresses is crucial as assigning the same addresses to more than one card is sure to cause conflict problems and data corruption.

The last address type to be considered is the base address. These are used by some cards in place of a DMA channel to send and receive data. There are many available and all are mapped to memory addresses by the system. While often refered to as I/O ports, they should not be confused with the previously discussed I/O addresses.

Base I/O ports range from 200 to 3FF and a number are reserved by the system. Reserved ranges include 300-31F, 330-36F, 380-3AF and 3E0-3EF. The following are some common I/O ports used by peripherals:

200 - 20F = Game (joystick) ports
230 - 23F = Buss mice
270 - 27F = Tertiary parallel printer port
2FO - 2FF = Serial Communications port 2
378-37F = Secondary parallel printer port
3B0 - 3BF = Primary parallel printer port
3C0 - 3CF = Graphics adapters
3D0 - 3DF = Graphics adapters
3F0 - 3FF = Serial Communications port 1 and floppy drive controller

While it may seem daunting at first, learning the basics of system addresses is invaluable and can save countless hours of troubleshooting should problems arise.

- 30 -

Categories: ,
Keywords: irq,dma,ports,i/o,addresses,configuration,conflicts

Comments


 



Textile help
 
* Indicates a required field.

As a SPAM prevention measure, comments are moderated and will be posted once vetted.

 

Article & Comments


Comments are not enabled for all articles or documents.

Article Navigation
|

Categories

Business
Communications
Electronics
Entertainment
Environment
Government
Internet and WWW
Miscellany
Music and Audio
News
Photography
Privacy
Psychology
Security
Society and Culture
Stage and Screen
Technology
Theology
Tips and Tricks
Web Design
Web Site


The Birches - Milner.ca Support Child Safety Online

 

 
 
 Help to FIGHT spam!
 • 
  •
•••