English
Language : 

M30222 Datasheet, PDF (79/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
Timer Ai mode register
b7 b6 b5 b4 b3 b2 b1 b0
0
10
Symbol
Address
When reset
TAiMR(i = 0 to 4) 039616 to 039A16 0016
Bit symbol
TMOD0
TMOD1
MR0
MR1
MR2
Bit name
Function
b1 b0
Operation mode select bit 1 0 : One-shot timer mode
RW
Pulse output function
select bit
External trigger select
bit (Note 2)
Trigger select bit
0 : Pulse is not output
(TA iOUT pin is a normal port pin)
1 : Pulse is output (Note 1)
(TAi OUT pin is a pulse output pin)
0 : Falling edge of TAi IN pin's input signal (Note 3)
1 : Rising edge of TAi IN pin's input signal (Note 3)
0 : One-shot start flag is valid
1 : Selected by event/trigger select
register
MR3
0 (Must always be “0” in one-shot timer mode)
TCK0
TCK1
Count source select bit
b7 b6
0 0 : f1
0 1 : f8
1 0 : f 32
1 1 : f C32
Note 1: The settings of the corresponding port register and port direction register are invalid.
Note 2: Valid only when the TAiIN pin is selected by the event/trigger select bit (address 038216
and 038316). If timer overflow is selected, this bit can be "1" or "0".
Note 3: Set the corresponding port direction register to "0".
Fig. 1.54. Timer Ai mode register in one-shot timer mode
(4) Pulse width modulation (PWM) mode
In this mode, the timer outputs pulses of a given width in succession. (See Table 1.29.) In this mode, the
counter functions as either a 16-bit pulse width modulator or an 8-bit pulse width modulator. Figure 1.55
shows theTimer Ai mode register in pulse width modulation mode. Figure 1.56 shows the example of
how a 16-bit pulse width modulator operates. Figure 1.57 shows the example of how an 8-bit pulse width
modulator operates.
Usage Precautions
(1) The timer Ai interrupt request bit becomes “1” if setting operation mode of the timer in compliance with
any of the following procedures:
• Selecting PWM mode after reset.
• Changing operation mode from timer mode to PWM mode.
• Changing operation mode from event counter mode to PWM mode.
Therefore, to useTimer Ai interrupt (interrupt request bit), set Timer Ai interrupt request bit to “0” after the
above listed changes have been made.
(2) Setting the count start flag to “0” while PWM pulses are being output causes the counter to stop counting.
If the TAiOUT pin is outputting an “H” level in this instance, the output level goes to “L”, and the Timer Ai
interrupt request bit goes to “1”. If the TAiOUT pin is outputting an “L” level in this instance, the level does not
change, and theTimer Ai interrupt request bit does not becomes “1”.
1-80