Page 1 of 1

CONFIG FOR PIC18F47K40 -44QFP

Posted: Sat Nov 30, 2024 2:57 pm
by SILVESTROS
Hi to all !
I would like to set internal oscillator for PIC18F47K40 at 64MHZ. What is the config setup for stable operation at that INTOSC. ?
What is the freq. set at other options , and OSCCON, OSCFREQ ,OSCTUNE at Main as C code?
Thanks in advance.

Basil

Re: CONFIG FOR PIC18F47K40 -44QFP

Posted: Sat Nov 30, 2024 4:45 pm
by chipfryer27
Hi

I'm not familiar with that chip and I can't actually test at present, however under project option you have settings for the oscillator and can set it for

HFINTOSC with HFFRQ = 64MHz (remember to set clock speed to 64MHz too).

If that doesn't do it, you could try using the Internal Oscillator Helper found under Component Libraries > Runtime. This will generate C-code to set the oscillator.

Hope this helps.

Regards

Re: CONFIG FOR PIC18F47K40 -44QFP

Posted: Mon Dec 02, 2024 5:35 pm
by SILVESTROS
Many thanks for info..
Below is the tested config for PIC18F47K40 at 64MHZ INTERNAL OSCILLATOR

Clock speed...64MHZ

OSC. MODE...Oscillator DISABLED
DEFAULT OSC...HFINTOSC with HFFRQ=64MHZ
FCMEN (CLOCK OUT ENABLE) ... OFF
CSWEN...OFF
FCMEN (FAIL SAFE CLOCK MONITOR) ...OFF

C CODE at main for initialize oscillator
OSCFRQ=0b00001000;

Regards

Basil