R01UH0136EJ0210 Rev.2.10
Page 322 of 800
Jul 31, 2012
M16C/64A Group
18. Timer B
Figure 18.7
Operation Example in Pulse Width Measurement Mode
0000h
TBiIN input
FFFFh
Count source
(Undefined
value)
(Undefined
value)
Set to 0 by accepting an interrupt request, or by a program.
Undefined value
Measured value 2
TBi register
IR bit
in the TBiIC register
Interrupt request
by overflow
MR3 bit
in the TBiMR register
Count
started
Set to 0 by writing to the TBiMR register.
Transfer to
the TBi register
(Measured value 3)
(Measured
value 2)
Becomes 0000h
Transfer to the TBi register
(Measured value 1)
Becomes 0000h
Undefined
value
Measured
value 1
Measured
value 3
Interrupt request by an effective edge
of the measured pulse
i = 0 to 5
The above assumes the following:
•
Bits MR1 to MR0 in the TBiMR register = 10b (measure pulse width).
•
Bits PPWFS12 to PPWFS10 and PPWFS22 to PPWFS20 in the PPWFS1 and PPWFS2 registers = 0
(measurement result stored in the TBi register).
•
No initial value is set while timer Bi is stopped.
TBiS bit in the
TABSR register or
TBSR register
Содержание M16C/60 Series
Страница 853: ...M16C 64A Group R01UH0136EJ0210...