Some enhanced mid-range PIC® devices (PIC16F1XXX device family) lack the data EEPROM found on other devices. Instead, they implement an equivalent amount of special flash memory that can provide an endurance comparable to that of a traditional data EEPROM. This high-endurance flash (HEF) memory appears in the regular program memory space and can be used for any purpose, like regular flash program memory.
As with all flash memory, data must be erased before it can be written and writing this memory will stall the device. Routines to read, write and erase the HEF memory are available and they are described in the application note AN1673, Using the PIC16F1XXX High-Endurance Flash (HEF) Block. You can also use the MPLAB® Code Configurator (MCC) to generate the flash access routines for you, or use the output of this tool as the basis for your own code implementation.
Note that by default, the MPLAB XC8 C compiler will use HEF memory for regular executable code unless it is told otherwise. If you wish to store data here, you must reserve the HEF memory by using the —ROM compiler option, for example:
or by placing the above argument (everything to the right of the '=' sign) in the ROM ranges field in the XC8 Linker > Memory Model category in the Project Properties dialog, if you are using MPLAB X IDE. Adjust the reserved memory range in these options as appropriate. You may wish to use only some HEF memory for data and the remainder for code.