View previous topic :: View next topic |
Author |
Message |
-Terppa-
Joined: 08 Jan 2018 Posts: 60 Location: Finland
|
DsPic33EP512GP806 clock setup |
Posted: Thu Jul 05, 2018 12:47 pm |
|
|
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: 19568
|
|
Posted: Thu Jul 05, 2018 1:09 pm |
|
|
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: 60 Location: Finland
|
|
Posted: Thu Jul 05, 2018 3:05 pm |
|
|
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: 9255 Location: Greensville,Ontario
|
|
Posted: Thu Jul 05, 2018 4:52 pm |
|
|
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: 19568
|
|
Posted: Fri Jul 06, 2018 12:43 am |
|
|
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: 60 Location: Finland
|
|
Posted: Fri Jul 06, 2018 3:13 am |
|
|
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: 9255 Location: Greensville,Ontario
|
|
Posted: Fri Jul 06, 2018 5:14 am |
|
|
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 |
|
|
|