English
Language : 

M30222 Datasheet, PDF (88/237 Pages) Mitsubishi Electric Semiconductor – SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
deUvnedloepr ment
Specifications in this manual are tentative and subject to change
MITSUBISHI MICROCOMPUTERS
M30222 Group
Rev. G
Timer B
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Table 1.31. Timer specifications in event counter mode
Item
Count source
Count operation
Divide ratio
Count start condition
Count stop condition
Interrupt request
generation timing
TBiIN pin function
Read from timer
Write to timer
Specification
• External signals input to TBiIN pin
• Effective edge of count source can be a rising edge or falling edge or both as
selected by software
• Count down
• When the timer underflows, it reloads the reload register content before conti-
nous counting.
1/(n + 1)
n: Set value
Count start flag is set (=i)
Count start flag is reset (=0)
The timer underflows.
Count source input
Count value can be read out by reading Timer Bi register
• When counting stops
When a value is written to Timer Bi register, it is written to both reload register
and counter.
• When counting is 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
01
Symbol
TBiMR(i=0 to 5)
Address
039B16 to 039D16
035B16 to 035D16
When reset
00XX00002
00XX00002
Bit symbol
TMOD0
TMOD1
MR0
MR1
Bit name
Operation mode select bit
Count polarity select
bit (Note 1)
Function
b1 b0
0 1 : Event counter mode
b3 b2
0 0 : Counts external signal's
falling edges
0 1 : Counts external signal's
rising edges
1 0 : Counts external signal's
falling and rising edges
1 1 : Inhibited
R
W
MR2
MR3
0 (Fixed to “0” in event counter mode; i = 0, 3)
Nothing is assigned (i = 1, 2, 4, 5).
Write "0" when writing to this bit. If read, the value
is indeterminate.
Invalid in event counter mode.
In an attempt to write to this bit, write “0”. If read, the value in
event counter mode, is indeterminate.
(Note 2)
(Note 3)
TCK0
Invalid in event counter mode.
Can be “0” or “1”.
TCK1
Event clock select
0 : Input from TBi IN pin (Note 4)
1 : TBj overflow
(j = i – 1; however, j = 2 when i = 0,
j = 5 when i = 3)
Note 1: Valid only when input from the TBi IN pin is selected as the event clock.
If timer's overflow is selected, this bit can be “0” or “1”.
Note 2: Timer B0, Timer B3.
Note 3: Timer B1, Timer B2, Timer B4, Timer B5.
Note 4: Set the corresponding port direction register to “0”.
Fig. 1.65. Timer Bi mode register in event counter mode
1-89