Quatech RS-422/485 Network Card User Manual


 
6 INTERRUPTS
The MPA-200 supports eleven interrupt levels: IRQ2 -7, IRQ10 - 12, and IRQ14
- 15. The interrupt level is selected through jumper blocks J5 and J6 ( see
JUMPER BLOCK CONFIGURATIONS on page 11). The interrupt source is
selected by bits D4 and D5 of the configuration register. The MPA-200 has three
interrupt sources: interrupt on terminal count, interrupt on test mode, and interrupt
from the SCC. Interrupts from the SCC can occur on a number of conditions,
depending on which is programmed. These include interrupt on first character
received, interrupt on all characters received, interrupt on special condition
received, interrupt on character transmitted, and interrupt on External/Status
(see manufacturers data sheets for more details). Also, jumper block J4 can be
selected to provide for interrupt sharing on the MPA-200.
When using interrupts with the MPA-200, it is required that the applications
program have an interrupt service routine (ISR). There are several things that an
ISR must do to allow proper system operation:
1. Do a software interrupt acknowledge to the SCC. This is accom-
plished by reading the interrupt vector register, status register 2, in
channel B of the SCC. The value supplied by this read can also be
used to vector to the appropriate part of the ISR.
2. Service the interrupt by reading the receiver buffer, writing to the
transmit buffer, etc.
3. Write a Reset Highest Interrupt Under Service (IUS) to the SCC. This
is done by writing a 0x38 to the SCC command register.
4. Check for any additional interrupts pending in the SCC and service
them.
5. For applications running under DOS, a nonspecific End of Interrupt
must be submitted to the interrupt controller. For Interrupts 2-7 this is
done by writing a 0x20 to port 0x20. For Interrupts 10-12,14 and 15
this is done by writing a 0x20 to 0x60, then a 0x20 to 0x20 (Due to the
interrupt controllers being cascaded). Note that this should only be
done if it is a requirement of the operating system being used.
For further information on these subjects or any others involving the SCC contact
the manufacturer of the SCC being used for a complete technical manual.
17 Quatech Inc., MPA-200/300 Manual