![](http://datasheet.mmic.net.cn/30000/M30802MC-XXXGP_datasheet_2359337/M30802MC-XXXGP_114.png)
9
2
3
f
o
5
0
2
,
2
0
.
g
u
A
0
.
1
.
v
e
R
0
1
0
-
7
8
1
0
B
9
0
J
E
R
Page 103
13. Timer A
p
u
o
r
G
0
8
/
C
6
1
M
Item
Specification
Count source
f1, f8, f32, fC32
Count operation
The timer counts down
When the count reaches 000016, the timer stops counting after reloading a
new count
If a trigger occurs when counting, the timer reloads a new count and restarts counting
Divide ratio
1/n
n : Set value
Count start condition
An external trigger is input
The timer overflows
The one-shot start flag is set (= 1)
Count stop condition
A new count is reloaded after the count has reached 000016
The count start flag is reset (= 0)
Interrupt request generation timing The count reaches 000016
TAiIN pin function
Programmable I/O port or trigger input
TAiOUT pin function
Programmable I/O port or pulse output (Setting by the corresponding function
select registers A and B)
Read from timer
When timer Ai register is read, it indicates an indeterminate value
Write to timer
When not counting
Value written to timer Ai register is written to both reload register and counter
When counting
Value written to timer Ai register is written to only reload register
(Transferred to counter at next reload time)
Table 13.4 Timer specifications in one-shot timer mode
Figure 13.10 Timer Ai mode register in one-shot timer mode
(3) One-shot timer mode
In this mode, the timer operates only once. (See Table 13.4) When a trigger occurs, the timer starts up and
continues operating for a given period. Figure 13.10 shows the timer Ai mode register in one-shot timer mode.
Bit name
Timer Ai mode register
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
MR2
MR1
MR3
0 (Set to “0” in one-shot timer mode)
0 0 : f1
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 bit
Trigger select bit
External trigger select
bit (Note 1)
0 : Falling edge of TAiIN pin's input signal (Note 2)
1 : Rising edge of TAiIN pin's input signal (Note 2)
Note 1: Valid only when the TAiIN pin is selected by the event/trigger select bit
(addresses 034216 and 034316). If timer overflow is selected, this bit can be “1” or “0”.
Note 2: Set the corresponding port function select register to I/O port, and port direction
register to “0”.
W
R
Symbol
Address
When reset
TAiMR(i=0 to 4)
035616 to 035A16 00000X002
This bit is invalid in M16C/80 series.
Port output control is set by the function select registers A and B.
– –