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

Models: RS-422/485 MPA-200/300

1 44
Download 44 pages 24.57 Kb
Page 24
Image 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

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