PIC:how can we get 1 ms interrupt using 16bit timer

frequencymicrocontrollerpictimer

I am using PIC24FJ256GB106 controller.I am setting configuration bit for internal frequency to FNOSC_FRCPLL.

I have confusion to this configuration bits that Am i getting 8MHZ or 16MHZ or 32MHZ ?

if I want timer(16bit) interrupt at every 1 ms then which frequency i have to use ? FOSC or FCY?

When i am setting FNOSC_FRCPLL configuration bit then what is FOSC and FCY?

Best Answer

FNOSC_FRPLL means your ultimate clock will be the output of the PLL module.

enter image description here

enter image description here

Summarizing from the PIC24F family reference manual:

6.8.3 FRC Oscillator with PLL Mode (FRCPLL)

The output of the FRC postscaler block may also be combined with the 4x PLL to produce a nominal system clock of either 16 MHz or 32 MHz. Although somewhat less precise in frequency than using the Primary Oscillator with a crystal or resonator, it still allows high-speed operation of the device without the use of external oscillator components.

The FRCPLL mode is selected whenever the COSC bits are ‘001’. In addition, this mode only functions when the direct or divide-by-2 FRC postscaler options are selected (RCDIV2:RCDIV0 = 000 or 001).