# HCS12 Assembly controlling frequency with PPL

#### justtrying

Joined Mar 9, 2011
330
I am trying to write a code to double frequency of bus clock. Here is what I have:

Rich (BB code):
PROGRAM_ADD     EQU     $0800 PLLCTL EQU$003A
CLKSEL  EQU     $0039 SYNR EQU$0034
REFDV   EQU     $0035 FREQUENCY_ADD EQU$0900

SYN_MULT        DB      $0 REF_DV DB$1

BSET    PLLCTL,\$01000000        ;turn PLL on
MOVB    SYN_MULT,SYNR
MOVB    REF_DV,REFDV

SWI
I am really unsure about it. All I know is that the steps are to turn PLL on and provide appropriate status to SYNR and REFDV. I think I did that, but I feel like it is wrong...

#### nigelwright7557

Joined May 10, 2008
532
Try outputing a square wave to an I/O pin and scoping that will give you an idea of the speed of the PIC.