Quatech MPA-200/300, RS-422/485 user manual Direct Memory Access

Page 24

7 DIRECT MEMORY ACCESS

Direct Memory Access (DMA) is a way of directly transferring data to and from memory, resulting in high data transfer rates with very low CPU overhead. The MPA-200 allows the user to perform DMA transfers when data is received (DMARRQ) or when data is transmitted (DMATRQ). Three different DMA channels are available(DMA1 - DMA3). Which channels are selected is deter- mined by setting jumper blocks J10 and J11 (See Table 8, and Table 9). The sources of MPA-200’s requests originate from the SCC and can be programmed for a variety of DMA modes. These modes include DMA request on transmit, DMA request on receive, and DMA request on both transmit and receive.

For DMA request on transmit, the DMA controller should be programmed first for an 8 bit read transfer on the desired channel, but not yet enabled. Then the SCC should be programmed for DMA request on transmit on the desired DMA source. The sources DMA request on transmit are either the W/REQA pin (pin 10) of channel A or the DTR/REQA pin (pin 16) of channel A. The source is then determined by bit D0 of the configuration register.

Note:

The DTR/REQA pin should only be used for DMA transfers if the user does not require a valid DTR signal at the connector. This is due to the fact that when DTR/REQA is used for DMA transfer it is not a valid handshake signal.

After programming the SCC for DMA, one should enable the DMA on the MPA-200 by setting bit D2 of the configuration register. Next, the DMA on the SCC should be enabled, and finally, the DMA channel should be unmasked. The DMA controller will write the data in memory to the SCC. When the transmit buffer of the SCC becomes empty, a DMA request will be generated and the data will be transferred.

For DMA request on receive, the DMA controller should be programmed first for an 8 bit write transfer on the desired channel, but not yet enabled. Next, the SCC should be programmed for DMA request on receive on the desired DMA source. The two sources for DMA request on receive are either the W/REQA pin (pin 10) of channel A or the W/REQB pin (pin 30) of channel B. The source is then deter- mined by bit D1 on the configuration register. After programming the SCC for DMA, one should enable the DMA on the MPA-200 by setting bit D3 of the configuration register. Then, the DMA on the SCC should be enabled, and finally the DMA controller should be enabled. When a character enters the receive buffer

Quatech Inc., MPA-200/300 Manual

18

Image 24
Contents MPA-200/300 QUATECH, INCPage Warranty Information Page Compliances Electromagnetic Emissions Table of Contents Quatech Inc., MPA-200/300 Manual Introduction MPA-200 board drawing Hardware Installation IRQ DMA/DRQSCC General Information Accessing the registers RR0 RR1RR2 RR3WR0 WR1WR2 WR3Baud Rate Generator Programming SCC Data Encoding Methods Jumper Block Configurations J4 Interrupt ConfigurationJ5 & J6 Interrupt Level Selection IRQ3 IRQ4 IRQ5 IRQ6 IRQ7IRQ10 IRQ11 IRQ12 IRQ14 IRQ15 J10 Transmit DMA Channel SelectionJ11 Receive DMA Channel Selection J7 Line Driver Control SelectionJ8 Synca to Rlen control Synca Rlen OUTAddressing Base Address = 3F8HPage Interrupts Direct Memory Access Page Reqa Configuration Register D1 -RXSRC, Receive DMA Source D0 -TXSRC, Transmit DMA SourceCommunications Register TM ST Llen Rlen Rcken Tcken Rxden TxdenD1 -RECEIVER Enable D0 -TRANSMITTER EnableDTE / DCE Configuration DTE Configuration Rrclk Rtclk Trxca Tclk TtclkDCE Configuration DCE Clock Configuration External Connections DTR DTR/REQA DSR Dcda +RRCLK Trxc Test Mode CTS Ctsa +DSR DcdaTest Mode Null-Modem Cables Circuit AB Signal Ground Connector Notation Dgnd Circuit CC Data SET Ready DSR Connector Notation +DSR,-DSRConnector Notation +TXD,-TXD Connector Notation +RXD,-RXDConnector Notation +RTCLK,-RTCLK Connector Notation +RRCLK,-RRCLKCircuit CA Request to Send RTS Connector Notation +RTS,-RTS Circuit CB Clear to Send CTS Connector Notation +CTS,-CTSCircuit CD DTE Ready DTR Connector Notation +DTR,-DTR Circuit LL Local Loopback LL Connector Notation LlbkCircuit RL Remote Loopback RL Connector Notation Rlbk Circuit TM Test Mode TM Connector Notation Test Mode Specifications MPA-200/300 Version March