Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Code Protect

Status
Not open for further replies.

Six-Sixteen

New Member
Hi,

I'm about to experiment the code protect option in programming PIC16F84A. Anybody willing to tell me what this means?
 
Six-Sixteen said:
Hi,

I'm about to experiment the code protect option in programming PIC16F84A. Anybody willing to tell me what this means?

It means no one, including yourself, will be able to read the chip once it's code protected. You will be able to erase it and start again though.

But, be VERY AWARE not to do this on UV eraseable PIC's, once code protected they CANNOT BE ERASED.

If you don't require code protection of your chip, I would advise not to bother doing it!.
 
I would think you would need to cut the core open, with very precise cutting tools, find the CP fuse and rebuild it manually.

Why bother, just write your own code...you lazy knob (jk)
 
falleafd said:
Hey, I've heard that some chinese programmer can crack the code protected. I'm doubt on it, but what do you think if someone can crack the code?

It depends how much money you want to throw at it, anything can be cracked if you spend enough time and money. As far as I know code-protect on PIC's is pretty secure, only physical methods of attack are used, cutting the chip open, or dissolving the encapsulation, then examining the insides with a microscope and physically altering it.

As you can imagine, the costs of this are extremely high, and it's likely you would need a number of chips to work on (as the chances of destroying them are high).

May you explain us the principals of making code protect?

Again, as far as I know, it simply prevents the reading of the code by the usual means - it's probably much easier to write similar code yourself, rather than extract the existing protected code.

Generally most commercial pre-programmed PIC's would be code protected - a good example would be the PICAxe series, I've never used one, but I presume they are code protected?. I've never heard of anyone having the code to duplicate them - although their extremely low cost would make it pretty pointless anyway.
 
... and code protection affects only for Flash memory, if I am not totally mistaken. PIC's EEPROM memory is not protected.

- just a thought.
 
Hello Nigel,

It's been a long time since my last post. I asked this question because, with your help( also with other guys), I'm now beginning to accept orders from my friends about projects using PICs.

Some say its better to code protect my programs to prevent others from duplicating it.

Anyway, if I get it right, it's ok for PIC16F84A to be code protected, and it can still be reprogrammed.

Thank you....
 
Six-Sixteen said:
Hello Nigel,

It's been a long time since my last post. I asked this question because, with your help( also with other guys), I'm now beginning to accept orders from my friends about projects using PICs.

Some say its better to code protect my programs to prevent others from duplicating it.

It depends what it is, and what you want from it - if it's a design you are selling, and wish to protect, by all means protect it. My point of view is that if you're not selling it, why not release the code to others - never mind code protecting your PIC's, release the source code as well. I've taken a lot off the Internet over many years, I consider it only fair to give back to the community as well.

Anyway, if I get it right, it's ok for PIC16F84A to be code protected, and it can still be reprogrammed.

Yes, the 16F84A should be fine.
 
Ok, what if you are going to sell the product, and want to protect it. But latter you might want to upgrade the program.
Can you password protect??? :)


Kent
 
kentken said:
Ok, what if you are going to sell the product, and want to protect it. But latter you might want to upgrade the program.
Can you password protect??? :)

No, but why on earth would you want to? - if you've written it you've got the source code already, why would you want to read the hex file back out from a chip?.

Obviously, if the chip could be password protected, it would make it much less secure - passwords can be broken!.
 
Yeah, I think we should share the code, except it's a commercial project. However, as you say, nigel, they can hack the chip, thus, they can copy all the source code (hex file) or they only know what it does inside the chip and they have to reprogram?

If measuring voltages inside, I think they have to reprogram as identically as what they see inside. But I was told that they can copy the code. So can they do that?

May we crack the protection of the chip, even open the chip, but we only crack the protection, not doing as you say that measure all the voltages.
 
so,
can the chip be protected so others cant read it and be able to reprogram with updated code latter.

I've built a device for farmers, and don't want someone to be able to read the chip and make there own.

I share code, but when I sell a product......

thanks
 
kentken said:
so,
can the chip be protected so others cant read it and be able to reprogram with updated code latter.

Yes, on the FLASH/EEPROM chips.

I've built a device for farmers, and don't want someone to be able to read the chip and make there own.

I share code, but when I sell a product......

That's what it's for!.
 
So, like on a 16F872 I will be able to lock the code, then latter rewrite the whole program?

The data sheets make it sound like when it is protected you wont be able to reprogram.

thanks
 
kentken said:
So, like on a 16F872 I will be able to lock the code, then latter rewrite the whole program?

The data sheets make it sound like when it is protected you wont be able to reprogram.

Try reading the programming specification datasheets, they tell you how to clear the code protection so you can reprogram them - this is done as part of the programming process.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top