View previous topic :: View next topic |
Author |
Message |
z1rqdym
Joined: 14 Dec 2014 Posts: 24
|
dsPIC33FJ128GP802 40MIPS with PLL |
Posted: Mon Jun 01, 2015 10:02 am |
|
|
compiler version 5.015
I'm going to use this dsPIC33 on my quadcopter. I planned to do this with 18F4431 but it's really slow while calculating float variables.
so my question is about how to use PLL on dsPIC33 to run 40MIPS? But I will never
use the internal ocs because I heard that when use the internal osc via PLL to get 40mips make the dspic hot.
i want to get 40mips with external crystal.
what would i do to do this on CCS C ?
there are fuses in the device file that are not explaned what these mean.
please could anybody help? |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19552
|
|
Posted: Mon Jun 01, 2015 10:23 am |
|
|
It'll run just as hot. It's running at 40MIPS that makes it hot, not the internal oscillator...
The surface mount versions run cooler than the DIP versions, and it depends on what you are 'doing' as well as the core speed. If you are driving pins, with some currents involved (which of course go up when capacitive loads are involved and speeds go up), so does the heat of the chip. |
|
|
z1rqdym
Joined: 14 Dec 2014 Posts: 24
|
|
Posted: Mon Jun 01, 2015 10:38 am |
|
|
should i use a cooling system on it? my system will work only 10min per fly the quadcopter.
but my main question is how to configure the Fosc to 80Mhz to use the dspic with 40mips ?
i have 10mhz crystal to use with that dspic. any help? |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19552
|
|
Posted: Mon Jun 01, 2015 10:45 am |
|
|
It doesn't run _that_ hot, unless you have silly things like foam on top of the chip...
HS,PR_PLL,NOOSCIO
#use delay(CRYSTAL=10MHz,CLOCK=80MHz)
I think that is all that is needed, it's been a while since I played with these.
Remembered after posting this. These chips _require_ the external 1MR resistor across the crystal for the oscillator to run properly. |
|
|
z1rqdym
Joined: 14 Dec 2014 Posts: 24
|
|
Posted: Fri Jun 05, 2015 6:10 am |
|
|
There is any information about that 1M Resistor across to the crystal. in my opinion thats not necessary because i used a while ago 18F4431 10Mhz crystal to get 40Mhz with PLL. i didn't need that resistor. Whats the difference i do not understood well, i read a bunch appnotes and but there is nothing. I'm going to change the led pins. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19552
|
|
Posted: Fri Jun 05, 2015 12:45 pm |
|
|
It depends on the PIC, and the crystal.
Generally PIC18's have enough resistance internally for 95% of crystals. This PIC33 though needs it for any except very low frequency crystals.
The data sheets for the PIC 18, say something along the lines of 'an external resistor may be needed in some cases'. Conversely the data sheet for this PIC says 'external resistor required'..... Note _required_. |
|
|
z1rqdym
Joined: 14 Dec 2014 Posts: 24
|
|
Posted: Fri Jun 05, 2015 7:17 pm |
|
|
if I use 1M resistor across the crystal, there are no need for the 15pF-22pF ceramic capacitor? |
|
|
z1rqdym
Joined: 14 Dec 2014 Posts: 24
|
|
Posted: Fri Jun 05, 2015 7:54 pm |
|
|
Ok, i add an 1M resistor across to the crystal, 15pF capacitors still there.
the dsPIC work fine.
but when i set any interrupt (TIMER2 RS232-recieve etc..) and when the interrupt is comes the dsPIC resets it self.
why is that doing? |
|
|
z1rqdym
Joined: 14 Dec 2014 Posts: 24
|
|
Posted: Fri Jun 05, 2015 8:48 pm |
|
|
i found that. in the dspic33fj128gp802.h stack size is 31. but when i compile my program, in the statistic page the stack size is 128 and its %100 full.
so i do this after Fuses lines
#build (stack=256)
and all the problem is gone.
so i think thats, can do any issue while a few times later while the program is working on? |
|
|
|