I'm doing a bunch of things with several IRQ's (turning them on/off, changing edge modes, etc)...but I've encountered some real craziness.
Part of what I am doing is, before setting irq parameters (such as timer overflow value), is to always write "1" to the irq flag bit, to 100% ensure that irq is not pending (ie: clear any pending of that irq), to ensure irq eventually fires as desired.
However, now with all the madness, I'm wondering when the flag IS zero, does writing a one actually SET the irq? The manual only states writing a one clears it (which is what I'm going by)...maybe I'm actually causing my irqs to fire, when I'm just trying to be safe.
For clarity, such as
ldi temp , (0<<INTF1)|(1<<INTF0) ;ensure any IRQ glitches cleared on IRQ0 out EIFR, temp
so before writing a one to clear a pending, does the bit need checked, or can it simply be written to one? If this is not an issue, I will look at other (many) possibilities.
Normally I wouldn't do this clearing at all, but with so many things happening, thought it would be a benefit