Page 1 of 1

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

Posted: Thu May 02, 2013 6:04 pm
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.

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

Posted: Thu May 02, 2013 7:06 pm
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

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

Posted: Thu May 02, 2013 7:41 pm
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

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

Posted: Thu May 02, 2013 8:52 pm
by kersing
Could you try attached flowchart? Should toggle port DL (D0-D7) bits every second.

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

Posted: Fri May 03, 2013 7:39 am
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

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

Posted: Fri May 03, 2013 1:00 pm
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

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

Posted: Fri May 03, 2013 1:02 pm
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!