|
|
View previous topic :: View next topic |
Author |
Message |
harvester
Joined: 18 Apr 2013 Posts: 3
|
PLL Problem on DSPic |
Posted: Mon Apr 29, 2013 2:40 am |
|
|
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: 19544
|
|
Posted: Mon Apr 29, 2013 3:40 am |
|
|
What compiler version?.
Basically, there is a limit to the spoon-feeding!.....
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 |
|
|
|
|
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
|