![](templates/subSilver/images/CCSLogo.jpg) |
![CCS C Software and Maintenance Offers](templates/subSilver/images/forumAd6.jpg) |
View previous topic :: View next topic |
Author |
Message |
bolubeyi
Joined: 27 Apr 2012 Posts: 15 Location: TURKEY
|
code protection |
Posted: Tue Sep 11, 2012 6:09 am |
|
|
Hi, I want to code protection for ccs c. No one can not read from chip. How can I do? Maybe fuses ? |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah
Joined: 11 Mar 2010 Posts: 19369
|
|
Posted: Tue Sep 11, 2012 7:38 am |
|
|
Yes, depends on the chip.
On many older chips, just 'PROTECT' in the fuses, but on a lot of newer chips there are separate options for different parts of the memory.
Things to remember. If you write the code to the chip, with PROTECT set, you can't verify the chip. The way you do this, is to write one chip, without the protect fuse, verify it is OK, and only then set the PROTECT fuse. Then read the chip back. You will get a set of garbage values. Store these.
Then write the chips, with PROTECT set, and verify the chips against the garbage values. The same code should always give the same garbage returns, if the chip has programmed correctly.
You can still read the chip, but what comes back is not code.
Then you can only turn off the PROTECT fuse, by performing a full erase on the chip, which deletes the code. If you program the read garbage into another chip, it won't work. Hence 'protected'.
The data sheet for your PIC, should tell you what protect options are available. Then just a matter of working out what the CCS fuse names are for the options you want.
Best Wishes |
|
![](templates/subSilver/images/spacer.gif) |
temtronic
Joined: 01 Jul 2010 Posts: 9174 Location: Greensville,Ontario
|
|
Posted: Tue Sep 11, 2012 7:43 am |
|
|
First, the code programmed into the PIC is not the source C code , rather the compiled 'hex' code or assembler...
You have to read the datasheet for whatever PIC you're using as some have simple code protect, others have 'banks' of protection.
Also look at the header file CCS supplies for your PIC as it will have the 'codewords' required to select the correct 'fuses' /options configuration for that PIC.
Some PICs are easy to read even when protected, though a simple,effective way to reduce or delay anyone is to just sand or grind off the PIC id data on the chip itself.that way it's just another,say 40 pin device, and it'll take a few days to figure out which PIC.Be sure to mark them with say coloured nail polish so YOU know which PIC it is !
Nowadays I'd be surprised if anyone would truly 'hack' into any product to get the code. The time spent would be more than if they actually wrote the code themselves.
hth
jay |
|
![](templates/subSilver/images/spacer.gif) |
bkamen
Joined: 07 Jan 2004 Posts: 1611 Location: Central Illinois, USA
|
|
Posted: Thu Sep 13, 2012 11:10 pm |
|
|
temtronic wrote: |
Nowadays I'd be surprised if anyone would truly 'hack' into any product to get the code. The time spent would be more than if they actually wrote the code themselves. |
Isn't that the truth.
-Ben _________________ Dazed and confused? I don't think so. Just "plain lost" will do. :D |
|
![](templates/subSilver/images/spacer.gif) |
|
|
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
|
Powered by phpBB © 2001, 2005 phpBB Group
|