LowPowerLab Forum

Hardware support => Low Power Techniques => Topic started by: photogphred on March 03, 2020, 04:47:54 PM

Title: Low Power with Digital Outputs
Post by: photogphred on March 03, 2020, 04:47:54 PM
Not sure if this is a dumb question or not, but if I set a GPIO to OUTPUT and set it to LOW and put the mote to sleep, what will I read on that pin in reference to Vin? Will I still see GND? Conversely, if I set it to HIGH what will I read on that pin when it's sleeping in reference to GND?

And if the pin is set to INPUT but it's floating and the mote goes to sleep, will it still be floating? If it's pulled high and you measure it, will it still read HIGH when sleeping?

Thanks so much!
Title: Re: Low Power with Digital Outputs
Post by: Felix on March 03, 2020, 04:55:54 PM
Input = High-Z, output will float if not pulled in any direction.

So...  GND/HIGH/HIGH_Z + sleeping = reads GND/HIGH/HIGH_Z
HIGH_Z pulled up sleeping = HIGH

See datasheet for what you can expect HIGH to be WRT VCC.
Also, best thing, try it out and see on the specific chip you're trying.
Datasheet + errata has the ultimate answers.
Title: Re: Low Power with Digital Outputs
Post by: TomWS on March 04, 2020, 06:22:32 PM
Floating inputs will consume more power than an input with pullup or an unconnected GPIO set HIGH or Low.   It is recommended to set all unused Digital pins to Input Pullup as the safest, lowest current configuration.  Note: that this info is relevant to AVR processors only.  SAMD processors may have a different behavior.