Hi all, i tried to Write some data into EEPROM of 16F873. I followed the steps written in the datasheet, but it did not work. What could be the problem?? I then used >step to debug the code, i found out that EECON1, WR could not be set. Really need help on this. Below i enclosed with my coding. Thanks. Regards George Chee movlw 0x4B movwf FSR movlw 0x10 movwf TEMP movlw .11 movwf RFCOUNT bsf STATUS,RP1 bcf STATUS,RP0 ; WR_NEXT movf TEMP,w movwf EEADR movf INDF,w movwf EEDATA bsf STATUS,RP0 bcf EECON1,EEPGD bsf EECON1,WREN bcf INTCON,GIE ; movlw 0x55 movwf EECON2 movlw 0xAA movwf EECON2 bsf EECON1,WR ; btfsc EECON1,WR goto $-1 incf FSR incf TEMP bcf EECON1,WREN decfsz RFCOUNT goto WR_NEXT -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu