Can't make dsPIC33EP512GP806 to work at all - HELP!

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

Post Reply
ronaldlijs
Posts: 139
Joined: Tue Jan 05, 2010 10:07 am
Has thanked: 20 times
Been thanked: 25 times
Contact:

Can't make dsPIC33EP512GP806 to work at all - HELP!

Post by ronaldlijs »

Hi Ben et al,

I have tried everything and I'm a bit desperate now... Flowcode 5.5.2.1 Professional.

I have a simple circuit: dsPIC33EP512GP806 (have tried on different boards as well), nothing connected to it, very clean 3.3V (10uV ripple), no external XTAL, and for testing I'm using the internal Fast RC oscillator to get the dsPIC started at least.

The simplest for example to enable port D.L(all bits), it just doesn't work at all. I get no signal out of the pins...

I am able to program/verify the device successfully through both Flowcode and through MPLAB X too. I'm using my PicKit3 which I currently use to program my dsPIC30F5013 devices...

I have tried all settings in the Project Options to no avail. Latest settings I have tried with are shown below, I have however tried with many different clock speeds and any setting possible. I have even tried the config bits by following eahc of the entries in the Data Sheet (DEVICE CONFIGURATION REGISTER MAP), still no luck :-( Very frustrating!

Thanks for your help!
PS: I use both dsPIC30 and dsPIC33 micros and although the dsPIC30 took me some time to get it to start, it worked in the end... it works fine with internal Fast RC no PLL.
Attachments
dsPIC33EP512GP806_2_Not_Working.jpg
Project Options settings not working
(126.69 KiB) Downloaded 509 times
Configure Chip settings not working
Configure Chip settings not working
dsPIC33EP512GP806_1_Not_Working.jpg (29.55 KiB) Viewed 3601 times

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: Can't make dsPIC33EP512GP806 to work at all - HELP!

Post by kersing »

Ronald,

I would:
1) Disable the watchdog.
2) set ICD Communication channel to another value. "Reserved, do not use" feels like it should be avoided to me...
3) Set "General Segment Key Bits" to Disabled.

Good luck!

Jac
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

ronaldlijs
Posts: 139
Joined: Tue Jan 05, 2010 10:07 am
Has thanked: 20 times
Been thanked: 25 times
Contact:

Re: Can't make dsPIC33EP512GP806 to work at all - HELP!

Post by ronaldlijs »

Thanks Jac for your tips.

Still no luck I'm afraid.

I can however see that if I use internal oscillator with PLL, power consumption jumps up (from 16mA to 26mA) right after the device if finished programming...

Ronald

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: Can't make dsPIC33EP512GP806 to work at all - HELP!

Post by kersing »

Could you try attached flowchart? Should toggle port DL (D0-D7) bits every second.
Attachments
test806.fcf_pic16
(6 KiB) Downloaded 167 times
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

ronaldlijs
Posts: 139
Joined: Tue Jan 05, 2010 10:07 am
Has thanked: 20 times
Been thanked: 25 times
Contact:

Re: Can't make dsPIC33EP512GP806 to work at all - HELP!

Post by ronaldlijs »

Thanks Jac,

Still no luck I'm afraid, micro doesn't react.

I am going to load the micro with a sample code if I can find one at the Microchip website to see if it starts at all.

Next level will have to be start looking into more detail the C/Asm code that Flowcode is producing...

Thanks,
Ronald

ronaldlijs
Posts: 139
Joined: Tue Jan 05, 2010 10:07 am
Has thanked: 20 times
Been thanked: 25 times
Contact:

Re: Can't make dsPIC33EP512GP806 to work at all - FIXED!!!!

Post by ronaldlijs »

OK guys, it's working now!!!!

First to thank Jac for his amazing help with my MCLR pin (stupid one, this one was yesterday = got fixed). But then again today he gave a great clue: go into MPLAB X and instead of programming the micro only, make it run in Debug mode (PICKit3 seems to support this in MPLAB X).

Anyway, I did so and the program ran fine!!!!!

But then after power was turned off and then back on (3.3V), the micro would not start at all. Same situation as before (head scratching).

So I have figured out that in order to make the micro start correctly, Debugger/Emulation Enabler Bit must be set to Yes in Flowcode.

Anyway, this smells like a small bug to me, will investigate further, but at least I can use the micro now.

I can only recommend Jac here if anyone wants professional Flowcode services (he's programmed some neat stuff for me in the past) he's great!

Thanks guys, hope this entry helps anyone else...
Ronald
Attachments
Set to Enabled made the micro work again
Set to Enabled made the micro work again
Debug.jpg (4.48 KiB) Viewed 3539 times

ronaldlijs
Posts: 139
Joined: Tue Jan 05, 2010 10:07 am
Has thanked: 20 times
Been thanked: 25 times
Contact:

Re: Can't make dsPIC33EP512GP806 to work at all - HELP!

Post by ronaldlijs »

By the way, how I found out the micro was working fine was by downloading the dsPIC33E Demo for Explorer 16 code from Microchip's website, changed the device in MPLAB IDE and flashed the micro and I got ~3.7MHz clock output off OSC2, so I then realized that the micro was working fine at physical level (that I wasn't doing anything wrong with my PCB/schematics).

Hope this helps!

Post Reply