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

Enable Watchdog first ??

ATmel T89C51AC2 have a watchdog and enable it at main() program.
Sometime when cpu hang!! and not reset.
How to insert watchdong sequence at ORG 0 or first execute instruction after reset.

void main(void)
{
MACRO_ENABLE_WATCHDOG(); // sometime not self reset
.....
.....
...
while(1)
{
...
...
...

}
}


ORG 0
MACRO_ENABLE_WATCHDOG();
STARTUP.A51(Clear RAM)
main.c(run)

Parents Reply Children
No data