|
|
|
|
|
by fancyketchup
4485 days ago
|
|
This isn't to suggest that using the WDT in interval mode is the wrong approach, and I know there's a certain amount of elegance to doing everything with one chip, but you could still use the level interrupt by adding a 7486 (standard quad XOR gate). For the gate's inputs, you would use the reed switch and a output pin from the AVR, and the gate's output would go to the external interrupt line. If the ISR toggles the state of the output pin each time it runs, the gate's output is only in the IRQ-asserted state for as long as it takes the ISR to fire up--so you don't get constant interrupts while the switch is closed, only a single one on the opening and closing transitions. The 74LVC86 variant only draws a dozen, or so, microamps, which is dwarfed by the current in the 10k pull-down resistor when the reed is closed, and comparable to the standby current of the radio in the new radio. |
|