Jinx wrote: > Fixes gratefully received, then maybe I can stop p*ssing about > with this and get some proper work done > This works when simulated with MPLAB. Some addresses like 0x1B forced MPLAB to complain so I used the Mnemonics for them. STEE bsf PORTB,LED bsf STATUS,RP0 ; <<<< changed from bcf bcf STATUS,RP1 movlw 0x00 movwf EEADR ; <<< MPLAB complained about 0x1B movlw 0x53 movwf EEDATA ; << MPLAB complained bcf STATUS,RP0 ; <<<<<<<< added bcf PIR1,EEIF bsf STATUS,RP0 WRITE bcf INTCON,GIE bsf EECON1,0x2 ; eecon1,wren movlw 0x55 movwf EECON2 ; eecon2 movlw 0xAA movwf EECON2 ; eecon2 bsf EECON1,0x1 ; eecon1,wr bcf STATUS,RP0 ; <<<<< added = RAM Pg 0 now WREND btfss PIR1,EEIF goto WREND bcf PIR1,EEIF bsf STATUS,RP0 ; <<<<<< added = RAM Pg 1 now bcf EECON1,0x2 ; eecon1,wren bcf STATUS,RP0 ; <<<<< deleted - bcf status,rp1 bcf PORTB,LED ENDWR goto ENDWR -- Best regards Tony mICros http://www.bubblesoftonline.com mailto:sales@bubblesoftonline.com -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu