Page 1 of 1

Oscillator configuration PIC16F18313

Posted: Tue Oct 02, 2018 8:57 am
by CSM2711
Hello,

I want to run my PIC16F18313 at 4 MHZ for this i configure the chip like this:
clock1.JPG
clock1.JPG (30.41 KiB) Viewed 2662 times
clock2.JPG
clock2.JPG (76.02 KiB) Viewed 2662 times
But when I Measure the CLKOUT Pin there is a 8 MHZ sawtooth.

After adding the following code:

Code: Select all

OSCCON1 = 0x03;
Everything is fine. That means I can measure a 1 Mhz square

So now my question, should it work also by configure the chip via Project options ot is this a Bug?

Re: Oscillator configuration PIC16F18313

Posted: Tue Oct 02, 2018 9:55 am
by Benj
Hello,

The clock speed setting in the project options is used to configure delays and baud rates etc. It must match the clock speed of the hardware but it does not in itself set the hardware clock speed.

The INTOSC helper component can be useful when using the internal oscillator.

Re: Oscillator configuration PIC16F18313

Posted: Tue Oct 02, 2018 11:10 am
by kersing
Hi Ben,

The 'clock speed' setting just the speed for calculations is a recurring source of confusion, would it be possible to add a remark to the dialog or change the text? There is plenty of screen real estate available in that dialog for more text.

Re: Oscillator configuration PIC16F18313

Posted: Tue Oct 02, 2018 11:43 am
by Benj
Good suggestion there Jack. We have changed the label text to the following.
Clock Speed (Hz): Defines delay related timings