Re: :I have a small problem and i hope that sombody of you can help me. :I am trying to use DEEM (Data EEprom Memory), to store variables and i :have success to write to it, but when I try to read thespecified address :it always gets FFh. Does any of you have an idea? ://Robert Berlin Looks like your reading sequence is ok (except at addr 002C which should be BSF). Now, the writing sequence in your Test_lst is almost exclusively incorrect. See section 7.4 in the 16F8X data sheet. Stuff in the listing lines 32-39 seems to be in wrong place. The correct way to store your data B'00011000' to addr ADDRESSram is BCF STATUS,RP0 ;bank 0 MOVLW B'00011000' ;write data to EEDATA MOVWF EEDATA MOVLW ADDRESSram ;write address to EEADDR MOVWF EEADDR BSF STATUS,RP0 ;bank 1 BCF INTCON,GIE ;disable interrupts BCF EECON1,EEIF ;clear EE-completed flag BSF EECON1,WREN ;enable writing to EEPROM MOVLW 55h ;"the required sequence" charge pump init? MOVWF EECON2 MOVLW AAh MOVWF EECON2 BSF EECON1,WR ;initiate writing BSF INTCON,GIE ;enable interrupts BCF EECON1,WREN ;disable further writes After this you can loop and check until the EEIF flag comes on and then read the contents of the memory: BCF STATUS,RP0 ;bank 0 MOVLW ADDRESSram ;write address to EEADDR MOVWF EEADDR BSF STATUS,RP0 ;bank 1 BSF EECON1,RD ;read EE BCF STATUS,RP0 ;bank 0 MOVF EEDATA,W ;W=EEDATA -- Lauri --- For more info.