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
the PCA4 watchdog is a) a kludge and b) worthless. You do not state which brand of chip you use, but most Philips chips with a PCA has a "real" watchdog as well. The PCA4 one is there for compatibility. why a kludge? you just found out why worthless? it can be disabled and any runaway code may disable it. Erik
I'm using a Philips P87C51RC2. Is there a real watchdog on this? That would be nice but I haven't seen one. Is there a Philips replacement with a real watchdog that you know of? Thanks, Jeff
yep P89C51Rx2 P89V51Rx2 P89C66x Erik
Thanks, Erik, that's a bit disappointing about the PCA kludge. Now I know. Jeff