#include<reg52.h>
sbit LED=P1^2;
sbit KEY=P3^3;
void main()
{
KEY=1;
while(1)
{
if(!KEY)
{
LED=0;
}
else
{
LED=1;
}
}
}
#include<reg52.h>
sbit LED=P1^2;
sbit KEY=P3^3;
void main()
{
KEY=1;
while(1)
{
if(!KEY)
{
LED=0;
}
else
{
LED=1;
}
}
}
转载于:https://www.cnblogs.com/fengyepiaolei/archive/2011/11/18/2254577.html