Electronic – PIC Kit 3 – PIC32 memory mismatch error

microchippicpickit

after I worked for a while with the PIC16 microcontrollers, I wanted to get known to PIC32 microcontrollers.

But I have a problem.
If I try to run a simple program on the PIC32MX110F016B or on the PIC32MX220F032B I get always the same error message:

Failed to program device
Selected device and target: memory mismatch.

I use the PIC Kit 3 combined with MPLAB to program the PICs and with the PIC16s it worked always pretty well.
The PIC is powered from the PIC Kit 3(3.25V) and I connected it this way:

(PC3 = PIC Kit 3 pin, MC = Microcontroller pin)

  • PC3 MCLR -> MC MCRL
  • PC3 VDD -> MC VDD
  • PC3 VSS -> MC VSS
  • PC3 PGD -> MC PGED1
  • PC3 PGC -> MC PGEC1

I also connected a 10K resistor from MCLR to the VDD pin.

And I think the only important config I set in the program is right, too:

#pragma config ICESEL = ICS_PGx1        // ICE/ICD Comm Channel Select (Communicate on PGEC1/PGED1)

Here the full console output:

Connecting to MPLAB PICkit 3…

Currently loaded firmware on PICkit 3
Firmware Suite
Version…..01.36.10
Firmware type…………..PIC32MX

Programmer to target power is enabled – VDD = 3,250000 volts.
Target device PIC32MX110F016B found.
Device ID Revision = A1

The following memory area(s) will be programmed:
program memory:
start
address = 0x0, end address = 0xfff
boot config
memory
configuration memory

Device Erased…

Programming…
Failed to program device
Selected device and
target: memory mismatch.

Best Answer

The PIC32s have a vcore/vcap pin that needs to have a sufficiently large, low esr capacitor connected otherwise you will get strange errors like this and it would not run stable. In the datasheet, there's a section detailing minimum connections including the minimum capacitor value.