English
Language : 

PIC24F16KL402 Datasheet, PDF (49/260 Pages) Microchip Technology – Low-Power, Low-Cost, General Purpose 16-Bit Flash Microcontrollers with nanoWatt XLP Technology
PIC24F16KL402 FAMILY
REGISTER 5-1: NVMCON: FLASH MEMORY CONTROL REGISTER
R/SO-0, HC R/W-0
R/W-0
R/W-0
U-0
U-0
U-0
WR
WREN
WRERR PGMONLY(4)
—
—
—
bit 15
U-0
—
bit 8
U-0
—
bit 7
R/W-0
ERASE
R/W-0
R/W-0
NVMOP5(1) NVMOP4(1)
R/W-0
R/W-0
R/W-0
NVMOP3(1) NVMOP2(1) NVMOP1(1)
R/W-0
NVMOP0(1)
bit 0
Legend:
-n = Value at POR
‘0’ = Bit is cleared
SO = Settable Only bit
‘1’ = Bit is set
x = Bit is unknown
HC = Hardware Clearable bit
R = Readable bit
W = Writable bit
U = Unimplemented bit, read as ‘0’
bit 15
bit 14
bit 13
bit 12
bit 11-7
bit 6
bit 5-0
WR: Write Control bit
1 = Initiates a Flash memory program or erase operation. The operation is self-timed and the bit is
cleared by hardware once the operation is complete.
0 = Program or erase operation is complete and inactive
WREN: Write Enable bit
1 = Enable Flash program/erase operations
0 = Inhibit Flash program/erase operations
WRERR: Write Sequence Error Flag bit
1 = An improper program or erase sequence attempt, or termination, has occurred (bit is set automatically
on any set attempt of the WR bit)
0 = The program or erase operation completed normally
PGMONLY: Program Only Enable bit(4)
Unimplemented: Read as ‘0’
ERASE: Erase/Program Enable bit
1 = Perform the erase operation specified by NVMOP<5:0> on the next WR command
0 = Perform the program operation specified by NVMOP<5:0> on the next WR command
NVMOP<5:0>: Programming Operation Command Byte bits(1)
Erase operations (when ERASE bit is ‘1’):
1010xx = Erase entire boot block (including code-protected boot block)(2)
1001xx = Erase entire memory (including boot block, configuration block, general block)(2)
011010 = Erase 4 rows of Flash memory(3)
011001 = Erase 2 rows of Flash memory(3)
011000 = Erase 1 row of Flash memory(3)
0101xx = Erase entire configuration block (except code protection bits)
0100xx = Erase entire data EEPROM(4)
0011xx = Erase entire general memory block programming operations
0001xx = Write 1 row of Flash memory (when ERASE bit is ‘0’)(3)
Note 1:
2:
3:
4:
All other combinations of the NVMOP<5:0> bits are no operation.
Available in ICSP™ mode only. Refer to the device programming specification.
The address in the Table Pointer decides which rows will be erased.
This bit is used only while accessing data EEPROM. It is implemented only in devices with data EEPROM.
 2011 Microchip Technology Inc.
DS31037B-page 49