Direct memory access (DMA) is a method of having a peripheral device control the processor's memory bus directly. The DMA allows a peripheral, such as the SARADC to transfer data directly to or from memory without having each byte (or word) handled by the processor. The DMA enables more efficient use of interrupts, and increases system performance by freeing up the CPU to do other tasks. Loading data in and writing data out of the CPU slows down the transfer since the CPU does not modify the data at all and only serves as an additional stop for data on the way to the final destination.
In a DMA transfer an event notifies the DMA controller that data needs to be transferred to memory. The DMA controller then asserts a DMA request signal to the CPU, asking permission to use the bus. The CPU completes its current bus activity, stops driving the bus and returns a DMA acknowledge signal to the DMA controller. The DMA controller can then read or write to the memory driving the address, data and control signals in the same manner that the CPU does. When the DMA is finished it stops driving the bus and control is given back to the CPU.