Microchip Technology MA240017 Ficha De Dados
PIC24F16KA102 FAMILY
DS39927C-page 52
2008-2011 Microchip Technology Inc.
REGISTER 6-1:
NVMCON: NONVOLATILE MEMORY CONTROL REGISTER
R/S-0, HC
R/W-0
R/W-0
R/W-0
U-0
U-0
U-0
U-0
WR
WREN
WRERR
PGMONLY
—
—
—
—
bit 15
bit 8
U-0
R/W-0
R/W-0
R/W-0
R/W-0
R/W-0
R/W-0
R/W-0
—
ERASE
NVMOP5
NVMOP4
NVMOP3
NVMOP2
NVMOP1
NVMOP0
bit 7
bit 0
Legend:
U = Unimplemented bit, read as ‘0’
R = Readable bit
W = Writable bit
S = Settable bit
HC = Hardware Clearable bit
-n = Value at POR
‘1’ = Bit is set
‘0’ = Bit is cleared
x = Bit is unknown
bit 15
WR:
Write Control bit (program or erase)
1
= Initiates a data EEPROM erase or write cycle (can be set but not cleared in software)
0
= Write cycle is complete (cleared automatically by hardware)
bit 14
WREN:
Write Enable bit (erase or program)
1
= Enable an erase or program operation
0
= No operation allowed (device clears this bit on completion of the write/erase operation)
bit 13
WRERR:
Flash Error Flag bit
1
= A write operation is prematurely terminated (any MCLR or WDT Reset during programming
operation)
0
= The write operation completed successfully
bit 12
PGMONLY:
Program Only Enable bit
1
= Write operation is executed without erasing target address(es) first
0
= Automatic erase-before-write: write operations are preceded automatically by an erase of target
address(es)
bit 11-7
Unimplemented:
Read as ‘0’
bit 6
ERASE:
Erase Operation Select bit
1
= Perform an erase operation when WR is set
0
= Perform a write operation when WR is set
bit 5-0
NVMOP<5:0>:
Programming Operation Command Byte bits
Erase Operations (when ERASE bit is ‘1’):
011010
011010
= Erase 8 words
011001
= Erase 4 words
011000
= Erase 1 word
0100xx
= Erase entire data EEPROM
Programming Operations (when ERASE bit is ‘0’):
001xx
001xx
= Write 1 word