Pickit 3 with PIC 12F629 not Programming

Discussion in 'Programmer's Corner' started by amitr12345, Jun 17, 2013.

  1. amitr12345

    Thread Starter Member

    Jun 17, 2013
    37
    2
    hi everybody,

    haven't connected anything yet to inputs or outputs. just wanted to see i can program the PIC MCU.

    the only setup i made was a breadboard going from pickit3 to PIC mcu, attached diagram of connections.

    i am able to connect with MPLAB IPE and MPLAB x-IDE.

    but whenever i try to program it says the pickit failed to program device.. ??!!

    don't know why, no real code i am interested in programing.
    i have blanked the MCU, maybe it has done some horrible thing ?

    would appreciate help
     
  2. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    If you use an external power supply, you shall not connect the VDD to the PICKIT. But you will need a common ground. So Vss (ground) must be connect to the PICKIT. Also do not use to long programming cables from the PICKIT to the board. Up to 20 cm is fine.
    Take a look at this doc and see if it helps http://picprojects.org.uk/projects/ICSP/icsp-info.pdf
     
  3. amitr12345

    Thread Starter Member

    Jun 17, 2013
    37
    2
    Thnx for the quick reply.
    I dont use long wires, in effect i connect the pickit straight to the breadboard.

    The external power supply is used, because otherwise the pickit doesnt find target device.

    Since vdd and vss is connected to external power supply and pickit, i can safely say they have common voltages.

    If blanking the mcu doesnt murder my mcu, maybe pickit or mcu is working partially, just for connecting, but not programming ?
     
  4. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    The PICKIT3 can supply power to a target if this option is turned on. In the programmer menu on the toolbar i think. And only in this case should the Vdd be connected to PICKIT else drop it, but keep the common Vss. Also please do not be stubborn on this matter:rolleyes:. What you postulate here is wrong
     
  5. amitr12345

    Thread Starter Member

    Jun 17, 2013
    37
    2
    From what i understand from u, should i disconnect the vdd from the pickit and stay with only 4 wires connected from pickit to mcu?

    Is it a mistake to connect external power supply of 5v to chip and pickit?
     
  6. amitr12345

    Thread Starter Member

    Jun 17, 2013
    37
    2
    Just saw your post after postig mine, i understand that my connection to vdd from pickit is wrong.

    Could i have damaged my pickit ?
     
  7. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    Hard to say. But I think if you can erase the device the PICKIT should work. Have you tried to disconnect the external 5 volt power supply. And used the PICKIT as power source? It would also help if you could post the error message that shows up after programming.
     
  8. amitr12345

    Thread Starter Member

    Jun 17, 2013
    37
    2
    Great help, i will try it in an hour and post if succeeded, and if not will post the error
     
  9. Brownout

    Well-Known Member

    Jan 10, 2012
    2,375
    998
    Programmer > Power > Power Device From PIKIT3 ( or similar ). Then you get an option to adjust the voltage. Make sure it's set at 3.3V or whatever your processor needs.
     
  10. mitko89

    Member

    Sep 20, 2012
    123
    19
    Does it pass the hardware test? There is a menu where you can adjust the options you discussed with t06afre and check what might be wrong. I had some problems with programming a device myself. In my case it was loose contact, check if the terminals are reliably connected and measure the voltage of the pins. Hope those suggestions might be of help.
     
  11. amitr12345

    Thread Starter Member

    Jun 17, 2013
    37
    2
    Wire connections checked and r reliable.
    Voltage was 5v on the dot from power supply, checked between vdd and vss on the chip.

    Is there any other hardware test via the mplab IPE software ?
     
  12. Brownout

    Well-Known Member

    Jan 10, 2012
    2,375
    998
    What file are you trying to program the PIC with? Have you built it with no errors?
     
  13. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
  14. amitr12345

    Thread Starter Member

    Jun 17, 2013
    37
    2
    Even random address change to 0x3fff are not changing.

    No particuler code for now.
     
  15. Brownout

    Well-Known Member

    Jan 10, 2012
    2,375
    998
    Excuse me? You need code in order to program a PIC. Or what am I missing?
     
  16. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    Your error may very well be from not trying to actually program anything while attempting to program the PIC. Write some simple code and build the hex file to program it properly.
     
  17. amitr12345

    Thread Starter Member

    Jun 17, 2013
    37
    2
    even tried this piece of code and results are the same.

    attached the error and code
     
  18. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    It looks liked your project is set up for a PIC 12F609, but you are attempting to program a 12F629...

    What is your build output?
     
  19. amitr12345

    Thread Starter Member

    Jun 17, 2013
    37
    2
    It is just the name.. Inside it i programed it for 12f629.

    The problem is not a specific code.
    It is programming in general. Theoretically i can put 0x3fff in all addresses and it should program the MCU.

    Frustrating.. I hope someone had the same problem.
    I am beginning to think that maybe the pickit 3 or MCU is faulty
     
    Nigon likes this.
  20. amitr12345

    Thread Starter Member

    Jun 17, 2013
    37
    2
    Just updating.. When erasing, seems it is a success, but when verifying blank it fails.

    Read a post of someone that said that pickit 3 and 12f family are a little buged working together, has anyone experienced that ?
     
    Nigon likes this.
Loading...