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
PLL not working
Moderator: Benj
-
- 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
Does this work?
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.
Code: Select all
OSCCON=0b11110000;
OSCTUNE=0b01000000;