If I read your message correctly, it looks as if you made the same mistake I did when I first started using the '84s EEPROM. EEADR gets modified every time you do a write (it works OK to increment it on read though). All you need to do is increment a register and copy it to EEADR before you do a write. Frank Richterkessing Experimental Methods Engineer GE Appliances FRANK.RICHTERKESSING@APPL.GE.COM >---------- >From: David BALDWIN[SMTP:db@SDM.BEL.ALCATEL.BE] >Sent: Monday, March 24, 1997 12:54AM >To: PICLIST@MITVMA.MIT.EDU >Subject: 16C84 EEPROM writing > >Hi, > > > I had like to write and read from the EEPROM of the 16C84. I tried to >write at 0x00, and it worked. I tried to do another write, next the >first one, setting the WREN bit and then the WR bit, after modifying the >EEADR and EEDATA files. I only got something writed on the second >location! I took my first code back and decided to make a loop, >incrementing the EEADR register and doing each time the whole thing: > > clrf temp >loop set WREN bit > write 55h to EECON2 > write AAh to EECON2 > set WR bit > move temp --> EEADR > set WR bit > btfss temp,6 > goto loop > > > The only location that has been writed is location 63! Can anybody >help >me? Or is there any code I can get to make this work? Thanks in advance. > >-david >