The Direct Memory Access (DMA) module is designed to service data transfers
between different memory regions directly, without intervention from the CPU. By
eliminating the need for CPU-intensive management of handling interrupts intended for
data transfers, the CPU now can spend more time on other tasks.
The DMA modules can be independently programmed to transfer data between
different memory locations, move different data sizes, and use a wide range of hardware
triggers to initiate transfers. The DMA modules can even be programmed to work together,
in order to carry out more complex data transfers without CPU overhead.
Key features of the DMA module include:
- Support access to the following
memory regions:
- GPR and SFR space
(R/W)
- Program Flash memory (R
only)
- Data EEPROM memory (R
only)
- Programmable priority between
the DMA and CPU operations. Refer to the “System Arbitration” section in
the “PIC18 CPU” chapter for details.
- Programmable Source and
Destination Address modes:
- Fixed address
- Post-increment
address
- Post-decrement
address
- Programmable source and
destination sizes
- Source and Destination Pointer
register, dynamically updated and reloadable
- Source and Destination Count
register, dynamically updated and reloadable
- Programmable auto-stop based on
source or destination counter
- Software triggered transfers
- Multiple user-selectable sources
for hardware triggered transfers
- Multiple user-selectable sources
for aborting DMA transfers