![](http://datasheet.mmic.net.cn/30000/M37540E8FP_datasheet_2359848/M37540E8FP_170.png)
7540 Group User’s Manual
2-94
APPLICATION
2.5 Timer Y and timer Z
Fig. 2.5.36 Setting method for programmable wait one-shot generation mode (1)
b7
b0
1
b7b0
1
1 1
b7
b0
b7b0
0
b7b0
0
Timer Z primary waveform extension control bit (Note 1)
0: Waveform not extended
1: Waveform extended
Timer Z secondary waveform extension control bit (Note 1)
0: Waveform not extended
1: Waveform extended
Timer Z output level latch
0: “L” level is output at timer stop. When count is started, “L”
level is output during the TZP interval (wait), and them, “H”
level is output during the TZS interval (one-shot) and timer
Z output is stopped at “L” level by underflow.
1: “H” level is output at timer stop. When count is started, “H”
level is output during the TZP interval (wait), and them, “L”
level is output during the TZS interval (one-shot) and timer
Z output is stopped at “H” level by underflow.
INT0 pin one-shot trigger control bit (Note 2)
0: INT0 pin one-shot trigger invalid
1: INT0 pin one-shot trigger valid
INT0 pin one-shot trigger active edge selection bit (Note 2)
0: Falling edge trigger
1: Rising edge trigger
Process 4: Set TZOUT pin to the output.
Port P0 direction register (P0D) [Address 0116]
Set P02/TZOUT pin as the output mode
Note: When using this mode, be sure to select “write to latch only”.
Process 1: Disable interrupt.
Process 2: Set timer Y, Z mode register.
Timer Y, Z mode register (TYZM) [Address 2016]
Programmable wait one-shot generation mode
Write to only latch (Note)
Timer Y count stop
Interrupt control register 1 (ICON1) [Address 3E16]
INT0 interrupt disabled
Process 3: Set timer Y, Z waveform output control register.
Timer Y, Z waveform output control register (PUM) [Address 2416]
Notes 1: The waveform extension function by the timer Z waveform extension control bits can be used
only when “0016” is set to prescaler Z.
When the value other than “0016” 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.
2: Stop Timer Z to change these bits.
Interrupt control register 2 (ICON2) [Address 3F16]
Timer Z interrupt disabled
(2) Programmable wait one-shot generation mode setting method
Figure 2.5.36 to Figure 2.5.38 show the setting method for programmable wait one-shot generation
mode of Timer Z.