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\$

1 Answer 1

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\$
4
  • 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\$ Commented Nov 7, 2012 at 21:11
  • \$\begingroup\$ @Joel: Bad wording on my part. Hopefully it is more clear now. \$\endgroup\$ Commented Nov 7, 2012 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\$ Commented Nov 7, 2012 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\$ Commented Nov 7, 2012 at 23:46

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.