![Renesas M16C/62P Group Скачать руководство пользователя страница 171](http://html1.mh-extra.com/html/renesas/m16c-62p-group/m16c-62p-group_hardware-manual_1440174171.webp)
M16C/62P Group (M16C/62P, M16C/62PT)
15. Timers
Rev.2.41
Jan 10, 2006
Page 156 of 390
REJ09B0185-0241
15.2
Timer B
Figure 15.16 shows a Timer B Block Diagram. Figures 15.17 and 15.18 show registers related to the Timer B.
Timer B supports the following three modes. Use the TMOD1 and TMOD0 bits in the TBiMR register (i = 0 to 5)
to select the desired mode.
•
Timer Mode:
The timer counts an internal count source.
•
Event Counter Mode:
The timer counts pulses from an external device or overflows or
underflows of other timers.
•
Pulse Period/Pulse Width Measurement Mode:
The timer measures pulse period or pulse width of an external signal.
Figure 15.16
Timer B Block Diagram
TBi Address
TBj
Timer B0 0391h
-
0390h
Timer B2
Timer B1 0393h
-
0392h
Timer B0
Timer B2 0395h
-
0394h
Timer B1
Timer B3 0351h
-
0350h
Timer B5
Timer B4 0353h
-
0352h
Timer B3
Timer B5 0355h
-
0354h
Timer B4
Select Clock Source
01:
Event Counter
00: Timer
10: Pulse Period and Pulse
Width Measurement
Reload Register
8 low-order bits
8 high-
order bits
Low-order Bits of Data Bus
High-order Bits of Data Bus
TBj Overflow
TBiS
Polarity Switching
and Edge Pulse
TBiIN
Counter Reset Circuit
Counter
TCK1 to TCK0
00
01
10
11
TMOD1 to TMOD0
TCK1
1
0
(Note 1, 2)
TCK1 to TCK0, TMOD1 to TMOD0 : Bits in TAiMR register
TBiS : Bits in the TABSR and the TBSR register
f1 or f2
f8
f32
fC32
i=0 to 5
NOTES :
1. Overflows or underflows.
2. j=i-1, however, j=2 when i=0 j=5 when i=3
The M16C/62P (80-pin version) and M16C/62PT (80-pin version) do not include TB1IN pin of Timer B1.
[Precautions when using TimerB2]
• Event Counter Mode
The external input signals cannot be counted. Set the TCK1 bit in the TB1MR
register to “1” when using the Event Counter Mode.
• Pulse Period/Pulse Width
Measurement Mode
This mode cannot be used.
Note
http://www.xinpian.net
提供单片机解密、IC解密、芯片解密业务
010-62245566 13810019655