PDA

View Full Version : I2C post write/read 10ms pause mandatory?



xnihilo
- 16th May 2008, 21:19
Hi,

In PPB manual, it is sait we have to add a
PAUSE 10
after a I2CREAD or I2CWRITE
In the 24LC08B datasheet, I read that something like 2ms are enough to write a page (16 bits) at once. Should I really add a 10ms pause after a write or a read or is it for safety for some specific conditions???

Thank you

skimask
- 16th May 2008, 21:26
In PPB manual, it is sait we have to add a
PAUSE 10
after a I2CREAD or I2CWRITE
In the 24LC08B datasheet, I read that something like 2ms are enough to write a page (16 bits) at once. Should I really add a 10ms pause after a write or a read or is it for safety for some specific conditions???

Pause after a read? Why would you want to do that? Are you waiting for the heating pads to burn some skin or something?

Pause after a write? Well, most likely since eeprom writes are internally timed and controlled by the eeprom itself. If you further read the eeprom datasheet, you'll probably find something about a BUSY bit. And you probably further find something about polling said bit to see if the internal write has been accomplished or not.

PAUSE 10 - ....and a few paragraphs before that, the PBP manual reminds you to check the datasheet for the specific device you are using to find the timing details.

xnihilo
- 16th May 2008, 21:42
Datasheet p3:
Write cycle time: 5ms
Is that the 'dead' time before another write can take place?
I have not included code for checking the flag telling the WRITE is finished but if I take in account the stated 5ms, I should be safe, shouldn't I?

So I do not need to wait after a read? Okay, I gues it is beacause no data is modified but why should it take more time to write than to read?

mister_e
- 16th May 2008, 23:26
5mSec is the max recommend, so you can't go wrong with that.

No need to wait after I2CREAD.

xnihilo
- 16th May 2008, 23:30
I always enjoy your answers, thank you very much.

mister_e
- 16th May 2008, 23:32
Bienvenue!

sougata
- 17th May 2008, 17:48
Hi,

Your datasheet should mention if your part supports page writes say in 128bytes. This means you can dump the entire 128bytes to your eeprom and wait 5mS or 10mS rather than 128 x 5 mS. I use this in one of my multichannel battery cell voltage logger/analyzer which needs to store data frequently

xnihilo
- 18th May 2008, 18:06
You'r right, you can write a 16 bytes page at once. 5ms is the needed delay.