#include <reg51.h>#define uint unsigned int#define uchar unsigned charsbit led1=P1^0;uint num;void main(){ TMOD=0x02; TH0=6; //给定时器加初值 TL0=6; //给定时器加初值 EA=1; ET0=1; TR0=1; while(1) { if(num==3686) { num=0; led1=~led1; } }}void T0_time() interrupt 1 //中断函数{ num++;}
...