Hi, I'm writing project and would like to provide a sample hex for someone to test. Could someone provide some code on how to reinitialise the pic every 2 hours? I don't want the user to sell my hex/pic as their own.
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
1) Buy the chip yourself and flash it for them with your hex and set the code protect bit on. First level of defense for your code.
2) Write a timer that runs two hours long and if your PIC has flash mem/read/write ability, just clear out all the flash memory in two hours and poof. Dead chip, you will have to reload the hex again.
3) Using the 2 hours timer thing, after 2 hours set all outputs to hi, or lo
or just goto an infinite loop in your code. Poof dead chip.
I see many ways to do this and I am sure others got ideas. Try a few and test them out to see. Just set your timer for a minute so you do not have to wait 2 hours. lol
Mz
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
btw:
3) won't work unless you have some way like (eeprom) to store the jump address or loop name to goto.
So you would need an eeprom value loaded up and then go look at that value to do your jump to or loop. Since eeprom will retain the value after a restart.
Sorry bout that.
Mz
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, I'm writing project and would like to provide a sample hex for someone to test. Could someone provide some code on how to reinitialise the pic every 2 hours? I don't want the user to sell my hex/pic as their own.
Thanks
1) Buy the chip yourself and flash it for them with your hex and set the code protect bit on. First level of defense for your code.
2) Write a timer that runs two hours long and if your PIC has flash mem/read/write ability, just clear out all the flash memory in two hours and poof. Dead chip, you will have to reload the hex again.
3) Using the 2 hours timer thing, after 2 hours set all outputs to hi, or lo
or just goto an infinite loop in your code. Poof dead chip.
I see many ways to do this and I am sure others got ideas. Try a few and test them out to see. Just set your timer for a minute so you do not have to wait 2 hours. lol
Mz
btw:
3) won't work unless you have some way like (eeprom) to store the jump address or loop name to goto.
So you would need an eeprom value loaded up and then go look at that value to do your jump to or loop. Since eeprom will retain the value after a restart.
Sorry bout that.
Mz