本人有毫秒的,要微秒自己调下;
#include<reg52.h>
#define uchar unsigned char
#define uint
unsigned intsbit key=P1^0;
void delay(uint z)
{
uint x,y;
for(x=z;x>0;x--)
for(y=110;y>0;y--);
}
main()
{
key=1;
while(1)
{
delay(2);
key=~key;
delay(3);
key=~key;
}
}
追问keil软件能编译吗?
追答可以啊,你自己动下啊