如何利用单片机控制一颗LED 灯闪烁
#include<reg51.h>sbit led=P2^0;void delay()//延时函数,实现对LED 灯的亮灭控制{unsigned int i,j;for(i=0;i<1000;i++)for(j=0;j<5;j++);}void main(void){while(1){led=0;//点亮LED 灯delay();//延时led=1;//熄灭LED灯delay();//延时}}...