12F1840 Running extremely slow

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
SHORTCIRCUIT
Posts: 155
Joined: Thu Feb 10, 2011 4:39 am
Location: Las Vegas, Nevada USA
Has thanked: 40 times
Been thanked: 19 times
Contact:

12F1840 Running extremely slow

Post by SHORTCIRCUIT »

Hi

I have been struggling with getting the 12F1840 to run properly with not much success.

I'm using osccon=0x70; for 8mhz. Simple test program to flash LED on A0 at 1 second rate which results in over a 1 minute rate.
I have set the general options under Build to 32000hz and program seems to run at a speed somewhat close to the 1 second.
I have included my Flowcode6 file so you can understand what I am doing wrong. Any help would certainly be appreciated.

Larry
12F1840 TEST.fcfx
(4.58 KiB) Downloaded 296 times

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: 12F1840 Running extremely slow

Post by medelec35 »

Hi Larry,
Just a simple typo.
You have got

Code: Select all

osccon=0x07;
Instead of

Code: Select all

osccon=0x70;
Which means your chip is running at 31KHz instead of 8MHz

Martin
Martin

SHORTCIRCUIT
Posts: 155
Joined: Thu Feb 10, 2011 4:39 am
Location: Las Vegas, Nevada USA
Has thanked: 40 times
Been thanked: 19 times
Contact:

Re: 12F1840 Running extremely slow

Post by SHORTCIRCUIT »

Hi Martin

As usual, are are awesome. I feel so stupid. I even checked my other programs and did not catch the typo.
I guarantee you that will never happen again. Thank you so much.

Larry

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: 12F1840 Running extremely slow

Post by medelec35 »

Hi Larry not a problem at all.
These things can catch us all out, no matter how experenced we are.

Martin
Martin

Post Reply