sleep and wakeup in software example

mikroC, mikroBasic and mikroPascal PRO for Microchip’s (formerly Atmel) 8-bit AVR MCUs
Post Reply
Author
Message
lawrencek
Posts: 12
Joined: 14 Jun 2012 13:57

sleep and wakeup in software example

#1 Post by lawrencek » 04 Jan 2017 00:23

I want to put a T2313 AVR to sleep, and wake it with the watchdog timer or automatically.
I would like it to sleep for say 30 seconds and then wake up, run my code and then sleep again.
I have got it to sleep using GCC, but I would like to do it all in MikroP. I have got the watchdog timer to work and was thinking of using that one.

Are there any examples - I cannot find any for the AVR

Thanks

Lawrence

User avatar
uros.cvetinovic
mikroElektronika team
Posts: 803
Joined: 14 Dec 2015 09:24

Re: sleep and wakeup in software example

#2 Post by uros.cvetinovic » 04 Jan 2017 13:12

Hi Lawrence,

Unfortunately, we don't have any example regarding putting AVR to sleep.

I can suggest you to check datasheet and documentation of the MCU,
and check which values you need to write to which specific registers in order to make MCU do what you expect.

Best regards,

Uros

Post Reply

Return to “AVR PRO Compilers”