English
Language : 

M30222 Datasheet, PDF (75/237 Pages) Mitsubishi Electric Semiconductor – SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
deUvnedloepr ment
MITSUBISHI MICROCOMPUTERS
Specifications in this manual are tentative and subject to change
M30222 Group
Rev. G
Timer A
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Table 1.26. Timer specifications in event counter mode (when not processing two-phase pulse signal)
Item
Count source
Count operation
Divide ratio
Count start condition
Count stop condition
Interrupt request
generation timing
TAiIN pin function
TAiOUT pin function
Read from timer
Write to timer
Select function
Specification
External signals input to TAiIN pin (effective edge can be selected by software)
TB2 overflow, TAj overflow
Up count or down count can be selected by external signal or software.
When the timer overflows or underflows, it reloads the reload register contents
before counting continues (Note)
1/(FFFF16 - n+1) for up count
1/(n + 1) for down count
n: Set value
Count start flag is set (=1)
Count start flag is reset (=0)
The timer overflows or underflows.
Programmable I/O port or count source input
Programmable I/O port or pulse output, or up/down count select input
Count value can be read out by reading Timer Ai register
When counting stops
When a value is written to Timer Ai register, it is written to both reload register
and counter
When counting is in progress
When a value is written to Timer Ai register, it is written to only reload register
(Transferred to counter at next reload time).
Free-run count function
Even when the timer overflows or underflows, the reload register content is not
reloaded to it.
Pulse output function
Each timer the timer overflows or underflows, the TAiOUT pin s polarity is
reversed.
Note: This does not apply when the free-fun function is selected.
Timer Ai mode register
b7 b6 b5 b4 b3 b2 b1 b0
0
01
Symbol
TAiMR(i = 0, 1)
Address
When reset
039616, 039716
0016
Bit symbol
TMOD0
TMOD1
MR0
MR1
Bit name
Function
RW
b1 b0
Operation mode select bit 0 1 : Event counter mode (Note 1)
Pulse output function
select bit
Count polarity
select bit (Note 3)
0 : Pulse is not output
(TA iOUT pin is a normal port pin)
1 : Pulse is output (Note 2)
(TA iOUT pin is a pulse output pin)
0 : Counts external signal's falling edge
1 : Counts external signal's rising edge
MR2
MR3
TCK0
Up/down switching
cause select bit
0 : Up/down flag's content
1 : TA iOUT pin's input signal (Note 4)
0 (Must always be fixed to “0” in event counter mode)
Count operation type
select bit
0 : Reload type
1 : Free-run type
TCK1
Invalid in event counter mode
Can be “0” or “1”
Note 1: In event counter mode, the count source is selected by the event / trigger select bit
(addresses 0382 16 and 038316).
Note 2: The settings of the corresponding port register and port direction register are invalid.
Note 3: Valid only when counting an external signal.
Note 4: When an "L" signal is input to the TAiOUT pin, the downcount is activated. When "H",
the upcount is activated. Set the corresponding port direction register to "0".
Fig. 1.52. Timer Ai mode register in event counter mode
1-76