• AVR Freaks

Hot!Cannot reprogram PIC10F200

Page: 12 > Showing page 1 of 2
Author
Blue_Key
Senior Member
  • Total Posts : 132
  • Reward points : 0
  • Joined: 2011/12/20 04:48:22
  • Location: 0
  • Status: offline
2019/07/07 23:36:49 (permalink)
0

Cannot reprogram PIC10F200

I'm having quite a headache.
 
I have 120+ boards, which contains a pic10F200 and I have to fix a firmware issue.
 
The initial programming was fine on these boards, however, it seems impossible to reprogram them.
 
I tried with a pickit3 and pickit 4, same behavior.
 
I can't even erase the pic. When I do an erase, it the console returns "Erase successful", however, if I read back the program memory right after, the old program is there.
 
When I try to program it, it basically fails as xxx has unexpected value to yyy which is basically the part of the software that I try to rewrite.
 
So basically it seems that the chip cannot be erased.
 
There is a bit of a design flaw where programming lines are connected to 1k resistor to GND/VCC, this might be a bit too low of impedance, but since it initially programmed fine I am not sure whether this could be the reason.
#1

21 Replies Related Threads

    PStechPaul
    Super Member
    • Total Posts : 2381
    • Reward points : 0
    • Joined: 2006/06/27 16:11:32
    • Location: Cockeysville, MD, USA
    • Status: offline
    Re: Cannot reprogram PIC10F200 2019/07/08 00:01:45 (permalink)
    0
    Those resistors are very likely the cause. Can you change them on one of the boards to see if it helps? Maybe you can view the signals on a scope to see if proper logic levels and transitions are visible.
     
    Something else to try might be setting the programmer voltage a little lower or higher. This may help even if the PIC is separately powered on the board.

     
    #2
    ric
    Super Member
    • Total Posts : 23609
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: Cannot reprogram PIC10F200 2019/07/08 00:09:40 (permalink)
    +1 (1)
    Blue_Key
    There is a bit of a design flaw where programming lines are connected to 1k resistor to GND/VCC, this might be a bit too low of impedance, but since it initially programmed fine I am not sure whether this could be the reason.

    This is a bit too vague.
    Is it GND, or is it VCC (actually VDD)?
    Do you mean one is pulled high and the other low?
     
    What is your MCLRE config setting?
    Does your code set ICSPCLK and/or ICSPDAT to output mode immediately after reset?
    (It's safer to have a short power-on delay first).
     
    What exactly is connected to the MCLR pin? Pullup/downs? Capacitors?

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #3
    Blue_Key
    Senior Member
    • Total Posts : 132
    • Reward points : 0
    • Joined: 2011/12/20 04:48:22
    • Location: 0
    • Status: offline
    Re: Cannot reprogram PIC10F200 2019/07/08 03:49:00 (permalink)
    0
    PStechPaul
    Those resistors are very likely the cause. Can you change them on one of the boards to see if it helps? Maybe you can view the signals on a scope to see if proper logic levels and transitions are visible.
     
    Something else to try might be setting the programmer voltage a little lower or higher. This may help even if the PIC is separately powered on the board.



    I am not sure, I'm able to read the device without any issue. I tried to set different voltages, and try vpp or vdd first, same behavior. I've tried powering through the programmer or using an external supply.
     
     
    ric
     
    This is a bit too vague.
    Is it GND, or is it VCC (actually VDD)?
    Do you mean one is pulled high and the other low?
     
    What is your MCLRE config setting?
    Does your code set ICSPCLK and/or ICSPDAT to output mode immediately after reset?
    (It's safer to have a short power-on delay first).
     
    What exactly is connected to the MCLR pin? Pullup/downs? Capacitors?



    MCLR, PGD, PGC are connected to VDD (3V3) through 1k (I know should have been 10k).
     
    However, first time programming was fine, reading the chip memory is fine.
    Erasing the chip or reprogramming doesn't work.
     
    post edited by Blue_Key - 2019/07/08 04:14:28
    #4
    rpg7
    Super Member
    • Total Posts : 1383
    • Reward points : 0
    • Joined: 2003/11/07 12:47:35
    • Status: online
    Re: Cannot reprogram PIC10F200 2019/07/08 04:11:53 (permalink)
    +1 (1)
    "MCLR, PGD, PGC are connected to VDD (3V3) through 1k (I know should have been 10k)."
     
    The programming spec indicates 4.5V to 5.5V Vdd for bulk erase and programming. From experience I have found that programming works at lower voltages, but bulk erase does not."
     
    #5
    Blue_Key
    Senior Member
    • Total Posts : 132
    • Reward points : 0
    • Joined: 2011/12/20 04:48:22
    • Location: 0
    • Status: offline
    Re: Cannot reprogram PIC10F200 2019/07/08 04:16:24 (permalink)
    0
    rpg7
    "MCLR, PGD, PGC are connected to VDD (3V3) through 1k (I know should have been 10k)."
     
    The programming spec indicates 4.5V to 5.5V Vdd for bulk erase and programming. From experience I have found that programming works at lower voltages, but bulk erase does not."
     

     
    What would you suggest? It would be a pain to replace the resistors on all the boards. Would there be a work around ? I cannot put VDD at 5V as there are other 3V3 components. 
     
    Is it the MCLR that needs to be at 5V for erase or the whole chip ?
    #6
    newfound
    Super Member
    • Total Posts : 1841
    • Reward points : 0
    • Joined: 2003/11/07 12:35:49
    • Status: offline
    Re: Cannot reprogram PIC10F200 2019/07/08 04:28:36 (permalink)
    0
    Blue_Key
    rpg7
    "MCLR, PGD, PGC are connected to VDD (3V3) through 1k (I know should have been 10k)."
     
    The programming spec indicates 4.5V to 5.5V Vdd for bulk erase and programming. From experience I have found that programming works at lower voltages, but bulk erase does not."
     

     
    Is it the MCLR that needs to be at 5V for erase or the whole chip ?




    "The programming spec indicates 4.5V to 5.5V Vdd for bulk erase and programming."
    #7
    pcbbc
    Super Member
    • Total Posts : 1255
    • Reward points : 0
    • Joined: 2014/03/27 07:04:41
    • Location: 0
    • Status: offline
    Re: Cannot reprogram PIC10F200 2019/07/08 04:39:15 (permalink)
    +1 (1)
    Blue_KeyWhat would you suggest? It would be a pain to replace the resistors on all the boards. Would there be a work around ? I cannot put VDD at 5V as there are other 3V3 components.

    First of all I would work out what the problem actually IS, rather than just speculating.  Only then can you come up with a workaround.
     
    So perhaps remove the offending resistors off a test board first, and see if that allows you to re-program?
    #8
    Blue_Key
    Senior Member
    • Total Posts : 132
    • Reward points : 0
    • Joined: 2011/12/20 04:48:22
    • Location: 0
    • Status: offline
    Re: Cannot reprogram PIC10F200 2019/07/08 05:17:11 (permalink)
    0
    I replaced MCLR to VDD to 10k and removed the other resistors, and behavior remains the same.
     
    [Ignore duplicate, connection issue ended up in multiple post...]
    post edited by Blue_Key - 2019/07/08 05:19:08
    #9
    Blue_Key
    Senior Member
    • Total Posts : 132
    • Reward points : 0
    • Joined: 2011/12/20 04:48:22
    • Location: 0
    • Status: offline
    Re: Cannot reprogram PIC10F200 2019/07/08 05:17:16 (permalink)
    0
    I replaced MCLR to VDD to 10k and removed the other resistors, and behavior remains the same.
    #10
    Blue_Key
    Senior Member
    • Total Posts : 132
    • Reward points : 0
    • Joined: 2011/12/20 04:48:22
    • Location: 0
    • Status: offline
    Re: Cannot reprogram PIC10F200 2019/07/08 05:17:16 (permalink)
    0
    I replaced MCLR to VDD to 10k and removed the other resistors, and behavior remains the same.
    #11
    Blue_Key
    Senior Member
    • Total Posts : 132
    • Reward points : 0
    • Joined: 2011/12/20 04:48:22
    • Location: 0
    • Status: offline
    Re: Cannot reprogram PIC10F200 2019/07/08 05:17:16 (permalink)
    0
    I replaced MCLR to VDD to 10k and removed the other resistors, and behavior remains the same.
    #12
    pcbbc
    Super Member
    • Total Posts : 1255
    • Reward points : 0
    • Joined: 2014/03/27 07:04:41
    • Location: 0
    • Status: offline
    Re: Cannot reprogram PIC10F200 2019/07/08 05:39:53 (permalink)
    +1 (1)
    I would start with a new part and ensure I can program it out of circuit.  Now you have proved that the programmer/configuration/software install is not faulty.
     
    Then, assuming a DIP part, remove one from and existing board and try and program that.  Now you have proved that the existing parts are not faulty.
    #13
    mpgmike
    Super Member
    • Total Posts : 258
    • Reward points : 0
    • Joined: 2014/01/23 17:27:06
    • Location: NJ
    • Status: offline
    Re: Cannot reprogram PIC10F200 2019/07/08 08:54:31 (permalink)
    0
    You could remove one of the 1k resistors to Vdd and jumper 5 volts in for programming, then replace the 1k resistor.  A pain, but it may work.

    I don't need the world to know my name, but I want to live a life so all my great-grandchildren proudly remember me.
    #14
    ric
    Super Member
    • Total Posts : 23609
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: Cannot reprogram PIC10F200 2019/07/08 13:15:41 (permalink)
    0
    Posts #5 and #7 spell out the main problem.

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #15
    NorthGuy
    Super Member
    • Total Posts : 5592
    • Reward points : 0
    • Joined: 2014/02/23 14:23:23
    • Location: Northern Canada
    • Status: offline
    Re: Cannot reprogram PIC10F200 2019/07/09 07:10:13 (permalink)
    +1 (1)
    Voltage is definitely a problem. With lower voltage, you can row erase, but not bulk erase. PICkit3 assumes the erase went through, but it didn't. Hence all your errors.
     
    On many other chips, you could solve the problem by doing row erase at lower voltages, but your PIC doesn't have a row erase. The only way is to erase at VDD of 5V. Erase is quick. May be your other components will tolerate 5V for a short time (actually only several microseconds are needed if you can time it well). Once you erase, you can then program it again at 3V.
     
    There is another problem with this chip if you do a separate erase. If you erase config, the calibration word will be erased too, so you need to do a special erase (programming memory only). If you do need to change config bits, it'll be much harder - as you will need to re-program the calibration bits after erase.
     
    The programming algorithm is easy. Read it in "Programming Specifications". Get a PIC, write a program which will power your board with 5V, then erase, reprogram the calibration and then take the power off. I'm pretty sure your 3V components can take this.
     
    Use PIC10F320 next time :) Same price, much better PIC. If you did, you wouldn't have this problem now.
    #16
    kjo
    Starting Member
    • Total Posts : 80
    • Reward points : 0
    • Joined: 2006/07/11 15:11:02
    • Location: 0
    • Status: offline
    Re: Cannot reprogram PIC10F200 2019/07/10 19:15:59 (permalink)
    +1 (1)
    My 2 cents....
    I didn’t see the IDE you’re using noted. Assume mplabx. I have some PCBs with CLK/DTA/Vpp requirements that cause some programming problems with 12F629 chips. If virgin, they program with the IDE. Once programmed the IDE can’t ID the chip. (12F629) But a kitsRus K150 will erase them. And the IDE will then program them. Further, if I use the MPLABX IPE, I can erase and reprogram them. (Using a ICD3) All of this is at 5V. I’m sure it is all related to the stuff I need attached to those lines. I could use isolation jumpers but I don’t want to. This is a cheap quasi-analog 8 pin chip that is great for simple analog/digital control.
    So my recommendation is to find a way to bulk erase the device u have using any safe method. Then program with the MPLABX IDE or IPE.
    #17
    Blue_Key
    Senior Member
    • Total Posts : 132
    • Reward points : 0
    • Joined: 2011/12/20 04:48:22
    • Location: 0
    • Status: offline
    Re: Cannot reprogram PIC10F200 2019/07/10 22:33:05 (permalink)
    0
    NorthGuy
    Voltage is definitely a problem. With lower voltage, you can row erase, but not bulk erase. PICkit3 assumes the erase went through, but it didn't. Hence all your errors.
     
    On many other chips, you could solve the problem by doing row erase at lower voltages, but your PIC doesn't have a row erase. The only way is to erase at VDD of 5V. Erase is quick. May be your other components will tolerate 5V for a short time (actually only several microseconds are needed if you can time it well). Once you erase, you can then program it again at 3V.

     
    Thanks, I think that explains it all. I will try to dig out how I can fix those boards and will amend the design. 
     
    Once again, it would be helpful for this to be clearly indicated on the device datasheet..
    #18
    PStechPaul
    Super Member
    • Total Posts : 2381
    • Reward points : 0
    • Joined: 2006/06/27 16:11:32
    • Location: Cockeysville, MD, USA
    • Status: offline
    Re: Cannot reprogram PIC10F200 2019/07/11 13:17:28 (permalink)
    +1 (1)
    I think the 10F200 was meant to be an extremely low cost device for one-time use in an essentially disposable consumer item like a toothbrush, flashlight, or toy. A 10F32x is only a few pennies more. I was at a MASTERS conference around 2003 when they introduced this tiny device, and they had thousands of them that they dispensed in a pepper shaker. They even had a contest to come up with the best design using this chip.

     
    #19
    acharnley
    Super Member
    • Total Posts : 319
    • Reward points : 0
    • Joined: 2016/05/01 06:51:28
    • Location: 0
    • Status: offline
    Re: Cannot reprogram PIC10F200 2019/07/12 07:12:17 (permalink)
    0
    What other components are using 3v3, can you get away with 4v etc without burning them out? If so perhaps you can get away with that. (edit - I see that has been offered already).

    Wouldn't the chip have used a full erase the first time it's programmed?
    #20
    Page: 12 > Showing page 1 of 2
    Jump to:
    © 2019 APG vNext Commercial Version 4.5