View previous topic :: View next topic |
Author |
Message |
tripper269
Joined: 06 May 2013 Posts: 33 Location: Toronto
|
dsPIC33 with FRC Oscillator |
Posted: Sun Jan 31, 2016 3:36 pm |
|
|
Hi all,
Does anybody know how set up the clock rate to 200 MHz by using internal FRC ? I tried with different fuse setting and #use delay(clock=4MHz, internal). use delay overrides the fuse settings. If i set the clock rate in ASM, use delay will change it. But in use delay the clock rate i can get is 80Mhz. So how can i achieve 200Mhz clock rate in CCS ? |
|
![](templates/subSilver/images/spacer.gif) |
newguy
Joined: 24 Jun 2004 Posts: 1903
|
|
Posted: Sun Jan 31, 2016 4:44 pm |
|
|
I'm not aware of any dsPIC33 processors rated to run up to 200MHz. I know there are some E series parts rated to 140MHz, but I've never seen any rated higher than that.
What is the part #? |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah
Joined: 11 Mar 2010 Posts: 19363
|
|
Posted: Mon Feb 01, 2016 2:44 am |
|
|
You can simply check by opening the 'parametric chart' on the Microchip site, and selecting the 'CPU speed' column.
70mips is the fastest listed.
To run these at 140MHz, the delay statement, is:
#use delay(clock=140Mhz,internal)
'Of course' the delay overrides the fuse settings. The delay must match the speed the CPU is being clocked at.
Also though, most of the clock programming on these chips is not done by the fuses. The PLL is setup after the chip boots. The compiler calculates the settings for these based on the clock specified, and the clock source (so if you used 'crystal=10MHz', with the same 'clock' setting, it'd know to set the PLL up to give a *14 result). |
|
![](templates/subSilver/images/spacer.gif) |
tripper269
Joined: 06 May 2013 Posts: 33 Location: Toronto
|
|
Posted: Mon Feb 01, 2016 8:48 am |
|
|
The part is dsPIC33FJ256GP506.I am using dsPIC starter kit, Labs comes with it says its running on 200MHZ and I also checked datasheet. All files are in XC16 but I decided to work on CCS cause that's what peoples use at my work. CCS is not allowing me to use more than 80Mhz speed with #use(clock =140Mhz, internal). |
|
![](templates/subSilver/images/spacer.gif) |
temtronic
Joined: 01 Jul 2010 Posts: 9171 Location: Greensville,Ontario
|
|
Posted: Mon Feb 01, 2016 8:52 am |
|
|
Which compiler version ? could be old, updated version may have fixed it ?
Maybe report to CCS on their website.
Jay |
|
![](templates/subSilver/images/spacer.gif) |
newguy
Joined: 24 Jun 2004 Posts: 1903
|
|
Posted: Mon Feb 01, 2016 8:54 am |
|
|
http://www.microchip.com/wwwproducts/Devices.aspx?product=dsPIC33FJ256GP506
First line of that processor's specifications:
Code: | Operating Range:
DC – 40 MIPS (40 MIPS @ 3.0-3.6V, -40°C to +85°C) |
For these dsPICs, it's one "instruction" per every two clock cycles. In other words, the maximum operating frequency is 80 MHz.
Seriously, read the data sheet. Complaining that the compiler won't let you set the clock to 200MHz is like complaining that the compiler didn't warn you about trying to run the processor at 10V. |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah
Joined: 11 Mar 2010 Posts: 19363
|
|
Posted: Mon Feb 01, 2016 8:57 am |
|
|
That chip is only rated for 80Mhz.
Read the data sheet.
This is why CCS won't let you select above this.
The starter kit itself _is_ rated to 200MHz, but only with chips that support this. Currently only the dsPIC32 models offer this, with the PIC32MZ starter kit. |
|
![](templates/subSilver/images/spacer.gif) |
|