PIC16F18345 timing errors

For general Flowcode discussion that does not belong in the other sections.
Post Reply
ianjoh
Posts: 11
http://meble-kuchenne.info.pl
Joined: Sat Jan 30, 2021 3:42 pm

Flowcode v10 PIC16F18345 timing errors

Post 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
Attachments
16F18345_multisounder_test.fcfx
(7.99 KiB) Downloaded 11 times

chipfryer27
Valued Contributor
Posts: 1813
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 404 times
Been thanked: 622 times

Re: PIC16F18345 timing errors

Post 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 68 times

Hope this helps.

PS

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

ianjoh
Posts: 11
Joined: Sat Jan 30, 2021 3:42 pm

Re: PIC16F18345 timing errors

Post by ianjoh »

Thank you that has sorted it.
Have to put that down to a late night senior moment!

chipfryer27
Valued Contributor
Posts: 1813
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 404 times
Been thanked: 622 times

Re: PIC16F18345 timing errors

Post by chipfryer27 »

Haha
Done many similar..
Glad it's sorted now.

Regards

Post Reply