Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Programatic RESET is not working in atmega32a

Status
Not open for further replies.

veerubiji

Full Member level 2
Full Member level 2
Joined
Feb 24, 2011
Messages
122
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,298
Visit site
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.

Code:
case(RESET):        
            #asm("CLI");        //Disable global interrupt
            MCUSR = 0x00;
            #asm("WDR");
            WDTCR=0x1B;
            WDTCR=0x0B;
            while(1);           //Wait for reset
            Command = 0;
            break;
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.
 

Is Watch Dog Timer enabled?[/QUOTE]

I am trying to enable and reset the controller and disable WDT in the same command. Is it possible? I have looked into the fuse bits about watchdog enabled or not i didn't find anything about.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top