English
Language : 

MC9S08GB60 Datasheet, PDF (115/290 Pages) Motorola, Inc – Microcontrollers
Initialization/Application Information
The clock scheme will be FLL engaged, internal (FEI). So
fICGOUT = (fIRG / 7) * P * N / R ; P = 64, fIRG = 243 kHz
Solving for N / R gives:
Eqn. 7-5
N / R = 10.8 MHz /(243/7 kHz * 64) = 4.86 ; We can choose N = 10 and R = 2.
Eqn. 7-6
A trim procedure will be required to hone the frequency to exactly 5.4 MHz. An example of the trim
procedure is shown in example #4.
The values needed in each register to set up the desired operation are:
ICGC1 = $28 (%00101000)
Bit 7
0
Bit 6 RANGE 0
Bit 5 REFS
1
Bits 4:3 CLKS 01
Bit 2 OSCSTEN 0
Bit 1
0
Bit 0
0
Unimplemented or reserved, always reads zero
Configures oscillator for low-frequency range; (don’t care)
Oscillator using crystal or resonator requested (don’t care)
FLL engaged, internal reference clock mode
Disables the oscillator in stop modes
Reserved for Freescale Semiconductor internal use; always write zero
Unimplemented or reserved, always reads zero
ICGC2 = $31 (%00110001)
Bit 7 LOLRE 0
Bit 6:4 MFD
011
Bit 3 LOCRE 0
Bit 2:0 RFD
001
Generates an interrupt request on loss of lock
Sets the MFD multiplication factor to 10
Generates an interrupt request on loss of clock
Sets the RFD division factor to ÷2
ICGS1 = $xx
This is read only except for clearing interrupt flag
ICGS2 = $xx
This is read only; good idea to read this before performing time critical operations
ICGFLTLU/L = $xx
Not used in this example
ICGTRM = $xx
Bit 7:0 TRIM
Only need to write when trimming internal oscillator; done in separate
operation (see example #4)
MC9S08GB/GT Data Sheet, Rev. 2.3
Freescale Semiconductor
115