PIC16F88 problem

Page: < 123 > Showing page 2 of 3
Author
Futterama
Starting Member
  • Total Posts : 75
  • Reward points : 0
  • Joined: 2006/02/01 00:57:12
  • Location: 0
  • Status: offline
RE: PIC16F88 problem 2008/01/04 15:36:16 (permalink)
0
ORIGINAL: PICkit2Dev

Have you tried selecting "Use VPP First Program Entry" on these parts?  What you are describing with the 2.5V Volt issue sounds just like the problem this is intended to solve.

I did try this yesterday, and it worked for a while, but the errors returned.

I have now soldered a larger cap (1µF vs. 100nF) on the supply pins, and set PICkit2 VDD to 5.0V and enabled "Use VPP First Program Entry".

I can now program the device several times in a row without errors.

I can even program a device without any caps but still with VPP first programming.

It seems like I can return to my project instead of debugging the programming...
post edited by Futterama - 2008/01/04 15:38:00
#21
BitWise
Super Member
  • Total Posts : 1235
  • Reward points : 0
  • Joined: 2004/11/09 13:24:20
  • Location: UK
  • Status: offline
RE: PIC16F88 problem 2008/01/05 02:57:26 (permalink)
0
Have you tried including pull-up/down resistors in the circuit?

I can't see a pull-up resistor (10K) on /MCLR as recommended in the Pickit 2 user guide. I also normally have 4.7K pull-down resistors on PGC and PGD as well. So far I haven't had any problems using my Pickit2 with a variety of devices in this configuration.

EDIT

I found this quote in a Pickit 2 annoucement in the forum
The updated PICkit 2 Microcontroller Programmers are easily identified by a red colored pushbutton as opposed to the black button found on prior revisions.  The distinguishment is important as the new revision PICkit 2s have internal pulldowns on PGC and PGD that are necessary for proper debugging operation.

From the photos it looks like you have a early Pickit 2 (with a black button - same as mine) so you should add the pull-down resistors should your programming circuit.
post edited by BitWise - 2008/01/05 03:03:40

Throughout your life advance daily, becoming more skillful than yesterday, more skillful than today. This is never-ending.

Yamamoto Tsunetomo (1659-1719)
#22
Futterama
Starting Member
  • Total Posts : 75
  • Reward points : 0
  • Joined: 2006/02/01 00:57:12
  • Location: 0
  • Status: offline
RE: PIC16F88 problem 2008/01/05 04:28:02 (permalink)
0
ORIGINAL: BitWise

Have you tried including pull-up/down resistors in the circuit?

I can't see a pull-up resistor (10K) on /MCLR as recommended in the Pickit 2 user guide. I also normally have 4.7K pull-down resistors on PGC and PGD as well. So far I haven't had any problems using my Pickit2 with a variety of devices in this configuration.

EDIT

I found this quote in a Pickit 2 annoucement in the forum
The updated PICkit 2 Microcontroller Programmers are easily identified by a red colored pushbutton as opposed to the black button found on prior revisions.  The distinguishment is important as the new revision PICkit 2s have internal pulldowns on PGC and PGD that are necessary for proper debugging operation.

From the photos it looks like you have a early Pickit 2 (with a black button - same as mine) so you should add the pull-down resistors should your programming circuit.


I don't use the pull-up on MCLR because I use it as an I/O port. Isn't the MCLR pull-up only for disabling the MCLR reset when the PIC is running?

Regarding the pull-downs on PGC and PGD, are they only for debugging as the quote says, or does it have an impact on programming too? I guess I could open my programmer and add those resistors internally?
#23
BitWise
Super Member
  • Total Posts : 1235
  • Reward points : 0
  • Joined: 2004/11/09 13:24:20
  • Location: UK
  • Status: offline
RE: PIC16F88 problem 2008/01/05 04:57:24 (permalink)
0
ORIGINAL: Futterama

ORIGINAL: BitWise

Have you tried including pull-up/down resistors in the circuit?

I can't see a pull-up resistor (10K) on /MCLR as recommended in the Pickit 2 user guide. I also normally have 4.7K pull-down resistors on PGC and PGD as well. So far I haven't had any problems using my Pickit2 with a variety of devices in this configuration.

EDIT

I found this quote in a Pickit 2 annoucement in the forum
The updated PICkit 2 Microcontroller Programmers are easily identified by a red colored pushbutton as opposed to the black button found on prior revisions.  The distinguishment is important as the new revision PICkit 2s have internal pulldowns on PGC and PGD that are necessary for proper debugging operation.

From the photos it looks like you have a early Pickit 2 (with a black button - same as mine) so you should add the pull-down resistors should your programming circuit.


I don't use the pull-up on MCLR because I use it as an I/O port. Isn't the MCLR pull-up only for disabling the MCLR reset when the PIC is running?

Regarding the pull-downs on PGC and PGD, are they only for debugging as the quote says, or does it have an impact on programming too? I guess I could open my programmer and add those resistors internally?

Try adding the resistors on the breadboard and see if it makes a difference. I wouldn't disassemble the Pickit2.

Throughout your life advance daily, becoming more skillful than yesterday, more skillful than today. This is never-ending.

Yamamoto Tsunetomo (1659-1719)
#24
xiaofan
Super Member
  • Total Posts : 6247
  • Reward points : 0
  • Joined: 2005/04/14 07:05:25
  • Location: Singapore
  • Status: offline
RE: PIC16F88 problem 2008/01/05 06:08:06 (permalink)
0
ORIGINAL: Futterama
I don't use the pull-up on MCLR because I use it as an I/O port. Isn't the MCLR pull-up only for disabling the MCLR reset when the PIC is running?

Regarding the pull-downs on PGC and PGD, are they only for debugging as the quote says, or does it have an impact on programming too? I guess I could open my programmer and add those resistors internally?

 
The pull-downs on PGC and PGD are only for debugging. So you do not really need it for programming.
 
If you read Chapter 3 of the PICkit 2 User Guide, you will know it is recommended to have a pull-up on MCLR. That chapter is highly recommended for reading.

  USB_Links and libusb
#25
PICkit2Dev
Super Member
  • Total Posts : 994
  • Reward points : 0
  • Joined: 2006/09/27 08:41:47
  • Location: 0
  • Status: offline
RE: PIC16F88 problem 2008/01/15 15:42:40 (permalink)
0
Resolution
 
Thanks to Toley for sending me a few of the problem PIC16F88 parts.  This problem is unique to 18-pin parts that share the Timer1 oscillator with the PGx programming pins.  Parts included are the PIC16F88, 87 and possibly the 818, 819, 62xA, & 648A.
 
The problem occurs when the device is programmed so that:
1) It uses the internal oscillator
-and-
2) The MCLR pin is turned off to use as a digital input instead
-and-
3) The program code enabled the Timer1 Oscillator in the T1CON register.  (The sooner this is enabled after the reset vector the more likely the problem is to occur.
 
This problem can be prevented by avoiding one of the 3 conditions above.
 
It is possible to recover parts with this issue.  To do so, follow these steps in the PICkit 2 Programmer software:

A) Put the part on a breadboard or other jig where it is only connected to the 5 PICkit 2 programming signals.
B) Open the PICkit 2 Programmer application v2.40 (or later). Select "Device Family > Midrange"
C) Set the PICkit 2 Programmer VDD voltage box to 3.0 Volts
D) Select "Device Family > Midrange" again; it should now detect the part
E) If the part is not detected in D), reduce the VDD by 0.1 volts and try again. Repeat until the part is detected.
F) Select the WRITE button. It should now erase the part.
 
You will now be able to program & use the part normally at 5.0 Volts VDD.
#26
Dany
Senior Member
  • Total Posts : 126
  • Reward points : 0
  • Joined: 2008/03/27 06:39:04
  • Location: 0
  • Status: offline
RE: PIC16F88 problem 2008/06/23 23:02:07 (permalink)
0
ORIGINAL: PICkit2Dev

It is possible to recover parts with this issue.  To do so, follow these steps in the PICkit 2 Programmer software:

A) Put the part on a breadboard or other jig where it is only connected to the 5 PICkit 2 programming signals.
B) Open the PICkit 2 Programmer application v2.40 (or later). Select "Device Family > Midrange"
C) Set the PICkit 2 Programmer VDD voltage box to 3.0 Volts
D) Select "Device Family > Midrange" again; it should now detect the part
E) If the part is not detected in D), reduce the VDD by 0.1 volts and try again. Repeat until the part is detected.
F) Select the WRITE button. It should now erase the part.

You will now be able to program & use the part normally at 5.0 Volts VDD.


Hi, I have some questions:
- What is the actual reason for the problem?
- Is it in the PIC or the programmer or both?
- After executing above resolution actions, will the problem then stay away in that PIC or is there a chance of re-occuring after the programming?

I have the same type of problem with a 12F629 and a "non standard" programmer (see thread http://forum.microchip.com/tm.aspx?m=347029). How can I tackle the problem?


Thanks in advance.

Kind regards,
Dany
#27
PICkit2Dev
Super Member
  • Total Posts : 994
  • Reward points : 0
  • Joined: 2006/09/27 08:41:47
  • Location: 0
  • Status: offline
RE: PIC16F88 problem 2008/06/24 08:18:24 (permalink)
0
The PIC12F629A problem is not the same as the above, which says "This problem is unique to 18-pin parts that share the Timer1 oscillator with the PGx programming pins."

Problems with devices like the PIC12F629A occur when the port pins shared with the programming pins are outputs that are driving a high value, preventing the programmer from being able to put the device into programming mode. What's needed to program a part like this is either a programmer that supports VPP First Program Entry or a programmer with really beefy output drivers to overpower the chip output pins.
#28
Dany
Senior Member
  • Total Posts : 126
  • Reward points : 0
  • Joined: 2008/03/27 06:39:04
  • Location: 0
  • Status: offline
RE: PIC16F88 problem 2008/06/25 06:35:08 (permalink)
0
ORIGINAL: PICkit2Dev

The PIC12F629A problem is not the same as the above, which says "This problem is unique to 18-pin parts that share the Timer1 oscillator with the PGx programming pins."

Problems with devices like the PIC12F629A occur when the port pins shared with the programming pins are outputs that are driving a high value, preventing the programmer from being able to put the device into programming mode. What's needed to program a part like this is either a programmer that supports VPP First Program Entry or a programmer with really beefy output drivers to overpower the chip output pins.

Thanks.
Can you give a little bit more detail about what "VPP First Program Entry" actually is? Perhaps I can modify my programmer to support it. I found several articles based on the seacrh for "VPP First Program Entry" and they suggest to raise Vpp before Vdd. Is this correct? Can I do this always or does it damage the PIC in some way? I did not do the modification in my programmer yet.

Observation: if I raise Vdd and Vpp at the same time (with internal oscillator and MCLR disabled) as my programmer does, the PIC program indeed starts to run, making some ports inaccessible for programming.

Thanks very much in advance.
post edited by Dany - 2008/06/25 06:50:26

Kind regards,
Dany
#29
Dany
Senior Member
  • Total Posts : 126
  • Reward points : 0
  • Joined: 2008/03/27 06:39:04
  • Location: 0
  • Status: offline
RE: PIC16F88 problem 2008/06/25 07:17:03 (permalink)
0
ORIGINAL: PICkit2Dev

What's needed to program a part like this is either a programmer that supports VPP First Program Entry or a programmer with really beefy output drivers to overpower the chip output pins.

Hi, this suggestion was the answer to my problem. In both the PGC and PGD lines of the programmer there was a series resistor of 1K present. I had to lower this to almost zero before re-programming became possible again.

Thanks very much!
post edited by Dany - 2008/06/25 07:19:01

Kind regards,
Dany
#30
lorenzo.pj
New Member
  • Total Posts : 5
  • Reward points : 0
  • Joined: 2008/08/20 07:04:51
  • Location: 0
  • Status: offline
RE: PIC16F88 problem 2008/08/25 05:00:19 (permalink)
0
ORIGINAL: PICkit2Dev

Resolution

Thanks to Toley for sending me a few of the problem PIC16F88 parts.  This problem is unique to 18-pin parts that share the Timer1 oscillator with the PGx programming pins.  Parts included are the PIC16F88, 87 and possibly the 818, 819, 62xA, & 648A.

The problem occurs when the device is programmed so that:
1) It uses the internal oscillator
-and-
2) The MCLR pin is turned off to use as a digital input instead
-and-
3) The program code enabled the Timer1 Oscillator in the T1CON register.  (The sooner this is enabled after the reset vector the more likely the problem is to occur.

This problem can be prevented by avoiding one of the 3 conditions above.

It is possible to recover parts with this issue.  To do so, follow these steps in the PICkit 2 Programmer software:

A) Put the part on a breadboard or other jig where it is only connected to the 5 PICkit 2 programming signals.
B) Open the PICkit 2 Programmer application v2.40 (or later). Select "Device Family > Midrange"
C) Set the PICkit 2 Programmer VDD voltage box to 3.0 Volts
D) Select "Device Family > Midrange" again; it should now detect the part
E) If the part is not detected in D), reduce the VDD by 0.1 volts and try again. Repeat until the part is detected.
F) Select the WRITE button. It should now erase the part.

You will now be able to program & use the part normally at 5.0 Volts VDD.



I've the same problem but with a PIC16F818, i follow this resolution but with the ICD2 programmer.
I set about 3V supply and i can connect the pic and the programmer but when i try to write it don't work.

Can you help me please?
I normally use the MCLR ON sad

Thank you
#31
jedineon
New Member
  • Total Posts : 2
  • Reward points : 0
  • Joined: 2008/12/11 09:30:31
  • Location: 0
  • Status: offline
RE: PIC16F88 problem 2008/12/11 10:44:07 (permalink)
0
I had the same problem... Damned 16F88!!!
But I've found a solution: the problem was indeed the timer1, because if I keep it deactivated for some seconds the programming is always successful; it doesn't matter how you set the MCLR pin, and even if you put your RB3 pin to GND, it is all a matter of timer1!

here I post the code that works: (written in CCS C)

void main()
{
   setup_timer_1(T1_DISABLED);
   delay_ms(4000);
   disable_interrupts(GLOBAL);
   disable_interrupts(INT_AD);
   disable_interrupts(INT_TIMER1);
   disable_interrupts(INT_TIMER2);
   set_tris_a (0b00010011);
   set_tris_b (0b00000110);

...
initialization
...

   setup_timer_1(T1_INTERNAL|T1_DIV_BY_1);
   enable_interrupts(GLOBAL);
   ferma();
   enable_interrupts(INT_AD);
   enable_interrupts(INT_TIMER1);
   enable_interrupts(INT_TIMER2);
   printf(" Interrupts enabled! ");

hope this helps!
#32
FunnyNYPD
Super Member
  • Total Posts : 1553
  • Reward points : 0
  • Joined: 2007/09/28 20:06:59
  • Location: USA & Canada
  • Status: offline
RE: PIC16F88 problem 2008/12/11 11:08:58 (permalink)
0
Yup. That's a software fix to avoid this issue.
Do you think a delay for 4 seconds, a little bit too long? How about 40 ms. Can you verify the shortest time on your project?
That would be very useful info for all 18 pin PIC users.
Thanks.
#33
jedineon
New Member
  • Total Posts : 2
  • Reward points : 0
  • Joined: 2008/12/11 09:30:31
  • Location: 0
  • Status: offline
RE: PIC16F88 problem 2008/12/11 11:55:28 (permalink)
0
That delay is ok for my project (a minisumo robot, who has to wait 5 sec before starting the main cycle, in my case the int_timer1).
But I've gone as far as 1sec of delay until activating timer1... maybe I'll try to shorten this delay later on.

Anyway I've found this problem only with 16F88, and I've been using 18pin 16F84, 16F84A, 16LF84A, 16F628, 16F628A without any problem of this sort!!!
#34
Guest
Super Member
  • Total Posts : 80499
  • Reward points : 0
  • Joined: 2003/01/01 00:00:00
  • Location: 0
  • Status: online
RE: PIC16F88 problem 2009/02/27 15:03:18 (permalink)
0
i have read this thread, and from what i can understand, it is due to Vdd and Vpp raising at the same time.
 
indeed it is a little obscure, PIC starting up for a few 100mS, and then getting re-programmed.
 
i have never paid close attention to it until i've read it here.
 
now, what about this:
 
inline 47R, 100R, or even 220R resistor, and use a 47uF or 100uF capacitor in parallel with Vcc/GND.
 
such a bypass should prevent Vdd from raising too quickly, so the PIC enters programming mode via Vpp raising,
and then a little later, Vdd also comes up.
 
sorry i do not have non-responsive PICs to test, but also, PICs starting up for a short moment is a little irritating.
I'd eventually add such a bypass to my breakout PCB (for normal operation, it is shortened with a switch).
 
maybe it won't work anyway, i am not a 15 years PIC expert.

aspforum.mchp.guest
#35
mdiabolo
New Member
  • Total Posts : 9
  • Reward points : 0
  • Joined: 2009/02/25 16:36:59
  • Location: 0
  • Status: offline
RE: PIC16F88 problem 2009/03/06 15:16:36 (permalink)
0
ORIGINAL: PICkit2Dev

Resolution

Thanks to Toley for sending me a few of the problem PIC16F88 parts.  This problem is unique to 18-pin parts that share the Timer1 oscillator with the PGx programming pins.  Parts included are the PIC16F88, 87 and possibly the 818, 819, 62xA, & 648A.

The problem occurs when the device is programmed so that:
1) It uses the internal oscillator
-and-
2) The MCLR pin is turned off to use as a digital input instead
-and-
3) The program code enabled the Timer1 Oscillator in the T1CON register.  (The sooner this is enabled after the reset vector the more likely the problem is to occur.

This problem can be prevented by avoiding one of the 3 conditions above.

It is possible to recover parts with this issue.  To do so, follow these steps in the PICkit 2 Programmer software:

A) Put the part on a breadboard or other jig where it is only connected to the 5 PICkit 2 programming signals.
B) Open the PICkit 2 Programmer application v2.40 (or later). Select "Device Family > Midrange"
C) Set the PICkit 2 Programmer VDD voltage box to 3.0 Volts
D) Select "Device Family > Midrange" again; it should now detect the part
E) If the part is not detected in D), reduce the VDD by 0.1 volts and try again. Repeat until the part is detected.
F) Select the WRITE button. It should now erase the part.

You will now be able to program & use the part normally at 5.0 Volts VDD.



Hi, I have the same problem because I programmed my PICs with those configuration bits. The thing is tha contrary to other people, the method to recover the PIC does not seem to work for me.
On the 3, I "broke" , I got only one back working after I erased it with a JDM programmer. The two others are still not working. I cannot reset them. The Pickit2 software does not even recognize them (even at 2.5V and I can not go lower !).

What can I do ?
#36
spiralbrain
New Member
  • Total Posts : 11
  • Reward points : 0
  • Joined: 2008/01/02 14:43:50
  • Location: 0
  • Status: offline
RE: PIC16F88 problem 2010/04/08 04:19:21 (permalink)
0
I reported a similar problem with the 16F628 in 2005 on Hi Tech forums http://forum.htsoft.com/all/showthreaded.php?Number=15867&page=

The solution I found back then was to randomly switch on and off the power supply to the pic being erased. it did work after a couple of tries. After so many years i tried the same code again to see if it was my programmer that was faulty. This time I used the PIC Kit 2 clone and it locked the chips again. doing a search I realised that the PIC Kit 2 now has an inbuilt function to deal with such an issue. the option called "USE VPP first program entry". this revived the 16F628.

Hope this helps someone who is facing a similar issue.Smile
#37
jwauton
New Member
  • Total Posts : 6
  • Reward points : 0
  • Joined: 2010/07/16 09:26:55
  • Location: 0
  • Status: offline
RE: PIC16F88 problem 2010/07/26 03:51:51 (permalink)
0
I am seeing the same problem on some boards manufactured in 2004. I need to reprogram the PIC on these boards and less than 50% will program. I have tried the various suggestions on this forum, and so far have managed to program one problem PIC only.
 
I have been programming with a PICKit3 but also tried an ICD2, both with exactly the same results.
 
The PIC on these boards has a 3V supply from a 78LC30HT1 regulator (although I have measured some at 3.3V and one at 4V!)
 
The RB6/PGC and RB7/PGD are used as analogue inputs in normal use, and both have a 1k8 resistor between the pin and the Op Amp driving them. (I have tried removing the resistors on one board but no change).
 
MCLR has a 47k pull up and connects directly to the header.
 
RB3/PGM is used to drive an LED, but there is a removeable jumper.
 
The board is not using TIMER 1.
 
Code in MAIN sets the Osc to XTAL (3.6864MHz).
 
Any help would be greatly appreciated.
 
Thanks and regards,
John
#38
Brick
Super Member
  • Total Posts : 1684
  • Reward points : 0
  • Joined: 2006/05/25 09:10:40
  • Status: offline
Re: RE: PIC16F88 problem 2010/07/26 17:06:04 (permalink)
0
Just a thought do you have code protection on? I have seen simular issues when it is on...
#39
jwauton
New Member
  • Total Posts : 6
  • Reward points : 0
  • Joined: 2010/07/16 09:26:55
  • Location: 0
  • Status: offline
RE: PIC16F88 problem 2010/07/26 21:13:55 (permalink)
0
No code protect.
 
#fuses HS,WDT,NOPROTECT,NOLVP,NOBROWNOUT,IESO,NOFCMEN,NODEBUG,MCLR
 
Tried all 16 boards again yesterday after posting.
 
If I just try and program, the progress bar at the bottom goes one full sweep (program I presume) and starts the second one and gives the verify error.
 
I also tried erasing first, which it says OK, but if I read (also OK) it shows all zeroes. If I then try and program again, the progress bar does two full sweeps then aborts at the start of the third one.
 
John
#40
Page: < 123 > Showing page 2 of 3
Jump to:
© 2017 APG vNext Commercial Version 4.5