rocketscream / Low-Power

Low Power Library for Arduino
www.rocketscream.com
1.27k stars 346 forks source link

Feature request #2

Closed cmpone closed 11 years ago

cmpone commented 12 years ago

Hi and thank you for the great work

I want to wakeup on analog comparator interrupt - is that possible to implement? at the moment iam using powerDown(500ms) and than I check if there is a interrupt. Can I check permanent and kill all other stuff?

ACSR = B01011000; ..... ISR(ANALOG_COMP_vect) { //interrupt ! ACSR = ACSR & 0b11110111 ; //toggle Interrupt Flag //Flag toggleed }

rocketscream commented 12 years ago

I think in power down mode, it might be impossible to implement as the analog comparator needs the IO clock to operate. It can only be enabled in idle mode (pg 40) and normal active mode (of course!).