![Renesas M16C/60 Series User Manual Download Page 338](http://html1.mh-extra.com/html/renesas/m16c-60-series/m16c-60-series_user-manual_1440171338.webp)
R01UH0136EJ0210 Rev.2.10
Page 305 of 800
Jul 31, 2012
M16C/64A Group
18. Timer B
18.2.3
Timer Bi Register (TBi) (i = 0 to 5)
Access this register in 16-bit units.
Event Counter Mode
The timer counts pulses from an external device, or overflows or underflows of other timers.
Pulse Period Measurement Mode, Pulse Width Measurement Mode
Set these modes when the TBiS bit in the TABSR or TBSR register is 0 (count stopped).
These modes become read only (RO) when the TBiS bit in the TABSR or TBSR register is 1 (count
started).
The counter starts counting the count source at an active edge of the measurement pulse, transfers the
count value to a register at the next active edge, and continues counting.
The measurement result can be read by reading the TBi register when bits PPWFS12 to PPWFS10 in
the PPWFS1 register and bits PPWFS22 to PPWFS20 in the PPWFS2 register are 0.
While counting, the counter value can be read by reading the TBi register when bits PPWFS12 to
PPWFS10 and bits PPWFS22 to PPWFS20 are 1.
(b15)
b7
b7
b0
Setting Range
Mode
Function
RW
(b8)
b0
0000h to FFFFh
Set an initial value.
Measures a pulse period or width.
Read the counter value while counting.
Pulse period
measurement mode,
Pulse width
measurement mode
RW
0000h to FFFFh
When n = setting value,
counter cycle: (n + 1)
fj
Timer mode
RW
0000h to FFFFh
When n = setting value,
n + 1 count
Event counter mode
RW
fj : Count source frequency
Timer Bi Register (i = 0 to 5)
Symbol
Address
Reset Value
TB0
0331h to 0330h
XXXXh
TB1
0333h to 0332h
XXXXh
TB2
0335h to 0334h
XXXXh
TB3
0311h to 0310h
XXXXh
TB4
0313h to 0312h
XXXXh
TB5
0315h to 0314h
XXXXh
Summary of Contents for M16C/60 Series
Page 853: ...M16C 64A Group R01UH0136EJ0210...