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.

Parents
  • 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

Reply
  • 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

Children
No data