![](http://datasheet.mmic.net.cn/230000/7540_datasheet_15567442/7540_105.png)
7540 Group User
’
s Manual
2-30
APPLICATION
2.2 Timer A
Fig. 2.2.21 Setting method for pulse width HL continuously measurement mode (1)
2.2.6 Pulse width HL continuously measurement mode
(1) Operation description
In the pulse width HL continuously measurement mode, the pulse width (
“
H
”
and
“
L
”
levels) input to
the P0
0
/CNTR
1
pin is measured.
CNTR
1
interrupt request is generated at both rising and falling edges of CNTR
1
pin input signal.
Except for this, the operation in pulse width HL continuously measurement mode is the same as in
period measurement mode.
The count value when trigger input from the CNTR
1
pin is accepted is retained until Timer A is read once.
Timer A can stop counting by setting
“
1
”
to the timer A count stop bit.
Also, when Timer A underflows, the timer A interrupt request bit is set to
“
1
”
.
(2) Pulse width HL continuously measurement mode setting method
Figure 2.2.21 and Figure 2.2.22 show the setting method for pulse width HL continuously measurement
mode of timer A.
b
7
b
0
0
b7
1
b
0
1 1
b7
b
0
b7
b
0
0
b
7
b
0
0
P
r
o
c
e
s
s
1
:
D
i
s
a
b
l
e
t
i
m
e
r
A
i
n
t
e
r
r
u
p
t
a
n
d
C
N
T
R
1
i
n
t
e
r
r
u
p
t
.
In
t
e
r
r
u
p
t
c
o
n
t
r
o
l
r
e
g
i
s
t
e
r
1
(
I
C
O
N
1
)
[
A
d
d
r
e
s
s
3
E
1
6
]
CNTR
1
interrupt disabled
P
o
r
t
P
0
d
i
r
e
c
t
i
o
n
r
e
g
i
s
t
e
r
(
P
0
D
)
[
A
d
d
r
e
s
s
0
1
1
6
]
S
e
t
t
h
e
P
0
0
/
C
N
T
R
1
p
i
n
t
o
t
h
e
i
n
p
u
t
m
o
d
e
P
r
o
c
e
s
s
2
:
S
e
t
t
h
e
C
N
T
R
1
p
i
n
t
o
t
h
e
i
n
p
u
t
m
o
d
e
.
In
t
e
r
r
u
p
t
c
o
n
t
r
o
l
r
e
g
i
s
t
e
r
2
(
I
C
O
N
2
)
[
A
d
d
r
e
s
s
3
F
1
6
]
Timer A interrupt disabled
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