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 CCS Technical Support

dsPIC33 with FRC Oscillator

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



Joined: 06 May 2013
Posts: 33
Location: Toronto

View user's profile Send private message

dsPIC33 with FRC Oscillator
PostPosted: Sun Jan 31, 2016 3:36 pm     Reply with quote

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 ?
newguy



Joined: 24 Jun 2004
Posts: 1908

View user's profile Send private message

PostPosted: Sun Jan 31, 2016 4:44 pm     Reply with quote

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 #?
Ttelmah



Joined: 11 Mar 2010
Posts: 19518

View user's profile Send private message

PostPosted: Mon Feb 01, 2016 2:44 am     Reply with quote

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).
tripper269



Joined: 06 May 2013
Posts: 33
Location: Toronto

View user's profile Send private message

PostPosted: Mon Feb 01, 2016 8:48 am     Reply with quote

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).
temtronic



Joined: 01 Jul 2010
Posts: 9229
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Mon Feb 01, 2016 8:52 am     Reply with quote

Which compiler version ? could be old, updated version may have fixed it ?

Maybe report to CCS on their website.

Jay
newguy



Joined: 24 Jun 2004
Posts: 1908

View user's profile Send private message

PostPosted: Mon Feb 01, 2016 8:54 am     Reply with quote

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.
Ttelmah



Joined: 11 Mar 2010
Posts: 19518

View user's profile Send private message

PostPosted: Mon Feb 01, 2016 8:57 am     Reply with quote

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.
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