Author Topic: MicroChip ICD 3 weird behaviour  (Read 4001 times)

0 Members and 1 Guest are viewing this topic.

Offline CambridgeMartTopic starter

  • Regular Contributor
  • *
  • Posts: 76
  • Country: fi
MicroChip ICD 3 weird behaviour
« on: August 30, 2025, 06:00:20 pm »
I am attempting to fix a unit which has an embedded PIC18F8720 MCU; it seems to have lost its settings, so I plan to download the ROM image for disassembly in an attempt to find out how to access the firmware and reset the configuration.
I'm using MPLab X 6.20 IPE with an ICD 3 programmer / debugger. The ICD 3 has been tested using the test interface board and is working correctly.

When connecting to the target, which is powered from the controller's internal PSU, I get the following message in IPE:
Code: [Select]
MPLABComm USB Version: 3.47
MPLABComm Serial Access Version: N/A


*****************************************************
Invalid VDD source setting. The debugger cannot supply power to the target if external power is already being supplied.

Connecting to MPLAB ICD 3...

Currently loaded firmware on ICD 3
Firmware Suite Version.....01.56.10
Firmware type..............PIC18F
Too much current has been drawn on VDD. Please disconnect your circuit, check the CLK and DATA lines for shorts and then reconnect.
Target voltage detected
Too much current has been drawn on VDD. Please disconnect your circuit, check the CLK and DATA lines for shorts and then reconnect.
Unable to connect to the target device.
Failed to get Device ID

This makes no sense as the power setting Power target circuit from ICD 3 is unchecked.
I have done all the usual stuff, checked the Clock and Data lines are not shorted, checked Vdd and measured 4.85V; I have also referred to the Microchip design guidelines and can confirm that there are no unwanted pullups or capacitors, just a 10k pullup from MCLR to Vdd, as per recommendations.

I have tried various sequences of powering everything, but get the same result every time.

Any recommendtions for the next step?
Life in the forest is so peaceful.
 

Offline fourtytwo42

  • Super Contributor
  • ***
  • Posts: 1248
  • Country: gb
  • Interested in all things green/ECO NOT political
Re: MicroChip ICD 3 weird behaviour
« Reply #1 on: August 31, 2025, 09:08:28 am »
I have had a lot of  trouble with Microchips recent poor support of PK3. I bought mine and used it under MPLAB BUT X has been a complete PITA!
I only use X as MPLAB will not install under Wine (LINUX).
The problem with X is the last version  in my experience to actually work with PK3 was 5.35 so I think that is  the first thing you should try.                                                                 
 

Online jpanhalt

  • Super Contributor
  • ***
  • Posts: 4826
  • Country: us
Re: MicroChip ICD 3 weird behaviour
« Reply #2 on: August 31, 2025, 11:41:30 am »
I use an ICD3, but the older MPLab 8.92 and almost always power the target separately.  The ICD3 still requires that its VDD (Pin2 in my cable) be connected to the board's VDD that's powered separately.  I am assuming you haven't changed that.
 

Offline CambridgeMartTopic starter

  • Regular Contributor
  • *
  • Posts: 76
  • Country: fi
Re: MicroChip ICD 3 weird behaviour
« Reply #3 on: August 31, 2025, 11:58:29 am »
Thanks, I'll have a look to see if I can get any pre X versions, although it appears Microchip deleted a lot of the older versions, or at least the links to them. I will give 5.35 a go.
To answer the other reply, yes Vdd is connected and is being sensed by the ICD 3.
Life in the forest is so peaceful.
 

Online jpanhalt

  • Super Contributor
  • ***
  • Posts: 4826
  • Country: us
Re: MicroChip ICD 3 weird behaviour
« Reply #4 on: August 31, 2025, 12:50:36 pm »
I have MPLab 8.92 full install in a zipped folder, but it  is about 110 MB, and I can't upload it here.  See if this link to Microchip archives works for you.  8.92 in on the 4th page.

https://www.microchip.com/en-us/tools-resources/archives/mplab-ecosystem

EDIT:
I just tried it.  You have to go to the 6th page of that link with all the MPLabX.  Then that opened the archives for MPLab on which 8.92 was the 4th page.
« Last Edit: August 31, 2025, 12:54:17 pm by jpanhalt »
 
The following users thanked this post: CambridgeMart

Offline CambridgeMartTopic starter

  • Regular Contributor
  • *
  • Posts: 76
  • Country: fi
Re: MicroChip ICD 3 weird behaviour
« Reply #5 on: August 31, 2025, 07:24:09 pm »
So tried MPLab x 5.35 and got exactly the same result.
Interestingly, disconnecting the target and attempting to connect to it gave this:
Code: [Select]
*****************************************************

Connecting to MPLAB ICD 3...

Currently loaded firmware on ICD 3
Firmware Suite Version.....01.56.07
Firmware type..............PIC18F

Too much current has been drawn on VDD. Please disconnect your circuit, check the CLK and DATA lines for shorts and then reconnect.
Target device was not found (could not detect target voltage VDD). You must connect to a target device to use ICD3.

Clearly very odd behaviour; given it work with the test fixture, which has a 12F series MCU onboard, I am wondering if the firmware version being loaded onto the ICD 3 is the problem.

Going to install MPLab 8.92 now to see how that fares.
Life in the forest is so peaceful.
 

Offline CambridgeMartTopic starter

  • Regular Contributor
  • *
  • Posts: 76
  • Country: fi
Re: MicroChip ICD 3 weird behaviour
« Reply #6 on: August 31, 2025, 08:02:12 pm »
Well 8.92 didn't fare much better. After fighting Windows to load the older driver, as the MPLab X version doesn't work with the older IDE, I managed to get this:
Code: [Select]
MPLAB ICD 3 detected
Connecting to MPLAB ICD 3...
Firmware Suite Version...... 01.56.07
Firmware type......................PIC18F
MPLAB ICD 3 Connected.
The overcurrent logic has detected a fault condition on
either VPP or VDD. Please disconnect your circuit check
MCLR or VDD for a short circuit and then reconnect. Also,
ensure that your target current requirements do not exceed
the specified limits.
Target Detected
ICD3Err0035: Failed to get Device ID. If you experience
persistent problems communicating, the ICD 3 test interface
can be used to help diagnose the problem.

The ICD 3 status looks OK, ICD 3 Vpp 13.18V, ICD 3 Vdd 5.18V, Target Vdd 4.98V
although not sure about the Vpp voltage which seems somewhat high.

I suspected that the long (2m) USB cable may be the issue, but swapping to a much shorter one made no difference.

I do have a PicKit 3, however I don't have a suitable cable, the target board has an RJ12 and I don't have a fully wired RJ12 to SIL adapter, so going to have to modify the one from my processor extension pack. I'll do that and post the results from using the PicKit 3
« Last Edit: August 31, 2025, 08:19:06 pm by CambridgeMart »
Life in the forest is so peaceful.
 

Online jpanhalt

  • Super Contributor
  • ***
  • Posts: 4826
  • Country: us
Re: MicroChip ICD 3 weird behaviour
« Reply #7 on: August 31, 2025, 08:57:28 pm »
I have not had that problem with 16F1xxx chips on a Win7 maching running 8.92. 

A problem I did have with some chips (e.g., 16f17xx) is that it returns an error to the effect ID returned 0x0000, expected some bizarre value, when in fact the correct chip ID  was returned. Of course, Microchip refused to help, but its forum led me to roll back to an earlier .jam file.  That fixed the problem.  If your chip is relatively old, maybe an earlier, better tested .jam file will help.  I think the .jam I am using is one or two versions earlier as it is the enhanced mid-range type.  Of course, you have to check that whatever .jam you add covers the chip you are using.

That episode cost me a few months as the old days when you could correspond directly with someone in Chandler are gone forever.  A typical question-response time was several days, and often the response was "move to MPLabX."  It was frustrating, and I suspect support for MPLabX is not much better.

The most current .jam appears to be ICD3FW_02890.jam.  ICD3FW_012840.jam (11/30/12) from 8.89,  ICD3FW_012838.jam (11/29/2012) from 8.89, and CD3FW_012656.jam (04/19/2011) from 8.70 are on my machine.  I don't remember which one worked with that chip.  None of that may be relevant to your issue, unfortunately.
 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 3300
  • Country: us
Re: MicroChip ICD 3 weird behaviour
« Reply #8 on: August 31, 2025, 09:03:52 pm »
I have had a lot of  trouble with Microchips recent poor support of PK3. I bought mine and used it under MPLAB BUT X has been a complete PITA!
I only use X as MPLAB will not install under Wine (LINUX).
The problem with X is the last version  in my experience to actually work with PK3 was 5.35 so I think that is  the first thing you should try.                                                               

Can't help with ICD 3 since I have a PicKit 2 and 3.
The newest version of MPLAB X that I have been successful using with PicKit 3 is version 3.55
I run it on my Win7 and WinXP machines.

The PicKit 3 seems to be picky about the order in which things are connected and started.
I usually need to have the PIC to be programmed plugged into the PicKit and powered before plugging the PicKit into the USB.  And the Pickit seen by Windows before starting MPLAB X.  On occasion, I actually need to reboot the computer to everyone to play together.

If I'm programming more than one PIC, I can get away with just plugging in each PIC and sometimes I need to restart the whole ball of wax.  I can't figure out why it is so picky.

I believe I stopped updating MPLAB X versions to be compatible with WinXP.  I don't know which version of MPLAB X that Microchip stopped supporting PicKit 3.  I don't think the next version (3.65) sees the PicKit 3.
 

Offline CambridgeMartTopic starter

  • Regular Contributor
  • *
  • Posts: 76
  • Country: fi
Re: MicroChip ICD 3 weird behaviour
« Reply #9 on: September 03, 2025, 08:36:00 pm »
So I have discovered that the overcurrent fault always occurs when reconnecting to the target , but doesn't occur when the initial connection is initiated by plugging in the ICD 3 USB cable with it attached to the powered target.
However, I now get
Code: [Select]
ICD3Err0035: Failed to get Device ID. If you experience
persistent problems communicating, the ICD 3 test interface
can be used to help diagnose the problem.
every time I try to connect.
Hooking up my handy logic analyser gave some interesting results:



Absolutely no activity on the data line; note that the target doesn't have PGM connected, so this is operating in HVP mode.

Note that I abandoned MPLAB X as it seems to be a known issue with it and the ICD 3, with incomplete or even incorrect firmware being loaded onto it, plus the annoying driver switching issue. I am now using only MPLAB V8.92 (thanks to Jpanhalt for the pointer to the download link).

I'm going to run the ICD 3 self test again and monitor the lines on the test interface in order to confirm everything still looks OK.
« Last Edit: September 07, 2025, 03:19:10 pm by CambridgeMart »
Life in the forest is so peaceful.
 

Offline CambridgeMartTopic starter

  • Regular Contributor
  • *
  • Posts: 76
  • Country: fi
Re: MicroChip ICD 3 weird behaviour
« Reply #10 on: September 07, 2025, 03:20:54 pm »
I discovered I had a wiring fault on the last logic trace, so I have corrected it. SData is now high all the time rather than the apparent low on the previous trace.
« Last Edit: September 07, 2025, 03:24:52 pm by CambridgeMart »
Life in the forest is so peaceful.
 

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 6929
  • Country: es
Re: MicroChip ICD 3 weird behaviour
« Reply #11 on: September 07, 2025, 03:41:59 pm »
ICD3 has always been the buggiest crap ever made. I really tore my hair off when using it.
Really terrible debugging tool.  Once you taste ARM, you'll never go back! It's like fentanyl!

Invisible breakpoints, or breakpoints that can't be deleted... breakpoints stopping elsewhere (No optimizations)...
Power not detected, or detecting shorts (Though VDD was sourced externally)...

I found that pretty often the only way to reset it was to reprogram the ICD3 firmware.

Pickit3, though less powerrful, worked MUCH better.
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline CambridgeMartTopic starter

  • Regular Contributor
  • *
  • Posts: 76
  • Country: fi
Re: MicroChip ICD 3 weird behaviour
« Reply #12 on: September 07, 2025, 07:57:06 pm »
My last post was wrong, I had an open circuit on my SData line, so the logic analyser saw a 1 as it is TTL bsed.
Fixed that, now it's stuck at 0 again. I have a PickKit 3, so going to give that a try next.
Life in the forest is so peaceful.
 

Offline CambridgeMartTopic starter

  • Regular Contributor
  • *
  • Posts: 76
  • Country: fi
Re: MicroChip ICD 3 weird behaviour
« Reply #13 on: September 07, 2025, 08:47:12 pm »
So my Pickit 3 wouldn't connect properly, no doubt because it had been used on MPLab X, and the firmware loaded by X makes communication with MPLab 8 sketchy.
After doing some reading up on this, several people recommended PickitMinus; I downloaded it and installed it; it immediately found the Pickit 3 and recognised that the firmware wasn't valid it and (MPLab developers take note) led me through the process to install the firmware then test it. Once done, I was able to connect to the target and dump the ROM contents.

I'm reading different things about Pickit minus, the developer claims he wrote it using the MPLab platform as a starting point; the developers of PickitPlus are claiming that he hacked their databases and his code can cause many problems such as random erasing of devices.
Life in the forest is so peaceful.
 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 3300
  • Country: us
Re: MicroChip ICD 3 weird behaviour
« Reply #14 on: September 07, 2025, 10:10:16 pm »
Try resetting the PicKit 3.

Download the "PICkit 3 Programmer App and Scripting Tool v3.10"
from the Microchip Archives (Near the bottom of the page).

  https://www.microchip.com/en-us/tools-resources/archives/mplab-ecosystem

It allows switching in/out of MPLAB mode and can reinstall the PicKit 3 firmware.
 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 3300
  • Country: us
Re: MicroChip ICD 3 weird behaviour
« Reply #15 on: September 07, 2025, 11:43:13 pm »
Hum, the PicKit Minus tool looks a lot like the PicKit 2 and 3 tools.

PicKit 3 v3.10 app:

  2656263-0
 

Offline CambridgeMartTopic starter

  • Regular Contributor
  • *
  • Posts: 76
  • Country: fi
Re: MicroChip ICD 3 weird behaviour
« Reply #16 on: September 18, 2025, 08:37:35 am »
A bit late responding, but the nice programmers who made the code for this system didn't set the read protection on this device, so I was able to dump everything including the configuration registers, so I am on a good footing to get this thing working again.
Looking for a decent disassembler, but going to start a new thread for that.
Life in the forest is so peaceful.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->