English
Language : 

PIC16LF720_11 Datasheet, PDF (166/244 Pages) Microchip Technology – 20-Pin Flash Microcontrollers with nanoWatt XLP Technology
PIC16(L)F720/721
18.6 Protection Against Spurious Write
There are conditions when the device should not write
to the program memory. To protect against spurious
writes, various mechanisms have been built in. On
power-up, WREN is cleared. Also, the Power-up Timer
(64 ms duration) prevents program memory writes.
The write initiates sequence and the WREN bit helps
prevent an accidental write during brown-out, power
glitch or software malfunction.
18.7 Operation During Code-Protect
When the device is code-protected, the CPU is able to
read and write unscrambled data to the program
memory.
18.8 Operation During Write-Protect
When the program memory is write-protected, the CPU
can read and execute from the program memory.
The portions of program memory that are
write-protected can be modified by the CPU using the
PMCON registers, but the protected program memory
cannot be modified using ICSP mode.
REGISTER 18-1: PMCON1: PROGRAM MEMORY CONTROL 1 REGISTER
U-1
—
bit 7
R/W-0/0
R/W-0/0 R/W/HC-0/0
U-0
CFGS
LWLO
FREE
—
R/W-0/0
WREN
R/S/HC-0/0
WR
R/S/HC-0/0
RD
bit 0
Legend:
R = Readable bit
-n = Value at POR
W = Writable bit
‘1’ = Bit is set
S = Setable bit, cleared in hardware
U = Unimplemented bit, read as ‘0’
‘0’ = Bit is cleared
x = Bit is unknown
bit 7
Unimplemented: Read as ‘1’
bit 6
CFGS: Flash Program/Data EEPROM or Configuration Select bit
1 = Accesses Configuration, user ID and device ID registers
0 = Accesses Flash program
bit 5
LWLO: Load Write Latches Only bit
1 = The next WR command does not initiate a write to the PFM; only the program memory
latches are updated.
0 = The next WR command writes a value from EEDATH:EEDATL into program memory latches
and initiates a write to the PFM of all the data stored in the program memory latches.
bit 4
FREE: Program Flash Erase Enable bit
1 = Perform an program Flash erase operation on the next WR command (cleared by hardware
after completion of erase).
0 = Perform a program Flash write operation on the next WR command.
bit 3
Unimplemented: Read as ‘0’
bit 2
WREN: Program/Erase Enable bit
1 = Allows program/erase cycles.
0 = Inhibits programming/erasing of Program Flash and Data EEPROM.
bit 1
WR: Write Control bit
1 = Initiates a program Flash program/erase operation.
The operation is self-timed and the bit is cleared by hardware once operation is complete.
The WR bit can only be set (not cleared) in software.
0 = Program/erase operation to the Flash is complete and inactive.
bit 0
RD: Read Control bit
1 = Initiates an program memory read (The RD is cleared in hardware; the RD bit can only be set
(not cleared) in software).
0 = Does not initiate a program memory read
DS41430B-page 166
Preliminary
 2011 Microchip Technology Inc.