標(biāo)題: 流水燈 [打印本頁]

作者: xdlab    時間: 2017-5-20 12:06
標(biāo)題: 流水燈
#include<reg52.h>
#include<intrins.h>
unsigned int t;
unsigned char aa;
void delay(unsigned int);
void main()
{
aa=0xfe;
while(1)
  {
        P1=aa;
        delay(500);
        aa=_crol_(aa,2);
  }
}

void delay(unsigned int t)
{
unsigned int i,j;
for(i=t;i>0;i--)
  for(j=110;j>0;j--);
}






歡迎光臨 (http://www.torrancerestoration.com/bbs/) Powered by Discuz! X3.1