DOUBT DSPIC33EP512MU810

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 7.

Moderator: Benj

Post Reply
RLOPES780
Posts: 119
Joined: Tue Apr 07, 2015 11:01 am
Been thanked: 3 times
Contact:

DOUBT DSPIC33EP512MU810

Post by RLOPES780 »

What is the maximum clock I can with this microcontroller (internal) and how do I set it?

Thankful;
Ricardo.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: DOUBT DSPIC33EP512MU810

Post by Benj »

Hi Ricardo,

Fastest clock speed is 140MHz or 140000000 which produces a instruction speed of 70MIPs.

Set your configuration settings like this.
Config.jpg
Config.jpg (113.13 KiB) Viewed 4288 times
And then add this code into a C code icon at the start of your project.

Code: Select all

//Setup configuration for 70MIPs using 7.37MHz int osc
PLLFBD = 68;// M=70
CLKDIVbits.PLLPOST = 0;// N1=2
CLKDIVbits.PLLPRE = 0;// N2=2
OSCTUN = 23;//Tune FRC oscillator from 7.37Mhz to 8.00566MHz

//Disable Watch Dog Timer
RCONbits.SWDTEN = 0;

// Clock switching to incorporate PLL
__builtin_write_OSCCONH(0x01);// Initiate Clock Switch to FRC with PLL

// Oscillator with PLL (NOSC=0b011)
__builtin_write_OSCCONL(0x01);// Start clock switching
while(OSCCONbits.COSC != 0b001);

// Wait for Clock switch to occur
while(OSCCONbits.LOCK != 1);


//USB H/W initialization for 70 MIPs
//ACLKCON3 = 0x24C1;
ACLKCON3 = 0x22C1;
ACLKDIV3 = 0x7;

// Wait for PLL to lock
ACLKCON3bits.ENAPLL = 1;
while(ACLKCON3bits.APLLCK != 1);

RLOPES780
Posts: 119
Joined: Tue Apr 07, 2015 11:01 am
Been thanked: 3 times
Contact:

Re: DOUBT DSPIC33EP512MU810

Post by RLOPES780 »

Hello Benj;
Thanks for listening.
I changed the settings and ran the program below but it didn't work.
(OBS) I am not using any external crystal.

Thankful;

Ricardo.
Attachments
Flowcode1.fcfx
(10.62 KiB) Downloaded 193 times

RLOPES780
Posts: 119
Joined: Tue Apr 07, 2015 11:01 am
Been thanked: 3 times
Contact:

Re: DOUBT DSPIC33EP512MU810

Post by RLOPES780 »

sorry this program
Attachments
Flowcode1.fcfx
(11.49 KiB) Downloaded 167 times

RLOPES780
Posts: 119
Joined: Tue Apr 07, 2015 11:01 am
Been thanked: 3 times
Contact:

Re: DOUBT DSPIC33EP512MU810

Post by RLOPES780 »

sorry benj this program
Attachments
Flowcode1.fcfx
(10.01 KiB) Downloaded 192 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: DOUBT DSPIC33EP512MU810

Post by Benj »

Hello Ricardo,

Could simply be the display that isn't working. I advise a 1 second LED flasher routine for a sanity check.

https://www.matrixtsl.com/wiki/index.ph ... ED_flasher

RLOPES780
Posts: 119
Joined: Tue Apr 07, 2015 11:01 am
Been thanked: 3 times
Contact:

Re: DOUBT DSPIC33EP512MU810

Post by RLOPES780 »

Hello benj;

I did the led test and it didn't work.
With this program I gave you was using a crystal of 20mhz and the display worked.
I removed the crystal (there is no external crystal) I changed the settings it gave me and it still does not work.
Can you still help me?

Thankful;
Ricardo
Attachments
Flowcode1.fcfx
(9.97 KiB) Downloaded 199 times

Post Reply