A possible solution to your problem with EEmemory is that there is a printing error in the 16F628 data sheet. The instruction on how to read and write to the internal Eememory is copy= ed and pasted from the PIC16F84 data sheet. And therby you write to the wron= g bank in 16F628. Eeread and Eeaddress is shifted from a F84. Have a look a= t the memory SFR table in the 16F628 data sheet and you see what I mean. I think there is an errata where this printing error is documented. Look at www.microchip.com under literature and errata document. Niklas Wennerstrand -----Ursprungligt meddelande----- Fr=E5n: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.ED= U] F=F6r PD Skickat: den 14 augusti 2001 23:42 Till: PICLIST@MITVMA.MIT.EDU =C4mne: Re: [PIC]:trouble writing to eeprom on 16f628 Thanks for your reply, I can't seem to find any reference to this in the data sheets, all I can see is the write enable bit in a data register, bu= t nothing mentioned in the config word. Could you give me an example of the config word that I should use, I use mplab so I normally don't even use a config word, this could be my problem right there. ----- Original Message ----- From: Heinz Czychun To: Sent: Tuesday, August 14, 2001 10:56 AM Subject: Re: [PIC]:trouble writing to eeprom on 16f628 > Hi Chris, > > I don't have any code, but have you checked the EEPROM > protect bit ( Bit 8 should be 1 ) in the config word? > > Heinz > > At 12:39 PM -0700 8/14/01, PD wrote: > >Has anyone seen any examples that shows a routine to write multiple > >ram locations to the eeprom, it would help me greatly. > > > >Thanks for any ideas on this. > > > >Chris > > ----- Original Message ----- > > From: PD > > To: PICLIST@MITVMA.MIT.EDU > > Sent: Monday, August 13, 2001 2:25 PM > > Subject: [PIC]:trouble writing to eeprom on 16f628 > > > > > > I have followed the Microchip examples and still can't get this to > >work, I can read from the eeprom with no problems but can not get it > >to write. I created a routine to read some values from the eeprom to > >the RAM at the start of the program and then if the user changes any > >values during use they are then written from RAM to the eeprom. If > >I simulate it in MPLAB it works fine, I can provide examples of my > >code if that helps any. > > > > Thanks > > Chris > > > >-- > >http://www.piclist.com hint: To leave the PICList > >mailto:piclist-unsubscribe-request@mitvma.mit.edu > > -- > http://www.piclist.com hint: To leave the PICList > mailto:piclist-unsubscribe-request@mitvma.mit.edu > > > -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu