SparkFun Forums 

Where electronics enthusiasts find answers.

For the discussion of Arduino related topics.
By kshepitzki
#196990
I am working on a project using ATmega328 that requires waking up from sleep mode using button presses. Several articles explain how to do that by connecting the button to the interrupt line INT0 or INT1.

However I have 4 SPST buttons but only 2 interrupt lines. Each button needs to be able to wake the controller and as it wakes up the controller needs to know (e.g. by reading digital pins) which button was pressed.

The project is single battery operated so needs to be very energy efficient.
I am embedded SW eng', so I understand HW if explained slowly :-)

Any suggestions for a simple HW solution?

I look forward to your solutions
User avatar
By DanV
#196998
Use Double pole single throw buttons and parallel one N.O contact from each switch into a single interrupt line, then use the other pole from each switch into an input on the ATMega (4 inputs total).