Software Reset for microcontroller(8051)

Status
Not open for further replies.

youstron

Newbie level 6
Joined
Mar 5, 2012
Messages
14
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,372
Its very easy to reset using hardware by pin 9, but how to reset using software program?? Please help me...please give the example assembly code to reset
 

depends on 8051 variant ......
for example:

 
In the software reset,if we give ljmp 00h ,then all the registers and flags are also comes to its default values??? (example for registers 00)
 

In the software reset,if we give ljmp 00h ,then all the registers and flags are also comes to its default values??? (example for registers 00)
- Ljmp 0000h only makes program jump to first address but there's no SFRs affected like the real Power On Reset.
- Register 0 is not SFR, but part of RAM. there's no default value of these. After power on reset, that's values are unknown.
 
Its very easy to reset using hardware by pin 9, but how to reset using software program?? Please help me...please give the example assembly code to reset

In 8051 there is no software RESET.
LJMP #0 sets only the PC, nothing else ..
If you want to zero all registers, you have to do it by zeroing them one-by-one.
:wink:
IanP
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…