English
Language : 

M16C65 Datasheet, PDF (389/829 Pages) Renesas Technology Corp – RENESAS MCU M16C FAMILY / M16C/60
Under development
M16C/65 Group
Preliminary Specification
This is a preliminary specification and is subject to change.
18. Timer B
18.3.4 Pulse Period/Pulse Width Measurement Modes
In pulse period and pulse width measurement modes, the timer measures 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 the Setting in Pulse Period/Pulse Width Measurement Modes, Figure
18.6 shows Operation Example in Pulse Period Measurement Mode, and Figure 18.7 shows Operation
Example in Pulse Width Measurement Mode.
Table 18.9 Specifications of Pulse Period/Pulse Width Measurement Modes
Item
Specification
Count source
f1TIMAB, f2TIMAB, f8TIMAB, f32TIMAB, f64TIMAB, fOCO-F, fOCO-S, fC32
Count operations
• Increment
• Counter value is transferred to reload register at an active edge of the
measurement pulse. The counter value is set to 0000h to continue counting.
Count start condition Set the TBiS bit (3) to 1 (start counting).
Count stop condition Set the TBiS bit to 0 (stop counting).
Interrupt request
generation timing
• When an active edge of measurement pulse is input (1)
• Timer overflow. When an overflow occurs, the MR3 bit in the TBiMR register is
set to 1 (overflowed) simultaneously.
TBiIN pin function
Measurement pulse input
Read from timer
When bits PPWFS12 to PPWFS10 and PPWFS22 to PPWFS20 in registers
PPWFS1 and PPWFS2 are 0
• Contents of the reload register (measurement result) can be read by reading
the TBi register (2)
When bits PPWFS12 to PPWFS10 and PPWFS22 to PPWFS20 in registers
PPWFS1 and PPWFS2 are 1
• Contents of the counter (counter value) can be read by reading the TBi register
• Contents of the reload register (measurement result) can be read by reading
the TBi1 register
Write to timer
• When not counting
Value written to the TBi register is written to both reload register and counter.
• When counting
Value written to the TBi register is written to only reload register
(transferred to counter when reloaded next).
i = 0 to 5
Notes:
1. No Interrupt request is generated when the first active edge is input after the timer starts
counting.
2. Value read from the TBi register is undefined until the second active edge is input after the timer
starts counting.
3. Bits TB0S to TB2S are assigned to bits 5 to 7 in the TABSR register, and bits TB3S to TB5S are
assigned to bits 5 to 7 in the TBSR register.
REJ09B0484-0030 Rev.0.30 Sep 09, 2008
Page 354 of 791