M30621ECGP MITSUBISHI [Mitsubishi Electric Semiconductor], M30621ECGP Datasheet - Page 80

no-image

M30621ECGP

Manufacturer Part Number
M30621ECGP
Description
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Manufacturer
MITSUBISHI [Mitsubishi Electric Semiconductor]
Datasheet
Timer B
80
Timer B
Figure 1.13.14. Block diagram of timer B
Figure 1.13.15. Timer B-related registers (1)
Figure 1.13.14 shows the block diagram of timer B. Figures 1.13.15 and 1.13.16 show the timer B-related
registers. However, timer B1 is used for internal timer since timer B1 does not have input port.
Use the timer Bi mode register (i = 0 to 5) 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.
Timer Bi mode register
b7
TBi
(i = 0 to 5)
b6
IN
Note: TB1
b5
f
f
f
Clock source selection
f
C32
32
1
8
b4
b3
IN
b2
Can be selected in only
event counter mode
Polarity switching
and edge pulse
does not connect to outside. Thus, do not select the function using this pin.
b1
TBj overflow
(j = i – 1. Note, however,
j = 2 when i = 0,
j = 5 when i = 3)
b0
Note 1: Timer B0, timer B3.
Note 2: Timer B1, timer B2, timer B4, timer B5.
Note 3: Do not set this mode since timer B1 does not have input port.
Bit symbol
TMOD0
TMOD1
TCK0
TCK1
MR0
MR1
MR2
MR3
• Event counter
• Timer
• Pulse period/pulse width measurement
Symbol
TBiMR(i = 0 to 5) 039B
Count source select bit
Operation mode select bit
Function varies with each operation mode
(Function varies with each operation mode)
035B
Bit name
Address
16
16
to 039D
to 035D
(address 0380
Count start flag
Counter reset circuit
16
16
Timer B0
Timer B1
Timer B2
Timer B3
Timer B4
Timer B5
0 0 : Timer mode
0 1 : Event counter mode
1 0 : Pulse period/pulse width
1 1 : Inhibited
b1 b0
16
00XX0000
00XX0000
When reset
)
TBi
measurement mode
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Data bus high-order bits
Data bus low-order bits
0391
0393
0395
0351
0353
0355
Reload register (16)
2
2
Function
Low-order 8 bits
Counter (16)
16
16
16
16
16
16
Address
0390
0392
0394
0350
0352
0354
M16C / 62 Group (80-pin)
16
16
16
16
16
16
(Note 3)
Timer B2
Timer B0
Timer B1
Timer B5
Timer B3
Timer B4
TBj
High-order 8 bits
Mitsubishi microcomputers
(Note 1)
(Note 2)
R
W

Related parts for M30621ECGP