richardlaishram
Member level 4
- Joined
- Jan 6, 2013
- Messages
- 77
- Helped
- 6
- Reputation
- 12
- Reaction score
- 6
- Trophy points
- 1,298
- Location
- Planet Earth
- Activity points
- 1,804
Please bear with me. I've to toggle a pin every 125 milliseconds and every minute I've to update the eeprom with a value after comparing with the previous value. For measuring time I'm using Timer 0 and it's ISR. Every minute I've to display the eeprom value in an LCD. My PROBLEM is that for the 1 second period the toggling is working fine, but during the eeprom_read/eeprom_write there is some delay and the pin toggling is not even.
I won't be able to toggle the pin directly using ISR because at some point I need to toggle every 500 milliseconds also. Please give a solution on this.
In short:
For the first second (toggle pin every 125 or 500 milliseconds) read/write to eeprom, display to LCD and then continue for the next second.
Reading/Writing to EEPROM creates an extra delay which makes the pin toggling uneven. Please give me a possible solution to this.
__ __ __ __........__ __ __ __......__ __ __ __......__ __ __ __ (The way pin is toggling, and the dots are for the time taken in writing eeprom and displaying to LCD)
I won't be able to toggle the pin directly using ISR because at some point I need to toggle every 500 milliseconds also. Please give a solution on this.
In short:
For the first second (toggle pin every 125 or 500 milliseconds) read/write to eeprom, display to LCD and then continue for the next second.
Reading/Writing to EEPROM creates an extra delay which makes the pin toggling uneven. Please give me a possible solution to this.
__ __ __ __........__ __ __ __......__ __ __ __......__ __ __ __ (The way pin is toggling, and the dots are for the time taken in writing eeprom and displaying to LCD)