354
DMAC
M
i
t
s
u
M
S
b
i
s
3
M
h
0
I
C
i
m
2
R
i
1
O
c
r
8
C
o
c
o
G
M
m
p
r
P
u
t
u
T
e
r
p
R
s
o
U
S
I
N
G
L
E
-
C
H
I
P
1
6
-
B
I
T
C
M
O
O
E
2.10 DMAC
2.10.1 Overview
DMAC transfers one data item held in the source address to the destination address every time a transfer
request is generated. The following is a DMAC overview.
(1) Source address and destination address
Both the register which indicates a source and the register which indicates a destination comprise of
24 bits, so that each can cover a 1M bytes space. After transfer of one bit of data is completed, the
address in either the source register or the destination register can be incremented. However, both
registers cannot be incremented. The links between the source and destination are as follows:
(a) A fixed address from an arbitrary 1M bytes space
(b) An arbitrary 1M bytes space from a fixed address
(c) A fixed address from another fixed address
(2) The number of bits of data transferred
The number of bit of data indicated by the transfer counter is transferred. If a 16-bit transfer is se-
lected, up to 128 K bytes can be transferred. If an 8-bit transfer is selected, up to 64K bytes can be
transferred. The transfer counter is decremented each time one bit of data is transferred, and a DMA
interrupt occurs when the transfer counter underflows.
(3) DMA transfer factor
The DMA transfer factor can be selected from the following 15 factors: falling edge of INT0/INT1 pin,
timer A0 interrupt request through timer A4 interrupt request, timer B0 interrupt request through timer
B2 interrupt request, UART0 transmission interrupt request, UART0 reception interrupt request,
UART1 transmission interrupt request, UART1 reception interrupt request, A-D conversion interrupt
request, and software trigger.
When software trigger is selected, DMA transfer is generated by writing “1” to software DMA interrupt
request bit. When other factor is selected, DMA transfer is generated by generating corresponding
interrupt request.
(4) Channel priority
If DMA0 transfer request and DMA1 transfer request occur simultaneously, priority is given to DMA0.
(5) Writing to a register
When writing to the source register or the destination register with DMA enabled, the content of the
register with a fixed address will change at the time of writing. Therefore, the user should not write to
a register with a fixed address when the DMA enable bit is set to “1”. The contents of the register with
‘forward direction’ selected, and the transfer counter, are changed when reloaded. A reload occurs
either when the transfer counter underflows, or when the DMA enable bit is re-enabled, after having
been disabled.
The reload register can be written to, as in normal conditions.
(6) Reading to a register
The reload register can be read to, as in normal conditions.