![](http://datasheet.mmic.net.cn/30000/M30263F3AFP_datasheet_2358719/M30263F3AFP_120.png)
12. Timer
page 103
9
2
3
f
o
7
0
2
,
5
1
.
b
e
F
0
.
2
.
v
e
R
0
2
0
-
2
0
2
0
B
9
0
J
E
R
)
T
6
2
/
C
6
1
M
,
B
6
2
/
C
6
1
M
,
A
6
2
/
C
6
1
M
(
p
u
o
r
G
A
6
2
/
C
6
1
M
Item
Specification
Count source
f1, f2, f8, f32, fC32
Count operation
Down-count
When the counter reaches 000016, it stops counting after reloading a new value
If a trigger occurs when counting, the timer reloads a new count and restarts counting
Divide ratio
1/n
n : set value of TAi register
000016 to FFFF16
However, the counter does not work if the divide-by-n value is set to 000016.
Count start condition
TAiS bit in the TABSR register is set to “1” (start counting) and one of the
following triggers occurs.
External trigger input from the TAiIN pin
Timer B2 overflow or underflow,
timer Aj (j=i-1, except j=4 if i=0) overflow or underflow,
timer Ak (k=i+1, except k=0 if i=4) overflow or underflow
The TAiOS bit in the ONSF register is set to “1” (= timer starts)
Count stop condition
When the counter is reloaded after reaching “000016”
TAiS bit is set to “0” (= stop counting)
Interrupt request generation timing
When the counter reaches “000016”
TAiIN pin function
I/O port or trigger input
TAiOUT pin function
I/O port or pulse output
Read from timer
An indeterminate value is read by reading TAi register
Write to timer
When not counting and until the 1st count source is input after counting start
Value written to TAi register is written to both reload register and counter
When counting (after 1st count source input)
Value written to TAi register is written to only reload register
(Transferred to counter when reloaded next)
Select function
Pulse output function
The timer outputs a low when not counting and a high when counting.
Table 12.1.3.1. Specifications in One-shot Timer Mode
12.1.3. One-shot Timer Mode
In one-shot timer mode, the timer is activated only once by one trigger. (See Table 12.1.3.1.) When the
trigger occurs, the timer starts up and continues operating for a given period. Figure 12.1.3.1 shows the
TAiMR register in one-shot timer mode.