Learn about the technologies behind the Internet with The TCP/IP Guide!
NOTE: Using robot software to mass-download the site degrades the server and is prohibited. See here for more.
Find The PC Guide helpful? Please consider a donation to The PC Guide Tip Jar. Visa/MC/Paypal accepted.
View over 750 of my fine art photos any time for free at DesktopScenes.com!

[ The PC Guide | Systems and Components Reference Guide | Motherboard and System Devices | System Resources | Interrupts (IRQs) | Interrupt Function and Operation ]

Interrupt Controllers

Device interrupts are fed to the processor using a special piece of hardware called an interrupt controller. The standard for this device is the Intel 8259 interrupt controller, and has been since early PCs. As with most of these dedicated controllers, in modern motherboards the 8259 is, in most cases,  incorporated into a larger chip as part of the chipset.

The interrupt controller has 8 input lines that take requests from one of 8 different devices. The controller then passes the request on to the processor, telling it which device issued the request (which interrupt number triggered the request, from 0 to 7). The original PC and XT had one of these controllers, and hence supported interrupts 0 to 7 only.

Starting with the IBM AT, a second interrupt controller was added to the system to expand it; this was part of the expansion of the ISA system bus from 8 to 16 bits. In order to ensure compatibility (isn't that a recurring theme?) the designers of the AT didn't want to change the single interrupt line going to the processor. So what they did instead was to cascade the two interrupt controllers together.

The first interrupt controller still has 8 inputs and a single output going to the processor. The second one has the same design, but it takes 8 new inputs (doubling the number of interrupts) and its output feeds into input line 2 of the first controller. If any of the inputs on the second controller become active, the output from that controller triggers interrupt #2 on the first controller, which then signals the processor.

So what happens to IRQ #2? That line is now being used to cascade the second controller, so the AT's designers changed the wiring on the motherboard to send any devices that used IRQ2 over to IRQ9 instead. What this means is that any older devices that used IRQ2 now use IRQ9, and if you set any device to use IRQ2 on an AT or later system, it is really using IRQ9.

Devices designed to use IRQ2 as a primary setting are rare in today's systems, since IRQ2 has been out of use for over 10 years. In most cases IRQ2 is just considered "unusable", while IRQ9 is a regular, usable interrupt line. However, some modems for example still offer the use of IRQ2 as a way to get around the fact that COM3 and COM4 share interrupts with COM1 and COM2 by default. You may need to do this if you have a lot of devices contending for the low-numbered IRQs (which is very common).

Note: If you select IRQ2 on a device such as a modem, IRQ9 will really be used instead. Any software that uses the device needs to be told that it is using IRQ9, not IRQ2. Also, if you do this, you cannot use the "real" IRQ9 for any other device. You should never attempt to use IRQ2 if you are already using IRQ9 on your PC, and vice-versa.

Next: IRQ Lines and the System Bus

Home  -  Search  -  Topics  -  Up

The PC Guide (http://www.PCGuide.com)
Site Version: 2.2.0 - Version Date: April 17, 2001
Copyright 1997-2004 Charles M. Kozierok. All Rights Reserved.

Not responsible for any loss resulting from the use of this site.
Please read the Site Guide before using this material.
Custom Search