75
TimerA
M
i
t
s
u
M
S
b
i
s
3
M
h
0
I
C
i
m
2
R
i
1
O
c
r
8
C
o
c
o
G
M
m
p
r
P
u
t
u
T
e
r
p
R
s
o
U
S
I
N
G
L
E
-
C
H
I
P
1
6
-
B
I
T
C
M
O
O
E
Item
Specification
Count source
Count operation
f
1
, f
8
, f
32
, f
C32
Down count
When the timer underflows, it reloads the reload register contents before continuing countin
g
1/(n+1)
n : Set value
Count start flag is set (= 1)
Count start flag is reset (= 0)
Interrupt request generation timing
When the timer underflows
TAi
IN
pin function
Programmable I/O port or gate input
TAi
OUT
pin function
Programmable I/O port or pulse output
Read from timer
Count value can be read out by reading timer Ai register
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 progress
When a value is written to timer Ai register, it is written to only reload register
(Transferred to counter at next reload time)
Select function
Gate function
Counting can be started and stopped by the TAi
IN
pin’s input signal
Pulse output function
Each time the timer underflows, the TAi
OUT
pin’s polarity is reversed
Divide ratio
Count start condition
Count stop condition
(1) Timer mode
In this mode, the timer counts an internally generated count source. (See Table16.) Figure 59 shows the
timer Ai mode register in timer mode.
Table 16. Specifications of timer mode
N
o
t
e
1
:
T
a
T
:
S
h
r
h
e
e
e
e
t
i
t
s
n
b
h
e
v
i
t
e
t
a
c
t
i
l
n
i
d
a
c
o
g
.
n
r
s
o
f
t
h
e
c
o
r
r
e
s
p
o
n
d
i
n
g
p
o
r
t
r
e
g
i
s
t
e
r
a
n
d
p
o
r
t
d
i
r
e
c
t
i
o
n
r
e
g
i
s
t
e
r
N
N
o
o
t
t
e
e
2
3
:
r
b
e
e
s
p
“
o
0
”
n
d
o
r
n
“
g
1
”
p
.
o
i
r
t
d
i
r
e
c
t
i
o
n
r
e
g
i
s
t
e
r
t
o
“
0
”
.
T
7
i
m
6 b
e
r
5
0
A
i
4
m
o
3 b
d
e
2
r
e
1
0 0
g
i
0
s
t
e
r
S
T
y
m
i
M
b
o
R
l
(
A
6
1
d
6
d
t
r
e
s
0
s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