English
Language : 

PIC16LF18854 Datasheet, PDF (169/668 Pages) Microchip Technology – C Compiler Optimized RISC Architecture
PIC16(L)F18856/76
10.2 Data EEPROM Memory
Data EEPROM Memory consists of 256 bytes of user
data memory. The EEPROM provides storage
locations for 8-bit user defined data.
EEPROM can be read and/or written through:
• FSR/INDF indirect access (Section 10.3 “FSR
and INDF Access”)
• NVMREG access (Section 10.4 “NVMREG
Access”)
• In-Circuit Serial Programming (ICSP)
Unlike PFM, which must be written to by row, EEPROM
can be written to word by word.
10.3 FSR and INDF Access
The FSR and INDF registers allow indirect access to
the PFM or EEPROM.
10.3.1 FSR READ
With the intended address loaded into an FSR register
a MOVIW instruction or read of INDF will read data from
the PFM or EEPROM.
Reading from NVM requires one instruction cycle. The
CPU operation is suspended during the read, and
resumes immediately after. Read operations return a
single word of memory.
10.3.2 FSR WRITE
Writing/erasing the NVM through the FSR registers (ex.
MOVWI instruction) is not supported in the
PIC16(L)F18856/76 devices.
10.4 NVMREG Access
The NVMREG interface allows read/write access to all
the locations accessible by FSRs, and also read/write
access to the User ID locations, and read-only access
to the device identification, revision, and Configuration
data.
Reading, writing, or erasing of NVM via the NVMREG
interface is prevented when the device is code-
protected.
10.4.1 NVMREG READ OPERATION
To read a NVM location using the NVMREG interface,
the user must:
1. Clear the NVMREGS bit of the NVMCON1
register if the user intends to access PFM
locations, or set NMVREGS if the user intends
to access User ID, Configuration, or EEPROM
locations.
2. Write the desired address into the
NVMADRH:NVMADRL register pair (Table 10-
2).
3. Set the RD bit of the NVMCON1 register to
initiate the read.
Once the read control bit is set, the CPU operation is
suspended during the read, and resumes immediately
after. The data is available in the very next cycle, in the
NVMDATH:NVMDATL register pair; therefore, it can be
read as two bytes in the following instructions.
NVMDATH:NVMDATL register pair will hold this value
until another read or until it is written to by the user.
 2016 Microchip Technology Inc.
Preliminary
DS40001824A-page 169