How do you know the flash is getting corrupted? Does the chip not verify? Do you have LVP enabled? If so, could the chip be drifting into programming mode? Or somehow drifting into programming mode with high voltage programming? I would also be immediately suspicious of the bootloader. Try putting the program on the chip without the bootloader, and see if you still have the corruption problem. Mike H. >I posted this question a while back but with an incorrect tag, >so some people might not have seen it. > >I am infrequently seeing corruption of the Flash memory on an >16F877A device. I first suspected my "bootloader" routine (which >actually doesn't program on boot-up), but I can't find a reason >why it would jump into the programming routine at just the right >point to corrupt the memory, bypassing the normal checks on >the data to be programmed (comparing length and checksum). I'm >running at 5V +/-2% with brown-out detect enabled and triggering >at very close to the nominal 4.0 V. Any ideas what, besides a >code bug, could be corrupting the program memory? > >-- >http://www.piclist.com#nomail Going offline? Don't AutoReply us! >email listserv@mitvma.mit.edu with SET PICList DIGEST in the body _________________________________________________________________ Is your PC infected? Get a FREE online computer virus scan from McAfee. Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body