![](http://datasheet.mmic.net.cn/230000/7540_datasheet_15567442/7540_158.png)
7540 Group User
’
s Manual
APPLICATION
2-83
2.5 Timer Y and timer Z
Fig. 2.5.27 Example of control procedure
“
0
“
2
0
1
6
”
0
1
6
”
R
E
S
E
T
0
1
0 1
P
r
o
c
e
s
s
i
n
g
1
1
1
C
L
I
0
1
1
Timer Y primary waveform
generation extended (
Note 3
)
Timer Y secondary waveform
generation extended (
Note 3
)
Initial state:
“
L
”
, TYP:
“
H
”
interval,
TYS:
“
L
”
interval
PUM(Address 24
16
)
“
41
16
”
0
1
1
TCSS(Address 2E
16
)
Timer Y count source:
f(X
IN
)/2 selected
Set port P0
1
to the output mode.
S
e
t
“
0
”
(
t
T
o
m
t
h
e
e
t
Y
i
m
e
n
r
t
e
Y
r
i
n
p
t
e
t
r
d
r
i
u
s
p
a
t
b
e
l
e
n
d
a
)
b
l
e
b
i
t
.
i
r
i
r
u
Prescaler Y (Address 21
16
)
S
e
t
v
a
l
u
e
t
o
t
i
m
e
r
Y
(
N
o
t
e
s
3
,
4
,
5
,
6
)
S
e
t
t
i
m
e
r
c
o
u
n
t
s
o
u
r
c
e
s
e
t
r
e
g
i
s
t
e
r
TYZM(Address 20
16
)
r
o
g
r
a
m
m
a
g
e
n
e
r
a
t
i
o
n
W
r
i
t
i
n
g
t
o
o
T
i
m
e
r
Y
c
o
S
e
t
t
i
m
e
r
Y
,
Z
m
o
d
e
r
e
g
i
s
t
e
r
P
b
m
n
u
l
o
l
y
n
e
w
e
l
a
s
t
a
v
e
f
o
r
m
d
t
o
c
p
h
(
N
o
t
e
2
)
t
T
i
m
e
r
Y
p
r
i
m
a
r
y
(
A
d
d
r
e
s
s
2
3
1
6
)
S
e
t
“
1
”
(
t
T
o
i
t
h
e
e
t
i
m
Y
e
n
r
t
e
Y
r
r
i
u
n
t
e
t
r
e
r
u
n
p
a
t
b
e
l
e
n
d
a
)
b
l
e
b
i
t
.
m
r
i
p
S
e
t
“
0
”
t
o
t
h
e
t
i
m
e
r
Y
i
n
t
e
r
r
u
p
t
r
e
q
u
e
s
t
b
i
t
.
TYZM(Address 20
16
)
i
m
e
r
Y
c
o
Set timer Y, Z mode register
T
u
n
t
s
t
a
r
t
In
i
t
i
a
l
i
z
a
t
i
o
n
SEI
CLD
CLT
CPUM(Address 3B
16
)
Wait until f(X
IN
) oscillation is stabilized (
Note 1
)
CPUM(Address 3B
16
)
←
10000X00
2
←
00000X00
2
X
:
T
h
i
s
b
i
t
i
s
n
o
t
u
s
e
d
h
e
r
e
.
S
e
t
i
t
t
o
“
0
”
o
r
“
1
”
a
r
b
i
t
r
a
r
y
.
Timer Y secondary (Address 22
16
)
Set timer Y, Z waveform output control register
N
o
t
e
s
1
2
:
:
F
W
o
T
e
t
o
W
s
:
I
T
w
a
:
I
s
b
t
i
6
:
o
r
e
y
e
t
e
p
h
u
r
n
t
Y
S
h
e
g
a
n
t
e
t
y
h
e
n
t
e
C
o
c
a
t
h
n
”
.
w
n
r
e
e
n
e
h
e
,
n
i
n
h
e
t
i
n
s
o
t
i
r
v
u
n
n
e
c
s
o
i
n
n
g
c
r
t
e
h
t
i
e
s
t
m
i
m
o
e
d
,
e
a
,
s
b
k
e
t
s
h
u
e
r
e
o
s
t
c
o
i
l
s
l
a
e
t
l
o
e
r
c
t
m
“
a
w
n
r
u
i
t
f
a
c
t
o
t
u
l
r
e
t
c
.
h
l
u
e
a
h
n
h
x
3
:
a
s
s
t
o
E
c
.
g
f
t
m
a
t
b
e
v
o
c
t
h
p
X
h
e
n
a
e
s
r
o
P
a
f
e
v
t
g
Y
n
o
c
r
o
r
a
“
r
P
g
m
n
Y
l
u
0
”
a
m
,
i
n
t
.
e
r
o
x
l
t
e
b
n
i
t
s
s
i
o
c
n
a
n
f
u
b
n
e
c
t
u
i
o
s
n
e
d
b
y
o
n
t
h
l
y
e
w
t
i
h
m
e
e
n
r
“
Y
0
0
1
w
a
6
”
v
e
i
s
f
o
s
r
e
m
t
i
l
e
t
m
a
g
o
a
d
T
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