Hi, I'm trying to use the watchdog on an 87C51. I've set up the PCA module 4 and it works when using timer 0 or the external pin (P1.2) to clock the main PCA timer, but when I select the internal clock to run the main timer, the watchdog activates whenever I start the main PCA timer. Sample code below:
CL = 0; // reset main PCA count CH = 0; CCAP4L = 0xFF; // set highest match count CCAP4H = 0xFF; CCAPM4 = 0x48; // set compare and match CMOD = 0x40; // enable watchdog CCON |= 0x40; // startup PCA timer