Quote Originally Posted by Jumper View Post
Hi,

Did you try to read out the program memory from the faulty pic? How do you know you really had a problem? Do you have brown out turned on or off?

Sometimes if BOR is off and the pic gets crazy pulling the plug on it might not be enought to reset it properly if BOR is turned off. The pic will continue runing on the charge in caps and power adapters. Pulling MCLR to GND will help :-)

Also make sure low voltage programming is turned off or if you use that function make sure that pin is controlled properly ( if 877A has that feature)

AND make sure you program is set up properly for the 877A. You can not run the same program on a 877 as an 877A without getting problems :-)

One time is a freak accident.... 2 times is a bad habit
'16F877A specifics and Defines
@ DEVICE pic16F877A, HS_OSC ' System Clock Options
@ DEVICE pic16F877A, WDT_ON ' Watchdog Timer
@ DEVICE pic16F877A, PWRT_ON ' Power-On Timer
@ DEVICE pic16F877A, BOD_ON ' Brown-Out Detect
@ DEVICE pic16F877A, LVP_ON ' Low-Voltage Programming
@ DEVICE pic16F877A, CPD_OFF ' Data Memory Code Protect

That board has a reset on it and the first thing I did was a simple reset and that did nothing. I unplugged it and left it unplugged for a minute or two then plugged it back in and still got nothing. I hplugged the RS232 in because I did have my program outputting some stats and I got nothing. So after trying reset a few more times and unplugging it a couple of times thats when I decided to load the program back on it. I did try and do a download but I have to be honest I had no idea if it downloaded the same program or not. Winpic indicated it was donwloading something and there was garbage in the HEX window but I've no way of knowing if it was garbage or was the original program I loaded, I did not save it. I uploaded my program again and it just went back to working like before.

I am making sure I have the correct codes for the 877a I've never hd a problem before and the programmer I have won't program this unless LVP is on. I am wondering now what "Data Memory Code Protect" is perhaps that should be on. This is the first time I have every had a problem like this with these pic's.
Thanks
David