Mitsubishi microcomputers
M16C / 6N0 / 6N1 Group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
96
(3) One-shot timer mode
In this mode, the timer operates only once. (See Table 1.14.4.) When a trigger occurs, the timer starts up
and continues operating for a given period. Figure 1.14.10 shows the timer Ai mode register in one-shot
timer mode.
Table 1.14.4. Timer specifications in one-shot timer mode
Figure 1.14.10. Timer Ai mode register in one-shot timer mode
Item
Specification
Count source
Count operation
The timer counts down (operating as an 8-bit or a 16-bit pulse width modulator)
The timer reloads a new count at a rising edge of PWM pulse and continues counting
The timer is not affected by a trigger that occurs when counting
High level width
n / fi
n : Set value
16-bit PWM
Cycle time
(2
16-1) / fi fixed
8-bit PWM
High level width n
(m+1) / fi
n : values set to timer Ai register’s high-order address
Cycle time
(2
8-1) (m+1) / fi
m : values set to timer Ai register’s low-order address
External trigger is input
Count start condition
The timer overflows
The count start flag is set (= "1")
The count start flag is reset (= "0")
Count stop condition
Interrupt request
generation timing
PWM pulse goes "L"
TAiIN pin function
TAiOUT pin function
Read from timer
f2, f8, f32, fC32
Programmable I/O port or trigger input
Pulse output
When timer Ai register is read, it indicates an indeterminate value
Write to timer
When counting stopped
When a value is written to timer Ai register, it is written to both reload
register and counter
When counting in progressWhen a value is written to timer Ai register, it is
written to only reload register
(Transferred to counter at next reload time)
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
(TAiOUT pin is a normal port pin)
1 : Pulse is output (Note 1)
(TAiOUT pin is a pulse output pin)
MR2
MR1
MR3
0 (Must always be "0" in one-shot timer mode)
0 0 : f2
0 1 : f8
1 0 : f32
1 1 : fC32
b7 b6
TCK1
TCK0
Count source select bit
10
0
0 : One-shot start flag is valid
1 : Selected by event/trigger select bits
Trigger select bit
External trigger select
bit (Note 2)
0 : Falling edge of TAiIN pin’s input signal (Note 3)
1 : Rising edge of TAiIN pin’s input signal (Note 3)
W
R
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 (addresses
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".
Timer A