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

DsPic33EP512GP806 clock setup

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



Joined: 08 Jan 2018
Posts: 59
Location: Finland

View user's profile Send private message

DsPic33EP512GP806 clock setup
PostPosted: Thu Jul 05, 2018 12:47 pm     Reply with quote

Hello guys.
I try to get maximum speed of that DsPic33ep512gp806 (140Mhz) but fastest what i get is 90-110Mhz.
Do i need internal to external clock switching or what? Fuses?

Compiler: PCWHD 5.074
MPLAB: 8.92 + CCSC plugin
Windows 7 64bit

10Mhz external crystal in hardware and this time it have 9pf capacitors.



Current setup in this moment:

Code:

#include "33EP512GP806.h"
#device adc=10
//#device PSV=16         //program storage visibility

#device PASS_STRINGS=IN_RAM



#FUSES NOWDT                    //No Watch Dog Timer
#FUSES CKSFSM                   //Clock Switching is enabled, fail Safe clock monitor is enabled
//#FUSES NOCKSNOFSM            //Fail safe disabled
#FUSES HS
//#FUSES NOOSCIO
#FUSES PR                   //primary oscillator
#FUSES NOPUT                    //No Power Up Timer
#FUSES NOBROWNOUT               //No brownout reset
#FUSES ALTI2C1                  //I2C1 mapped to ASDA1/ASCL1 pins
#FUSES NOJTAG                   //JTAG disabled
#FUSES NOAPLK                   //Auxiliary Segment Key bits, use if using both NOAWRT and NOAPROTECT fuses
#FUSES PR_PLL               

#use delay(CRYSTAL=10mhz, clock=90mhz)// <-- that is maximum speed at this time..
Ttelmah



Joined: 11 Mar 2010
Posts: 19515

View user's profile Send private message

PostPosted: Thu Jul 05, 2018 1:09 pm     Reply with quote

What happens when you select the faster settings?.
One classic reason for failure is inadequate supply smoothing, partciularly on VddCore. As the frequency goes up, the demands on the supply rise.
Look at section 2.2 in the data sheet. Do you have all the recommended capacitors close to the chip?. How long are the supply rails?. If any length, then look at the paragraph about tank capacitors.
-Terppa-



Joined: 08 Jan 2018
Posts: 59
Location: Finland

View user's profile Send private message

PostPosted: Thu Jul 05, 2018 3:05 pm     Reply with quote

If i try example 100Mhz it will never start, but sometimes i can use 110Mhz.
All core capacitors (100nf) is in place and there is 220uf electrolytic capacitor Vdd line as well.
What are you thinking about these fuse settings Mr T?
Maybe i check that USB port. There is no external power supply, only pickit3 feeds a current.
Thank you very much Mr T!
temtronic



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

View user's profile Send private message

PostPosted: Thu Jul 05, 2018 4:52 pm     Reply with quote

this...
Quote:
There is no external power supply, only pickit3 feeds a current.

is the key to your problem!!

Somewhere in the PK3 documentation there's a chart or listing of the max current it can supply. It may be in the Help files within MPLAB. I know it's 'somewhere'..
The PICkit3 is NOT able to supply enough current (power) to run your PIC at high speed. You'll need to add a separate power supply, I suggest something in the order of 2 amps at whatever VDD you're running at.

Jay
Ttelmah



Joined: 11 Mar 2010
Posts: 19515

View user's profile Send private message

PostPosted: Fri Jul 06, 2018 12:43 am     Reply with quote

Have to agree wholeheartedly.
The PIcKit3, is 'famous' for not being able to deliver much power to the attached devices. The PicKit4, is slightly better, but all USB based devices are very limited.
This was carefully 'missing' from the initial post...

The Pickit3 is rated to draw a maximum of 100mA from the USB connection, and already uses well over half this to power it's own circuitry. It is able to deliver only about 30mA to the target board. It is in the MPLAB user guide under 'debugger powered'
Quote:

The internal debugger power is limited to 30 mA.


The PicKit4, is rated to deliver more, at 50mA.

At 70MIPS, your device draws up to 105mA (and that's assuming no other circuitry on the board).....
The supply is probably already drooping significantly at the upper speeds that work.
-Terppa-



Joined: 08 Jan 2018
Posts: 59
Location: Finland

View user's profile Send private message

PostPosted: Fri Jul 06, 2018 3:13 am     Reply with quote

That Pickit3 power seems to be very low. Well i try to put some more with my laboratory supply.

Thank you for all.
temtronic



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

View user's profile Send private message

PostPosted: Fri Jul 06, 2018 5:14 am     Reply with quote

The PicKit3 was not designed to be a ' PIC prototype development' power supply JUST an easy way to program PICs and have a debugger/ICD as well. Also,since it is powered through a USB port on a PC, you should look at the power setup for that USB port. Some unknown program altered the max current of a port some years ago. One day it worked, next day it didn't... hair pulling 'fun' .Never ever did find out what program did that.
For prototyping/testing/proof of concept I use a $2 USB<>TTL module. Gives me both 5 and 3 v power as well as serial to PC. If I need more than 1/2 amp, I use a 2 amp 'wallwart' style regulated power supply.

Jay
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