2个回答
展开全部
很好做呀
#include<reg51.h>
sbit key=P1^0;
sbit jdq=P2^0;
main()
{
unsigned int times;
TMOD=0x01;
TH0=(65536-50000)/256;
TL0=(65536-50000)%256;
while(1)
{
if(key==0)
{
while(key==0);
jdq=0;
TR0=1;
times=0;
while(times>=2400)
{
while(TF0==0);
TF0=0;
TH0=(65536-50000)/256;
TL0=(65536-50000)%256;
times++;
}
jdq=1;
TR0=0;
}
}
}
#include<reg51.h>
sbit key=P1^0;
sbit jdq=P2^0;
main()
{
unsigned int times;
TMOD=0x01;
TH0=(65536-50000)/256;
TL0=(65536-50000)%256;
while(1)
{
if(key==0)
{
while(key==0);
jdq=0;
TR0=1;
times=0;
while(times>=2400)
{
while(TF0==0);
TF0=0;
TH0=(65536-50000)/256;
TL0=(65536-50000)%256;
times++;
}
jdq=1;
TR0=0;
}
}
}
展开全部
#include<reg51.h>
sbit key=P1^0;
sbit jdq=P2^0;
main()
{
unsigned int times;
TMOD=0x01;
TH0=(65536-50000)/256;
TL0=(65536-50000)%256;
while(1)
{
if(key==0)
{
while(key==0);
jdq=0;
TR0=1;
times=0;
while(times>=2400)
{
while(TF0==0);
TF0=0;
TH0=(65536-50000)/256;
TL0=(65536-50000)%256;
times++;
}
jdq=1;
TR0=0;
}
}
}
sbit key=P1^0;
sbit jdq=P2^0;
main()
{
unsigned int times;
TMOD=0x01;
TH0=(65536-50000)/256;
TL0=(65536-50000)%256;
while(1)
{
if(key==0)
{
while(key==0);
jdq=0;
TR0=1;
times=0;
while(times>=2400)
{
while(TF0==0);
TF0=0;
TH0=(65536-50000)/256;
TL0=(65536-50000)%256;
times++;
}
jdq=1;
TR0=0;
}
}
}
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |