Hello all,
Is it possible to use a combination of two pins to wake up ATMEGA328p from deep sleep? For example if two buttons are pressed to wake up, but if only one is pressed to continue sleeping. Thank you.
Hello all,
Is it possible to use a combination of two pins to wake up ATMEGA328p from deep sleep? For example if two buttons are pressed to wake up, but if only one is pressed to continue sleeping. Thank you.
You can use some logic gates (AND/NAND/OR/NOR) to combine the two signals to generate the interrupt.
They can either be part of an IC or you can use transistors.
You will need one pin for the interrupt from the above circuit and two pins for the buttons (e.g. 2 for the interrupt, 3 and 4 for the buttons); that way you will not get an interrupt if one of the buttons is pressed.
Alternative is to wake up on either button, check the other button and go back to sleep if you find that both were not pressed.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.