DM5816/DM6816
RTD Embedded Technologies, Inc.
34
Your DM5816 can interrupt the processor when a variety of conditions are met. By using these
interrupts, you can write software that effectively deals with real world events.
Interrupt Request Lines
To allow different peripheral devices to generate interrupts on the same computer, the PC bus
has eight different interrupt request (IRQ) lines. A transition from low to high on one of these
lines generates an interrupt request which is handled by the PC’s interrupt controller. The
interrupt controller checks to see if interrupts are to be acknowledged from that IRQ and, if
another interrupt is already in progress, it decides if the new request should supersede the one
in progress or if it has to wait until the one in progress is done. This prioritizing allows an
interrupt to be interrupted if the second request has a higher priority. The priority level is based
on the number of the IRQ; IRQ0 has the highest priority, IRQ1 is second-highest, and so on
through IRQ7, which has the lowest. Many of the IRQs are used by the standard system
resources. IRQ0 is used by the system timer, IRQ1 is used by the keyboard, IRQ3 by COM2,
IRQ4 by COM1, and IRQ6 by the disk drives. Therefore, it is important for you to know which
IRQ lines are available in your system for use by the module.
8259 Programmable Interrupt Controller
The chip responsible for handling interrupt requests in the PC is the 8259 Programmable
Interrupt Controller. To use interrupts, you need to know how to read and set the 8259’s interrupt
mask register (IMR) and how to send the end-of-interrupt (EOI) command to the 8259.
- Interrupt Mask Register (IMR)
Each bit in the interrupt mask register (IMR) contains the mask status of an IRQ line; bit 0 is for
IRQ0, bit 1
is for IRQ1, and so on. If a bit is
set
(equal to 1), then the corresponding IRQ is
masked and it will not generate an interrupt. If a bit is
clear
(equal to 0), then the corresponding
IRQ is unmasked and can generate interrupts.
The IMR is programmed through port 21H.
- End-of-Interrupt (EOI) Command
After an interrupt service routine is complete, the 8259 interrupt controller must be notified. This
is done by writing the value 20H to I/O port 20H.
Summary of Contents for DM5816
Page 1: ...BDM 610010027 Rev A DM5816 DM6816 Triggered User s Manual...
Page 7: ...DM5816 DM6816 RTD Embedded Technologies Inc 7...
Page 15: ...DM5816 DM6816 RTD Embedded Technologies Inc 15 Fig 1 7 Base Address Switch S1...
Page 22: ...DM5816 DM6816 RTD Embedded Technologies Inc 22...
Page 42: ...DM5816 DM6816 RTD Embedded Technologies Inc 42 P3 Connector P6 Connector...