CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Getting "Option invalid No Internal Osc" when co

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
c_user



Joined: 19 May 2010
Posts: 9

View user's profile Send private message

Getting "Option invalid No Internal Osc" when co
PostPosted: Fri Apr 08, 2011 3:57 pm     Reply with quote

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?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Apr 08, 2011 4:26 pm     Reply with quote

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);
  }

}
c_user



Joined: 19 May 2010
Posts: 9

View user's profile Send private message

PostPosted: Fri Apr 08, 2011 5:08 pm     Reply with quote

Thank you for helping.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group