Table 7.5 Register Functions In Repeat Mode - Hitachi H8S/2215 Series Hardware Manual

Hitachi single-chip microcomputer
Table of Contents

Advertisement

Table 7.5
Register Functions in Repeat Mode
Register
23
MAR
23
15
H'FF
IOAR
7
0
ETCRH
7
0
ETCRL
MAR specifies the start address of the transfer source or transfer destination as 24 bits. MAR is
incremented or decremented by 1 or 2 each time a byte or word is transferred. IOAR specifies the
lower 16 bits of the other address. The 8 bits above IOAR have a value of H'FF. The number of
transfers is specified as 8 bits by ETCRH and ETCRL. The maximum number of transfers, when
H'00 is set in both ETCRH and ETCRL, is 256.
In repeat mode, ETCRL functions as the transfer counter, and ETCRH is used to hold the number
of transfers. ETCRL is decremented by 1 each time a transfer is executed, and when its value
reaches H'00, it is loaded with the value in ETCRH. At the same time, the value set in MAR is
restored in accordance with the values of the DTSZ and DTID bits in DMACR. The MAR
restoration operation is as shown below.
MAR = MAR – (–1)
The same value should be set in ETCRH and ETCRL.
In repeat mode, operation continues until the DTE bit is cleared. To end the transfer operation,
therefore, you should clear the DTE bit to 0. A transfer end interrupt request is not sent to the CPU
or DTC. By setting the DTE bit to 1 again after it has been cleared, the operation can be restarted
from the transfer after that terminated when the DTE bit was cleared. Figure 7.7 illustrates
operation in repeat mode.
Function
DTDIR = 0
DTDIR = 1
0
Source
Destination
address
address
register
register
0
Destination
Source
address
address
register
register
Holds number of transfers
Transfer counter
DTID
DTSZ
· 2
· ETCRH
Initial Setting
Start address of
transfer destination
or transfer source
Start address of
transfer source or
transfer destination
Number of transfers Fixed
Number of transfers Decremented every
Rev. 3.0, 10/02, page 169 of 686
Operation
Incremented/decrem
ented every transfer.
Initial setting is
restored when value
reaches H'0000
Fixed
transfer. Loaded
with ETCRH value
when count reaches
H'00

Advertisement

Table of Contents
loading

Table of Contents