I was thinking about how to set up the digital i/o pins when putting the AVR to sleep.
If I have a peripheral connected to a few AVR pins, both inputs and outputs, and the VCC to the peripheral is shut down before the AVR is put to sleep. How should I configure the AVR pins?
If the peripheral is completely powered off is it best to HiZ all pins, both outputs and inputs from the AVR? Or maybe the output pins from the AVR should be driven low while the input pins should be HiZ?
What if the peripheral is not completely powered off, if there is a small leakage in the power switch that controls the VCC of the peripheral?
I did a quick test with two applications on the same PCB; one with all HiZ and the other with outputs low and inputs HiZ and the low outputs version seemed to be 0.1 ÂµA lower. But is there theoretical support for my test result?