4x PLL (PIC24F GA, GC, KA, KL, KM)
This PLL provides a fixed 4x multiplier, which can be used with XT and EC Primary Oscillators and the FRC Oscillator.
The PLL accepts any frequency input from approximately 3.5 MHz to 8 MHz.
Whenever the clock source of the PLL is changed, the PLL ready timer is reset to allow the PLL to synchronize to the new clock source. After the ready timer has counted the required time, the PLL output is ready for use. Application code can monitor the PLL Lock flag (OSCCON<5>) to determine when the PLL output frequency is locked.
Code Example:
The following MPLAB® XC16 Compiler code example enables the 4x PLL with Fast RC Oscillator source as the default system clock for a PIC24FJ128GA010 MCU. The default RCDIV setting (divide-by-2) sets FRC @ 4 MHz providing a 16 MHz system clock (8 MIPs):
#include <xc.h>
#pragma config FNOSC = FRCPLL // default System clock = Fast RC Osc. with 4x PLL module
// default RCDIV setting sets FRC at 4 MHz providing 16 MHz sys clk (8 MIPs)
int main(void)
{
...
}