
Under
development
1-80
Specifications in this manual are tentative and subject to change
Rev. H
Timer A
MITSUBISHI MICROCOMPUTERS
M30222 Group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
(4) Pulse width modulation 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 modula-
tor 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”.
Fig. 1.54. Timer Ai mode register in one-shot timer mode
Bit name
Timer Ai mode register
Symbol
Address
When reset
TAiMR(i = 0 to 4) 039616 to 039A16
0016
Function
Bit symbol
b7
b6
b5
b4
b3
b2
b1
b0
Operation mode select bit 1 0 : One-shot timer mode
b1 b0
TMOD1
TMOD0
MR0
Pulse output function
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)
MR2
MR1
MR3
0 (Must always be “0” in one-shot timer mode)
0 0 : f 1
0 1 : f 8
1 0 : f 32
1 1 : f C32
b7 b6
TCK1
TCK0
Count source select bit
10
0
0 : One-shot start flag is valid
1 : Selected by event/trigger select
register
Trigger select bit
External trigger select
bit (Note 2)
0 : Falling edge of TAi IN pin's input signal (Note 3)
1 : Rising edge of TAi IN pin's input signal (Note 3)
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
W
R
and 038316). If timer overflow is selected, this bit can be "1" or "0".
Note 3: Set the corresponding port direction register to "0".