WDT做定时器使用,产生定时中断,使灯循环亮灭 #includevoid main(){WDTCTL = WDTPW + WDTSSEL + WDTTMSEL;P4DIR |= BIT0;//P4.0定义为输出P4OUT |= BIT0;//P4.0初始化为1,灯灭IE1 |= WDTIE;//使能WDT定时器中断IFG1 &= ~WDTIFG;//清中断标志_BIS_SR(GIE);//使能总中断}#pragma vector = W... 2023-06-13 WDT定时器定时中断文章单片机51单片机