Page 1 of 1

PIC16F15324 - Clock Frequency Options for Target

Posted: Sat Jan 15, 2022 5:45 pm
by jay_dee
Hi,
When using the PIC16F15324 the FC target options for HF internal oscillator are 1MHz and 32MHz.
Under 'other options' is the clock speed setting which defines FC timings. This only allows a max value of 20.
Could this be changed to allow for the 32MHz timings.
My Flash test is running around 300ms when it should be near 500ms.

Side question, Are low interal clock frequencies considered more 'stable' or less prone to issues in noisy enviroments.
I'm guessing not significantly and as such there is nothing to be gained from the other Oscillator settings in the HFFREQ register. 16,8,4,2 MHz.
So just stick with 32Mhz for general purpose work.
Cheers, J.

Re: PIC16F15324 - Clock Frequency Options for Target

Posted: Sat Jan 15, 2022 6:43 pm
by medelec35
Hi J
What you may or may not know is the IntOsc component can be used to generate the required C code to set the internal osc frequency.
The options are:
Int Osc Options.png
Int Osc Options.png (69.72 KiB) Viewed 1144 times
After selecting the options, it displays the C code to enter within a C code block:
16F15324 OSC.png
16F15324 OSC.png (105.88 KiB) Viewed 1144 times
Also, note that you need to manually enter 32 within clock speed rather than using the dropdown.
jay_dee wrote:
Sat Jan 15, 2022 5:45 pm
as such there is nothing to be gained from the other Oscillator settings in the HFFREQ register. 16,8,4,2 MHz.
The reason for the other options is the lower the frequency the less power the microcontroller uses.
So the lower frequencies are more suited to battery power devices.
In addition, the lower the frequency the more it's suited to selecting lower timer interrupt and PWM frequencies.