[AVR] My Atemga8 not waking up from power down mode

Status
Not open for further replies.

vaibhav.vaidya91

Newbie level 2
Joined
Aug 23, 2011
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,294
Hi All,


I am getting trouble while waking up atmega8 from sleep mode.
Let me xpln u my project and code first.

I want to put atmega 8 in sleep mode after 10 sec and can be awaked by interrupt INT0 and go to sleep again after 10 sec.

in main i blinked LED on PD0 twice after i set sleep mode as power down.
and started Timer 1 in compare o/p mode for 10 sec.
in ISR i put my Atmega8 in sleep mode and timer clk disabled.
INT0 is set for falling edge interrupt and on interrupt mega8 wakes up and again timer is started so process continues.

Now when i executed code on proteus its working fine but in actual mega8 is not waking up.

-Vaibhav
 

A few possibilities I see:

1. Port configuration may not be correct.
2. The compiler disables global interrupt in timer ISR entry. Hence while you are sleeping in ISR, interrupt not forwarded to software.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…