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 support@ccsinfo.com

PLL Problem on DSPic

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



Joined: 18 Apr 2013
Posts: 3

View user's profile Send private message

PLL Problem on DSPic
PostPosted: Mon Apr 29, 2013 2:40 am     Reply with quote

hey, guys!

i can activate PLL by using the code for Pic18f452
# include "18f452.h"
# use delay(clock=16M, oscillator=4M)

but when i use this code for DsPic30f5011 or any dspic, it is not working...

# include "30f5011.h"
# use delay(clock=16M, oscillator=4M)
it says "Option invalid No PLL option"

Does anyone know why??
Ttelmah



Joined: 11 Mar 2010
Posts: 19359

View user's profile Send private message

PostPosted: Mon Apr 29, 2013 3:40 am     Reply with quote

What compiler version?.

Basically, there is a limit to the spoon-feeding!..... Smile

On the PIC18, there is a single speed PLL, giving *4. If you specify a clock, and oscillator rate that differ by this amount, the compiler will enable it.

However on the DSPIC's, you have three different PLL rates, three different possible external oscillators, and also the option to run on the internal oscillator. You need to give the compiler a few more 'clues' before it can work out what you want!.
On later compiler versions (you don't say what you are using....), it will guess you mean XT with 4* PLL.
However on earlier compilers, you need to say 'crystal=4M', at the least (and preferably actually specify the fuses).
I also suspect you may have a very early compiler (possibly into the time we really consider 'beta at best'), since this has been accepted without demur for about the last three years....

Best Wishes
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