Reset by Software

Thread Starter

AMIT_GOHEL

Joined Jul 13, 2010
67
hello friends,

Is there any way to reset the 89c51 microcontroller by any software technique.

i've used all the IO pins so can't even use it to reset externally(make any port pin high when want to reset and connect it to reset pin )..


thanks in advance.
 

GetDeviceInfo

Joined Jun 7, 2009
2,196
I don't believe the 89C51 has a software reset. There are other devices in the family however that have a watchdog timer, whose output resets those devices.
 

Thread Starter

AMIT_GOHEL

Joined Jul 13, 2010
67
thanks GetDeviceInfo for responce..

can i reset it by jumping to 0000h(it's the reset vector location for rerset) ?
i actually don't have development board so can't experiment it.
help of someone would be appreciable.
thanks..
 

DonQ

Joined May 6, 2009
321
thanks GetDeviceInfo for responce..

can i reset it by jumping to 0000h(it's the reset vector location for rerset) ?
i actually don't have development board so can't experiment it.
help of someone would be appreciable.
thanks..
Jumping to the reset address has the same effect as powering up at that address, but usually, the reason you want to reset while running is that the processor has crashed for some reason, in which case you can't depend on any code executing reliably, including a jump to reset.

If you can still execute code reliably, you should probably fix the software problem you are having with some error routines or something, rather than just resetting and starting over.

Only if you can no longer execute any code, should there be any reason to reset.

Watch-dog timers are made exactly for this purpose. If your software isn't able to keep clearing it (for the same reason that it can't now simply jump to the reset vector address), the hardware will time-out and perform a hardware reset, same as pulling the hardware reset line low.

If you don't have a watchdog timer, sometimes you can manipulate other hardware to have the same effect. But the key word is hardware.
 

Papabravo

Joined Feb 24, 2006
21,225
You cannot jump to address zero to do a RESET. The 8051 has interrupt priority logic that will not be RESET correctly by a jump to address 0x0000.

As has been suggested an expiring watchdog timer is the only way to do it without some way of triggering an external circuit to raise the RESET line.
 
Top