203
Timer A
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
Figure 2.2.23. Set-up procedure of one-shot mode, external trigger selected
Setting one-shot timer's time
(b15)
Can be set to 0001
16
to FFFF
16
b7
b0
(b8)
b7
b0
Timer A0 register [Address 0387
16
, 0386
16
] TA0
Timer A1 register [Address 0389
16
, 0388
16
] TA1
Timer A2 register [Address 038B
16
, 038A
16
] TA2
Timer A3 register [Address 038D
16
, 038C
16
] TA3
Timer A4 register [Address 038F
16
, 038E
16
] TA4
Start count
Setting count start flag
b7
Count start flag [Address 0380
16
]
TABSR
Timer A0 count start flag
Timer A1 count start flag
Timer A2 count start flag
Timer A3 count start flag
Timer A4 count start flag
b0
Pulse output function select bit
1 : Pulse is output
Selecting one-shot timer mode and functions
b7
1
0
1
1
1
0
Timer Ai mode register (i=0 to 4) [Address 0396
16
to 039A
16
]
TAiMR (i=0 to 4)
External trigger select bit
1 : Rising edge of TAi
IN
pin's input signal
Selection of one-shot timer mode
0 (Must always be “0” in one-shot timer mode)
Count source select bit
b7 b6
0 0 : f
1
0 1 : f
8
1 0 : f
32
1 1 : f
C32
Trigger select bit
1 : Selected by event/trigger select bit
Setting event/trigger select bit
b7
Trigger select register [Address 0383
16
]
TRGSR
One-shot start flag [Address 0382
16
]
ONSF
Timer A0 event/trigger select bit
b7 b6
IN
is selected (Note)
b7
b0
Timer A1 event/trigger select bit
0 0 :
Input on TA1
IN
is selected (Note)
Timer A2 event/trigger select bit
0 0 :
Input on TA2
IN
is selected (Note)
Timer A3 event/trigger select bit
0 0 :
Input on TA3
IN
is selected (Note)
Timer A4 event/trigger select bit
0 0 :
Input on TA4
IN
is selected (Note)
Note: Set the corresponding port direction register to “0”.
Count source period
f(X
IN
) : 10MH
Z
f(Xc
IN
) : 32.768kH
Z
100ns
800ns
3.2
μ
s
976.56
μ
s
b7 b6
Count
source
f
1
f
8
f
32
f
C32
0
0
1
1
0
1
0
1
Setting clock prescaler reset flag
(This function is effective when f
C32
is selected as the count source. Reset the prescaler for generating f
C32
by dividing the X
CIN
by 32.)
b7
b0
Clock prescaler reset flag [Address 0381
16
]
CPSRF
Clock prescaler reset flag
0 : No effect
1 : Prescaler is reset (When read, the value is “0”)
Clearing timer Ai interrupt request bit
b7
0
Timer Ai interrupt control register [Address 0055
16
to 0059
16
]
TAiIC (i=0 to 4)
Interrupt request bit
b0
Refer to 'Precaution for Timer A (one-shot timer mode)'