English
Language : 

MC68HC908RF2 Datasheet, PDF (134/254 Pages) Motorola, Inc – HCMOS Microcontroller Unit
Internal Clock Generator Module (ICG)
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(t2/t1).
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-l--o-(--gt--2--(--2-⁄---t)--1---)-
DDIV2 = DDIV1 + DVFACT
DSFACT = 2----(--D-----D-----I-(-V--t-2-2----⁄-–--t--1-D--)--D-----I--V----1----)
DSTG2 = DSFACT ⋅ DSTG1
If DSTG2 is greater than 255:
DDIV2 = DDIV2 + 1
DSTG2 = D-----S-----T2----G-----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 8-9. This example is for illustrative purposes only and
does not represent a valid syntax for any particular assembler.
Advance Information
134
Internal Clock Generator Module (ICG)
MC68HC908RF2 — Rev. 1
MOTOROLA