94
Tentative Specifications REV.A
S
pecifications in this manual are tentative and subject to change.
Mitsubishi microcomputers
M16C / 62T Group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
deveopmen
Timer B
Timer B
Figure 1.17.14 shows the block diagram of timer B. Figures 1.17.15 and 1.17.16 show the timer B-related
registers.
Use the timer Bi mode register (i = 0 to 2) bits 0 and 1 to choose the desired mode.
Timer B has three operation modes listed as follows:
Timer mode: The timer counts an internal count source.
Event counter mode: The timer counts pulses from an external source or a timer overflow.
Pulse period/pulse width measuring mode: The timer measures an external signal's pulse period or pulse width.
But, M30623(80-pin package), timer B1 has no input pin, so funcs as the internal timer.
Figure 1.17.15. Timer B-related registers (1)
Timer Bi mode register
Symbol
TBiMR(i = 0 to 5) 039B
16
to 039D
16
Address
When reset
00XX0000
2
00XX0000
2
035B
16
to 035D
16
Bit name
Function
Bit symbol
TMOD0
b7
b6
b5
b4
b3
b2
b1
b0
0 0 : Timer mode
0 1 : Event counter mode
1 0 : Pulse period/pulse width
measurement mode (Note 3)
1 1 : Inhibited
b1 b0
TCK1
MR3
MR2
MR1
TMOD1
MR0
TCK0
Function varies with each operation mode
Count source select bit
(Function varies with each operation mode)
Operation mode select bit
(Note 1)
(Note 2)
AA
Note 1: Timer B0, timer B3.
Note 2: Timer B1, timer B2, timer B4, timer B5.
Note 3: In the timer B1 mode register of M30623(80-pin package), do not use this mode,
because timer B1 has no input pin.
AA
A
A
AA
A
A
A
A
Clock source selection
(address 0380
16
)
Event counter
Timer
Pulse period/pulse width measurement
Reload register (16)
Low-order 8 bits
High-order 8 bits
Data bus low-order bits
Data bus high-order bits
f
1
f
8
f
32
f
C32
TBj overflow
(j = i – 1. Note, however,
j = 2 when i = 0,
j = 5 when i = 3)
Can be selected in only
event counter mode
Count start flag
Polarity switching
and edge pulse
TBi
IN
(i = 0 to 5)
Counter reset circuit
Counter (16)
TBi Address
Timer B0 0391
16
0390
16
Timer B1 0393
16
0392
16
Timer B2 0395
16
0394
16
Timer B1
Timer B3 0351
16
0350
16
Timer B4 0353
16
0352
16
Timer B5 0355
16
0354
16
Timer B4
TBj
Timer B2
Timer B0
Timer B5
Timer B3
Note 1: In M30623(80-pin package), do not select the function using TB1
IN
,
because it is not connected to the external pin.
Note 2: The TB5
IN
pin is shared with the TA0
IN
pin, RxD
2
, and SCL pin.
Figure 1.17.14. Block diagram of timer B