Gonzalo Jimenez wrote: > I'm worrking with a 16F876A, I've made a macro following datasheet > instruction to read and write EEPROM, but I guess there is something really > wrong, Perhaps, if your code isn't *tooo* long, you might post it ? Don't forget the _CONFIG settings ! > I program the PIC, the program runs acordingly, then when I try to > read the PIC to see if any change happened in EEPROM I can not do that > because it says that it's code protected... What is "it" ? And, of course, it just might be code protected ! > what I guess is that I'm > writing in FLASH enstead of EEPROM, but I suppose code found in microchip > datasheet is working good... now I doubt it :( I don't think it could be *that* wrong... > I know if a PIC is code protected I can not over write it, You can always erase a code protected PIC, and the programmer *has* to erase the PIC to be able to re-program anyway. > but I also know > that there is a way to erase it compleatly (all data including fuses) but > my programmer can not do that, It *must* be able to do that. If not, it could only program each chip once. > is there a simply way to acomplish this? I > mean, to erase a chip? Most programming software has a special function to do this. > Well, thanks in advance, I hope you can give me some advices... It's hard, you don't tell us what programmer you use, what software you use, what your code look like and so on. A little more info and I'm sure this will be resolved quite fast :-) Jan-Erik. -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body