Z86E04/E08
Zilog CMOS Z8 OTP Microcontrollers
DS97Z8X0401 P R E L I M I N A R Y 31
HALT Mode. This instruction turns off the internal CPU
clock but not the crystal oscillation. The counter/timers and
external interrupts IRQ0, IRQ1, IRQ2 and IRQ3 remain ac-
tive. The device is recovered by interrupts, either external-
ly or internally generated. An interrupt request must be ex-
ecuted (enabled) to exit HALT Mode. After the interrupt
service routine, the program continues from the instruction
after the HALT.
Note: On the C12 ICEBOX, the IRQ3 does not wake the
device out of HALT Mode.
STOP Mode. This instruction turns off the internal clock
and external crystal oscillation and reduces the standby
current to 10 µA. The STOP Mode is released by a RESET
through a Stop-Mode Recovery (pin P27). A Low input
condition on P27 releases the STOP Mode. Program exe-
cution begins at location 000C(Hex). However, when P27
is used to release the STOP Mode, the I/O port Mode reg-
isters are not reconfigured to their default power-on condi-
tions. This prevents any I/O, configured as output when the
STOP instruction was executed, from glitching to an un-
known state. To use the P27 release approach with STOP
Mode, use the following instruction:
Note: A low level detected on P27 pin will take the device
out of STOP Mode even if configured as an output.
In order to enter STOP or HALT Mode, it is necessary to
first flush the instruction pipeline to avoid suspending exe-
cution in mid-instruction. To do this, the user executes a
NOP (opcode=FFH) immediately before the appropriate
SLEEP instruction, such as:
Watch-Dog Timer (WDT). The Watch-Dog Timer is en-
abled by instruction WDT. When the WDT is enabled, it
cannot be stopped by the instruction. With the WDT in-
struction, the WDT is refreshed when it is enabled within
every 1 Twdt period; otherwise, the controller resets itself,
The WDT instruction affects the flags accordingly; Z=1,
S=0, V=0.
WDT = 5F (Hex)
Opcode WDT (5FH). The first time Opcode 5FH is execut-
ed, the WDT is enabled and subsequent execution clears
the WDT counter. This must be done at least every TWDT;
otherwise, the WDT times out and generates a reset. The
generated reset is the same as a power-on reset of TPOR,
plus 18 XTAL clock cycles. The software enabled WDT
does not run in STOP Mode.
Opcode WDH (4FH). When this instruction is executed it
enables the WDT during HALT. If not, the WDT stops
when entering HALT. This instruction does not clear the
counters, it just makes it possible to have the WDT running
during HALT Mode. A WDH instruction executed without
executing WDT (5FH) has no effect.
Permanent WDT. Selecting the hardware enabled Perma-
nent WDT option, will automatically enable the WDT upon
exiting reset. The permanent WDT will always run in HALT
Mode and STOP Mode, and it cannot be disabled.
Auto Reset Voltage (VLV). The Z86E04/E08 has an auto-
reset built-in. The auto-reset circuit resets the Z86E04/E08
when it detects the VCC below VLV.
Figure 18 shows the Auto Reset Voltage versus tempera-
ture. If the VCC drops below the VCC operating voltage
range, the Z86E04/E08 will function down to the VLV un-
less the internal clock frequency is higher than the speci-
fied maximum VLV frequency.
LD P2M, #1XXX XXXXB
NOP
STOP X = Dependent on user's application.
FF NOP ; clear the pipeline
6F STOP ; enter STOP Mode
or
FF NOP ; clear the pipeline
7F HALT ; enter HALT Mode