This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Software *** Hardware reset of AT89S52

Is this possible if we use hard reset (Logic 1 Pulse with some delay) by using ISR and one Port Pin Connected to RESET Pin? so that Controller can RESET itself by Applying RESET signal by ISR. I mean Software *** Hardware RESET!

AT89S52 can be reset with logic high for 2 machine cycles to RESET PIN.
I used Proteus VSM 7.1 and it shows RESET...
Reset itself by ISR and Port Pin

delay();
RESET_Port_Pin=1;            //Soft Reset to uC by Port Pin
delay();
RESET_Port_Pin=0;
delay();


But in Actual Circuit this Doesn't works.
Without any chip it could be done or not?
I think momentry latching of some type will help?
Please help!

Parents
  • Thank you Dan, Andy !!
    If you don't mind please provide one example of usage of Watchdog timer within ISR, Special SFR for Watchdog timer is WDTRST (0xA6) and WDTPRG (0xA7). I didn't used WDT earlier. Please..

    Datasheet Describes...... The WDT consists of a 14-bit counter and the Watchdog Timer Reset
    (WDTRST) SFR. To enable the WDT, a user
    must write 01EH and 0E1H in sequence to the WDTRST register (SFR location 0A6H). When
    the WDT is enabled, it will increment every machine cycle while the oscillator is running. There is no way to disable
    the WDT except through reset (either hardware reset or WDT overflow reset). When WDT overflows,
    it will drive an output RESET HIGH pulse at the RST pin.
    Using the WDT....
    To enable the WDT, a user must write 01EH and 0E1H in sequence to the WDTRST register
    (SFR location 0A6H). When the WDT is enabled, the user needs to service it by writing 01EH
    and 0E1H to WDTRST to avoid a WDT overflow. The 14-bit counter overflows when it reaches
    16383 (3FFFH), and this will reset the device. When the WDT is enabled, it will increment every
    machine cycle while the oscillator is running. This means the user must reset the WDT at least
    every 16383 machine cycles. To reset the WDT the user must write 01EH and 0E1H to
    WDTRST. WDTRST is a write-only register.

Reply
  • Thank you Dan, Andy !!
    If you don't mind please provide one example of usage of Watchdog timer within ISR, Special SFR for Watchdog timer is WDTRST (0xA6) and WDTPRG (0xA7). I didn't used WDT earlier. Please..

    Datasheet Describes...... The WDT consists of a 14-bit counter and the Watchdog Timer Reset
    (WDTRST) SFR. To enable the WDT, a user
    must write 01EH and 0E1H in sequence to the WDTRST register (SFR location 0A6H). When
    the WDT is enabled, it will increment every machine cycle while the oscillator is running. There is no way to disable
    the WDT except through reset (either hardware reset or WDT overflow reset). When WDT overflows,
    it will drive an output RESET HIGH pulse at the RST pin.
    Using the WDT....
    To enable the WDT, a user must write 01EH and 0E1H in sequence to the WDTRST register
    (SFR location 0A6H). When the WDT is enabled, the user needs to service it by writing 01EH
    and 0E1H to WDTRST to avoid a WDT overflow. The 14-bit counter overflows when it reaches
    16383 (3FFFH), and this will reset the device. When the WDT is enabled, it will increment every
    machine cycle while the oscillator is running. This means the user must reset the WDT at least
    every 16383 machine cycles. To reset the WDT the user must write 01EH and 0E1H to
    WDTRST. WDTRST is a write-only register.

Children