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 support@ccsinfo.com

Cannot Program PIC, invalid Device ID

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



Joined: 28 Sep 2018
Posts: 395
Location: Toronto, ON

View user's profile Send private message Visit poster's website

Cannot Program PIC, invalid Device ID
PostPosted: Fri Mar 22, 2019 8:59 am     Reply with quote

I just got a couple of prototype PCBs with a PIC24FJ128GA308 on them.

I am unable to program them, with this problem:
Code:
Target Device ID (0x0) is and Invalid Device ID. Please check your connections to the Target Device.


I'm in MPLABx, with PICkit4. The same program works on another board of almost identical design, only with a couple of IO pins swapped.

ICSP seems to be connected solidly to the PIC, measured by multimeter continuity test. The PGD, PGC, and MCLR pins seem to be working "normally" (compared traces with the known good board).

VDD and VSS pins are getting 3v3 and GND, respectively.

Any ideas?
dluu13



Joined: 28 Sep 2018
Posts: 395
Location: Toronto, ON

View user's profile Send private message Visit poster's website

PostPosted: Fri Mar 22, 2019 9:02 am     Reply with quote

Ah, it looks like VCAP pin has 3.3V instead of 1.8V. This is different from my old working board.

The only thing that changed was that a couple of IO pins was swapped, so I don't imagine that could have fried the PIC.

Looks like I have a dead PIC anyway. Any ideas what could have caused this problem? I really can't think of anything besides maybe some ESD... It is really dry here lately.
dluu13



Joined: 28 Sep 2018
Posts: 395
Location: Toronto, ON

View user's profile Send private message Visit poster's website

PostPosted: Fri Mar 22, 2019 10:36 am     Reply with quote

I have just read on some old threads about VCAP. Apparently wrong AVDD and AVSS can cause this problem I appear to be seeing with VCAP.

The thing is that my AVSS and AVDD range are within spec according to the datasheet. (VDD and AVDD = 3.3v). I am just using different regulators to generate each one.

One thing that I just remembered, though is that I had the regulator for AVDD hooked up wrong on my previous board. So I had taken that off and jumpered AVDD to VDD. I can't imagine that being the issue, but I will bypass the AVDD regulator and jumper it to VDD on my new board. We'll see what happens...
gaugeguy



Joined: 05 Apr 2011
Posts: 296

View user's profile Send private message

PostPosted: Fri Mar 22, 2019 12:07 pm     Reply with quote

According to the data sheet AVdd must be within +/- 0.3V of Vdd. This would include during power up. If the two supplies do not rise at exactly the same rate the chip could be damaged.
dluu13



Joined: 28 Sep 2018
Posts: 395
Location: Toronto, ON

View user's profile Send private message Visit poster's website

PostPosted: Fri Mar 22, 2019 12:14 pm     Reply with quote

I couldn't find that rise time reference in the datasheet. But I did get it to work by removing the separate regulator I was using for AVDD and jumping AVDD to VDD.

That seems to be in line with what you're saying.

I am using 3V3 for both regulators, just that the VDD regulator is giving something like 3.31 V and the AVDD is giving 3.300. So I'm within the voltage tolerance there. I'll check the rise times.

Edit: looks like AVDD is coming up to 3.3V about 500 us after main VDD comes on... I guess that's a problem?

Ok so it's solved. In the future, make sure that AVDD and VDD come up "at the same time". Although I could not find in the datasheet what that tolerance is. I was originally using my second regulator to power AVDD, and I wanted to use that as my "VREFH" to save on pins. But it looks like I'll have to use my second supply to connect to VREFH instead.
Ttelmah



Joined: 11 Mar 2010
Posts: 19359

View user's profile Send private message

PostPosted: Wed Mar 27, 2019 2:07 am     Reply with quote

Yes. This was met years ago in another thread:
<https://www.ccsinfo.com/forum/viewtopic.php?t=53052>

The basic key is that if AVdd differs by more than a FET 'drop' from Vdd,
you can trigger a lock up condition in the circuitry, and stop things from
working. There isn't a 'time' delta here, just a voltage limit.
AVdd, experiences some quite nasty current spikes as the ADC works, so
is still likely to not be a terribly 'good' source for Vref, even if you feed it
off a separate regulator. Adding extra filtering to it, is the 'limit' of what
you can really do. :(
Gabriel



Joined: 03 Aug 2009
Posts: 1067
Location: Panama

View user's profile Send private message

PostPosted: Wed Mar 27, 2019 12:09 pm     Reply with quote

i usually solve this by unplugging the pic-kit from the ICSP on the target board and reconnecting.
_________________
CCS PCM 5.078 & CCS PCH 5.093
dluu13



Joined: 28 Sep 2018
Posts: 395
Location: Toronto, ON

View user's profile Send private message Visit poster's website

PostPosted: Wed Mar 27, 2019 4:06 pm     Reply with quote

Gabriel wrote:
i usually solve this by unplugging the pic-kit from the ICSP on the target board and reconnecting.


Yeah, this has happened to me before. But this time, it was my AVDD.

@TTelmah How do you remember all of these threads??
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