Z86C04/C08 
CMOS 8-Bit Low-Cost 1K/2K-ROM Microcontrollers Zilog
26 P R E L I M I N A R Y DS97DZ80502
Clock. The on-chip oscillator has a high-gain, parallel-res-
onant amplifier for connection to a RC, crystal, ceramic 
resonator, LC, or any suitable external clock source 
(XTAL1 = Input, XTAL2 = Output). The crystal should be 
AT cut, 12 MHz max, with a series resistance (RS) less 
than or equal to 100 Ohms. 
The crystal should be connected across XTAL1 and 
XTAL2 using the vendor’s crystal recommended capacitors (which depends on the crystal manufacturer, ceramic 
resonator and PCB layout) from each pin directly to device 
Ground pin 14 (Figure 16).
Note that the crystal capacitor loads should be connected 
to V
SS
 pin 14 to reduce ground noise injection.
To use 32 KHz crystal, the 32 KHz operational mask option 
must be selected, and an external resistor R must be connected across XTAL1 and XTAL2.To use RC oscillator, 
the RC oscillator option must be selected. 
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 
active. The device can be recovered by interrupts, either 
externally or internally generated. An interrupt request 
must be executed (enabled) to exit HALT mode. After the 
interrupt service routine, the program continues from the 
instruction after the HALT. 
STOP Mode. This instruction turns off the internal clock 
and external crystal oscillation and reduces the standby 
current. The STOP mode can be released by two methods. 
The first method is a RESET of the device by removing 
VCC or dropping the VCC below VLV. The second method 
is if P27 is at a low level when the device executes the 
STOP instruction. A low condition on P27 releases the 
STOP mode regardless if configured for input or output.
Program execution under both conditions begins at location 000C (Hex). However, when P27 is used to release 
the STOP mode, the I/O port mode registers are not reconfigured to their default power-on conditions. This prevents any I/O, configured as output when the STOP instruction was executed, from glitching to an unknown 
state. To use the P27 release approach with STOP mode, 
use the following instruction:
Note: (X = dependent upon user’s application.)
In order to enter STOP or HALT mode, it is necessary to 
first flush the instruction pipeline to avoid suspending execution in mid-instruction. To do this, the user must execute 
a NOP (opcode = FFH) immediately before the appropriate 
sleep instruction, that is, as follows:
Watch-Dog Timer (WDT). The Watch-Dog Timer is enabled by instruction WDT. When the WDT is enabled, it 
cannot be stopped by the instruction. With the WDT instruction, the WDT should be refreshed once the WDT is 
enabled within every Twdt period; otherwise, the Z8 resets 
itself. The WDT instruction affects the Flags accordingly: Z 
= 1, S = 0, V = 0.
WDT = 5F (Hex)
LD P2M, #1XXX XXXXB
NOP
STOP
FF NOP ; clear the pipeline 
6F STOP ; enter STOP mode
or 
FF NOP ; clear the pipeline 
7F HALT ; enter HALT mode
Figure 15. Oscillator Configuration
XTAL1
XTAL2
C1
C2
C1
C2
Ceramic 
Resonator 
or Crystal
External Clock
L
LC Clock
XTAL1
XTAL2
XTAL1
XTAL2
*
*
*
*
*
 = Use pin 14.
XTAL1
XTAL2
C1
C2
R
32 KHz
32 KHz Crystal Clock
XTAL1
XTAL2
R
RC Clock
C
*
*
*