PDA

View Full Version : Do I need a DELAY following a WRITE to EEPROM?



Melanie
- 13th July 2004, 16:25
1. Do I need a Delay when WRITING to EEPROM?
2. How long should this Delay be?
3. Why doesn't PBP take care of this for me?


1. Do I need a Delay when WRITING to EEPROM?

Only when writing to EXTERNAL EEPROMs. The WRITE command takes care of the INTERNAL EEPROM timing. Commands such as I2CWRITE (for I2C devices such as 24LC16, 24LC32, etc), or SHIFTOUT (for SPI devices eg 25LC640) require you to add-in that Delay.

2. How long should this Delay be?

10mS is usually recommended (PAUSE 10), as it takes care of pretty much all devices that you're likely to come across. However check with your Serial EEPROMs Datasheet, quite a few are specified at 5mS or even less - so you might be wasting time and hampering your programs performance unnecessarily.

3. Why doesn't PBP take care of this for me?

Simply because there are many kinds of I2C/SPI devices. Not all of them are EEPROMs, and not all of them need delays following a Write operation - so it's up to you to read your device Datasheets and decide if delays are required and how long they are supposed to be.