I'm using a PIC18f45k50, and the FOSC has 3 bits, so the Mux Block diagram says
HF-16 mhz 111
HF-8 mhz 110
HF-4 mhz 101
HF-2 mhz 100
HF-1 mhz 011
HF-500 khz 010
HF-250 kHz 001
This fine, but in MPLAB you have the Config module, and that lists a set of defined names, like INTOSCIO, INTOSCCLKO
Ok, so I'm using #pragma config FOSC = INTOSCIO // Oscillator Selection (Internal oscillator) and it works.
But I can't find the definition in relations to the bits each config option is setting, these I believe set the FOCS<3:0> and other bits CFGPLLEN, PLSEL,PLLEN, SPLLMULT and PLL_Select.
I've searched various docs and all the headers but no joy, can't find the link between the configuration literals (INTOSCIO) and what bits accutualy get set.
Many thanks
Geoff
HF-16 mhz 111
HF-8 mhz 110
HF-4 mhz 101
HF-2 mhz 100
HF-1 mhz 011
HF-500 khz 010
HF-250 kHz 001
This fine, but in MPLAB you have the Config module, and that lists a set of defined names, like INTOSCIO, INTOSCCLKO
Ok, so I'm using #pragma config FOSC = INTOSCIO // Oscillator Selection (Internal oscillator) and it works.
But I can't find the definition in relations to the bits each config option is setting, these I believe set the FOCS<3:0> and other bits CFGPLLEN, PLSEL,PLLEN, SPLLMULT and PLL_Select.
I've searched various docs and all the headers but no joy, can't find the link between the configuration literals (INTOSCIO) and what bits accutualy get set.
Many thanks
Geoff
Last edited: