16-Bit Reload Register (Tmrd0/Tmrd1) - Fujitsu MB90460 Series Hardware Manual

F2mc-16lx 16-bit microcontroller
Table of Contents

Advertisement

CHAPTER 12 16-BIT RELOAD TIMER
12.4.4

16-bit Reload Register (TMRD0/TMRD1)

The 16-bit reload register (TMRD0/TMRD1) sets a reload value in the 16-bit down
counter. The value written to this register is loaded into the down counter, and the
value is counted down.
■ 16-bit Reload Register (TMRD0/TMRD1)
Figure 12.4-5 shows the 16-bit reload registers (TMRD0/TMRD1).
16-bit Reload Register (Upper)
Address: ch.0 000085
ch.1 000089
Read/write
Initial value
16-bit Reload Register (Lower)
Address: ch.0 000084
ch.1 000088
Read/write
Initial value
The initial value of the counter is set in this register when counting is disabled (TMCSRL0/
TMCSRL1:CNTE = 0), regardless of the operating mode of the 16-bit reload timer. When counting is
enabled (TMCSRL0/TMCSRL1:CNTE = 1) and the counter is started, counting down starts from the value
written to this register.
In reload mode, the value set in the 16-bit reload register (TMRD0/TMRD1) is reloaded into the counter
when an underflow occurs, and counting down continues. In single-shot mode, the counter stops at FFFF
when an underflow occurs.
Notes:
• Write a value to this register in the counter stop (TMCSRL0/TMCSRL1:CNTE = 0) state. Also,
always use a word transfer instruction (MOVW 003AH, A etc.) to write a value to this register.
• Although the 16-bit reload register (TMRD0/TMRD1) is functionally a write-only register, it is
allocated to the same address as the read-only 16-bit timer registers (TMR0/TMR1). Accordingly,
since the read value is used as the TMR0/TMR1 value, the INC/DEC instruction and other
instructions for read-modify-write (RMW) operations cannot be used.
242
Figure 12.4-5 16-bit Reload Register (TMRD0/TMRD1)
bit
15
14
13
H
D14
D13
D15
H
W
W
W
X
X
X
bit
7
6
5
H
D07
D06
D05
H
W
W
X
X
12
11
10
D12
D11
D10
W
W
W
X
X
X
4
3
2
D04
D03
D02
W
W
W
W
X
X
X
9
8
D09
D08
TMRD0/TMRD1
W
W
X
X
1
0
D01
D00
TMRD0/TMRD1
W
W
X
X
X
H

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mb90465 series

Table of Contents