English
Language : 

M16C62_M Datasheet, PDF (366/615 Pages) Renesas Technology Corp – 16-BIT SINGLE-CHIP MICROCOMPUTER M16C FAMILY / M16C/60 SERIES
Timer B
Mitsubishi microcomputers
M16C / 62A Group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Selecting pulse period / pulse width measurement mode and functions
b7
b0 Timer Bi mode register (i=0 to 5) [Address 039B16 to 039D16, 035B16 to 035D16]
1 0 1 0 TBiMR (i=0 to 5)
Selection of pulse period / pulse width measurement mode
Measurement mode select bit
b3 b2
1 0 : Pulse width measurement (Interval between measurement pulse falling edge to
rising edge, and between rising edge to falling edge)
Fixed to “0” in pulse period/pulse width measurement mode (i = 0, 3)
In an attempt to write to this bit, write “0” (i = 1, 2, 4, 5)
Timer Bi overflow flag
0 : Timer did not overflow
1 : Timer has overflowed
Count source select bit
b7 b6
0 0 : f1
0 1 : f8
1 0 : f32
1 1 : fC32
b7
b6
Count
Count source period
source f(XIN) : 16MHZ f(XcIN) : 32.768kHZ
0 0 f1
62.5ns
0 1 f8
500ns
1 0 f32
2µs
1 1 fC32
976.56µs
Setting clock prescaler reset flag
(This function is effective when fC32 is selected as the count source. Reset the prescaler for generating fC32 by
dividing the XCIN by 32.)
b7
b0
Clock prescaler reset flag [Address 038116]
CPSRF
Clock prescaler reset flag
0 : No effect
1 : Prescaler is reset (When read, the value is “0”)
Setting count start flag
b7
b0 Count start flag
b7
[Address 038016]
TABSR
Timer B0 count start flag
Timer B1 count start flag
Timer B2 count start flag
Timer B3,4,5 count start
b0 flag
[Address 034016]
TBSR
Timer B3 count start flag
Timer B4 count start flag
Timer B5 count start flag
Start count
Clearing overflow flag
b7
0
b0 Timer Bi mode register (i=0 to 5) [Address 039B16 to 039D16, 035B16 to 035D16]
TBiMR (i=0 to 5)
Timer Bi overflow flag
0 : Timer did not overflow
Figure 2.3.11. Set-up procedure of pulse width measurement mode
2-49