Page 1 of 1

INT OSC in PIC 16LF1823

Posted: Wed Sep 08, 2021 4:18 pm
by mehmet64
hi
i try too use INTOSC in one Project with a 16LF1823 but this not working prperty after program Micro///this just working property wen i set FREQ in 0.5 MHZ and PWM out put FRQ is not true i see with osiloscope ///when i set PWM FRQ to 38 kHZ micro provide 1 KHz PWM

Re: INT OSC in PIC 16LF1823

Posted: Wed Sep 08, 2021 4:22 pm
by mehmet64
This is my project

Re: INT OSC in PIC 16LF1823

Posted: Wed Sep 08, 2021 8:09 pm
by BenR
Hello,

On the component toolbar look under Runtime -> Matrix tools for the IntOsc helper component.

This lists the speeds that the internal oscillator on your selected device can run at and also lists the line of C code needed to be inserted after the start icon to configure the chip to run at the selected speed.

For 0.5MHz you need to use the following line of C code at the start of your program.

Code: Select all

OSCCON = 0x38;
Hopefully this helps.

Re: INT OSC in PIC 16LF1823

Posted: Thu Sep 09, 2021 12:29 pm
by mehmet64
hi
thank you very much