RL78/G1H CHAPTER 7 TIMER ARRAY UNIT
R01UH0575EJ0120 Rev. 1.20 Page 148 of 920
Dec 22, 2016
7.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 SPLIT 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.
Figure 7 - 7 Format of Timer data register mn (TDRmn) (n = 0, 2)
Figure 7 - 8 Format of Timer data register mn (TDRmn) (n = 1, 3)
(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).
Remark m: Unit number (m = 0, 1), n: Channel number (n = 0 to 3)
Address: FFF18H, FFF19H (TDR00), FFF64H, FFF65H (TDR02) After reset: 0000H R/W
FFF70H, FFF71H (TDR10), FFF74H, FFF75H (TDR12)
FFF19H (TDR00) FFF18H (TDR00)
1514131211109876543210
TDRmn
Address: FFF1AH, FFF1BH (TDR01), FFF66H, FFF67H (TDR03) After reset: 00H R/W
FFF72H, FFF73H (TDR11), FFF76H, FFF77H (TDR13)
FFF1BH (TDR01H) FFF1AH (TDR01L)
1514131211109876543210
TDRmn