Download Print this page

Renesas M16C/50 Series User Manual page 333

Advertisement

M16C/5L Group, M16C/56 Group
16.3.4
Pulse Period/Pulse Width Measurement Modes
In pulse period and pulse width measurement modes, the timer measures the pulse period or pulse
width of an external signal. Table 16.9 lists Specifications of Pulse Period/Pulse Width Measurement
Modes, Table 16.10 lists Registers and Settings in Pulse Period/Pulse Width Measurement Modes,
Figure 16.6 shows Operation Example in Pulse Period Measurement Mode, and Figure 16.7 shows an
Operation Example in Pulse Width Measurement Mode.
Table 16.9
Specifications of Pulse Period/Pulse Width Measurement Modes
Item
Count sources
Count operations
Count start condition
Count stop condition
Interrupt request
(3)
generation timing
TBiIN pin function
Read from timer
Write to timer
i = 0 to 2
TBiS: Bit in the TABSR register
Notes:
1.
No interrupt request is generated when the first active edge is input after the timer starts
counting.
2.
The value read from the TBi register is undefined until the second active edge is input after the
timer starts counting.
3.
When timer Bi in pulse-period measurement mode or pulse-width measurement mode is used
as an event or trigger for timer A or timer B other than timer Bi, an event or trigger occurs at both
the overflow and active edge of the measurement pulse.
R01UH0127EJ0110 Rev.1.10
Sep 01, 2011
f1TIMAB, f2TIMAB, f8TIMAB, f32TIMAB, f64TIMAB, fOCO-F, fOCO-S, fC32
Increment
The counter value is transferred to the reload register at an active edge of the
measurement pulse. The counter value becomes 0000h and count continues.
Set the TBiS bit to 1 (start counting).
Set the TBiS bit to 0 (stop counting).
When an active edge of measurement pulse is input
Timer overflow. The MR3 bit in the TBiMR register becomes 1 (overflowed) at
the same time an overflow occurs.
Measurement pulse input
When bits PPWFS12 to PPWFS10 in the PPWFS1 register are 0
Value of the reload register (measurement result) can be read by reading the
(2)
TBi register.
When bits PPWFS12 to PPWFS10 in the PPWFS1 register are 1
Value of the counter (counter value) can be read by reading the TBi register.
Value of the reload register (measurement result) can be read by reading the
TBi1 register.
When not counting, the value written to the TBi register is written to both the
reload register and counter.
Specification
(1)
16. Timer B
Page 296 of 803

Advertisement

loading