Lea, -----Original Message----- From: Lea |;Writing byte to internal EE : |;address byte must be in EEADR, and value in EEDATA |; |WRITEE BSF STATUS,5 | BSF EECON1,WREN | MOVLW 0x55 | MOVWF EECON2 | MOVLW 0xAA | MOVWF EECON2 | BSF EECON1, WR | BCF STATUS,5 | MOVLW 1 | CALL DELAY ;1 ms sub delay, to allow eeprom to write. | RETURN |I use this routines and works very good, If you ask me why to write 55h & |AAh to EECON2 I have no idea, but this is the way that works ;-). MChip magic numbers :) Note that the erase/write cycle time typ. value is 10 ms ! If in the meanwhile the write is in process you got nothing else to do for more than 10 ms, a good way to do the waiting delay is by polling the e2prom write complete interrupt flag (EEIF). Also it is a good practice to check te WERR bit (reset during a write cycle...) at the begining of the code. Regards, S.-