
Oscillator Module (OSC)
Functional Description
MC68HC908QL Family
Data Sheet
MOTOROLA
Oscillator Module (OSC)
105
11.3.1 Internal Oscillator
The internal oscillator circuit is designed for use with no external components to
provide a clock source with tolerance less than ±25% untrimmed. An 8-bit trimming
register allows the adjust to a tolerance of less than ±5%.
The internal oscillator will generate a clock of 25.6 MHz typical (INTCLK) resulting
in a maximum bus speed (internal clock
÷ 4) of 6.4 MHz. The bus clock is software
selectable to be 3.2 MHz, which is the default frequency after reset. The 3.2 MHz
selection is required for applications running at 3.3 V. The maximum frequency at
5 V is 8 MHz, since the internal oscillator will have a ±25% tolerance (pre-trim),
then the +25% case should not allow a frequency higher than 8 MHz:
6.4 MHz + 25% = 8 MHz for 5 V operation
3.2 MHz + 25% = 4 MHz for 3.3 V operation
Figure 11-3 shows how BUSCLKX4 is derived from INTCLK and, like the RC
oscillator, OSC2 can output BUSCLKX4 by setting OSC2EN in PTAPUE register.
11.3.1.1 Internal Oscillator Trimming
The 8-bit trimming register, OSCTRIM, allows a clock period adjust of +127 and
–128 steps. Increasing OSCTRIM value increases the clock period. Trimming
allows the internal clock frequency to be set to 25.6 MHz ± 5%.
There’s an option to order a trimmed version of MC68HC908QL4. The trimming
value will be provided in a known FLASH location, $FFC0. So that the user would
be able to copy this byte from the FLASH to the OSCTRIM register right at the
beginning of assembly code.
Reset loads OSCTRIM with a default value of $80.
11.3.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 11-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 ms.