Page 1 of 1

PIC18(L)F2X/4XK22 config 64MHz clock ?

PostPosted: Tue Feb 07, 2023 5:12 pm
by eeboxCHIP
64 MHz performance available using PLL using C.

1. Please show code for using 64 MHz performance with MPLABĀ® X Integrated Development Environment (IDE) for PIC18F46K22.

2. List of NON RUN TIME config bits ? Registers bits that cannot be code modified in Main() ?

Thank you all.

Re: PIC18(L)F2X/4XK22 config 64MHz clock ?

PostPosted: Wed Feb 08, 2023 6:20 am
by AussieSusan
The answers are all in the datasheet.
Figure 2-1 shows how the oscillator can be configured. HFINTOSC outputs 16MHz. Set the INTOSC divider to 1:1 to you get the 16MHz out. Set the input to the 4x PLL to be the IMTOSC signal and select the 'Primary Clock' for the CPU.
Section 24.1 talks about the config bits and table 24-1 plus the notes indicate what can be read and written and when. Section 24.2 describes each of the CONFIG registers in more detail. Also see the function of the WRTC bit.
Susan