Datasheet

MC68HC908QY4MC68HC908QT4MC68HC908QY2MC68HC908QT2MC68HC908QY1MC68HC908QT1
104 Oscillator Module (OSC) MOTOROLA
Oscillator Module (OSC)
NON-DISCLOSURE AGREEMENT REQUIRED
8.4.1.2 Internal to External Clock Switching
When external clock source (external OSC, RC, or XTAL) is desired, the
user must perform the following steps:
1. For external crystal circuits only, OSCOPT[1:0] = 1:1: To help
precharge an external crystal oscillator, set PTA4 (OSC2) as an
output and drive high for several cycles. This may help the crystal
circuit start more robustly.
2. Set CONFIG2 bits OSCOPT[1:0] according to Table 8-2. The
oscillator module control logic will then set OSC1 as an external
clock input and, if the external crystal option is selected, OSC2 will
also be set as the clock output.
3. Create a software delay to wait the stabilization time needed for
the selected clock source (crystal, resonator, RC) as
recommended by the component manufacturer. A good rule of
thumb for crystal oscillators is to wait 4096 cycles of the crystal
frequency, i.e., for a 4-MHz crystal, wait approximately 1 msec.
4. After the manufacturers recommended delay has elapsed, the
ECGON bit in the OSC status register (OSCSTAT) needs to be set
by the user software.
5. After ECGON set is detected, the OSC module checks for
oscillator activity by waiting two external clock rising edges.
6. The OSC module then switches to the external clock. Logic
provides a glitch free transition.
7. The OSC module first sets the ECGST bit in the OSCSTAT
register and then stops the internal oscillator.
NOTE: Once transition to the external clock is done, the internal oscillator will
only be reactivated with reset. No post-switch clock monitor feature is
implemented (clock does not switch back to internal if external clock
dies).