#include <reg52.h>
#define uchar unsigned char
#define uint unsigned int
sbit LED = P1^0;
void DelayMS(uint x)
{
uchar i;
while(x--)
{
for(i=120;i>0;i--);
}
}
void main()
{
while(1)
{
LED = ~LED;
DelayMS(150);
}
}
仿真+源代码在https://download.csdn.net/download/qq_30787727/14927150
关注公号众陆小马获取更多