
7540 Group User
’
s Manual
APPLICATION
2-87
2.5 Timer Y and timer Z
Fig. 2.5.30 Setting method for programmable one-shot generation mode (2)
Prescaler Z (PREZ) [Address 25
16
] (
Note 2
)
o
u
n
t
v
a
l
u
e
P
r
o
c
e
s
s
8
:
S
e
t
t
h
e
s
t
a
n
d
b
y
s
t
a
t
e
t
o
a
c
c
e
p
t
t
h
e
o
n
e
-
s
h
o
t
s
t
a
r
t
t
r
i
g
g
e
r
(
N
o
t
e
)
.
b
7
0
b
0
Timer Y, Z mode register (TYZM) [Address 20
16
]
i
e
r
Z
c
o
u
n
t
s
t
a
r
t
T
m
0
1 1
Process 7: Set the one-shot pulse width (
Note 1
).
S
e
t
t
h
e
c
o
u
n
t
v
a
l
u
e
t
o
p
r
e
s
c
a
l
e
r
Z
a
n
d
t
i
m
e
r
Z
p
r
i
m
a
r
y
C
C
o
u
n
t
v
a
l
u
e
Timer Z primary (TZP) [Address 27
16
] (
Note 3
)
N
o
t
e
:
W
t
h
m
e
e
n
r
Z
t
h
e
c
I
u
N
n
T
0
t
i
n
p
g
i
n
i
s
o
s
n
t
e
a
-
t
s
e
h
d
o
t
y
t
r
i
t
g
h
g
e
e
r
n
c
p
o
u
n
t
t
o
r
o
f
l
t
r
b
i
g
i
t
g
o
e
f
r
P
t
U
o
M
I
N
T
0
i
s
s
p
e
i
t
t
a
o
“
t
v
e
a
r
l
i
d
h
”
i
,
i
o
r
b
i
n
f
t
s
s
e
t
t
i
n
g
.
Notes
1:
In the programmable one-shot generation mode, TZS is not used.
When the count setting value is changed, value of EXPZP is valid by
writing to TZP. Even when changing TZP is not required, write the
same value again.
2:
When the timer Z waveform extension function is used, be sure to set
“
00
16
”
to prescaler Z.
3:
In the programmable one-shot generation mode, when the setting
value is changed while the waveform is output, set by software in
order not to execute the writing to TZP and the timing of timer Z
underflow simultanesously.
P
r
o
c
e
s
s
6
:
S
e
t
t
h
e
t
i
m
e
r
Z
c
o
u
n
t
s
o
u
r
c
e
.
b7
b0
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
(
T
C
S
S
)
[
A
d
d
r
e
s
s
2
E
1
6
]
T
i
m
b
5
0
0
1
1
e
b
4
0
1
0
1
r
Z
c
o
u
n
t
s
o
u
r
c
e
s
e
l
e
c
t
i
o
n
b
i
t
s
:
:
:
:
f
f
T
N
(
(
X
I
X
I
i
m
o
N
)
N
)
e
t
/
/
r
v
1
2
Y
a
6
i
u
l
a
n
b
d
l
e
e
r
f
l
o
w
(
N
o
t
e
)
a
Process 5: When the trigger by INT
0
pin input is selected:
Set port P3 direction register, pull-up control register and port P1P3 control register
P
u
l
l
-
u
p
c
o
n
t
r
o
l
r
e
g
i
s
t
e
r
(
P
U
L
L
)
[
A
d
d
r
e
s
s
1
6
1
6
]
P
0
1
3
7
:
:
p
u
u
u
l
l
l
l
l
u
-
u
l
-
u
p
p
p
O
O
c
f
n
o
f
n
t
r
o
l
b
i
t
P
P
-
b
7
b
0
P
o
r
t
P
1
P
3
c
o
n
t
r
o
l
r
e
g
i
s
t
e
r
(
P
1
P
3
C
)
[
A
d
d
r
e
s
s
1
7
1
6
]
P
0
1
3
7
/
:
:
I
M
T
N
T
0
O
S
L
l
i
n
l
e
e
p
v
l
u
e
t
l
e
v
e
l
s
e
l
e
c
t
i
o
n
b
i
t
C
T
l
e
v
b
7
b
0
0
P
o
r
t
P
3
d
i
r
e
c
t
i
o
n
r
e
g
i
s
t
e
r
(
P
3
D
)
[
A
d
d
r
e
s
s
0
7
1
6
]
S
e
t
P
3
7
/
I
N
T
0
p
i
n
a
s
t
h
e
i
n
p
u
t
m
o
d
e
b
0
7
b
0
Note:
When the timer Z waveform extension function is used,
do not select the timer Y underflow as the timer Z count source.