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
  • "do you mean that write a near-to-overflow value to the watchdog and it will generate a RESET?"

    Not necessarily.

    If you enable the watchdog and then deliberately do not service it, it will generate a Reset!

    As Dan showed:

    IE = 0;
    WDTRST = 0x1E; // Enable the watchdog
    WDTRST = 0xE1;
    
    for (;;);      // Infinite loop
    

    That is its job, after all!

Reply
  • "do you mean that write a near-to-overflow value to the watchdog and it will generate a RESET?"

    Not necessarily.

    If you enable the watchdog and then deliberately do not service it, it will generate a Reset!

    As Dan showed:

    IE = 0;
    WDTRST = 0x1E; // Enable the watchdog
    WDTRST = 0xE1;
    
    for (;;);      // Infinite loop
    

    That is its job, after all!

Children
  • What I learned was the controller would run into unknown states, for both hardware and software reasons.So the programmers enable the watchdog in the initial section and feed it every intervals.Hence once the controller flies away or stays long in unintended loop,the Watchdog would compliant for the ignoring. So the controller will be reset.

    Is the usage above of faulty?

  • "Is the usage above of faulty?"

    No, in fact, that usage model is the convention.

    James hopes to use the watchdog in a less conventional way to programmatically cause a reset by enabling it and then not servicing it so that the watchdog timer expires and generates a reset.

  • "Hence once the controller flies away or stays long in unintended loop,the Watchdog would compliant for the ignoring. So the controller will be reset."

    Exactly!

    And so, if you deliberately don't service the watchdog, you know that it will cause a reset!

    QEF.

  • "Is the usage above of faulty?"

    No, in fact, that usage model is the convention.

    James hopes to use the watchdog in a less conventional way to programmatically cause a reset by enabling it and then not servicing it so that the watchdog timer expires and generates a reset.

    I am, in fact, using the watchdog both ways in the same project.

    Erik