Ron Anthony wrote: > > Hello All. I am currently struggling with how to deal with the ridiculously > bad code protect on the 16F877. I am hoping to learn a few things from > those who are actively working with the flash memory. > > Here is the primary question: > > If I code protect the upper half of the chip, that is, 50% of the flash > memory, will someone be able to use an ICSP to put in code on the open lower > half that can internally read the code protected space and dump the contents > out of a port? Because if they can, there is no sense code protecting that > half of the chip. If I code protect the 256 bytes, can they not read those > as well? From what I understand, internal flash reads work on code > protected memory. So it is very easy to set up a memory dump of the code > protected space. Is this correct? You can't read or write code protected ROM from within the chip, or from a programmer or from ICSP. Ages ago there was some threads about having a special config bit that would allow the chip to rewrite itself underneath the code protection. ie. the ROM can't be accessed from outside the chip but it can be rewritten internally. That way a bootloader could use encrypted code to update itself. Not a reality though and I guess, unless you are confident that the protected code will not need replacing, then using a bootloader for upgrades is no option. -- Best regards Tony mICros http://www.bubblesoftonline.com mailto:sales@bubblesoftonline.com -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.