Electronic – How to program a PIC12

microchipmicrocontrollerpicpickitprogramming

I have a PIC12F675 that I need to program. I'm using a Pickit 2 and the Pickit 2 software. Supposedly I should be able to program it using this circuit, but the Pickit 2 software is not detecting the chip at all.

circuit

What's going wrong?

EDIT: I've added an image of my circuit breadboarded out. And here is where you can find the datasheet for the PIC12F675. Skip to page 4 for the pinout.

Breadboard

EDIT2: I just actually looked at the chips (dumb, but I kind of assumed mouser would send me what I ordered), and I noticed they're actually PIC12C671's. How much of a difference would this make?

Final EDIT: Wow! Thanks to everyone that helped me with this! I was not expecting this kind of response. It ended up being a small stupid problem just like I thought it would be. It was my fault for not double checking everything when I received the package from Mouser.

Best Answer

A possible problem is that some PICs need a power-cycle to get into programming mode. The 12F675 in particular needs this when the configuration word in your application configures the MCLR pin as GPIO.

When the pcikit2 powers your target chip it will provide the power cycle. With the independent +5V you supply it can't do this.


After covering the most probable problems you might go for the improbable ones... Don't laugh at me, I am drawing on my own experience!

  • could you have two pickit2's connected? (Yes, I once did this and was flabbergasted that the one the pickit2 application selected was not the one the PIC was connected to. I hve also once wasted an hour when I had two target PICs wires in parallel. That gives very strange results when they both put their chip ID out to the programmer. )
  • is the pickit2 you are using connected to the PC you are using? (I do PIC classes and the students can get quite creative in who's laptop connects to who's PIC)
  • are both the pickit2 and the chip the right side round? The pickit2 pciture is as seen from above (where the button and LEDs are).
  • is the chip really a 12F675? (I once tried for full day to get the A/D converter of a 12F629 working - for the non-PIC-guru's: that's the cheaper brother of the 12F675, it is cheaper because it does not have an A/D converter).
  • Are the wires exactly as you show them, not mixed up? And are they not by any accident broken? If you are using a solderless breadboard: does it still make all the contacts?
  • Is the firmware in the pickit2 a version that matches your PC side? maybe re-load the firmware to be 100% sure.

In response to your EDIT2: ROFL, check my bullet 4. The PIC12C671 is a totally different chip, and the C means it is an EPROM (one-time-programmable) chip, which is not supported by pickit2.