Page 1 of 1

PIC16F18345 timing errors

Posted: Sat Jan 10, 2026 12:35 am
by ianjoh
Hi.
I am having timing errors with this pic on a basic flasher.
It looks to be running at 4x normal speed, I have set the delay to 2 secs to slow the led down enough for me to count the flashes. I am getting 10 flashes per 9 to 10 second time period.
The pic is on an external 4Mhz crystal.
Thanks Ian

Re: PIC16F18345 timing errors

Posted: Sat Jan 10, 2026 4:53 am
by chipfryer27
Hi

You have the oscillator set wrong in Project Options.

For External Oscillator Mode between 100KHz and 4MHz you should set at XT
Software Oscillator mode should just be EXTOSC (you have it at 4xPLL which multiplies the clock by a factor of four)

Screenshot 2026-01-10 044318.jpg
Screenshot 2026-01-10 044318.jpg (41.93 KiB) Viewed 71 times

Hope this helps.

PS

I moved the post to "General" as this is not a bug.

Re: PIC16F18345 timing errors

Posted: Sat Jan 10, 2026 2:48 pm
by ianjoh
Thank you that has sorted it.
Have to put that down to a late night senior moment!

Re: PIC16F18345 timing errors

Posted: Sat Jan 10, 2026 2:59 pm
by chipfryer27
Haha
Done many similar..
Glad it's sorted now.

Regards