Maker Pro
Maker Pro

AVR I/O during sleep/ power save mode

MrEE

Apr 13, 2012
84
Joined
Apr 13, 2012
Messages
84
Hello all,

I am working on a project using the ATMEGA165P. I'd like to use the Power sleep mode (or some other similar low power mode), but just before I enter power sleep, I need to set an I/O to high. The question is, would the output remain high during sleep?
 

GreenGiant

Feb 9, 2012
842
Joined
Feb 9, 2012
Messages
842
Looking at the datasheet it appears that it will preserve the state of it though it does not state that directly.

If you can I would say program one to just turn on a few pins and then go to sleep and see if they still read high.
 

MrEE

Apr 13, 2012
84
Joined
Apr 13, 2012
Messages
84
thanks for your reply. I've just started writing a simple test code. I'll post my results once I'm done..
 

MrEE

Apr 13, 2012
84
Joined
Apr 13, 2012
Messages
84
ok.. I just tested the sleep under the idle mode. The output pin driving an LED remains HI during sleep (verfied current consumption drops to what the LED needs) then I wake up by pulling INT0 low.
 
Top