Hello,
I have a problem when i disable the watchdog
// WDTCN = 0x0DE; // WDTCN = 0x0AD;
at the begining of the main. I put a breakpoint at the external interrupt 0. It will never go in and stop at the breakpoint. When i stop the program. I will stay inside the while loop and I checked the interrupt peripheral, it seems that interrupt 0 has been requested.
This problem will not happen when I enable the watchdog in the begining of the main.
WDTCN = 0xFF; // lock out the watchdog disable feature WDTCN = 0xA5; // enable and restart watchdog timer
Anybody has any idea about this?
the old Intel "PCA dog" which, is not a real a watchdog, but some cheap substitute (can way too easily be disabled) by a single write to PCA0MD which may set 'external clock' which you do not have.
Erik
Hi Erik,
THanks for the reply. I will try to work up from there.
It seems like it just couldn't stop at the interrupt 0 (breakpoint i have set) if i disable the watchdog at the beginning of the program.
post the values after the thing has run a while of IE, 0, 1, TMOD and TCON as shown in the debugger when it works and when it does not.