Many of the different PICmicro processors contain an area of EEPROM memory. EEPROM stands for Electrically Erasable Programmable Read Only Memory, which translates to "memory which holds its value when the power is turned off". EEPROM is not like the PICmicro register memory, in that you can't just put values into it, instead you have to instruct the PICmicro to write or read a particular location.
EEPROM is useful as a way of replacing hardware like switches or lines which would otherwise have to be used to configure a device. Because it is important that such information is not corrupted by rogue programs the designers of the PICmicro have devised a sequence of actions you need to perform in order to store values in EEPROM. This sequence is given in detail in Practical 7, the digital lock, where you will also find code to read and write to this memory.
To write to the EEPROM you must follow this sequence:
set the address of the destination in EEADR bank 0
put the data in EEDATA bank 0
turn off all the interrupts (clear GIE in INTCON) bank 0
set the write enable bit (WREN) in EECON1 bank 1
put the value 0x55 in EECON2 bank 1
put the value 0xAA in EECON2 bank 1
set the write bit (WR) in EECON1 bank 1
wait for the EEIF bit in EECON1 to set bank 1
clear the EEIF bit in EECON1 bank 1
clear the WREN bit in EECON1 bank 1
turn interrupts back on (set GIE in INTCON) bank 1
This rather long winded process will write a single byte to EEPROM. Note that EECON1 and EECON2 are in bank 1 and so your code must set the bit in the status register for this to work correctly.
To read from the EEPROM is much easier. You just need to follow this sequence:
set the address of the source in EEADR bank 0
set RD bit in EECON1 bank 1
read the data from EEDATA bank0.
I have put these actions into the functions which I have written. See the code in ex71.c for this.