#7
Post
by MustardMan » 04 Jul 2006 03:55
@Rotary_Ed
A simple example I can immediately see is this...
When an interrupt occurs, it sets a flag - one bit only. If the interrupt occurs a few times before you check the flag, you will only ever know that the interrupt has happened once.
If your ISR increments a variable/byte every time an interrupt occurs, then you know how many times you have missed it. For example, a timer interrupt. If your main loop is too slow for some reason, or has variable execution time, you may miss a 'tick'.
Alternately, a UART interrupt, you would know that you have missed characters (of course, your ISR should actually store the characters, not just count them!)
MM.