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

No internal OSC

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



Joined: 30 Jan 2010
Posts: 8

View user's profile Send private message

No internal OSC
PostPosted: Wed Jan 15, 2014 3:08 am     Reply with quote

Hello,

i just tried to work with the PIC24FV16KA304. Therefore I used the PC24 wizard and told to use the internal OSC (20MHz as used automatically).
Unfortunately after trying to compile this code with no other changes the compiler results in a Error99 telling: "Option invalid No internal OSC".
What is going wrong with this as the PIC24 has a internal osc.

I am using the ccs PCWHD compiler Version IDE 5.016 and PCD 5.016. And the file #include <24FV16KA304.h> was included.

Thanks
A. Wolf
Ttelmah



Joined: 11 Mar 2010
Posts: 19504

View user's profile Send private message

PostPosted: Wed Jan 15, 2014 4:04 am     Reply with quote

A couple of bits to this.

The first is a 'confusion' in the labelling of this oscillator. For some reason Microchip, elect to call this particular oscillator the 'Fast RC oscillator', not the 'internal oscillator'. CCS carry this forward, and won't accept the keyword 'internal'. Select the fuse FRC_PLL, and just say 'clock', rather than internal.

Then though, unlike the oscillators on a lot of the DSPIC's that have a programmable divider in the PLL, allowing a huge range of frequencies to be selected, from the RC source, these ones only support a 4*PLL, fed from 8MHz, or 4MHz. So clock=16MHz, or clock=32MHz only. Default is 16MHz. 20MHz can't be generated from this oscillator.

As a general comment, the 'wizard', is thick. It'll generate invalid code on most chips, and should be treated as something that is more likely to create problems, than solve them....

Best Wishes
jeremiah



Joined: 20 Jul 2010
Posts: 1346

View user's profile Send private message

PostPosted: Wed Jan 15, 2014 10:38 am     Reply with quote

Just a tip:

Even though the data sheet specifies higher frequencies, I found a lot of chips in that particular series (the PIC24 F/FV xx KA xxx series) seem to have trouble at and above 20MHz (works fine at 11MHz, haven't tried 19Mhz). Simple Hello World programs would fail in some configurations. When I last checked the errata, it didn't mention any problems like that, but I experienced it on 4 different lots of chips from that series.

If you run into problems, try dialing down the clock speed and see if they go away.
mcr1981



Joined: 27 Oct 2010
Posts: 28

View user's profile Send private message

PostPosted: Fri Jan 17, 2014 6:23 pm     Reply with quote

Ttelmah wrote:
A couple of bits to this.

The first is a 'confusion' in the labelling of this oscillator. For some reason Microchip, elect to call this particular oscillator the 'Fast RC oscillator', not the 'internal oscillator'. CCS carry this forward, and won't accept the keyword 'internal'. Select the fuse FRC_PLL, and just say 'clock', rather than internal.

Best Wishes




That's strange.
I have code with 24FV32KA302 using that expression (internal = 32 MHZ) and the code works with an LED and LCD, also with OC (PWM).


I'm not using the CCS IDE, I'm using MPLAB X and PCD (5.016).



EDIT:

Probably is what has been said, the compiler cannot produce 20 MHz from the internal oscillator (no INTRC that can generate that Fosc).
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