Download Print this page

Renesas M16C/50 Series User Manual page 321

Advertisement

M16C/5L Group, M16C/56 Group
16.2.3
Timer Bi Register (TBi) (i = 0 to 2)
Timer Bi Register (i = 0 to 2)
(b15)
(b8)
b7
b0
b7
fj : Count source frequency
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 is 0 (count stopped).
These modes become read only (RO) when the TBiS bit in the TABSR 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 are 0.
While counting, the counter value can be read by reading the TBi register when bits PPWFS12 to
PPWFS10 are 1.
R01UH0127EJ0110 Rev.1.10
Sep 01, 2011
b0
Symbol
TB0
TB1
TB2
Mode
When n = setting value,
Timer mode
counter cycle: (n + 1)
When n = setting value,
Event counter mode
n + 1 count
Pulse period
Set an initial value.
measurement mode,
Measures a pulse period or width.
Pulse width
Read the counter value while counting.
measurement mode
Address
0331h to 0330h
0333h to 0332h
0335h to 0334h
Function
0000h to FFFFh
fj
0000h to FFFFh
0000h to FFFFh
16. Timer B
Reset Value
XXXXh
XXXXh
XXXXh
Setting Range
RW
RW
RW
RW
Page 284 of 803

Advertisement

loading