EPROM Memory Programming Specification
3.0
CODE PROTECTION
The program code written into the EPROM can be pro-
tected by writing to the CP0 & CP1 bits of the configu-
ration word.
For PIC12C67X and PIC12CE67X devices, once code
protection is enabled, all protected segments read '0's
(or “garbage values”) and are prevented from further
programming. All unprotected segments, including ID
and configuration word locations , and calibration word
location read normally and can be programmed.
3.1
Embedding Configuration Word and ID Information in the Hex File
To allow portability of code, the programmer is required to read the configuration word and ID locations from the hex
file when loading the hex file. If configuration word information was not present in the hex file then a simple warning
message may be issued. Similarly, while saving a hex file, configuration word and ID information must be included.
An option to not include this information may be provided.
Microchip Technology Inc. feels strongly that this feature is important for the benefit of the end customer.
TABLE 3-1:
CONFIGURATION WORD
PIC12C671, PIC12CE673
To code protect:
• Protect all memory
• Protect 0200h-07FFh
• No code protection
00 0000 X00X XXXX
01 0101 X01X XXXX
11 1111 X11X XXXX
R/W in Protected Mode
Read Unscrambled, Write Enabled
Read Unscrambled, Write Enabled
Read All 0’s, Write Disabled
Read Unscrambled, Write Enabled
Read Unscrambled, Write Enabled
R/W in Unprotected Mode
Read Unscrambled, Write Enabled
Read Unscrambled, Write Enabled
Read Unscrambled, Write Enabled
Read Unscrambled, Write Enabled
Read Unscrambled, Write Enabled
Program Memory Segment
Configuration Word (0x2007)
Unprotected memory segment
Protected memory segment
ID Locations (0x2000 : 0x2003)
INTRC Calibration Word (0X3FF)
PIC12C672, PIC12CE674
To code protect:
• Protect all memory
• Protect 0200h-07FFh
• Protect 0400h-07FFh
• No code protection
00
01
10
11
0000
0101
1010
1111
X00X
X01X
X10X
X11X
XXXX
XXXX
XXXX
XXXX
R/W in Unprotected Mode
Read Unscrambled, Write Enabled
Read Unscrambled, Write Enabled
Read Unscrambled, Write Enabled
Read Unscrambled, Write Enabled
Read Unscrambled, Write Enabled
Program Memory Segment
Configuration Word (0x2007)
Unprotected memory segment
Protected memory segment
ID Locations (0x2000 : 0x2003)
INTRC Calibration Word (0X7FF)
R/W in Protected Mode
Read Unscrambled, Write Enabled
Read Unscrambled, Write Enabled
Read All 0’s, Write Disabled
Read Unscrambled, Write Enabled
Read Unscrambled, Write Enabled
©
1998 Microchip Technology Inc.
DS40175A-page 9