Hi there, I've just received an Olimex ICD2 and I'm having a bit of an odd issue and I thought I'd post a question to see if anyone has any thoughts. When I open up MPLAB IDE (v7.50), select the ICD2 as the programmer, then connect to it, I get the following output: (ICD2 is on USB) Connecting to MPLAB ICD 2.Connected Setting Vdd source to target ICDWarn0020: Invalid target device id (expected=0xC1, read=0x0).Reading ICD Product ID Running ICD Self Test. Failed Self Test.
See ICD2 Settings (status tab) for details. MPLAB ICD 2 Ready - When I open up the Status tab, I see the following under self-test: Target Vdd: Low Module Vpp: Pass MCLR Gnd: Pass MCLR Vdd: Low MCLR Vpp: Pass and under the Power tab: Target Vdd: 0.00 Target Vpp: 12.86 MPLAB ICD 2 Vpp: 12.86 - This happens when the unit is just connected to the USB port without an external jack powering it. If, after connecting the USB, I connect the power adapter, the 'Target Vdd' and 'MCLR Vdd' will turn to Pass and the 'Target Vdd' under power will be 5.00.
Note that this is with or without the ICD2 connected to my target board. (If I have the USB and power adapter connected to the ICD2, when I 'connect' from MPLAB it outputs the above, and also makes an increasingly high-pitch noise as it sounds like it's 'powering something up'). If I open up another project (or create a new one) in the MPLAB IDE, then the voltages will return to the error state described above, regardless of if the ICD2 is externally powered or not. If I unplug the USB and power, wait for a minute, then plug the USB then power, I can get the voltages to register to be okay.
![52nd 52nd](/uploads/1/2/5/3/125391867/549316013.jpg)
Again this is regardless of whether the ICD2 is connected to an external board or not. I now have a blinking LED working, both in debug mode with breakpoints and in release mode, standalone. There is still the very odd power behavior. To get it to program I have to follow the following steps precisely or the voltages won't be okay: - Open MPLAB IDE - Open project I'm going to program - Plug in ICD2, wait until its been detected (5 seconds) - Connect to ICD2 - ICD2 fails self-test for power - Connect external power adapter to ICD2 - ICD2 will now pass self-test for power - ICD2 now ready for programming If I switch projects, or switch from debug programmer, it fails the self-test and I can't simply unplug then replug the power adapter.
I have to exit MPLAB, disconnect the power adapter from the ICD2, disconnect the USB from the ICD2, wait a moment, then go back to the above. Very very odd! I cleaned and re-installed the drivers for the ICD2, and installed the latest MPLAB IDE (v. The real progress - when the debugger actually started to run the program - happened when I changed the brown-out voltage in the configuration bits from 4.5v to 2.7v. Sounds like a problem with the ICD2. The controller software actually measures the voltages, via voltage dividers, and it might be a poor connection. If that is the problem it should work OK, if you disregard the message.
One of my co-workers purchased an Olimex ICD2 unit on my advice, to start playing around with PIC's. When we were getting him introduced to his first project board, we found that the ICD2 would fail with his PIC18 proto board if it was powered from USB, but would pass if we used a lab bench supply. I think there's an issue with the Olimex ICD2 using USB derived power.
Hey guys, I am very very new to all this so you will have to bear with me. I also just purchased an Olimex ICD2 and had the exact same problem as you guys have mentioned and the problem has been remedied by your solution. Although I do have a question, I have to have the 'Power target circuit from MPLAB ICD 2' box checked in order for my voltage to show up properly and the self test to pass. I don't actually use the power from the ICD, I have a seperate 4.7V regulated supply and I know for sure it's giving the right power so technically should that be checked if I am using an external supply? I also have a another question now because I am getting another error.
![Mplab ide v 7 52nd st Mplab ide v 7 52nd st](http://www.puntoflotante.net/mplab.jpg)
I bought a couple PIC18F4550 when I bought the programmer and I am trying to get them setup for the first time, they haven't been programmed. I am getting: Connecting to MPLAB ICD 2.Connected Setting Vdd source to MPLAB ICD 2 ICDWarn0020: Invalid target device id (expected=0x90, read=0x0).Reading ICD Product ID Running ICD Self Test.Passed MPLAB ICD 2 Ready I have a 10k pullup resistor ( tried with and without ) on the MCRL. The VDD is 4.7V from an external supply. Then I followed the ICSP header diagram and matched up the pins on the PIC (PCD, PGD, PGM) using the datasheet as reference. Does this sound about right?
I just grabbed a basic 18F4550 specific app that flashes a couple LED's (I am a full time programmer so I generally understand that aspect of it, I just needed something to get started and to quickly see if everything is working). It's an MPLAB sample project and the programmer is setup for the proper PIC device. Any help on this would be greatly appreciated, Cheers, T. Jasonharper, Thanks for that tidbit, I hooked the VDD from the ICSP header up to my power source and sure enough everything reads fine now. With the 'Power target circuit from MPLAB ICD 2' off I am passing the self test and my target VDD is reading 5.00V.
Sep 16, 2018 - Grimstad closed out the tournament 13-over, tied-for-52nd. To keep up with the. Texas Tech 888 ( 24) 8. Indiana 892 ( 28) 9. Mississippi St. 898 ( 34) 10. Mercer 901 ( 37) 11. 77-76-76=229 ( 13). Print Friendly Version.
I am however still getting the same error message I was getting before. The ICDWarn0020: Invalid target device id (expected=0x90, read=0x0) error is still happening.
It's a PIC18F4550 and under MPLAB it has the right device selected and when I originally selected the device it downloaded the proper OS to the PIC without any errors. Someone else mentioned to me to check all my power on the chip because they can have multiple VDD's (which this one has) and to make sure all of them are getting power, which they are. Any other suggestions that might remedy this problem? As an aside I had also received an Invalid Target Device ID warning where the read ID was zero, but this cleared up once the Vdd was connected.
Out of curiosity, have you tried installing a fresh copy of MPLAB and the drivers on another machine to see if it works there? (I only mention this as it had some effect when I was having issues setting everything up for the first time). I remember that in some cases where one has wired up their own board, there can be noise issues, and they recommend adding some very small capacitors to the program lines if things aren't communicating correctly. It does sound as though this may still be a power issue though? Hey guys, Just wanted to give you guys a big thank you, sorry I didn't reply sooner, some crappy life stuff came up. I managed to get everything running after your advice, I just had the PGC and PGD wires backwards, even though I thought for SURE I had tried them both ways but at least now I know for sure what the pinout is so I shouldn't have this problem anymore.
I can even get the debugging to work now as well, I read in most cases that when you can program but not debug it's a problem with the oscillator settings in the 'configuration bits' and sure enough when I switched that to something else and also set it to use the external oscillator it worked like a charm. Thanks for all your help guys.