Hi All, I am using AT89s8252,to reset the Watch Dog timer I am using the cmd(all in vain)
setb WDTEN_
#define WDTEN_ 0x01 #define WDTRST_ 0x02 . . .
Without bit-addressability (which is a Keil extension and not part of ANSI 'C') you will have to use the standard ANSI 'C' approach of using mask values on the whole byte. The #defines you mentioned sound like mask values? ie, 0x01 is bit 0; 0x02 is bit 1.
First of all, to reset watchdog you must use bit WDTRST. Bit WDTEN is for enable/disable watchdog in the whole. Anyway, those defines you told about are values, not bits' numbers. So to use it you should do next: In C:
WMCON |= WDTEN_;
ORL WMCON,#WDTEN_
Hi, Thanx Andy and Oleg... I use assmbly language for coding...planning to move towards c.All these I was using a DOS based assembler. As Oleg mentioned to reset the WDT its the WDTRST bit(sorry for that).