Do 'high' outputs go low when in 'power-down' sleep?

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Folks,  I've made a timer based on an AT85.  It turns on PB0 for an amount of time that can be programmed in.  It will eventually turn on the mains via a relay.
It has two LEDs on it, one on PB3 and the other on PB4, and one of the LEDs lights while it is in programming mode (while setting the timeout period) and the other lights while it is in timer mode.  When timer mode times out, it goes to sleep.  Sleep mode is set for power-down.

Paragraph 7.4.6 in the datasheet says "When entering a sleep mode, all port pins should be configured to use minimum power" - but I think it's talking more about pull-ups than outputs - or does it mean that port pins have to be switched off?  The term 'power-down' suggests that the chip powers down - except that it is still watching for wake-up signals.  I had expected that in "power-down" sleep, the LEDs would turn off - but the Timer LED says on (that's the LED that is on when 'sleep' is executed).  Is this what you would expect? 

I can, of course, program the thing to turn off both LEDs, but I'd like to know if this is normal behaviour, or whether I should be looking for a coding fault.

Thanks, Guys,
Mike.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 2

During any sleep, ports retain their state. If high/low, they stay high/low. If in/out. they stay that way. 

 

The phrase about configuring for minimum power applies to things like pull-up resistors. You do not want an output that happens to have a pull-up (because it is sometimes an input) to sleep as a logic low output. Likewise, you do not want it to go to sleep with an LED on; it will really ruin your power reduction. 

 

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks very much Jim - esp. for such a quick response.  I'll program them off.

Mike.