# Estimating EEPROM read time

This is a question in relation to USB transmissions crash my software GUI.

I posted this question separately so that I could clarify my question separate from the other one.

I have the same operating code here and I would like to ask: How can we estimate the EEPROM read time from I2C communication running at 100kHz?

main()
{
usbinit(); // usb initialization
while(1)
{
UsbTasks(); // does usb works
yourtasks(); //sends the buffer
}
}


I trust reading a chunk of data from EEPROM won't do any damage than doing adc_conversions and calculations.

I don't want a precise time duration. But I trust read will occur quite fast rather than write that will take 5ms minimum.

I could not find any EEPROM read time though is it because it depends upon baud rate of communication (I2C here @ 100kbps).

I would love to have your thoughts and information in regards to this problem.

• Start conditions, stop conditions, address bits, operation bits, data bits. Add those up and divide by the bit rate (since reads are essentially zero-latency at that frequency). – Ignacio Vazquez-Abrams Feb 22 '14 at 7:02

You could calculate it by reading the EEPROM datasheet and adding up the time take to transfer all the bits as Ignacio Vazquez-Abrams suggested in a comment. Because you've already selected a device and have it working though you might find it easier just to measure it. Normally I'd do something like the following and use a scope to measure it:

// Take an I/O pin high
// Take the I/O pin low


If you don't have a scope you could enclose the reading in a loop and maybe turn a LED on and off with something like this:

uint32_t i;
// Turn on LED
for (i=0; i < 100000; i++)