www.pudn.com > STC.rar > WDT.C, change:2009-07-23,size:277b


/* 
晶振在12M或11.0592M时,溢出时间为1s左右 
*/ 
 
sfr WDT_COUTR = 0XC1; 
 
void main() 
{ 
	... 
	WDT_COUTR = 0X3C; 
	/* 0011,1100 EN_WDT = 1,CLR_WDT = 1,IDLE_WDT = 1,PS2=1,PS1=0,PS0=0 */ 
	 while(1) 
	 { 
		display(); 
		keyboard(); 
		... 
		WDT_COUTR = 0X3C; //喂狗 
	 } 
}