Move the strings off to an external EEPROM or serial FLASH. Explain to the customer that the PICs really aren't designed to be reprogrammed regularly and that to prevent undetected device failure when the code memory fails, you need to store the data in a separate device where failure detection methods can be employed and easy replacement is possible. They should pay the (fairly small, I guess) cost of changing the device(s). Heck, use an Dallas Semi I button memory and just swap them around to change the set of available strings. --- James Newton mailto:jamesnewton@geocities.com 1-619-652-0593 http://techref.massmind.org NEW! FINALLY A REAL NAME! Members can add private/public comments/pages ($0 TANSTAAFL web hosting) -----Original Message----- From: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of andy howard Sent: Wednesday, March 01, 2000 13:30 To: PICLIST@MITVMA.MIT.EDU Subject: Code Protection etc. I have a product using a 16F84 that outputs a 5 character RS232 string using retlw tables, the exact string depending on user input via one of several switches. Now one of my clients needs to be able to change the string from time to time. I have reservations about giving them the source, since they have a PicStart on the premises and might suddenly find no need to buy any more of these units from me. OTOH I have a very good relationship with these people and do a lot of other (non-pic) consulting work for them and would like to keep it that way, equally I'd also like to keep the code under wraps. Is there any way I could code protect all of this and still allow them to change the contents of the retlw tables if need be? Or if not, does anyone have any advice on how to gently break to the client that they can't have the code. My two fallback positions are: 1). ...to offer to provide re-programmed PICs on an exchange basis at cost + small handling/programming charge if they need to change it (they won't need to change very often). Or, if all else fails, 2). ...to give them the source, because it isn't worth falling out with them over, and it certainly isn't worth the cost of lawyers to draw up intellectual property contracts etc. Which leads me to a second question. Is it possible to erase a code-protected Flash part? And if so would it still be reliable after re-programming? In a few months time I will be upgrading quite a number of protected 16F877s and it goes against the grain to simply bin them all. Cheers Andy. .