Top Correction Registers (Top0Cc-Top10Cc) - Mitsubishi Electric M32R Series User Manual

Mitsubishi 32-bit risc single-chip microcomputers
Table of Contents

Advertisement

10
10.3.7

TOP Correction Registers (TOP0CC-TOP10CC)

TOP0 Correction Register (TOP0CC)
TOP1 Correction Register (TOP1CC)
TOP2 Correction Register (TOP2CC)
TOP3 Correction Register (TOP3CC)
TOP4 Correction Register (TOP4CC)
TOP5 Correction Register (TOP5CC)
TOP6 Correction Register (TOP6CC)
TOP7 Correction Register (TOP7CC)
TOP8 Correction Register (TOP8CC)
TOP9 Correction Register (TOP9CC)
TOP10 Correction Register (TOP10CC)
D0
1
2
D
Bit Name
0-15
TOP0CC-TOP10CC
Note: This register must always be accessed in halfwords.
The TOP correction registers are used to correct the TOP counter value by adding or subtracting it
in the middle of operation. To increase or reduce the counter value, write a value to this correction
register, the value by which you want to be increased or reduced from the initial count set in the
counter. To add, write the value you want to add to the correction register directly as is; to subtract,
write the two's complement of the value you want to subtract to the correction register.
Correction of the counter is performed synchronously with a clock period next to the one in which
the correction value was written to the TOP correction register. In this case, one down-count in the
clock period during which the correction was performed is canceled. Therefore, note that the
counter value actually is corrected by (correction register value + 1). For example, if the initial
counter value is 10 and you write a value 3 to the correction register when the counter has counted
down to 5, then the counter underflows after a total of 15 counts.
3
4
5
6
TOP0CC-TOP10CC
(Acceptable set values +32767- –32768)
10-79
MULTIJUNCTION TIMERS
10.3 TOP (Output-related 16-bit Timer)
7
8
9
10
11
Function
16-bit correction register value
<Address:H'0080 0246>
<Address:H'0080 0256>
<Address:H'0080 0266>
<Address:H'0080 0276>
<Address:H'0080 0286>
<Address:H'0080 0296>
<Address:H'0080 02A6>
<Address:H'0080 02B6>
<Address:H'0080 02C6>
<Address:H'0080 02D6>
<Address:H'0080 02E6>
12
13
14
D15
<When reset: Indeterminate>
R
Ver.0.10
W

Advertisement

Table of Contents
loading

Table of Contents