English
Language : 

Z8F042AHJ020SG Datasheet, PDF (211/282 Pages) Zilog, Inc. – High-Performance 8-Bit Microcontrollers
Z8 Encore! XP® F082A Series
Product Specification
194
Table 112. Oscillator Configuration and Selection
Clock Source
Characteristics
Required Setup
Internal Precision
RC Oscillator
• 32.8kHz or 5.53MHz
• High accuracy
• No external components required
• Unlock and write Oscillator Control
Register (OSCCTL) to enable and
select oscillator at either 5.53 MHz or
32.8 kHz
External Crystal/
Resonator
• 32kHz to 20MHz
• Very high accuracy (dependent on
crystal or resonator used)
• Requires external components
• Configure Flash option bits for correct
external oscillator mode
• Unlock and write OSCCTL to enable
crystal oscillator, wait for it to stabilize
and select as system clock (if the
XTLDIS option bit has been deas-
serted, no waiting is required)
External RC Oscilla- • 32kHz to 4MHz
• Configure Flash option bits for correct
tor
• Accuracy dependent on external com- external oscillator mode
ponents
• Unlock and write OSCCTL to enable
crystal oscillator and select as system
clock
External Clock
Drive
• 0 to 20MHz
• Write GPIO registers to configure PB3
• Accuracy dependent on external clock pin for external clock function
source
• Unlock and write OSCCTL to select
external system clock
• Apply external clock signal to GPIO
Internal Watchdog
Timer Oscillator
• 10kHz nominal
• Low accuracy; no external compo-
nents required
• Very low power consumption
• Enable WDT if not enabled and wait
until WDT Oscillator is operating
• Unlock and write Oscillator Control
Register (OSCCTL) to enable and
select oscillator
Caution: Unintentional accesses to the Oscillator Control Register can actually stop the chip by
switching to a nonfunctioning oscillator. To prevent this condition, the oscillator control
block employs a register unlocking/locking scheme.
OSC Control Register Unlocking/Locking
To write the Oscillator Control Register, unlock it by making two writes to the OSCCTL
Register with the values E7H followed by 18H. A third write to the OSCCTL Register
changes the value of the actual register and returns the register to a locked state. Any other
sequence of Oscillator Control Register writes has no effect. The values written to unlock
the register must be ordered correctly, but are not necessarily consecutive. It is possible to
write to or read from other registers within the unlocking/locking operation.
PS022827-1212
PRELIMINARY
Operation