veerubiji
Full Member level 2
- Joined
- Feb 24, 2011
- Messages
- 122
- Helped
- 3
- Reputation
- 6
- Reaction score
- 3
- Trophy points
- 1,298
- Activity points
- 2,301
Hi,
I am trying to reset atmega32a programmatically. It can be done with watchdog timer. In my case i am trying to reset the timer when i send some command from PC.
I have written code like this for that function.
but this is not working, can anyone help me what i am doing wrong or how to reset ATmega32A programmatically. When i send "RESET" command from PC then it has to reset micro controller.
I am trying to reset atmega32a programmatically. It can be done with watchdog timer. In my case i am trying to reset the timer when i send some command from PC.
I have written code like this for that function.
Code:
case(RESET):
#asm("CLI"); //Disable global interrupt
MCUSR = 0x00;
#asm("WDR");
WDTCR=0x1B;
WDTCR=0x0B;
while(1); //Wait for reset
Command = 0;
break;