Reset by Software

Discussion in 'Embedded Systems and Microcontrollers' started by AMIT_GOHEL, Sep 28, 2010.

  1. AMIT_GOHEL

    Thread Starter Member

    Jul 13, 2010
    67
    7
    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.
     
  2. GetDeviceInfo

    Senior Member

    Jun 7, 2009
    1,571
    230
    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.
     
  3. AMIT_GOHEL

    Thread Starter Member

    Jul 13, 2010
    67
    7
    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..
     
  4. DonQ

    Active Member

    May 6, 2009
    320
    11
    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.
     
  5. Papabravo

    Expert

    Feb 24, 2006
    10,138
    1,786
    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.
     
    AMIT_GOHEL likes this.
  6. AMIT_GOHEL

    Thread Starter Member

    Jul 13, 2010
    67
    7
    doubt solved..thanks papabravo & donQ..

    you can close this threat now..
     
Loading...