Pulse Period/Pulse Width Measurement Modes - Renesas M16C/64C User Manual

Table of Contents

Advertisement

M16C/64C Group
18.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 18.9 lists Specifications of Pulse Period/Pulse Width Measurement
Modes, Table 18.10 lists Registers and Settings in Pulse Period/Pulse Width Measurement Modes,
Figure 18.6 shows Operation Example in Pulse Period Measurement Mode, and Figure 18.7 shows an
Operation Example in Pulse Width Measurement Mode.
Table 18.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 5
TBiS: Bit in the TABSR or TBSR 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.
R01UH0092EJ0110 Rev.1.10
Jul 31, 2012
f1TIMAB, f2TIMAB, f8TIMAB, f32TIMAB, f64TIMAB, 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 and PPWFS22 to PPWFS20 in registers
PPWFS1 and PPWFS2 are 0
Value of the reload register (measurement result) can be read by reading the
(2)
TBi register.
When bits PPWFS12 to PPWFS10 and PPWFS22 to PPWFS20 in registers
PPWFS1 and PPWFS2 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)
18. Timer B
Page 320 of 807

Advertisement

Table of Contents
loading

This manual is also suitable for:

M16c/60 seriesM16c series

Table of Contents