![](http://datasheet.mmic.net.cn/230000/7540_datasheet_15567442/7540_153.png)
7540 Group User
’
s Manual
2-78
APPLICATION
2.5 Timer Y and timer Z
Notes 1:
In the programmable waveform generation mode, values of TYS, EXPYP, and EXPYS are
valid by writing to TYP because the setting to them is executed all at once by writing to
TYP. Even when changing TYP is not required, write the same value again.
2:
In the programmable waveform generation mode, when the setting value is changed while
the waveform is output, set by software in order not to execute the writing to TYP 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 Y interrupt.
Writing 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 and a secondary setting values, and primary write timing, it
may be impossible.)
3:
The waveform extension function by the timer Y waveform extension control bits can be
used only when
“
00
16
”
is set to Prescaler Y.
When the value other than
“
00
16
”
is set to Prescaler Y, be sure to set
“
0
”
to EXPYP and
EXPYS.
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 Y write control bit to select
“
write
to latch only
”
.
5:
When TYS is read out, the undefined value is read out. However, while timer Y counts the
setting value of TYS, the count value during the secondary interval can be obtained by
reading the timer Y primary.
6:
In order to use TY
OUT
pin, set
“
1
”
to bit 1 of the port P0 direction register (output mode).
Figure 2.5.23 shows the timing diagram of the programmable waveform generation mode.