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.

Difference between soft/hard reset in a microcontroller

Status
Not open for further replies.

veerendar

Newbie level 1
Joined
Jan 6, 2009
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,286
89c51

what is the difference between softreset and hard reset in a microcontroller?? and how is it done??
 

Re: 89c51

hard reset :-- it occurs due to power on off in this case there may be chances of data corruption and the controller is not able to save any important data

soft reset :-- it is done through software or it is known to the software that the system will restart now so we can take care of all the variables we want to store and dont loose the data
 

Re: 89c51

A 'soft reset' is best done by using the watch dog timer (if the MCU has one) to do a real hard reset. I say this because simply forcing the program to start at address 0000 does not clear interrupt flags etc. For example if RI is set and not cleared it can cause problems after your soft reset. If you do choose to do a soft reset make sure that you reset all registers that need to be reset and then force a jump to 0000 - this can be done by calling a function that pushes the 0000 return address onto the stack
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top