PIC16F15324 - Clock Frequency Options for Target

For general Flowcode discussion that does not belong in the other sections.
Post Reply
jay_dee
Posts: 130
http://meble-kuchenne.info.pl
Joined: Sun Dec 20, 2020 6:06 pm
Has thanked: 46 times
Been thanked: 29 times

PIC16F15324 - Clock Frequency Options for Target

Post 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.

medelec35
Matrix Staff
Posts: 1432
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 506 times
Been thanked: 469 times

Re: PIC16F15324 - Clock Frequency Options for Target

Post 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 1094 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 1094 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.
Martin

Post Reply