#include <reg52.h>
sbit P11=P1^1;
void main( )
{
TMOD = 0x01;
TH0=(65536-10000)/256;
TL0=(65536-10000)%256;
TR0=1;
while(1);
}
void InterruptTimer0( ) interrupt 1
{
static unsigned char count = 0;
TH0=(65536-10000)/256;
TL0=(65536-10000)%256;
if(count<10)
{
count++;
}
else
{
count =0;
P11=~P11;
}
}
版权声明:本文为aa543928678原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。