Author Topic: device failure on PICKIT2  (Read 21937 times)

0 Members and 1 Guest are viewing this topic.

Online SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
device failure on PICKIT2
« on: October 19, 2012, 08:18:09 pm »
I'm trying to program a 16F883 with my pickit2 but it won't recognize the "device", could it be the 3" wires that link from the pickit2 to the ziff socket ?
 

Offline Baliszoft

  • Frequent Contributor
  • **
  • Posts: 277
  • Country: hu
Re: device failure on PICKIT2
« Reply #1 on: October 19, 2012, 08:21:04 pm »
I usually got around 10" of cable for icsp and works without problems.
 

Online SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: device failure on PICKIT2
« Reply #2 on: October 19, 2012, 08:25:34 pm »
hm very odd, i'm getting sporadic behaviour
 

Online SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: device failure on PICKIT2
« Reply #3 on: October 19, 2012, 08:31:19 pm »
it will write to the pic but then when I try to read says it failed at address 0x000000 or that no device was detected
 

Offline DrGeoff

  • Frequent Contributor
  • **
  • Posts: 794
  • Country: au
    • AXT Systems
Re: device failure on PICKIT2
« Reply #4 on: October 19, 2012, 08:34:53 pm »
What's the power arrangement during this?
Was it really supposed to do that?
 

Online SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: device failure on PICKIT2
« Reply #5 on: October 19, 2012, 08:44:23 pm »
I have the pickit plugged into a small adapter board I made, male 90deg header in, connected straight to a female header, a female header down each side of the zif socket and i use 3" jumper wires to connect the pickit header to the pic headers. The power is coming from the pickit, no other power involved
 

Offline Baliszoft

  • Frequent Contributor
  • **
  • Posts: 277
  • Country: hu
Re: device failure on PICKIT2
« Reply #6 on: October 19, 2012, 08:53:57 pm »
Check the voltage settings on the pickit (and verify if that matches the actual output).
 

Online SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: device failure on PICKIT2
« Reply #7 on: October 19, 2012, 08:57:51 pm »
4.7-4.85, ticking the box in the interface to make it power the target pic seems to have resolved it......... i have the latest software and pickit firmware
 

Offline djsb

  • Frequent Contributor
  • **
  • Posts: 891
  • Country: gb
Re: device failure on PICKIT2
« Reply #8 on: October 19, 2012, 09:23:30 pm »
Have you got pin 1 (MCLR) tied to 5V with a 10K resistor? This is needed. This topic may also be useful.

http://www.microchip.com/forums/m330142.aspx

David.
David
Hertfordshire,UK
University Electronics Technician, London PIC,CCS C,Arduino,Kicad, Altium Designer,LPKF S103,S62 Operator, Electronics instructor. Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime. Credited Kicad French to English translator.
 

Online SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: device failure on PICKIT2
« Reply #9 on: October 20, 2012, 06:28:31 am »
Have you got pin 1 (MCLR) tied to 5V with a 10K resistor? This is needed. This topic may also be useful.

http://www.microchip.com/forums/m330142.aspx

David.

There is a Vpp/MCLR pin on the pickit2 that I connect to that pin
 

Offline AndyC_772

  • Super Contributor
  • ***
  • Posts: 4228
  • Country: gb
  • Professional design engineer
    • Cawte Engineering | Reliable Electronics
Re: device failure on PICKIT2
« Reply #10 on: October 20, 2012, 07:25:38 am »
It still needs a separate 10k pull-up between MCLR# and VCC, though - but it sounds as though you've resolved your problem by getting the PICKIT to actually power the board. Without it, the PIC might still have been powered through its inputs, so although I'm surprised it ever worked at all, it's not impossible.

Offline djsb

  • Frequent Contributor
  • **
  • Posts: 891
  • Country: gb
Re: device failure on PICKIT2
« Reply #11 on: October 20, 2012, 07:26:44 am »
Try connecting the 10k resistor AS WELL.

David.
David
Hertfordshire,UK
University Electronics Technician, London PIC,CCS C,Arduino,Kicad, Altium Designer,LPKF S103,S62 Operator, Electronics instructor. Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime. Credited Kicad French to English translator.
 

Online SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: device failure on PICKIT2
« Reply #12 on: October 20, 2012, 07:31:18 am »
I'm confused because there is a dedicated VPP/MCLR pin on the pickit so that would lead to assume that you leave it to the pickit. I'll try it when i next flash a chip.
 

Offline AndyC_772

  • Super Contributor
  • ***
  • Posts: 4228
  • Country: gb
  • Professional design engineer
    • Cawte Engineering | Reliable Electronics
Re: device failure on PICKIT2
« Reply #13 on: October 20, 2012, 07:45:56 am »
Assumption is the mother of all f***-ups!

Online SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: device failure on PICKIT2
« Reply #14 on: October 20, 2012, 07:50:54 am »
is the 10K resistor requirement stated in the pickit manual ?
 

Offline djsb

  • Frequent Contributor
  • **
  • Posts: 891
  • Country: gb
Re: device failure on PICKIT2
« Reply #15 on: October 20, 2012, 08:34:41 am »
Don't know, as I've not read the PK2 manual. We use PICKit 3 and ICD3 at work (and the occasional student uses PICKit 2) and they ALL work with the board I developed that has a 10K resistor to +5V (and a push button reset to ground). Also try to leave the 2 ICSP pins clear of any load (LED's etc) as this can effect the programming.

I used this as a guide.

http://ww1.microchip.com/downloads/en/DeviceDoc/DS-51765C.pdf

David.
David
Hertfordshire,UK
University Electronics Technician, London PIC,CCS C,Arduino,Kicad, Altium Designer,LPKF S103,S62 Operator, Electronics instructor. Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime. Credited Kicad French to English translator.
 

Online SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: device failure on PICKIT2
« Reply #16 on: October 20, 2012, 08:58:27 am »
well yes I think there is scope for using the MCLR pin in the circuit as a MCLR that is shared with the VPP of the pickit so the pickit will be made to deal with it as it's a common scenario and they chose to make those pins dual function. but i think purely for programming you should need any extra components.

Yes I try to leave the ICSP pins free in a design so that I can change the firmware without taking the chip out.
 

Offline AndyC_772

  • Super Contributor
  • ***
  • Posts: 4228
  • Country: gb
  • Professional design engineer
    • Cawte Engineering | Reliable Electronics
Re: device failure on PICKIT2
« Reply #17 on: October 20, 2012, 09:10:22 am »
Quote from: the data sheet
An internal MCLR option is enabled by clearing the
MCLRE bit in the Configuration Word Register 1. When
MCLRE = 0, the Reset signal to the chip is generated
internally. When the MCLRE = 1, the RA3/MCLR pin
becomes an external Reset input. In this mode, the
RA3/MCLR pin has a weak pull-up to VDD.

MCLR/VPP is used in two ways during programming: as a device reset (to put it into programming mode in the first place), and as VPP to provide the high voltage necessary to program the Flash memory. It may be that, especially if you don't already have MCLRE programmed as 1, the programming sequence doesn't work because MCLR doesn't go high when it should.

Seriously, though... it's only a 10K resistor, that's all. Just try it if you still have a problem!

Have you not already fixed it by powering the device correctly? Or are you still having problems even after getting the PICKIT to provide power to the board? It sounds from what you said as though you only had problems when the PIC wasn't being powered from anywhere at all - and that's hardly surprising ;)

Online SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: device failure on PICKIT2
« Reply #18 on: October 20, 2012, 09:22:52 am »
Yes the problem was resolved by ticking the box on the pickit interface to power the pic, I thought this was a manhual only control put there so that you can use the pickit as a power supply too (up to 50 or 100mA) so it's nothing to do with programing but yes it fixed it, if the software knows that the target needs power it should provide it.

I'm not using the MCLR as a MCLR pin but as an I/O (well nothing at all I think).

My point is that I'm doing as instructed but things are not working. So maybe there is a problem with the software or the manual. As I'm giving the pickit exclusive access and control of the target pic I'd expect it to "deal with it" I've not done anything the pickit can't do itself if needed
 

Online SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: device failure on PICKIT2
« Reply #19 on: October 20, 2012, 05:06:30 pm »
it's doing it again now even with the pic powered from the pickit. Now i pissed off, what is it with this shit programmer !
 

Online SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: device failure on PICKIT2
« Reply #20 on: October 20, 2012, 05:28:50 pm »
I can read the device but not program it, this all used to work before why is it suddenly doing this ? faulty programmer ?
 

Offline Baliszoft

  • Frequent Contributor
  • **
  • Posts: 277
  • Country: hu
Re: device failure on PICKIT2
« Reply #21 on: October 20, 2012, 05:33:16 pm »
Pickit2 is a good programmer imho. Maybe you are doing something wrong?

My pickit2 already had lots of abuse (overload on target power, overload on gnd), the only issue i had with it, that somehow i managed to erase its calibration memory (dont ask how), and it wasn't sending out the requested target voltage. After a re-calibration it was good as new.
 

Offline djsb

  • Frequent Contributor
  • **
  • Posts: 891
  • Country: gb
Re: device failure on PICKIT2
« Reply #22 on: October 20, 2012, 05:33:23 pm »
Please be more specific. What is "it"? Did you put the 10k resistor on the MCLR pin? Which pins on the Pickit 3 are connected to which pins on the device. Do you get any message at all in MPLAB? What configuration fuses are you using (are they in your source code listing or set up in MPLAB?Have you tried powering the target from a separate supply and not the Pickit?Is your device plugged in securely? I could go on with the questions but I'll just give you a chance to answer.

David.
« Last Edit: October 20, 2012, 05:37:34 pm by djsb »
David
Hertfordshire,UK
University Electronics Technician, London PIC,CCS C,Arduino,Kicad, Altium Designer,LPKF S103,S62 Operator, Electronics instructor. Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime. Credited Kicad French to English translator.
 

Online mariush

  • Super Contributor
  • ***
  • Posts: 5022
  • Country: ro
  • .
Re: device failure on PICKIT2
« Reply #23 on: October 20, 2012, 05:35:12 pm »
Use a 4.7k-10k resistor between the MCLR and 5v power of the chip, see chapter 2 in the manual attached.
 

Offline Jon Chandler

  • Frequent Contributor
  • **
  • Posts: 539
    • Throw Away PIC
Re: device failure on PICKIT2
« Reply #24 on: October 20, 2012, 05:36:02 pm »
Here is a compilation of common PIC problems:  Commandments For Using PICs

A couple points come to mind:

1. Do you have a 0.1 uF bypass cap across the power pins?  Problems with this show up in all kinds of ways.

2. I would recommend against disabling /MCLR, even if it means using the ICSP pins for I/O.

3. The PICkit 2 will properly pull up /MCLR when the PICkit is connected, but you'll need the 10k resistor to allow the board to run reliably with the PICkit disconnected.

4. If you want the PICkit to power the micro, tick the box. (That really seems pretty straightforward.)

5. If the PICkit errors because of a power short, you must disconnect it from USB, shut down the GUI and start over.  In the event of communication errors or other problems programming, I would also do this.  The PICkit will protect itself from supplying excess power, but needs to be disconnected from USB to reset.

6. If the GUI freezes and can't be closed, it's usually because of a power short.  See #5.

Hope this helps.  The PICkit 2 has been solid for me.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf