View previous topic :: View next topic |
Author |
Message |
dluu13
Joined: 28 Sep 2018 Posts: 395 Location: Toronto, ON
|
Cannot Program PIC, invalid Device ID |
Posted: Fri Mar 22, 2019 8:59 am |
|
|
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
|
|
Posted: Fri Mar 22, 2019 9:02 am |
|
|
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
|
|
Posted: Fri Mar 22, 2019 10:36 am |
|
|
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: 306
|
|
Posted: Fri Mar 22, 2019 12:07 pm |
|
|
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
|
|
Posted: Fri Mar 22, 2019 12:14 pm |
|
|
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: 19595
|
|
Posted: Wed Mar 27, 2019 2:07 am |
|
|
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
|
|
Posted: Wed Mar 27, 2019 12:09 pm |
|
|
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
|
|
Posted: Wed Mar 27, 2019 4:06 pm |
|
|
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?? |
|
|
|