Quatech MPAP-100 user manual Interrupts

Models: MPAP-100

1 64
Download 64 pages 37.9 Kb
Page 28
Image 28
8 Interrupts

8 Interrupts

The MPAP-100 will operate using the interrupt level (IRQ) assigned by the PCMCIA system. Interrupts can come from the SCC, the external FIFOs or RS-232 test mode. The interrupt source is selected by bits 4 and 5 of the Configuration Register (see page 41).

When using interrupts with the MPAP-100, the application must have an interrupt service routine (ISR). There are several things that an ISR must do to allow proper system operation:

1.If the external FIFOs are enabled, read the Interrupt Status Register (see page 43) to determine whether the interrupt was caused by a FIFO event or by theSCC.

2.If the TX_FIFO bit is set, at least 512 bytes can be written to the Tx FIFO. If the

RX_FIFO bit is set, at least 512 bytes can be read from the Rx FIFO. I/O block move instructions may be useful. Check the FIFO Status Register (see page 44) after servicing the FIFO(s) to see if further FIFO service is required.

3.If the SCC bit is set, do an SCC software interrupt acknowledge by reading Read Register 2 in channel B of the SCC. The value read can also be used to vector to the appropriate part of the ISR.

4.Service the SCC interrupt by reading the receiver buffer, writing to the transmit buffer, issuing commands to the SCC, etc.

5.Write a Reset Highest Interrupt Under Service (IUS) command to the SCC by writing 0x38 to Write Register 0.

6.Check for other interrupts pending in the SCC by reading Read Register 3. Perform further interrupt servicing if necessary.

7.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 port 0x60, then a 0x20 to port 0x20 (due to the interrupt controllers being cascaded). Device drivers running under other operating systems may have varying requirements concerning the End of Interrupt command.

For further information on these subjects or any others involving the SCC contact Zilog for a complete technical manual.

Page 28
Image 28
Quatech MPAP-100 user manual Interrupts