内容简介:EA=1; //开中断 ET0=1; //允许定时器0中断 TR0=1;p10 = 0;p11 = 0; //启动定时器0 while(1); //无穷循环,等待中断 } void timer0_int(void) interrupt 1 { uint t0;TH0=(65535-10000)/ sbit LED=P1^0;sbit K1=P1^1;sbit K2=P1^2;void...
用户评论
havenhome