On Sun, 17 Feb 2002 09:09:15 -0800, Nick Masluk wrote: Comments inline. >I've now tried clearing the WDT within the loop that >checks if the write is complete. It ends up clearing >the first memory block, and then just sits in the >write complete check loop, and never moves on to clear >any other of the addresses. Here is what the code now >looks like: > >;start > bsf STATUS, RP0 > movlw 0x0FF > movwf EEDATA > clrf EEADR > bcf PIR1, EEIF ^^^^^^^^^^^^^^^^^^^^^^ Danger, Will Robinson. PIR1 is in bank 0, you're in bank 1. >nxtadr bsf EECON1, WREN > movlw 0x055 > movwf EECON2 > movlw 0x0AA > movwf EECON2 > bsf EECON1, WR > bcf EECON1, WREN > clrwdt > btfsc PIR1, EEIF ^^^^^^^^^^^^^^^^^^^ Same here. > goto $+3 > clrwdt > goto $-3 > bcf PIR1, EEIF ^^^^^^^^^^^^^^^^^^^ And here. > incf EEADR, F > movlw 0x07F > xorwf EEADR, W > btfss STATUS, Z > goto nxtadr > bcf STATUS, RP0 >;end > Regards, Bob -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics