单片机C语言程序设计实例.doc
时间:11-15 13:51
查看:760次
下载:162次
简介:
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++);
}
}
![](/Uploads/2014_11/article/0115b8d41e08329a6a35e73e0c12f005.png)