Timer Data Register Mn (Tdrmn) - Renesas RL78/G1P Hardware User Manual

16-bit single-chip microcontroller
Hide thumbs Also See for RL78/G1P:
Table of Contents

Advertisement

RL78/G1P

6.2.2 Timer data register mn (TDRmn)

This is a 16-bit register from which a capture function and a compare function can be selected.
The capture or compare function can be switched by selecting an operation mode by using the MDmn3 to MDmn0 bits
of timer mode register mn (TMRmn).
The value of the TDRmn register can be changed at any time.
This register can be read or written in 16-bit units.
In addition, for the TDRm1 and TDRm3 registers, while in the 8-bit timer mode (when the SPLITm1 and SPLITm3 bits
of timer mode registers m1 and m3 (TMRm1, TMRm3) are 1), it is possible to read and write the data in 8-bit units, with
TDRm1H and TDRm3H used as the higher 8 bits, and TDRm1L and TDRm3L used as the lower 8 bits.
Reset signal generation clears this register to 0000H.
Address: FFF18H, FFF19H (TDR00), FFF64H, FFF65H (TDR02)
15
TDRmn
Address: FFF1AH, FFF1BH (TDR01), FFF66H, FFF67H (TDR03)
15
TDRmn
(i) When timer data register mn (TDRmn) is used as compare register
Counting down is started from the value set to the TDRmn register. When the count value reaches 0000H, an
interrupt signal (INTTMmn) is generated. The TDRmn register holds its value until it is rewritten.
Caution The TDRmn register does not perform a capture operation even if a capture trigger is input,
when it is set to the compare function.
(ii) When timer data register mn (TDRmn) is used as capture register
The count value of timer count register mn (TCRmn) is captured to the TDRmn register when the capture
trigger is input.
A valid edge of the TImn pin can be selected as the capture trigger. This selection is made by timer mode
register mn (TMRmn).
m: Unit number (m = 0), n: Channel number (n = 0 to 3)
Remark
R01UH0895EJ0100 Rev.1.00
Nov 29, 2019
Figure 6-7. Format of Timer Data Register mn (TDRmn) (n = 0, 2)
FFF19H (TDR00)
14
13
12
11
10
Figure 6-8. Format of Timer Data Register mn (TDRmn) (n = 1, 3)
FFF1BH (TDR01H)
14
13
12
11
10
CHAPTER 6 TIMER ARRAY UNIT
After reset: 0000H
9
8
7
6
5
After reset: 0000H
9
8
7
6
5
R/W
FFF18H (TDR00)
4
3
2
1
R/W
FFF1AH (TDR01L)
4
3
2
1
0
0
136

Advertisement

Table of Contents
loading

Table of Contents