Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
LinkBack Thread Tools Display Modes
Old 18th March 2004, 10:41 PM   (permalink)
Default Code Protect

Hi,

I'm about to experiment the code protect option in programming PIC16F84A. Anybody willing to tell me what this means?
Six-Sixteen is offline  
Old 19th March 2004, 09:08 AM   (permalink)
Default Re: Code Protect

Quote:
Originally Posted by Six-Sixteen
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!.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 19th March 2004, 01:44 PM   (permalink)
Default

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?

May you explain us the principals of making code protect?
falleafd is offline  
Old 19th March 2004, 01:50 PM   (permalink)
Default

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)
__________________
www.winpicprog.co.uk - Great PIC language tutorials.
pike is offline  
Old 19th March 2004, 02:11 PM   (permalink)
Default

Quote:
Originally Posted by falleafd
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).

Quote:
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.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 19th March 2004, 06:07 PM   (permalink)
Default

... and code protection affects only for Flash memory, if I am not totally mistaken. PIC's EEPROM memory is not protected.

- just a thought.
PICcie is offline  
Old 19th March 2004, 07:41 PM   (permalink)
Default Code Protect

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 is offline  
Old 19th March 2004, 10:14 PM   (permalink)
Default Re: Code Protect

Quote:
Originally Posted by Six-Sixteen
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.

Quote:
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.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 20th March 2004, 08:09 AM   (permalink)
Default

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 is offline  
Old 20th March 2004, 09:19 AM   (permalink)
Default

Quote:
Originally Posted by kentken
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!.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 20th March 2004, 04:41 PM   (permalink)
Default

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.
falleafd is offline  
Old 21st March 2004, 07:54 AM   (permalink)
Default

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 is offline  
Old 21st March 2004, 10:30 AM   (permalink)
Default

Quote:
Originally Posted by kentken
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.

Quote:
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!.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 21st March 2004, 10:51 AM   (permalink)
Default

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 is offline  
Old 21st March 2004, 10:54 AM   (permalink)
Default

Quote:
Originally Posted by kentken
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.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Reply

Bookmarks

Thread Tools
Display Modes





All times are GMT. The time now is 05:38 PM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker