How does one set the program memory page lock byte when downloading the program to the part? I would think that this could be accomplished from the linker/locater but can find no reference to it in the manual. Has anyone done this? Comments welcomed
Is that the exercise bike or the camcorder?
OK wiseguy 8051f330
"OK wiseguy 8051f330" Well, I googled for "8051f330" and got 5 hits, none of which were an IC manufacturer's website. You need to try a little harder to help people help you!
he forgot the C C8051f330 But, then, why would someone asking for help make it easy for those willing to help him. Thst would not be 'cool'. Erik
This forum is clearly populated by children and should not be visited by working professionals.
This forum is clearly populated by children and should not be visited by working professionals of which you can not possibly (incomplete data) be one. Erik
"This forum is clearly populated by children and should not be visited by working professionals." Mike, If you're going to ask questions on a professional forum like this one you need to learn to provide the information that people need in order to help you. The full and correct part number for the device you have a specific query about is pretty fundamental information. If you can't manage that after two attempts then we're unlikely to take you particularly seriously!
Mike, I've always programmed these types of security bytes in our device programmer, but I guess with a flash device that's a bit irrelevant. I took a quick look at the datasheet and see that the byte that specifies which pages are locked is located in the "last byte of user flash." While I'm not going to bother to find out where that is on this particular chip, it's easy from that point of view to get the compiler / linker to help you out. Make a file (call it, say, LOCKBYTE.C) and put something like: const unsigned char code lockval = 0xXX; where 0xXX represents the right code for the sections you want to lock. Next, use a linker diretive to tell the linker to put this at the last byte of user flash, like so: ?CO?LOCKBYTE(0xXXXX) again, of course, substitute 0xXXXX for whatever is the last byte of user flash. Hope that helps.