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
2023-04-07 20:42:18
969KB
te
1