Search code examples
picmicrochipmplab

Microchip PIC18F45K50 Target Device ID (0x1200) is a valid Device ID but does not match the expected Device ID (0x5c00) as selected


I am in MPLAB 3.65 in Windows 10 trying to load a program onto a Microchip PIC18F45K50. The program builds fine, but the following is the ICD 3 output when I try to load the code:


Connecting to MPLAB ICD 3...

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

Programmer to target power is enabled - VDD = 3.250000 volts. ****Target Device ID (0x1200) is a valid Device ID but does not match the expected Device ID (0x5c00) as selected.

Device Erased...

Programming...

The following memory area(s) will be programmed: program memory: start address = 0x0, end address = 0x3d7f configuration memory program memory Address: 0 Expected Value: 41 Received Value: ff ****Failed to program device


I'm powering the device from the ICD 3, and using XC8. The debugger self-test is successful. I'm pretty certain I have the USB drivers installed correctly.

Thanks for any help in advance.


Solution

  • An incorrect ID may indicate, as Eugene Sh mentioned, the device is not a PIC18F45K50. It also may be that the data read back (over PGC/PGD) is corrupted. Wiring between the ICD3 and the chip must be kept reasonably short.

    Have you followed section 2.0 of the datasheet regarding power? In particular the requirement that VUSB3VS must be connected to either a supply voltage (not VDD for F devices) or a low ESR cap.