English
Language : 

MC68HC908RK2 Datasheet, PDF (75/158 Pages) Motorola, Inc – Microcontroller Unit
Usage Notes
6.4.7 Improving Settling Time
The settling time of the internal clock generator can be vastly improved if an external clock source can be
used during the settling time. When the internal clock generator is disabled (ICGON is low), the DDIV[3:0]
and DSTG[7:0] bits can be written. Then, when the internal clock generator is re-enabled, the clock period
will automatically start at the point written in the DDIV and DSTG bits.
Since a change in the DDIV and DSTG bits only cause a change in the clock period relative to the starting
point, the starting point must first be captured. The initial clock period can be expressed as in the next
example, where τX is a process, temperature, and voltage dependent constant and DDIV1 and DSTG1
are the values of DDIV and DSTG when operating at τ1.
τ1 = τX ⋅ 2DDIV1 ⋅ DSTG1
Finding the new values for DDIV and DSTG is easy if the new clock period is a binary multiple or fraction
of the original. In this case, DSTG is unchanged and DDIV2 is DDIV1 + log2(τ2/τ1).
If the new clock period is not a binary multiple or fraction of the original, both DSTG and DDIV may need
to change according to these equations:
DVFACT
=
int
l--o---g----(---τ--2-----⁄---τ---1----)
log ( 2 )
DDIV2 = DDIV1 + DVFACT
DSFACT =
----------------(---τ--2-----⁄---τ---1---)-----------------
2(DDIV2 – DDIV1)
DSTG2 = DSFACT ⋅ DSTG1
If DSTG2 is greater than 255:
DDIV2 = DDIV2 + 1
DSTG2
=
D-----S-----T----G-----2-
2
The software required to do this is relatively simple, since most of the math can be done before coding
because the initial and final clock periods are known. An example of how to code this in assembly code
is shown in Figure 6-10. This example is for illustrative purposes only and does not represent a valid
syntax for any particular assembler.
6.4.8 Trimming Frequency on the Internal Clock Generator
The unadjusted frequency of the low-frequency base clock (IBASE), when the comparators in the
frequency comparator indicate zero error, will vary as much as ±25% due to process, temperature, and
voltage dependencies. These dependencies are in the voltage and current references, the offset of the
comparators, and the internal capacitor. The voltage and temperature dependencies have been designed
to be a maximum of approximately ±1% error. The process dependencies account for the rest.
Fortunately, for an individual part, the process dependencies are constant. An individual part can operate
at approximately ±2% variance from its unadjusted operating point over the entire specification range of
the application. If the unadjusted operating point can be changed, the entire variance can be limited
to ±2%.
MC68HC908RK2 Data Sheet, Rev. 5.1
Freescale Semiconductor
75