#include <REGX52.H>

void Delay(unsigned int xms) //@12.000MHz { unsigned char data i, j; while(xms) { i = 2; j = 239; do { while (--j); } while (--i); xms--; }

}

void main() { while(1) { if(P3_0==0) { Delay(20); while(P3_0==0); //空循环体 Delay(20); P2_0=~P2_0; //~取反 }

	if(P3_3==0)
	{
		P2_0=0;
	}
	else
	{
		P2_0=1;
	}
}

}


原文地址: https://www.cveoy.top/t/topic/pikM 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录