Mitsubishi microcomputers
M16C / 61 Group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Timer B
(1) Timer mode
In this mode, the timer counts an internally generated count source. (See Table 1.16.6.) Figure 1.16.16
shows the timer Bi mode register in timer mode.
Table 1.16.6. Timer specifications in timer mode
Item
Count source
Count operation
Specification
f1, f8, f32, fC32
• Counts down
• When the timer underflows, it reloads the reload register contents before
continuing counting
Divide ratio
1/(n+1) n : Set value
Count start condition
Count stop condition
Count start flag is set (= 1)
Count start flag is reset (= 0)
Interrupt request generation timing The timer underflows
TBiIN pin function
Read from timer
Write to timer
Programmable I/O port
Count value is read out by reading timer Bi register
• When counting stopped
When a value is written to timer Bi register, it is written to both reload register and counter
• When counting in progress
When a value is written to timer Bi register, it is written to only reload register
(Transferred to counter at next reload time)
Timer Bi mode register
b7 b6 b5 b4 b3 b2 b1 b0
Symbol
Address
When reset
00XX0000
TBiMR(i=0 to 2) 039B16 to 039D16
2
0
0
Bit symbol
R
W
Bit name
Function
0 0 : Timer mode
b1 b0
TMOD0
TMOD1
MR0
Operation mode select bit
Invalid in timer mode
Can be “0” or “1”
MR1
MR2
0 (Fixed to “0” in timer mode ; i = 0)
(Note 1)
(Note 2)
Nothing is assiigned (i = 1,2).
In an attempt to write to this bit, write “0” . The value, if read, turns out
to be indeterminate.
Invalid in timer mode.
MR3
In an attempt to write to this bit, write “0” . The value, if read in
timer mode, turns out to be indeterminate.
b7 b6
Count source select bit
TCK0
TCK1
0 0 : f
0 1 : f
1
8
1 0 : f32
1 1 : fC32
Note 1: Timer B0.
Note 2: Timer B1, timer B2.
Figure 1.16.16. Timer Bi mode register in timer mode
83