Execute Transfer Count Register (Etcr) - Hitachi H8S/2215 Series Hardware Manual

Hitachi single-chip microcomputer
Table of Contents

Advertisement

7.3.3

Execute Transfer Count Register (ETCR)

• Short Address Mode
ETCR is a 16-bit readable/writable register that specifies the number of transfers. The setting of
this register is different for sequential mode and idle mode on the one hand, and for repeat mode
on the other.
(1) Sequential Mode and Idle Mode
In sequential mode and idle mode, ETCR functions as a 16-bit transfer counter (with a count
range of 1 to 65,536). ETCR is decremented by 1 each time a transfer is performed, and when
the count reaches H'0000, the DTE bit in DMABCR is cleared, and transfer ends.
(2) Repeat Mode
In repeat mode, ETCR functions as transfer counter ETCRL (with a count range of 1 to 256)
and transfer number storage register ETCRH. ETCRL is decremented by 1 each time a transfer
is performed, and when the count reaches H'00, ETCRL is loaded with the value in ETCRH. At
this point, MAR is automatically restored to the value it had when the count was started. The
DTE bit in DMABCR is not cleared, and so transfers can be performed repeatedly until the
DTE bit is cleared by the user.
ETCR is not initialized by a reset or in standby mode.
• Full Address Mode
ETCR is a 16-bit readable/writable register that specifies the number of transfers. The function of
this register is different in normal mode and in block transfer mode. ETCR is not initialized by a
reset or in standby mode.
(1) Normal Mode
(a) ETCRA
In normal mode, ETCRA functions as a 16-bit transfer counter. ETCRA is decremented by
1 each time a transfer is performed, and transfer ends when the count reaches H'0000.
ETCRB is not used at this time.
(b) ETCRB
ETCRB is not used in normal mode.
(2) Block Transfer Mode
(a) ETCRA
In block transfer mode, ETCRAL functions as an 8-bit block size counter and ETCRAH
holds the block size. ETCRAL is decremented each time a 1-byte or 1-word transfer is
performed, and when the count reaches H'00, ETCRAL is loaded with the value in
ETCRAH. So by setting the block size in ETCRAH and ETCRAL, it is possible to
repeatedly transfer blocks consisting of any desired number of bytes or words.
Rev. 3.0, 10/02, page 146 of 686

Advertisement

Table of Contents
loading

Table of Contents