上传者: 38595850
|
上传时间: 2023-04-07 20:42:18
|
文件大小: 969KB
|
文件类型: PDF
001:闪烁的LED
#include
#define u8 unsigned char
#define u16 unsigned int
sbit LED=P2^0;
void delay(u16 x)
{
uchar i;
while(x--)
{
for(i=0;i<120;i++);
}
}
void main()
{
while(1)
{
LED=~LED;
delay(150);
}
}
002:从左到右的流水
#include
#include
#define u8 unsigned char
#define u16 unsigned int
voi