??? 04/06/09 13:52 Modified: 04/06/09 13:58 Read: times |
#164398 - It's a common mistake... Responding to: ???'s previous message |
...to make the ISR exessively long by putting everything into it, what has to be done when the timer ticks.
The deep meaning of a timer interrupt is not to kick-start everything that is to be done when the time ticks, but to remember the main program that something has to be done now. So, the fastest ISR would do nothing but only set a certain flag in RAM to remember the main program that the timer has ticked. This "remember flag" has periodically to be polled by the main program, of course. The same with the serial transmission ISR. The fastest ISR would only save the received byte and would leave it to the main program to process it. Kai |