Hi,
I have a demo board with a PIC16F689 that has a long period timer, it was using a 4mhz oscillator, and was quite accurate.
I changed the configuration settings on the PROGRAMMER to "Internal Oscillator" and the timing is no longer accurate, the error is about 4 x what it was.
Having read the help on the website, do i need to DEFINE the settings?
I.e. I understood the compiler would assume 4Mhz - do i need to use OSCCON to tell it?
"As always the fix is in the datasheet. On most of the parts so equipped, set the OSCCON register to a value of $60 for 4MHz operation. This should be the first thing you do in your program."
Also, should i be using the OSCTUNE / OSCCAL DEFINE, i noticed the programmer is set to "Erase before Program"?
If i use OSCCAL is this reading the calibration value and then automatically adding it to my code?
Thank you for any help.
I have a demo board with a PIC16F689 that has a long period timer, it was using a 4mhz oscillator, and was quite accurate.
I changed the configuration settings on the PROGRAMMER to "Internal Oscillator" and the timing is no longer accurate, the error is about 4 x what it was.
Having read the help on the website, do i need to DEFINE the settings?
I.e. I understood the compiler would assume 4Mhz - do i need to use OSCCON to tell it?
"As always the fix is in the datasheet. On most of the parts so equipped, set the OSCCON register to a value of $60 for 4MHz operation. This should be the first thing you do in your program."
Also, should i be using the OSCTUNE / OSCCAL DEFINE, i noticed the programmer is set to "Erase before Program"?
If i use OSCCAL is this reading the calibration value and then automatically adding it to my code?
Thank you for any help.
Comment