0
\$\begingroup\$

When I write protect a PIC using the config bits, does it prevent all future programming or can I still reprogram the part if I erase it first? I assume this behavior should be standard across all their products, but if it matters I'm using a PIC18 series micro. The datasheet only tells me what I can set, not the actual effect of setting the config bits.

Sample Config Register

Can anyone refer me to a datasheet/errata that speaks to the effect of setting the config bit?

\$\endgroup\$
2
\$\begingroup\$

This is clearly answered in the datasheet. The protection bits can be cleared, but only by a bulk erase. So yes, you can reprogram the part, but you can never read out code-protected data. It may be possible to read write-protected data (that is not code-protected), but in either case all the protection bits are cleared by a bulk erase. After a bulk erase, the chip is back to factory-fresh state.

\$\endgroup\$
  • 1
    \$\begingroup\$ I don't know if you're completely right about your last statement. I think write protected data can be read but read protected data cannot be read. \$\endgroup\$ – Joel B Nov 7 '12 at 21:11
  • \$\begingroup\$ @Joel: Bad wording on my part. Hopefully it is more clear now. \$\endgroup\$ – Olin Lathrop Nov 7 '12 at 21:57
  • \$\begingroup\$ What you describe is what I think should happen, but I don't see it anywhere in a datasheet. I updated my question showing the sparse information in the datasheet. I can't find it referenced anywhere else. Can you update your answer with any datasheet/errata excerpt backing up your claims? \$\endgroup\$ – Joel B Nov 7 '12 at 23:23
  • 1
    \$\begingroup\$ @Joel: OK, then it's in the programming spec. I know I've read this many times, so it has to be in one of those. \$\endgroup\$ – Olin Lathrop Nov 7 '12 at 23:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.