3
\$\begingroup\$

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.

\$\endgroup\$
7
  • \$\begingroup\$ If you can erase it then what is read? Also what voltage are you running \$\endgroup\$ Feb 19, 2013 at 3:25
  • \$\begingroup\$ Also do you have the code protection set in the config? \$\endgroup\$ Feb 19, 2013 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\$ Feb 19, 2013 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\$ Feb 19, 2013 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\$ Feb 19, 2013 at 21:28

3 Answers 3

4
\$\begingroup\$

AVDD and AVSS must be connected.

\$\endgroup\$
2
  • \$\begingroup\$ Was this responsible for the issue you were having? \$\endgroup\$
    – rdtsc
    Feb 5, 2016 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\$ Feb 5, 2016 at 18:50
3
\$\begingroup\$

The device is probably faulty.

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

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.

\$\endgroup\$

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