“89c51控制定时器T1产生周期为1s的方波”程序设计及proteus仿真图一、源程序代码:#includereg52.hsbitfangbo=P2^7;unsignedintaa=0;voidmain(){TMOD=0x10;TH1=(65536-50000)/256;TL1=(65536-50000)%256;EA=1;ET1=1;TR1=1;while(1){if(aa==10){fangbo=~fangbo;aa=0;}}}voidtimer1()interrupt3{TH1=(65536-50000)/256;TL1=(65536-50000)%256;aa++;}二、总体的连线图(proteus)三、对应的仿真: