|
|
View previous topic :: View next topic |
Author |
Message |
mc@ey
Joined: 11 Aug 2014 Posts: 3
|
Dspic30F4011 PLL Settings |
Posted: Mon Aug 11, 2014 1:36 am |
|
|
Hi All,
I am new in DsPic world. i often worked with pic18f family. In my Project i use dspic30f4011 with 10mhz quarz.
in my understanding i have a result from 2,5 MIPS
i would like to work with 4xPLL but i have no Idee, how can i set this in my source code.
i tryed with
#Fuses XT_PLL4
#use delay (Crystal= 10000000)
but it doesnt work.
Can somebody help me?
Thanks in advance. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19552
|
|
Posted: Mon Aug 11, 2014 2:05 am |
|
|
Start by looking in the .h file for the chip, and at the data sheet.
You will see in the data sheet, that unlike the PIC18, with just *4 PLL, you have a choice of *4, *8, and *16. However then you see (table 21-1), that the PLL can only be used with the XT oscillator, EC clock input, or FRC internal oscillator. However on these chips 'XT' is rated for up to 10MHz.
A look at the fuses, finds XT_PLL4, XT_PLL8, & XT_PLL16,
So you can run at 40MHz, with the first, and clock=40MHz, or go to 80MHz, with XT_PLL8. The fastest you can run the chip, is with a 7.5MHz crystal, and PLL16, giving 120MHz master oscillator, and 30MIPS.
The delay has to be given the clock rate. So either:
#use delay (clock=40MHz)
or
#use delay (crystal=10MHz, clock=40MHz)
If you do the latter, you can get rid of the PLL fuse, since the compiler then 'knows' to use the *4 PLL. |
|
|
mc@ey
Joined: 11 Aug 2014 Posts: 3
|
|
Posted: Mon Aug 11, 2014 4:00 am |
|
|
Ttelmah wrote: | Start by looking in the .h file for the chip, and at the data sheet.
You will see in the data sheet, that unlike the PIC18, with just *4 PLL, you have a choice of *4, *8, and *16. However then you see (table 21-1), that the PLL can only be used with the XT oscillator, EC clock input, or FRC internal oscillator. However on these chips 'XT' is rated for up to 10MHz.
A look at the fuses, finds XT_PLL4, XT_PLL8, & XT_PLL16,
So you can run at 40MHz, with the first, and clock=40MHz, or go to 80MHz, with XT_PLL8. The fastest you can run the chip, is with a 7.5MHz crystal, and PLL16, giving 120MHz master oscillator, and 30MIPS.
The delay has to be given the clock rate. So either:
#use delay (clock=40MHz)
or
#use delay (crystal=10MHz, clock=40MHz)
If you do the latter, you can get rid of the PLL fuse, since the compiler then 'knows' to use the *4 PLL. |
Hi Thx for your answer..
I tried with / without
#Fuses XT_PLL4
and with
#use delay (crystal=10MHz, clock=40MHz)
But it doesnt work.
:(
How i need to change my settings. |
|
|
mc@ey
Joined: 11 Aug 2014 Posts: 3
|
|
Posted: Mon Aug 11, 2014 4:07 am |
|
|
here is my Source Code;
#include <30F4011>
#Fuses NOWDT
#Fuses CKSFSM
#Fuses NOBROWNOUT
#device ICSP=1
#use delay( crystal=10MHz, clock=40MHz)
#use rs232(baud=38400,xmit=PIN_F3,rcv=PIN_F2) |
|
|
|
|
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
|