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

作者: 空城123    時(shí)間: 2018-4-2 19:30
標(biāo)題: 流水燈移位,雙燈移位
#include<reg52.h>
  #include<intrins.h>
  #define uint unsigned int
  #define uchar unsigned char
  uhar temp;
  void delay(uint z);
  void main()
  {
  temp=0xf5;
  P0=temp;
  while(1)
          {
         delay(1000);
        temp=_crol_(temp,1);                                                                                          
        P0=temp;
        }       

  }
  void delay(uint z)
          {
        uint x,y;
        for(x=z;x>0;x--)
                for(y=110;y>0;y--);
        }


作者: sun_shine    時(shí)間: 2018-4-2 22:04
學(xué)習(xí)了




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