PIC code protection

Discussion in 'Programmer's Corner' started by R!f@@, Sep 6, 2016.

  1. R!f@@

    Thread Starter AAC Fanatic!

    Apr 2, 2009
    8,753
    760
    I was told that I cannot copy a code protected PIC.
    Question:
    1. If I program a PIC with code protection enabled, the code is protected from copying by a second party ? right ?
    2. If I program a PIC with code protection enabled, will I be able to erase it and program it again after modifying the code ?
     
  2. joeyd999

    AAC Fanatic!

    Jun 6, 2011
    2,677
    2,730
    You can.

    Yes.

    Yes.

    One thing you cannot do is in-circuit debug with the code protect bits set. I usually add a directive to automatically un-set the protection bits if I am building in debug mode. This way, I don't have to remember to set them when I build for release.
     
    R!f@@ likes this.
  3. R!f@@

    Thread Starter AAC Fanatic!

    Apr 2, 2009
    8,753
    760
    o_O
    I CAN copy a code protected PIC.
    As in read the HEX file and write to a fresh PIC.
     
  4. joeyd999

    AAC Fanatic!

    Jun 6, 2011
    2,677
    2,730
    Sorry. I meant you can code-protect a PIC so it cannot be copied.
     
    R!f@@ likes this.
  5. R!f@@

    Thread Starter AAC Fanatic!

    Apr 2, 2009
    8,753
    760
    Aah !
    Thanks again.
     
Loading...