Searching \ for 'This is a wierd one... 16f877 problems!' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=16F
Search entire site for: 'This is a wierd one... 16f877 problems!'.

Truncated match.
PICList Thread
'This is a wierd one... 16f877 problems!'
2000\01\22@182108 by Lou

flavicon
face
Help!

 Whenever I program a 16f877 (40 pin dip) with the following code, the chip
NEVER can be re-programmed again. (well, at least with my picstart plus
anyway). Can anyone help shed some light on what might be happening?  I was
__trying to put some initial values in the chips EEprom, while programming
in MPlab, using hi-tec's C compiler. Now I have 3 dead $10 chips -- all with
working  (but not quite finished) code, that I cant re-program over. What
have I done?

#asm
psect absdata,abs,ovrld,delta=2
org 0x2100
dw 00,02,03,04
#endasm

I have the following config fuses set,


__CONFIG(BKBUG|CP1|CP0|WRT|BODEN|PWRTE|WDTE|FOSC1|LVP);


Any ideas?

  thanks!

 spam_OUTlfaustiniTakeThisOuTspamatlantech.net

2000\01\22@183126 by Andrew T Kelley

picon face
Perhaps you might try to erase the chips first.

I think that CP0 and CP1 are code protect bits, but I'm not sure.

Hope this helps,
Andrew

On Sat, 22 Jan 2000 18:21:21 -0500 Lou <.....lfaustiniKILLspamspam@spam@ATLANTECH.NET> writes:
{Quote hidden}

________________________________________________________________
YOU'RE PAYING TOO MUCH FOR THE INTERNET!
Juno now offers FREE Internet Access!
Try it today - there's no risk!  For your FREE software, visit:
dl.http://www.juno.com/get/tagj.

2000\01\22@232821 by Lou

flavicon
face
  There is no option for erasing the chip. This really sucks, I now have 5
parts written like they are ROM parts. I just don't understand. Can anyone
out there tell me what the programming pin voltage is (pin 1) when you are
programming the 16f877. Maybe mine has gone nutso, and is "over
programming" -- is that even possible?


 --Lou
{Original Message removed}

2000\01\22@235516 by Jim Robertson

flavicon
face
At 06:21 PM 1/22/00 -0500, you wrote:


Ok, here is the solution you have been waiting for.

Set code protection to "ALL" and program just the config bits by using the
PICSTART PLUS menu -> program/verify. Uncheck the program, ID and Data EEPROM
options. and click program.

Now select code protection to "OFF" AND make sure the Data EE protect option
is ALSO "OFF."  Now reprogram the config bits just as you did above. You will
now be able to rewrite to the DATA EEPROM and your $10 chips are saved.

Your config bit options need to set the CPD bit and this will prevent the
problem occuring again.

__CONFIG(BKBUG|CP1|CP0|WRT|BODEN|PWRTE|WDTE|FOSC1|CPD)

(Delete the LVP mode if you are using the picstart plus)

This is just a guess at the syntax used. I am not farmiliar with the hi-tech
compiler __Config directive. It seems to use OR and not AND like MPASM. If
this
is the case then it sucks bad!

Jim


{Quote hidden}

Regards,

Jim Robertson
NEWFOUND ELECTRONICS
________________________________________
Email: EraseMEnewfoundspam_OUTspamTakeThisOuTpipeline.com.au
http://www.new-elect.com
MPLAB compatible PIC programmers.
________________________________________

2000\01\23@003015 by Lou

flavicon
face
 thank you!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
thank you thank you thank you!!!

 I have been driving my self nuts for about 9 hours now, trying every last
damn thing I could think of, switching computers, programmers, cables all
that crap. I was about to look in to the programming ICD from microchip, to
see if I had missed anything about the config bits being OTP or something..
How did you ever figure that one out?  I would never have gotten that one on
my own..

 again, thanks!

  ---Lou
{Original Message removed}

2000\01\24@062921 by Jim Robertson

flavicon
face
At 12:29 AM 1/23/00 -0500, you wrote:
>  thank you!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
>thank you thank you thank you!!!
>
>  I have been driving my self nuts for about 9 hours now, trying every last
>damn thing I could think of, switching computers, programmers, cables all
>that crap. I was about to look in to the programming ICD from microchip, to
>see if I had missed anything about the config bits being OTP or something..
>How did you ever figure that one out?  I would never have gotten that one on
>my own..
>
>  again, thanks!

Ok,  take it the solution works. What is happening is this. You are code
protecting the data eeprom and therefore MPLAB will not be able to program
new data into the data eeprom. To disable the data protection you need to
MPLAB to issue the special break code protection command. This will break
the program AND data protection. However MPLAB  will only do this when it
sees
the program memory protection is enabled and not just when the data
protection
is enabled. The sequence I gave you turns on the program memory code
protection
and then MPLAB is forced to break the code protection before it can program
the config bits second time around.

How did I figure it out? Well I have been doing pic programmers since 1991 and
you learn all the tricks along the way. I have a picstart plus driver that
is way better than MPLAB plus I have programmers that are compatible with
MPLAB. This sort of means that I have to be up to scratch with all the
picstart/MPLAB details.

My only beef is that I should not have to be the one to help you out with
this. There seems to be some serious lack of support and/or documentation
associated with this trap you have fallen into.

Also, I cannot agree that a design that assumes unspecified bits should
be programmed as '0' (as the hi-tech C compiler seems to do) is a good
design. This has contributed to your woes.


Regards,

Jim



>   ---Lou
>{Original Message removed}

More... (looser matching)
- Last day of these posts
- In 2000 , 2001 only
- Today
- New search...