Has anybody created a library which allows I2C to run without using the interrupts? Simply polling the TWINT bit instead of it setting off an interrupt?
I'm using two timers already for timing sensitive operations and would love it if I could run I2C in the background, so-to-speak.
edit: More questions as I think of them
-
Would it be possible to set the arduino to us clock stretching while acting as slave receiver? I'm thinking just setting the TWINT interrupt routine to set to the clock line to open collector should do it.
-
When an interrupt occurs the global interrupt enable is turned off, does this also turn off the timer counters? ie If a timer overflows while an interrupt is already occurring does the interrupt get saved and executed after the current interrupt in occurring or does it get skipped after the timer resets? If it is a timer interrupt does the timer get reset at the beginning of the interrupt and continue to tick during the interrupt? ie do timers really go off every (number of timer cycles + number of cycles in interrupt code)