Sorry for such "noobish" question but I've tried to help my son with learning PIC programming. I load some simple asm source into MPLAB and pressed "make and program device main project". IDE build source and shot it into PIC12F629, program started, LED's were flashing as they should by source... everyone happy.

I'm an old school guy and have no idea about erasing... We tried same routine again and then we discover that we have to erase PIC to do it again?

How? (PICKIT2 programmer)

  • \$\begingroup\$ When you do the make and program again the first operation should be an erase so after making changes you should just be able to repeat the same process you did you first time. Did that not work? \$\endgroup\$ – K-Sid Aug 2 '13 at 19:07
  • \$\begingroup\$ What IDE are you using? \$\endgroup\$ – Jeanne Pindar Aug 2 '13 at 23:17
  • 1
    \$\begingroup\$ In MPLAB X, you can right click on your toolbar and add an "Erase Device Memory" icon \$\endgroup\$ – unknown Jan 3 '20 at 21:36

It sounds like you're using MPLAB X.

In general, there's no need to erase a flash-based PIC part prior to reprogramming. The IDE will take care of that for you.

If for some reason you really do need to do a manual erase, you will need to either:

  • Use MPLAB 8 (which supports PICkit2), or
  • Get a new programmer (PICkit3/PM3/ICD3/REAL ICE) and use the MPLAB X IPE program (integrated programming environment) that comes with MPLAB X.

You can install MPLAB 8 at the same time as MPLAB X, and they won't interfere (much) with each other. The PICkit2 doesn't require you to do anything fancy like run the driver switcher either (some programmers use different drivers for MPLAB 8 and X, and you need to use the driver switcher utility)

EDIT: With MPLAB X v1.7 and v1.85, you can indeed still use PICkit2 (despite Leon's comment)

enter image description here

It's not 100% supported (hence the amber lights) but I've used it on a variety of PIC24 and PIC16 projects successfully.

  • \$\begingroup\$ MPLAB X doesn't support the PICkit 2! \$\endgroup\$ – Leon Heller Aug 2 '13 at 19:48
  • \$\begingroup\$ He voted down, I woted up....and you're in right, I use MPLAB X. So, wrote that you gave up with PICkit2, what else do you prefer? Much obliged. \$\endgroup\$ – Alex Aug 2 '13 at 20:29
  • 1
    \$\begingroup\$ For quite some time, MPLAB X did have yellow-light support for a lot of parts, and I was successfully using it. I haven't checked it lately. \$\endgroup\$ – Adam Lawrence Aug 3 '13 at 1:48
  • 1
    \$\begingroup\$ I use PICkit3 for 99% of my work these days. It took some getting used to, but does the job and is a bit faster than PICkit2. \$\endgroup\$ – Adam Lawrence Aug 3 '13 at 1:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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