Which consumes less battery power: running a Switch() case that contains 5 Cases (one of the Cases will be Sleep Enable) inside an ISR(), or running a Switch() routine in Main()?
Basically, I want to conserve coin cell battery power as much as possible. It involves blinking low power LEDs of varying patterns depending on the Case selected.
My idea was to have a pushbutton provide the external interrupt and to run the entire program via interrupts.
Each Switch() Case would blink the LED pattern indefinitely, until the pushbutton external interrupt changes to the next Switch() Case.
The final Switch() Case is a Sleep Enable. The next pushbutton external interrupt would start this Switch() Case cycle again to the very beginning.
So, an additional question is can a program stay inside the ISR indefinitely using the While() inside the ISR? If it can, would an external interrupt still be detected even though the ISR hasn't returned to the Main() program?