Pulse Period And Pulse Width Measurement Mode - Renesas M16C/60 Series Hardware Manual

Hide thumbs Also See for M16C/60 Series:
Table of Contents

Advertisement

Under development
This document is under development and its contents are subject to change.
M16C/6N5 Group

3. Pulse Period and Pulse Width Measurement Mode

In pulse period and pulse width measurement mode, the timer measures pulse period or pulse width of an
external signal. Table 1.13.8 lists specifications in pulse period and pulse width measurement mode.
Figure 1.13.20 shows TBiMR register in pulse period and pulse width measurement mode. Figure
1.13.21 shows the operation timing when measuring a pulse period. Figure 1.13.22 shows the operation
timing when measuring a pulse width.
Table 1.13.8 Specifications in Pulse Period and Pulse Width Measurement Mode
Item
Count source
Count operation
Count start condition
Count stop condition
Interrupt request generation timing • When an effective edge of measurement pulse is input (Note 2)
TBi
pin function
IN
Read from timer
Write to timer
i = 0 to 5
Note 1: The TB0S to TB2S bits are assigned to the TABSR register bit 5 to bit 7, and the TB3S to TB5S bits
are assigned to the TBSR register bit 5 to bit 7.
Note 2: Interrupt request is not generated when the first effective edge is input after the timer started counting.
Note 3: Value read from TBi register is indeterminate until the second valid edge is input after the timer starts
counting.
Rev.1.00
2003.05.30
page 119
f
, f
, f
, f
, f
1
2
8
32
C32
• Up-count
• Counter value is transferred to reload register at an effective edge of
measurement pulse. The counter value is set to "0000
Set TBiS bit (Note 1) to "1" (start counting)
Set TBiS bit to "0" (stop counting)
• Timer overflow. When an overflow occurs, the MR3 bit of TBiMR register is
set to "1" (overflow) simultaneously. The MR3 bit is set to "0" (no overflow) by
writing to TBiMR register at the next count timing or later after the MR3 bit
was set to "1". At this time, make sure TBiS bit is set to "1" (start counting).
Measurement pulse input
Contents of the reload register (measurement result) can be read by reading
TBi register (Note 3)
Value written to TBi register is written to neither reload register nor counter
Specification
" to continue counting.
16
Timer B

Advertisement

Table of Contents
loading

This manual is also suitable for:

M16c/6n5

Table of Contents