English
Language : 

PIC16F636-I Datasheet, PDF (96/234 Pages) Microchip Technology – 8/14-Pin, Flash-Based 8-Bit CMOS Microcontrollers with nanoWatt Technology
PIC12F635/PIC16F636/639
9.5 Protection Against Spurious Write
There are conditions when the user may not want to
write to the data EEPROM memory. To protect against
spurious EEPROM writes, various mechanisms have
been built in. On power-up, WREN is cleared. Also, the
Power-up Timer (nominal 64 ms duration) prevents
EEPROM write.
The write initiate sequence and the WREN bit together
help prevent an accidental write during:
• Brown-out
• Power Glitch
• Software Malfunction
9.6 Data EEPROM Operation During
Code Protection
Data memory can be code-protected by programming
the CPD bit in the Configuration Word (Register 12-1)
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 in program memory to
‘0’ will also help prevent data memory code protection
from becoming breached.
TABLE 9-1: SUMMARY OF REGISTERS ASSOCIATED WITH DATA EEPROM
Name
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Value on
POR, BOR
INTCON
PIR1
PIE1
EEDAT
EEADR
EECON1
EECON2
Legend:
Note 1:
GIE
EEIF
EEIE
PEIE
LVDIF
LVDIE
T0IE
CRIF
CRIE
INTE
C2IF(1)
C2IE(1)
RAIE
C1IF
C1IE
T0IF
OSFIF
OSFIE
INTF
—
—
RAIF
TMR1IF
TMR1IE
0000 000x
0000 00-0
0000 00-0
EEDAT7 EEDAT6
EEADR7(1) EEADR6
EEDAT5
EEADR5
EEDAT4
EEADR4
EEDAT3
EEADR3
EEDAT2
EEADR2
EEDAT1
EEADR1
EEDAT0
EEADR0
0000 0000
0000 0000
—
—
—
—
WRERR WREN
WR
RD
---- x000
EEPROM Control Register 2 (not a physical register)
---- ----
x = unknown, u = unchanged, – = unimplemented read as ‘0’, q = value depends upon condition.
Shaded cells are not used by the data EEPROM module.
PIC16F636/639 only.
Value on
all other
Resets
0000 000x
0000 00-0
0000 00-0
0000 0000
0000 0000
---- q000
---- ----
DS41232D-page 94
© 2007 Microchip Technology Inc.