Sleep and wakeup
Mode with lowest power consumption is power down mode. The MCU can be woken by e.g. a pin change interrupt.
At wakeup, the interrupt handler is executed, then the code continues where it left of before sleeping.
Pull-ups
Pull-up settings remain valid during power down mode. So you can leave out many pull-up resistors.
Software reset
The software reset is executed by first enabling the watchdog timer with minimal time interval, followed by running an endless loop. The first thing the setup() function should do is disable the watchdog again.
Peripherals
Internal ATTiny peripherals can be powered down to limit current consumption. Don't forget to re-enable them after wake-up or your code won't run correctly.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.