Skip to content

example code on how to use sleep mode on an atmega328p in avr assembly

Notifications You must be signed in to change notification settings

COLVERTYETY/avrsleepmode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 

Repository files navigation

avrsleepmode Codacy Badge


Context

You can find here some exemple code on how to use sleep mode on an atmega328p in avr assembly. This code was written as part of a 1st year course on mcu architecture. If any avrfreaks would happen to pass by I am open to all critiscisme and pull requests.


About the code

Two interrupts are used to either send the mcu to sleepmode(INTV1) or to wake it up(INTV0). The number of times the mcu has been waken up are counted in the "count" register. Current sleemode is PowerDown.

for reference other sleep modes are:

  • 000 : Idle Mode
  • 001 : ADC noise Reduction Mode
  • 010 : PowerDown Mode
  • 011 : Standby
  • 111 : Extended Standby

About

example code on how to use sleep mode on an atmega328p in avr assembly

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published