Hi David, > Then when the interrupt is serviced it is cleared by the CPU back to > zero. BTW, the docs do not say precisely WHEN during the interrupt > service routine.... Anyway, the docs say repeatedly that the flag > can be cleared by the user BY WRITING A 1 TO THE FLAG REGISTER. I > have not tried this in real life, but I would have expected that the > SW should write a zero to the register. But apparently writing a 1 > to the register that already has a 1 will reset the 1..... The reason that writing a 1 to it clears it is because if you write a 1 to some other bit in the same register, you're writing a zero to all of the other bits. -- Dave Hylands Vancouver, BC, Canada http://www.DaveHylands.com/
Message
Re: [AVR-Chat] Re: documentation of timer interrupts vs bugs
2005-04-21 by Dave Hylands