17.06.2014 Views

Hardware Manual - RTD Embedded Technologies, Inc.

Hardware Manual - RTD Embedded Technologies, Inc.

Hardware Manual - RTD Embedded Technologies, Inc.

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

DMA transfers data between a peripheral device and PC memory without using the processor as an<br />

intermediate. Bypassing the processor in this way allows very fast transfer rates. All PCs contain the necessary<br />

hardware components for accomplishing DMA. However, software support for DMA is not included as part of<br />

the BIOS or DOS, leaving you with the task of programming the DMA controller yourself. With a little care, such<br />

programming can be successfully and efficiently achieved.<br />

The following discussion is based on using the DMA controller to get data from a peripheral device and write it<br />

to memory. The opposite can also be done; the DMA controller can read data from memory and pass it to a<br />

peripheral device. There are a few minor differences, mostly in programming the DMA controller, but in general<br />

the process is the same.<br />

The following steps are required when using DMA:<br />

1. Choose a DMA channel.<br />

2. Allocate a buffer.<br />

3. Calculate the page and offset of the buffer.<br />

4. Set the DMA page register.<br />

5. Program the 8237 DMA controller.<br />

6. Program device generating data (DM6425HR).<br />

7. Enable DMA channel.<br />

8. Wait until DMA is complete.<br />

9. Disable DMA channel.<br />

Each step is detailed in the following sections.<br />

Choosing a DMA Channel<br />

There are a number of DMA channels available on the PC for use by peripheral devices. The DM6425HR can use<br />

DMA channel 5, 6, or 7, selected through software. You can arbitrarily choose any of these; in most cases your<br />

choice will be fine. Occasionally though, you will have another peripheral device (for example, a tape backup or<br />

Bernoulli drive) that also uses the DMA channel you have selected. This will certainly cause erratic results and<br />

can be hard to detect. The best approach to pinpoint this problem is to read the documentation for the other<br />

peripheral devices in your system and try to determine which DMA channel each uses.<br />

84 DM6425HR dataModule BDM-610010034 Rev C

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!