Power Down Mode Example

danni's picture
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Type: 

Compiler/Assembler: 

The following example code demonstrate the implementation of the power down mode on the AVR.
The application light a LED and flash a LED.
The key can be used to switch both LEDs on and off.
If the LEDs are on, a timeout of 20 seconds switch off also.
During the off state, the power down mode was entered.

The code use a very efficient key debouncing routine:
https://www.avrfreaks.net/index.p...

It use also a macro to access portpins as bitvariables:
https://www.avrfreaks.net/index.p...

Peter Dannegger

Attachment(s):