单片机C语言程序设计实例.doc
时间:11-15 13:51
查看:875次
下载:163次
简介:
01 闪烁的 LED
/* 名称:闪烁的 LED
说明:LED 按设定的时间间隔闪烁
*/
#include<reg51.h>
#define uchar unsigned char
#define uint unsigned int
sbit LED=P1^0;
//延时
void DelayMS(uint x)
{
uchar i;
while(x--)
{
for(i=0;i<120;i++);
}
}
