BAT32G1x9 user manual | Chapter 6 Universal timer unit Timer4/8
145 / 1149
Rev.1.02
6.2.3
Timer data register mn (TDRmn).
This is a 16-bit register that can be used to switch between the capture function and the compare function.
The operating mode is selected by the MDmn3 to MDmn0 bits of the timer mode register mn (TMRmn), and the
capture function and the comparison function are switched.
The TDRmn register can be rewritten at any time.
This register can be read and written in 16-bit increments.
Timer4 is SPLIT in 8-bit timer mode (timer mode registers m1, m3 (TMRm1, TMRm3). The bit is "1"), which
can read and write the TDRm1 register and the TDRm3 register in 8 bits, where TDRm1H and TDRm3H is
used as the high 8 bit, and TDRm1L and TDRm3L are used as the low 8 bit.
After generating the reset signal, the value of the TDRmn register changes to "0000H".
Figure 6-3
Timer data register mn(TDRmn) (n=0, 2, 4, 5, 6, 7).
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
TDRmn
Figure 6-4
Timer data registers mn(TDRmn) (n=1, 3).
(TDR01H
can support 8bit operation
) (TDR01L
can support 8bit operation
).
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
TDRmn
i.
The case where the timer data register mn (TDRmn) is used as a comparison registerThe count is
decremented from the setpoint of the TDRmn register and generates an interrupt signal (INTTMmn) when
the count value changes to "0000H". The value of the TDRmn register is maintained until it is rewritten.
Note: Even if the input capture trigger signal, the TDRmn
register set to the comparison function
does not perform a
capture operation.
ii.
The case where the timer data register mn (TDRmn) is used as the capture registerThe count value of
the timer count register mn (TCRmn) is captured to the TDRmn register via input capture trigger. Th e
effective edge of the TImn pin can be selected as the capture trigger signal. The timing mode register
mn (TMRmn) sets the selection of capture triggers.
Note: m: unit number (m=0,1) n: channel number (when m=0: n=0~3, m=1: n=0~7).