I wonder, could somebody point me toward a sketch which has an interrupt routine which is masked for a period, interrupts which would occur if enabled are NOT queued while the interrupt is masked. Then the interrupt routine is unmasked and the next interrupt is caught and processed before the interrupts are masked once again.
what the interrupt does isn't important, just the mechanical function of the software.
I've tried various methods but whatever I have done has resulted in the interrupt either being permanently active or never occurring.
what I want to do is to periodically read the ir port of my Elster AC100.... But only when I want to do it rather than when an ir stream is detected on the pulse port. Interrupts occurring all of the time would upset my measurement loop.
thanks
Ian
Re: Masking interrupts
Can you not simply use the cli(); command?
More info here..
http://arduino.cc/forum/index.php/topic,45239.0.html
Re: Masking interrupts
Thanks Stuart,
Re: Masking interrupts
you should be able to mask the pulse interrupt with bitClear(EIMSK,INT1) and re-enable it with bitSet(EIMSK,INT1)