This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

interrupt and weiting data to the 24c08 serial eeprom

In my project,I am trying to write some data in to 24c08 serial eeprom.

Also a timer 1 interupt subrountie may run at every 1ms to count the run time.

Should i set the EA to 0 before access the serial eeprom to prevent data loss.

Moreover, if i do so, i think some interupt will be miss and affect the accuracy of the timer.

How can i solve this problem?

Finally, my programm is code at C. Anyways for me to calculate the system time?

  • An I2C master can pause at any time during an I2C transmission.

    It doesn't matter if you are using an I2C peripheral in your micro, or manually bit-banging. You can stop at any time (with the clock high or low), and resume later.

    The only restriction is that you must make sure that SDA and SCL are not altered by the timer interrupt service.

  • Hi, I2C EEprom may take 10mS to write 1 Byte, if you use page write then the time take per second may be lesser. Still it should more than 1mS.If you are waiting for EEproom to finished writing, it is not good practics.
    If you don't have nested interrupt then is no meaning to disable the interrupt.

    My Advise is chaneg you timer interrupt to higher value