Microchip Technology DM164130-9 User Manual

Page of 101
Lessons
 2012 Microchip Technology Inc.
DS41628B-page 95
EXAMPLE 3-55: 
When the WR bit is set, it remains set until the write to EEPROM is complete. 
3.14.7
C Language
3.14.7.1 BOTH
There are two functions that the XC8 compiler provides, which greatly simplify 
EEPROM reads and writes. 
EXAMPLE 3-56: 
Use this to read and write single bytes from EEPROM. 
;REQUIRED SEQUENCE for EEPROM write
    movlw       0x55
    movwf       EECON2
    movlw       0xAA
    movwf       EECON2
    bsf         EECON1, WR      ;begin write
eeprom_read(<addr>)
eeprom_write(<addr>,<value>);