sleep command?

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

hi there,

i there a avr-gcc c-command that supports the avr sleep mode?
are there code examples?

thanks,
marcus

admin's test signature
 

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

Hi Marcus,

you have to enable the idle mode like so:

// enable "idle" mode
outp((1<<SE),MCUCR);

and then you merely call

asm ("sleep");

where you want to doze...

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

hi carl,

it works - thanks a lot!

marcus

admin's test signature