Hello
I have an error, or an stupid mistake
For now, i am out of options
It looks like they run at +/- 32khz.
If i only use OutputC5=1 and OutputC5= 0, the output at c5 is for 5V and 0V is 5,6kHz.
-
I have tryed several things:
- Different PIC (16f1823 & 16f1829 ) and other pcb's.
- FC7 in stead of FC8
- Several settings at config bit's
-
Best regards Danny
Internal Oscillator error 16f1823 & 16f1829
Moderator: Benj
-
- Posts: 65
- Joined: Thu Feb 07, 2008 7:59 am
- Has thanked: 17 times
- Been thanked: 10 times
- Contact:
Internal Oscillator error 16f1823 & 16f1829
- Attachments
-
- weg test 16f1823.fcfx
- (7.56 KiB) Downloaded 127 times
-
- 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: Internal Oscillator error 16f1823 & 16f1829
Hello Danny.
Can you enter 32000000 for the Clock speed in your project options, General options tab.
Also, at the very start of Main, add a code block with
Can you enter 32000000 for the Clock speed in your project options, General options tab.
Also, at the very start of Main, add a code block with
Code: Select all
OSCCON = 0xF0;
Martin
-
- Posts: 65
- Joined: Thu Feb 07, 2008 7:59 am
- Has thanked: 17 times
- Been thanked: 10 times
- Contact:
Re: Internal Oscillator error 16f1823 & 16f1829
It works, it looks like i have missed something when using OSCCON = 0x70; and OSCCON = 0xF0;
Frequentie c5 on/of (whitout delay's and anything else) is now 364khz.
Many thanks for the fast respons.
-
- 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: Internal Oscillator error 16f1823 & 16f1829
Hi Danny.
No, it's not your fault with the OSCCON value.
You can indeed have OSCCON = 0x70;
But if you did, then the PLL Enable within the configuration settings must be set to Yes.
In the case of the 16F1823 there is a textual bug.
Instead of showing PLL Enable, it's showing VCAP P
I have fixed this issue and there will be an update as soon as possible.
Your mistake was to leave the clock speed within project options set at the default speed of 19.6608MHz
Before the update is available, If you want to experiment, you can use OSCCON = 0x70; and change VCAP P from No to Yes, and the internal OSC should run at 32MHz.
The difference between OSCCON = 0x70; and OSCCON = 0xF0;
OSCCON = 0x70; allows the PLL Enable to be disabled, so int OSC will run at 8MHz, or PLL Enabled so int OSC will run at 32MHz
OSCCON = 0xF0; overwrites the PLL Enable, so int OSC will run at 32MHz, whether PLL is enabled or not.
No, it's not your fault with the OSCCON value.
You can indeed have OSCCON = 0x70;
But if you did, then the PLL Enable within the configuration settings must be set to Yes.
In the case of the 16F1823 there is a textual bug.
Instead of showing PLL Enable, it's showing VCAP P
I have fixed this issue and there will be an update as soon as possible.
Your mistake was to leave the clock speed within project options set at the default speed of 19.6608MHz
Before the update is available, If you want to experiment, you can use OSCCON = 0x70; and change VCAP P from No to Yes, and the internal OSC should run at 32MHz.
The difference between OSCCON = 0x70; and OSCCON = 0xF0;
OSCCON = 0x70; allows the PLL Enable to be disabled, so int OSC will run at 8MHz, or PLL Enabled so int OSC will run at 32MHz
OSCCON = 0xF0; overwrites the PLL Enable, so int OSC will run at 32MHz, whether PLL is enabled or not.
Martin