English
Language : 

MC9S08QE16CLC Datasheet, PDF (187/350 Pages) Freescale Semiconductor, Inc – Low-power wireless applications, Gas, water and heater meters
Internal Clock Generator (S08ICGV4)
10.5.3 Example #2: External Crystal = 4 MHz, Bus Frequency = 20 MHz
In this example, the FLL will be used (in FEE mode) to multiply the external 4 MHz oscillator up to
40-MHz to achieve 20 MHz bus frequency.
After the MCU is released from reset, the ICG is in self-clocked mode (SCM) and supplies approximately
8 MHz on ICGOUT which corresponds to a 4 MHz bus frequency (fBus).
During reset initialization software, the clock scheme will be set to FLL engaged, external (FEE). So
fICGOUT = fext * P * N / R ; P = 1, fext = 4.00 MHz
Solving for N / R gives:
Eqn. 10-3
N / R = 40 MHz /(4 MHz * 1) = 10 ; We can choose N = 10 and R = 1
Eqn. 10-4
The values needed in each register to set up the desired operation are:
ICGC1 = $78 (%01111000)
Bit 7 HGO
0
Bit 6 RANGE 1
Bit 5 REFS
1
Bits 4:3 CLKS
11
Bit 2 OSCSTEN 0
Bit 1 LOCD 0
Bit 0
0
Configures oscillator for low power
Configures oscillator for high-frequency range; FLL prescale factor is 1
Requests an oscillator
FLL engaged, external reference clock mode
Disables the oscillator
Loss-of-clock detection enabled
Unimplemented or reserved, always reads zero
ICGC2 = $30 (%00110000)
Bit 7 LOLRE
Bit 6:4 MFD
Bit 3 LOCRE
Bit 2:0 RFD
0 Generates an interrupt request on loss of lock
011 Sets the MFD multiplication factor to 10
0 Generates an interrupt request on loss of clock
000 Sets the RFD division factor to 1
ICGS1 = $xx
This is read only except for clearing interrupt flag
ICGS2 = $xx
This is read only. Should read DCOS before performing any time critical tasks
ICGFLTLU/L = $xx
Not used in this example
ICGTRM
Not used in this example
MC9S08AC60 Series Data Sheet, Rev. 3
Freescale Semiconductor
187