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?
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