M16C/62P Group (M16C/62P, M16C/62PT)
15. Timers
Rev.2.41
Jan 10, 2006
Page 163 of 390
REJ09B0185-0241
Figure 15.21
TBiMR Register in Pulse Period and Pulse Width Measurement Mode
Timer Bi Mode Register (i=0 to 5)
Address
After Reset
039Bh to 039Dh
00XX0000b
035Bh to 035Dh
00XX0000b
Bit Symbol
Function
RW
RW
—
NOTES :
1.
2.
TB0MR to TB2MR
MR3
MR2
TCK1
1 0
b3 b2 b1 b0
b7 b6 b5 b4
Symbol
TMOD1
Count Source Select Bit
b7 b6
0 0 : f1 or f2
(2)
0 1 : f8
1 0 : f32
1 1 : fC32
Timer Bi Overflow Flag
(1)
0 : Timer did not overflow
1 : Timer has overflow ed
MR0
b1 b0
1 0 : Pulse period / pulse w idth measurement
mode
TMOD0
Measurement Mode Select
Bit
TB3MR to TB5MR
RW
RW
RW
b3 b2
0 0 : Pulse period measurement
(Measurement betw een a falling edge and
the next falling edge of measured pulse)
0 1 : Pulse period measurement
(Measurement betw een a rising edge and
the next rising edge of measured pulse)
1 0 : Pulse w idth measurement
(Measurement betw een a falling edge and
the next rising edge of measured pulse
and betw een a rising edge and the next
falling edge)
1 1 : Do not set to this value
RW
MR1
Selected by PCLK0 bit in the PCLKR register.
This flag is indeterminate after reset. When the TBiS bit = 1 (start counting), the MR3 bit is cleared to “0” (no overflow )
by w riting to the TBiMR register at the next count timing or later after the MR3 bit w as set to “1” (overflow ed). The
MR3 bit cannot be set to “1” in a program. The TB0S to TB2S bits are assigned to the bit 5 to bit 7 in the TABSR
register, and the TB3S to TB5S bits are assigned to the bit 5 to bit 7 in the TBSR register.
Bit Name
Operation Mode Select Bit
RW
RO
TCK0
TB0MR, TB3MR registers
Set to “0” in pulse period and pulse w idth measurement mode
TB1MR, TB2MR, TB4MR, TB5MR registers
Nothing is assigned. When w rite, set to “0”.
When read, its content is indeterminate.
RW
http://www.xinpian.net
提供单片机解密、IC解密、芯片解密业务
010-62245566 13810019655