PIC12F629/675
8.7
DATA EEPROM OPERATION
DURING CODE PROTECT
Data memory can be code protected by programming
the CPD bit to ‘0’.
When the data memory is code protected, the CPU is
able to read and write data to the Data EEPROM. It is
recommended to code protect the program memory
when code protecting data memory. This prevents
anyone from programming zeroes over the existing
code (which will execute as NOPs) to reach an added
routine, programmed in unused program memory,
which outputs the contents of data memory.
Programming unused locations to ‘0’ will also help
prevent data memory code protection from becoming
breached.
TABLE 8-1:
REGISTERS/BITS ASSOCIATED WITH DATA EEPROM
Valueonall
other
Value on
Address
Name
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
POR, BOD
RESETS
0Ch
9Ah
9Bh
9Ch
9Dh
PIR1
EEIF
ADIF
—
—
CMIF
—
—
TMR1IF 00-- 0--0 00-- 0--0
0000 0000 0000 0000
EEDATA
EEADR
EEPROM Data Register
—
EEPROM Address Register
-000 0000 -000 0000
EECON1
—
—
—
—
WRERR WREN
WR
RD
---- x000 ---- q000
---- ---- ---- ----
EECON2(1) EEPROM Control Register 2
Legend: x= unknown, u= unchanged, - = unimplemented read as '0', q= value depends upon condition.
Shaded cells are not used by Data EEPROM module.
Note 1: EECON2 is not a physical register.
DS41190C-page 50
2003 Microchip Technology Inc.