Hi All, I'm afraid that this means that it would be simple to get the code - you have it in "clear text" going from the 12c508 to the F877.. In a well known and understood format. (ICSP) You also have the general problem that you can't supervise the equipment or the update code that you send out! Look at Pay/Cable TV Smartcards, these are cracked all the time, yet are supposed to be "secure". This means that a sufficiently determined person could "crack it". Unless you have lots of free space and RAM on the PIC I doubt that you can implement a good cipher anyway. I could be wrong here - I haven't tried to implement any good ciphers on a PIC. A GOOD cryptography reference is "Applied Cryptography" by Schneier. I have the 2nd Ed, but I think there is a 3rd. It all comes down to "acceptable risk". Making it hard for the casual cracker to copy it but probably not impeding a determined and well resourced person for too long. Basically you have to make it harder to copy it then to just design it from scratch. One Possibility: Store your "program" in an external EEPROM. The program would be some kind of encrypted interrupter. A little like BASIC on a BASIC stamp. The thing is that you will need to write the interrupter to run internal "routines" so you get enough speed. You will also have to ensure that you have all the routines that you will ever need and some lower level commands to help make any new ones if you forget one. Not to mention the tools to generate this code.. I don't know if this will be applicable to your application or not. Just wild idea.. Cheers, Ash. > How about adding a 80 cent 12C508 to your board, > which programs your 16F877 with data from an external > port (which you must already have). The user could > download new firmware from you via the net, plug their > PC into the product, the 12c508 de-crypts the firmware > and programs the 16F877 in standard ICSP mode. > Full security, solution fixed. This gives you the same > functionality you are asking for now, at the expense > of adding a tiny cheap PIC. > > Now before you say that the boards can't be modded > to add the 12c508, you could put the 12c508 plus > a few parts in a tiny potting box, as part of the > programming lead that goes from the product to the > the PC. Neat and cheap. -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads