English
Language : 

M16C30L Datasheet, PDF (88/166 Pages) Renesas Technology Corp – SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Timer B
Mitsubishi microcomputers
M16C / 30L Group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Timer B
Figure 1.14.14 shows the block diagram of timer B. Figures 1.14.15 and 1.14.16 show the timer B-related
registers.
Use the timer Bi mode register (i = 1, 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.
Data bus high-order bits
Clock source selection
f1
f8
f32
fC32
• Timer
• Pulse period/pulse width measurement
Clock selection
• Event counter
Data bus low-order bits
Low-order 8 bits
Reload register (16)
High-order 8 bits
Counter (16)
TBiIN
(i = 1, 2)
Polarity switching
and edge pulse
Can be selected in only
event counter mode
TBj overflow
(j = i – 1. Note, however,
must not be set when i = 1)
Count start flag
(address 038016)
Counter reset circuit
TBi
Timer B1
Timer B2
Address
039316 039216
039516 039416
TBj
Must not be set
Timer B1
Figure 1.14.14. Block diagram of timer B
Timer Bi mode register
b7 b6 b5 b4 b3 b2 b1 b0
Symbol
Address
TBiMR(i = 1, 2) 039C16, 039D16
When reset
00XX00002
Bit symbol
Bit name
Function
TMOD0
TMOD1
Operation mode select bit
b1 b0
0 0 : Timer mode
0 1 : Event counter mode
1 0 : Pulse period/pulse width
measurement mode
1 1 : Must not be set.
MR0
MR1
Function varies with each operation mode
Nothing is assigned.
In an attempt to write to these bits, write “0”.
The value, if read, turns out to be indeterminate.
MR3
TCK0
TCK1
Function varies with each operation mode
Count source select bit
(Function varies with each operation mode)
RW
Figure 1.14.15. Timer B-related registers (1)
87