Tony, the FAE for microchip told me that internal flash reads can occur perfectly well on code protected memory, that the point of the code protected memory was not to defeat hackers or code copyers, but rather to protect you from overwriting your own code. Are you sure that the code protected flash can't be read with internal flash reading code??? -----Original Message----- From: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Tony Nixon Sent: Wednesday, July 18, 2001 1:16 AM To: PICLIST@MITVMA.MIT.EDU Subject: Re: [PIC]: about the flash memory on the 16F877 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. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.