I'm currently going through the datasheet of the PIC18F45K22. I would like my microcontroller to run at a speed of 16 MHz using the internal oscillator, as I don't have an external crystal oscillator. I am using MPLAB IDE.
However, I'm a bit confused about whether I should be configuring the configuration registers or the oscillator registers to achieve this.
Could you please provide help on which registers I need to configure to ensure that the microcontroller operates at a speed of 16 MHz using the internal oscillator?
Edit : I have edited clock frequency in a post . before I asked for 20 MHz and now I am asking for 16 MHz
However, I'm a bit confused about whether I should be configuring the configuration registers or the oscillator registers to achieve this.
Could you please provide help on which registers I need to configure to ensure that the microcontroller operates at a speed of 16 MHz using the internal oscillator?
Edit : I have edited clock frequency in a post . before I asked for 20 MHz and now I am asking for 16 MHz
Last edited:






