#include
#define uint unsigned int
#define uchar unsigned char
void delay(uint z)
{
uint x,y;
for(x=100;x>0;x--)
for(y=z;y>0;y--);
}
void main()
{
while(1)
{
P1=0x7f;
delay(100);
P1=0xbf;
delay(100);
P1=0xdf;
delay(100);
P1=0xef;
delay(100);
P1=0xf7;
delay(100);
P1=0xfb;
delay(100);
P1=0xfd;
delay(100);
P1=0xfe;
delay(100);
}
} 单片机程序,流水灯!!!左移!!!不懂在联系!!
额
代码这有几个
电路图式protues仿真的
不知你要不 如要就留下邮箱