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 Running extremely slow
Moderator: Benj
-
- Posts: 155
- Joined: Thu Feb 10, 2011 4:39 am
- Location: Las Vegas, Nevada USA
- Has thanked: 40 times
- Been thanked: 19 times
- Contact:
-
- 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
Hi Larry,
Just a simple typo.
You have got
Instead of
Which means your chip is running at 31KHz instead of 8MHz
Martin
Just a simple typo.
You have got
Code: Select all
osccon=0x07;
Code: Select all
osccon=0x70;
Martin
Martin
-
- 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
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
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
-
- 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
Hi Larry not a problem at all.
These things can catch us all out, no matter how experenced we are.
Martin
These things can catch us all out, no matter how experenced we are.
Martin
Martin