English
Language : 

M16C62N Datasheet, PDF (81/213 Pages) Renesas Technology Corp – SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Timer B
Mitsubishi microcomputers
M16C / 62N Group (80-pin)
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Timer B
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.
Data bus high-order bits
Clock source selection
f1
f8
f32
fC32
• Timer
• Pulse period/pulse width measurement
• Event counter
Clock selection
Data bus low-order bits
Low-order 8 bits
Reload register (16)
High-order 8 bits
Counter (16)
TBiIN
(i = 0 to 5)
Polarity switching
and edge pulse
Can be selected in only
event counter mode
TBj overflow
(j = i – 1. Note, however,
j = 2 when i = 0,
j = 5 when i = 3)
Count start flag
(address 038016)
Counter reset circuit
TBi
Timer B0
Timer B1
Timer B2
Timer B3
Timer B4
Timer B5
Address
039116 039016
039316 039216
039516 039416
035116 035016
035316 035216
035516 035416
TBj
Timer B2
Timer B0
Timer B1
Timer B5
Timer B3
Timer B4
Note: TB1IN does not connect to outside. Thus, do not select the function using this pin.
Figure 1.13.14. Block diagram of timer B
Timer Bi mode register
b7 b6 b5 b4 b3 b2 b1 b0
Symbol
Address
TBiMR(i = 0 to 5) 039B16 to 039D16
035B16 to 035D16
When reset
00XX00002
00XX00002
Bit symbol
Bit name
Function
RW
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 (Note 3)
1 1 : Must not be set
MR0
Function varies with each operation mode
MR1
MR2
(Note 1)
(Note 2)
MR3
TCK0
TCK1
Count source select bit
(Function varies with each operation mode)
Note 1: Timer B0, timer B3.
Note 2: Timer B1, timer B2, timer B4, timer B5.
Note 3: Do not set this mode in timer B1 mode register because timer B1 does not have input port.
Figure 1.13.15. Timer B-related registers (1)
80