424
Chapter 11
16-bit Timer/Event Counter P (TMP)
Preliminary User’s Manual U17566EE1V2UM00
(2)
Operation flow in pulse width measurement mode
Figure 11-39
Software processing flow in pulse width measurement mode
<1>
<2>
S
et TPnCTL0 regi
s
ter
(TPnCE
b
it = 1)
TPnCE
b
it = 0
Regi
s
ter initi
a
l
s
etting
TPnCTL0
(TPnCK
S
0 to TPnCK
S
2
b
it
s
),
TPnCTL1,
TPnIOC1,
TPnIOC2,
TPnOPT0
Initi
a
l
s
etting of the
s
e regi
s
ter
s
i
s
performed
b
efore
s
etting the
TPnCE
b
it to 1.
The TPnCK
S
0 to TPnCK
S
2
b
it
s
c
a
n
b
e
s
et
a
t the
sa
me time when co
u
nting
h
as
b
een
s
t
a
rted (TPnCE
b
it = 1).
The co
u
nter i
s
initi
a
lized
a
nd co
u
nting
i
s
s
topped
b
y cle
a
ring the TPnCE
b
it to 0.
S
TART
S
TOP
<1> Co
u
nt oper
a
tion
s
t
a
rt flow
<2> Co
u
nt oper
a
tion
s
top flow
FFFFH
16-
b
it co
u
nter
0000H
TPnCE
b
it
TIPn0 pin inp
u
t
TPnCCR0 regi
s
ter
INTTPnCC0
s
ign
a
l
D
0
0000H
0000H
D
1
D
2
electronic components distributor