#Fuse directive for partial code protection on PIC18F8620
Posted: Wed Aug 03, 2005 9:03 am
I would like to apply code protection (both read and write) to Block 3 (0xC000 to 0xFFFF) only on my PIC18F8620 from the CCS compiler. The available Fuse options don't seem to allow this. I could edit the values of the PROTECT & WRT options, but would prefer a more straightforward, clearly documented method since I am afraid I'll forget to change it back on the next project. I could edit the Hex file, or edit the fuse bits after loading the file into the programmer, but this seems prone to error and oversight, especially when the project goes to production.
Can I create a new Fuse option? I tried to add one via the device editor without success.
Joined: 17 Nov 2005 Posts: 30 Location: Chester UK
#FUSES - partial setting of WRT
Posted: Thu Nov 17, 2005 8:05 am
Hi Larry
I have a similar issue. I have an I2C bootloader on a PIC16F819 and I only want to protect the first 0x200 bytes - Impossible to do when your only options are either
Code:
#fuses WRT
or
Code:
#fuses NOWRT
I have just emailed CCS and am currently awaiting a reply.
In the meantime I am using the #rom directive to write a word directly to the config register.
In my case
Code:
#rom 0x2007 = {0b000xxxxxxxxxxxxx}
I guess you could #define each of the individual config bits to make it more readable
Hope this helps
Ben
bennyboos
Joined: 17 Nov 2005 Posts: 30 Location: Chester UK
Posted: Thu Nov 17, 2005 8:26 am
OK - had a reply back from CCS
It seems that one can simply assign a constant to WRT as required
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum