I have been using a DSPIC30f4011 for two days but suddenly I am no longer able to program the chip again.

The message I am getting:

Failed to verify at programming address 0x0000 (when I click the Verify button).

Failed to program at programming address 0x0000 (when I click the Write button).

Successful (when I click Read button).

Successful (when I click erase button).

I clicked on the erase button and tried to get rid of the error. But when I clicked read after erasing it, the first byte is still 0000 0000. Everything else is FFFF.

I am pretty sure the wiring and power supply is correct because when I put a new chip into the spot where the old chip was at, PICKIT 2 is able to program/verify it.

The pickit shows All protect for both old chip and new chip so it's not a problem.

  • \$\begingroup\$ If you can erase it then what is read? Also what voltage are you running \$\endgroup\$ – Grady Player Feb 19 '13 at 3:25
  • \$\begingroup\$ Also do you have the code protection set in the config? \$\endgroup\$ – Grady Player Feb 19 '13 at 3:26
  • \$\begingroup\$ @GradyPlayer The erase is not working. Every time read will return the same thing after the chip is erased. I am running at 4.7 V. I never enable code protect. Another new chip is doing the same thing to me. \$\endgroup\$ – Timtianyang Feb 19 '13 at 15:06
  • \$\begingroup\$ I was having the same thing yesterday with a 16f884, after pulling my LEDs out, and reprogramming once at 5v then unchecking erase before program I was able to reprogram... After reading that whole chip erase needs 5v \$\endgroup\$ – Grady Player Feb 19 '13 at 17:12
  • \$\begingroup\$ Yeah, I do have several LEDs connected to the chip when it is being programmed. But unplugging them doesn't solve the problem. Thanks though. \$\endgroup\$ – Timtianyang Feb 19 '13 at 21:28

AVDD and AVSS must be connected.

  • \$\begingroup\$ Was this responsible for the issue you were having? \$\endgroup\$ – rdtsc Feb 5 '16 at 12:54
  • \$\begingroup\$ yes. At least for the chip I'm using, as soon as they are connected the issue is gone. page 12 of the datasheet: "This pin must be connected at all times." \$\endgroup\$ – Timtianyang Feb 5 '16 at 18:50

The device is probably faulty.

  • \$\begingroup\$ but I am able to read from it. \$\endgroup\$ – Timtianyang Feb 18 '13 at 22:09
  • \$\begingroup\$ But you can't program it. \$\endgroup\$ – Leon Heller Feb 18 '13 at 23:14
  • \$\begingroup\$ I concur that the device may be damaged or there is a problem with device power. \$\endgroup\$ – Chetan Bhargava Mar 21 '13 at 5:13

If you attempt to erase a device and then perform a blank check on it and the blank check fails there’s a chance that the flash memory on the IC is bad. Flash memory based devices only have so many erase / write cycles that can be performed on them before they burn out.


protected by Dave Tweed Jun 28 '17 at 14:13

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.