I'd be willing to bet everybody else's money it's a banking problem. Compare what you've got to this. (Note that it uses a variable register called "eea", which is part of another routine) ;=========================================== bank0 macro bcf status,rp0 bcf status,rp1 bcf status,irp endm bank1 macro bsf status,rp0 bcf status,rp1 bcf status,irp endm bank2 macro bcf status,rp0 bsf status,rp1 bcf status,irp endm bank3 macro bsf status,rp0 bsf status,rp1 bcf status,irp endm ;================================================ ; Read EEPROM ;================================================ eeread bank0 movf eea,w ;address bank2 movwf eeadr bank3 bcf eecon1,eepgd bsf eecon1,rd bank2 movf eedata,w ;data bank0 return ;================================================ ; Write to EEPROM ;================================================ eewrite bank2 movwf eedata ;data bank0 movf eea,w ;address bank2 movwf eeadr bank3 bcf eecon1,eepgd ;select EEPROM memory bsf eecon1,wren ;initiate write movlw 0x55 movwf eecon2 movlw 0xaa movwf eecon2 bsf eecon1,wr bank0 btfss pir2,eeif ;wait for write completion goto $-1 bcf pir2,eeif return -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads