Author Topic: Low Power with Digital Outputs  (Read 1384 times)

photogphred

  • NewMember
  • *
  • Posts: 2
Low Power with Digital Outputs
« 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!

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Low Power with Digital Outputs
« Reply #1 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.

TomWS

  • Hero Member
  • *****
  • Posts: 1930
Re: Low Power with Digital Outputs
« Reply #2 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.
« Last Edit: March 04, 2020, 06:25:39 PM by TomWS »