![](http://datasheet.mmic.net.cn/230000/7540_datasheet_15567442/7540_167.png)
7540 Group User
’
s Manual
2-92
APPLICATION
2.5 Timer Y and timer Z
Notes 1:
In the programmable wait one-shot generation mode, values of TZS, EXPZP and EXPZS
are valid by writing to TZP. Even when changing TZP is not required, write the same value
again.
2:
In the programmable wait 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 underflow during the secondary interval simultaneously.
An example of a measurement is shown below.
ex.) The underflow by the primary and the underflow by secondary are stored by polling etc.
using timer Z interrupt.
Writing to primary is performed in by judging that there is no problem if the underflow
by secondary is completed with reference to primary write operation before.
(Depending on a primary setting value, primary write timing, software and timing of
external trigger to INT
0
pin, it may be impossible.)
3:
The waveform extension function by the timer Z waveform extension control bits can be
used only when
“
00
16
”
is set to Prescaler Z.
When the value other than
“
00
16
”
is set to Prescaler Z, be sure to set
“
0
”
to EXPZP and
EXPZS. Also, when the timer Y underflow is selected as the timer Z count source, the
waveform extension function cannot be used.
4:
When using this mode, be sure to set
“
1
”
to the timer Z write control bit to select
“
write to
latch only
”
.
5:
When TZS is read out, the undefined value is read out. However, while Timer Z counts the
setting value of TZS (during one-shot output), the count value during the secondary interval
can be obtained by reading TZP.
6:
In order to use TZ
OUT
pin, set
“
1
”
to bit 2 of the port P0 direction register (output mode).
7:
Stop Timer Z to change the INT
0
pin one-shot trigger control bit and INT
0
pin one-shot
trigger active edge selection bit.
Figure 2.5.35 shows the timing diagram of the programmable wait one-shot generation mode.