#include
sbit p10=P1^0;
unsigned char c;
bit p;
main()
{
本文引用地址:http://m.butianyuan.cn/article/201611/320159.htm TR0=0;
TMOD=0X01;
TH0=0XFC;
TL0=0X18;
EA=1;
ET0=1;
TR0=1;
while(1){}}
void isr() interrupt 1
{
TH0=0XFC;
TL0=0X18;
if(p!=1) p10=~p10;
if(p==1) p10=0;
c++;
if(c==250) {c=0;p=~p;}
}
評論