3
\$\begingroup\$

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)

\$\endgroup\$
3
  • \$\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\$ Commented Aug 2, 2013 at 19:07
  • \$\begingroup\$ What IDE are you using? \$\endgroup\$ Commented Aug 2, 2013 at 23:17
  • 1
    \$\begingroup\$ In MPLAB X, you can right click on your toolbar and add an "Erase Device Memory" icon \$\endgroup\$ Commented Jan 3, 2020 at 21:36

1 Answer 1

4
\$\begingroup\$

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.

\$\endgroup\$
4
  • \$\begingroup\$ MPLAB X doesn't support the PICkit 2! \$\endgroup\$ Commented Aug 2, 2013 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\$ Commented Aug 2, 2013 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\$ Commented Aug 3, 2013 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\$ Commented Aug 3, 2013 at 1:54

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.