#include <REGX52.H>
int main()
{
while(1)
{
if(P3_1 == 0)
{
P2_0 = 0;
}
else
{
P2_0 = 1;
}
}
return 0;
}
按下k1点亮 松开灭
#include <REGX52.H>
int main()
{
while(1)
{
if(P3_1 == 0)
{
P2_0 = 0;
}
else
{
P2_0 = 1;
}
}
return 0;
}
按下k1点亮 松开灭