8
\$\begingroup\$

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.

\$\endgroup\$
11
  • 2
    \$\begingroup\$ Are you sure your circuit is correct, is powered, has decoupling capacitors, is connected to your computer? \$\endgroup\$
    – user17592
    Commented Mar 26, 2013 at 16:14
  • \$\begingroup\$ I have 5 volts going to it, and it is connected to my computer. It looks like I overlooked the decoupling capacitors. Would that have that big of an impact on the circuit? \$\endgroup\$ Commented Mar 26, 2013 at 16:40
  • 1
    \$\begingroup\$ Probably not, but you don't want to waste a week for a decoupling capacitor you can add in a minute. \$\endgroup\$
    – user17592
    Commented Mar 26, 2013 at 16:41
  • 2
    \$\begingroup\$ The 12F675 is supported by the PICkit 2 and MPLAB. \$\endgroup\$ Commented Mar 26, 2013 at 17:10
  • 3
    \$\begingroup\$ Vdd on the ICSP connector should be connected to +5V. \$\endgroup\$ Commented Mar 26, 2013 at 18:52

3 Answers 3

10
\$\begingroup\$

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.

\$\endgroup\$
3
  • \$\begingroup\$ I tried powering it from the PICKit itself, and it's still not working. \$\endgroup\$ Commented Mar 26, 2013 at 18:48
  • \$\begingroup\$ :( Thank you for the help! Like I said, I assumed Mouser had sent me the right chips. My fault for not double checking everything before getting started. Thanks again! \$\endgroup\$ Commented Apr 8, 2013 at 16:22
  • 1
    \$\begingroup\$ As I say to my students: feel free to make a mistake for the first time. But never again. \$\endgroup\$ Commented Apr 8, 2013 at 17:32
5
\$\begingroup\$

The PICkit2 programmer should work as-is for your part without any headers. (Debugging is another matter altogether.)

As well as the decoupling capacitor advice that was offered, consider this: most (all) PIC devices need a 10k pullup from _MCLR to VDD. Try adding that and see what happens.

PICkit2 support

Here's a wiring example from the PICkit3 setup poster. (The pinouts of the PICkit2 and PICkit3 are identical, so the information is 100% relevant.)

ISCP diagram

You can see that the programmer's pins 1 through 5 need to be connected to your circuit. Your schematic is missing the VDD Target connection from pin 2. Try connecting this and allowing the PICkit2 to power the circuit.

\$\endgroup\$
4
  • 3
    \$\begingroup\$ The lack of a resistor on MCLR won't stop the PICkit programming the device. It might stop the program from running, though. \$\endgroup\$ Commented Mar 26, 2013 at 18:25
  • \$\begingroup\$ I added the pull-up in and made sure I had the correct device selected in MPLAB. Still no dice. \$\endgroup\$ Commented Mar 26, 2013 at 18:49
  • \$\begingroup\$ @LeonHeller I based my statement about _MCLR on the PICkit3 poster, which shows the _MCLR pull-up under the "correct" way of wiring things. \$\endgroup\$ Commented Mar 26, 2013 at 20:55
  • \$\begingroup\$ @Madmanguruman I wish I didn't have it hooked up exactly like this, but I verified with the datasheet and all the connections are correct. \$\endgroup\$ Commented Apr 7, 2013 at 21:17
3
\$\begingroup\$

PICKit2 does support your device (source). This means there is something wrong with your setup. There are some things you can check:

  • Is there a problem in the communication with PICKit? No, if this would be the case, you would get an error that the ICSP tool couldn't be found.
  • Is there a problem with the circuit with the chip? Possibly. You should check your circuit, add decoupling capacitors if not done yet. All VDD and VSS pins should be connected, also those of the ICSP connector. Also, check your power supply: is it smooth?
  • Is there a software problem? Most likely, I'd say. Have you selected the right chip in MPLAB? Can you program other chips with the same setup?
\$\endgroup\$
8
  • \$\begingroup\$ I checked all of this. Added in the decoupling caps and the MCLR pull-up resistor. I'm using the PICKit2 v2.61 software for programming the chip, instead of MPLAB. Although I did try what you said in MPLAB. I get this error when I try to connect to the chip. Please verify that a PIC12F675 is correctly installed in the application \$\endgroup\$ Commented Mar 26, 2013 at 18:47
  • \$\begingroup\$ @WillemEllis Very well. I thought of something else: did you connect all Vdd and Vss pins of the chip? Also check if PGC is connected to PGC and not to PGD - this caused me some trouble lately. \$\endgroup\$
    – user17592
    Commented Mar 26, 2013 at 18:52
  • \$\begingroup\$ @WillemEllis any progress on this one? \$\endgroup\$
    – user17592
    Commented Mar 29, 2013 at 8:12
  • \$\begingroup\$ sorry for taking so long to get back to you. Unfortunately, no. I talked to my professor and he couldn't figure it out either. I have made sure everything is connected as in the circuit with PGD and PGC going to the correct pins. Still no luck. \$\endgroup\$ Commented Apr 7, 2013 at 21:11
  • \$\begingroup\$ If you are certain that your connections are good, try another device or another PICkit2. \$\endgroup\$ Commented Apr 7, 2013 at 22:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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