//* Idea of passing "go ahead" from Timer interrupt to main loop *

volatile uint8_t ready = 0; // volatile mandatory volatile uint16_t results; // volatile mandatory Timer_ISR() { ... result = ...; ready = 1; } void main() { ... while(1) { while (0==ready) ; ready = 0; // for at least a few microseconds there will be no interrupt call // and we don't have to worry about atomic access to shared variables ... = result; ... } }