03.01.2015 Views

80C186EC/80C188EC Microprocessor User's Manual

80C186EC/80C188EC Microprocessor User's Manual

80C186EC/80C188EC Microprocessor User's Manual

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.

CHAPTER 10<br />

DIRECT MEMORY ACCESS UNIT<br />

In many applications, large blocks of data must be transferred between memory and I/O space. A<br />

disk drive, for example, usually reads and writes data in blocks that may be thousands of bytes<br />

long. If the CPU were required to handle each byte of the transfer, the main tasks would suffer a<br />

severe performance penalty. Even if the data transfers were interrupt driven, the overhead for<br />

transferring control to the interrupt handler would still decrease system throughput.<br />

Direct Memory Access, or DMA, allows data to be transferred between memory and peripherals<br />

without the intervention of the CPU. Systems that use DMA have a special device, known as<br />

the DMA controller, that takes control of the system bus and performs the transfer between memory<br />

and the peripheral device. When the DMA controller receives a request for a transfer from a<br />

peripheral, it signals the CPU that it needs control of the system bus. The CPU then releases control<br />

of the bus and the DMA controller performs the transfer. In many cases, the CPU releases the<br />

bus and continues to execute instructions from the prefetch queue. If the DMA transfers are relatively<br />

infrequent, there is no degradation of software performance; the DMA transfer is transparent<br />

to the CPU.<br />

The DMA Unit has four channels. Each channel can accept DMA requests from one of four<br />

sources: an external request pin, the Serial Communications Unit, the Timer/Counter Unit or direct<br />

programming. Data can be transferred between any combination of memory and I/O space.<br />

The DMA Unit can access the entire memory and I/O space in either byte or word increments.<br />

10.1 FUNCTIONAL OVERVIEW<br />

The DMA Unit is logically divided into two modules with two channels each. The four channels<br />

are functionally identical. The following discussion is hierarchical, beginning with an overview<br />

of a single channel and ending with a description of the full four-channel unit.<br />

10.1.1 The DMA Transfer<br />

A DMA transfer begins with a request. The requesting device may either have data to transmit (a<br />

source request) or it may require data (a destination request). Alternatively, transfers may be initiated<br />

by the system software without an external request.<br />

10-1

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

Saved successfully!

Ooh no, something went wrong!