>-----Original Message----- >From: Alan B. Pearce [mailto:A.B.Pearce@RL.AC.UK] >Sent: 21 May 2004 16:27 >To: PICLIST@MITVMA.MIT.EDU >Subject: Re: [PIC:] Function to Write EEPROM > > >>I observed now that the problem happens when I write more >than one byte >>in a burst. If I only write the first letter of each option, it >>works... It's strange...should I put a delay after each write ? > >Most definitely. In fact if you look at the example code in >the data sheet it tells you to check to see if the eeprom >portion is busy writing before doing the next write - at least >this is the case for 16F series, haven't checked the 18f >series, but I am not aware of any technology changes in this area. The function that the OP listed previously waits for the eeprom's busy flag to clear before attempting a wite, so a delay should not be required. The function looks very much like the one used in HiTech PICC, and I have used this many times to write a string of bytes to the EEPROM with no problem. If the watchdog is definitely disabled, then I see no reason for this code sequence to cause problems. Regards Mike ======================================================================= This e-mail is intended for the person it is addressed to only. The information contained in it may be confidential and/or protected by law. If you are not the intended recipient of this message, you must not make any use of this information, or copy or show it to any person. Please contact us immediately to tell us that you have received this e-mail, and return the original to us. Any use, forwarding, printing or copying of this message is strictly prohibited. No part of this message can be considered a request for goods or services. ======================================================================= Any questions about Bookham's E-Mail service should be directed to postmaster@bookham.com. -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body