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

Can the controller be reseted using program?

I am using a 89s8252 controller.

I am wondering, is there any command u can call to reset the controller so that it will run from the start again?

I know that using watch dog timer will reset the controller when the time is up..

But I was wondering is there other way to do it in C language or in the controller architecture it self.
Thanks.

  • "is there any command u can call to reset the controller so that it will run from the start again?"

    Making it "run from the start again" is easy - you just jump to location C:0x0000 - but this is not the same as a reset, because it will not reset all the peripherals, the processor logic, the SFRs, the interrupt system, etc, etc, etc.

    "I know that using watch dog timer will reset the controller when the time is up."

    This is the only truly 100% certain way to get a reliable reset.
    Why would you want to do anything else?

    Do a search - it has been discussed many times

  • I am wondering, is there any command u can call to reset the controller so that it will run from the start again?

    But I was wondering is there other way to do it in C language or in the controller architecture it self.



    1) "u can"? I have no idea what micro can
    anyhow
    There is no way you can do it in C, but in asm you can do the following:
    1) code that all SFRs get set to the default level make sure you get them all
    2) execute reti twice (not in 'C') must be asm
    3) jump to addr 0 (not in 'C')

    In other words: any attempt to reset the controller except by watchdog timeout is cumbersome, difficult and error prone.

    Erik