View previous topic :: View next topic |
Author |
Message |
c_user
Joined: 19 May 2010 Posts: 9
|
Getting "Option invalid No Internal Osc" when co |
Posted: Fri Apr 08, 2011 3:57 pm |
|
|
I have a design I previously compiled a long time ago. I just downloaded the latest version of the compiler and now come up with a bizarre message.
I am using a pic18F4550 device, with an internal oscillator. In spite of this, the compiler complains with:
*** Error 99 "ccs.c" Line 3(5,28): Option invalid No Internal Osc
The test code is simply:
Code: | #include <18f4550.h>
#use delay(internal = 4MHz)
void main()
{
setup_oscillator(OSC_4MHZ|OSC_INTRC|OSC_31250|OSC_PLL_OFF);
} |
The complaining line is:
#use delay(internal = 4MHz)
Any thoughts? |
|
![](templates/subSilver/images/spacer.gif) |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Fri Apr 08, 2011 4:26 pm |
|
|
I was able to make it work with the internal oscillator in vs. 4.119 with
the following settings. CCS has changed the names of the oscillator
fuses to match the 18F4550 data sheet. So "INTHS" means to use the
internal oscillator for the PIC, and the HS oscillator (with crystal) for the
USB module.
Code: |
#include <18F4550.h>
#fuses INTHS, NOWDT, BROWNOUT, PUT, NOLVP
#use delay(clock=4M)
//==============================
void main()
{
setup_oscillator(OSC_INTRC | OSC_4MHZ);
// Blink LED once per second.
while(1)
{
output_toggle(PIN_B0);
delay_ms(500);
}
} |
|
|
![](templates/subSilver/images/spacer.gif) |
c_user
Joined: 19 May 2010 Posts: 9
|
|
Posted: Fri Apr 08, 2011 5:08 pm |
|
|
Thank you for helping. |
|
![](templates/subSilver/images/spacer.gif) |
|