PLL not working

An area to discuss 8-bit PIC specific problems and examples

Moderator: Benj

Post Reply
howard123
Posts: 75
Joined: Thu May 24, 2012 1:15 pm
Location: Cape Town
Has thanked: 30 times
Been thanked: 28 times
Contact:

PLL not working

Post by howard123 »

Hello all

I have a PIC18F46K22 running on the internal high frequency oscillator and producing 16MHz. I would like to increase the speed, using the PLL, up to a maximum speed of 64MHz but am not having success in doing this.

I have set the PLL Enable (PLLCFG) in the Configuration as well as combinations of OSCTUNE and OSCCON2. Here is my code at the start..

OSCCON=0b11110110; //16 meg internal
SLRCON=0b00011111;//all ports slow slew
OSCTUNE=0b01000000;// PLLEN
OSCCON2=0b10000000;//PLLRDY

In all cases the frequency remains at 16MHz.

I have not seen the data-sheet mention that a delay is necessary between a low start speed and PLL implementation. Could be wrong.

Any ideas?
Thanks
Howard
V7.2.1.4

Kenrix2
Flowcode v5 User
Posts: 211
Joined: Tue Feb 19, 2013 9:51 pm
Has thanked: 72 times
Been thanked: 177 times
Contact:

Re: PLL not working

Post by Kenrix2 »

Does this work?

Code: Select all

OSCCON=0b11110000;
OSCTUNE=0b01000000;
If you look at Figure 2-1, find the Clock Switch MUX. You can see that SCS<1:0> needs to be 00 for the 4xPLL to work.

howard123
Posts: 75
Joined: Thu May 24, 2012 1:15 pm
Location: Cape Town
Has thanked: 30 times
Been thanked: 28 times
Contact:

Re: PLL not working

Post by howard123 »

Hi
This has worked perfectly.
Thank you for your kindness.
regards
Howard

Post Reply