Thanks Gonzalo. I just now looked at my code, and noticed I was polling the wrong bit. Somehow I got the idea that polling the WR bit would tell me when the write cycle was complete. I'll try this change (tomorrow) and see if EEADR still gets altered. If some of my questions seem dumb, keep in mind that my entire experience with PICs amounts to about one month. I haven't done any significant machine language programming in over five years and back then it was with Z80s and 6502s - somewhat different environment than a PIC. (I think I prefer PICs). -Thanks again. Frank Richterkessing Experimental Methods Engineer GE Appliances FRANK.RICHTERKESSING@APPL.GE.COM >---------- >From: Gonzalo Palarea[SMTP:chalo@TIKAL.NET.GT] >Sent: Tuesday, November 12, 1996 7:44PM >To: Multiple recipients of list PICLIST >Subject: Re: Thanks for the help > >At 06:18 PM 11/12/96 -0500, you wrote: >>Thanks to those of you who responded to my request for help on the >>16C84's internal EEPROM. You helped me solve my problem as well as find >>a bug in my code! >> >>Maybe this is obvious to most of you, but it may be of help to someone >>else in this situation. My routines to read and write a block of file >>registers >>to the 16C84's internal EEPROM incremented EEADR after each read or >>write to point to the next location. As I found out, after a write, >>EEADR contains some other value. The solution is to use another register >>to hold and increment the address and move it into EEADR before each >>write. It is possible though (but maybe not advisable?) to increment >>EEADR when reading from EEPROM. > >It's strange that the EEADR changed. Did you wait for the write cycle to >complete? (ie did you check EEIF in EECON1?) >