I am using a timer interrupt for multiplexing however my question relates more closely to interrupt service routines.
If I set the prescaler and turn on a timer, using the below code I can run code asynchronous to the main loop at a certain interval depending on the prescaler. Or at least this is my understanding of it.
//code to run asynchronously at a certain interval
Now if for example I set my timer to interrupt every millisecond (16000 cycles on at 16Mhz AVR) and the code I run takes for example 2 milliseconds to execute; is the code completely executed by the second timer interrupt. That is, does the next timer interrupt depend on the previous one completing and could having slow code slow down an interrupt?
I am using an Atmega328P-PU with an external 16Mhz crystal as clock.