Quatech RS-422/485, MPA-200/300 user manual Interrupts

Page 23

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

Image 23
Contents QUATECH, INC MPA-200/300Page Warranty Information Page Compliances Electromagnetic Emissions Table of Contents Quatech Inc., MPA-200/300 Manual Introduction MPA-200 board drawing IRQ DMA/DRQ Hardware InstallationSCC General Information Accessing the registers RR3 RR0RR1 RR2WR3 WR0WR1 WR2Baud Rate Generator Programming SCC Data Encoding Methods IRQ3 IRQ4 IRQ5 IRQ6 IRQ7 Jumper Block ConfigurationsJ4 Interrupt Configuration J5 & J6 Interrupt Level SelectionJ10 Transmit DMA Channel Selection IRQ10 IRQ11 IRQ12 IRQ14 IRQ15J7 Line Driver Control Selection J11 Receive DMA Channel Selection Synca Rlen OUT J8 Synca to Rlen controlBase Address = 3F8H AddressingPage Interrupts Direct Memory Access Page Reqa Configuration Register D0 -TXSRC, Transmit DMA Source D1 -RXSRC, Receive DMA SourceTM ST Llen Rlen Rcken Tcken Rxden Txden Communications RegisterD0 -TRANSMITTER Enable D1 -RECEIVER EnableDTE / DCE Configuration Rrclk Rtclk Trxca Tclk Ttclk DTE ConfigurationDCE Configuration DCE Clock Configuration External Connections CTS Ctsa +DSR Dcda DTR DTR/REQA DSR Dcda +RRCLK Trxc Test ModeTest Mode Null-Modem Cables Connector Notation +RXD,-RXD Circuit AB Signal Ground Connector Notation DgndCircuit CC Data SET Ready DSR Connector Notation +DSR,-DSR Connector Notation +TXD,-TXDCircuit CB Clear to Send CTS Connector Notation +CTS,-CTS Connector Notation +RTCLK,-RTCLKConnector Notation +RRCLK,-RRCLK Circuit CA Request to Send RTS Connector Notation +RTS,-RTSCircuit RL Remote Loopback RL Connector Notation Rlbk Circuit CD DTE Ready DTR Connector Notation +DTR,-DTRCircuit LL Local Loopback LL Connector Notation Llbk Circuit TM Test Mode TM Connector Notation Test Mode Specifications MPA-200/300 Version March