欧美极品高清xxxxhd,国产日产欧美最新,无码AV国产东京热AV无码,国产精品人与动性XXX,国产传媒亚洲综合一区二区,四库影院永久国产精品,毛片免费免费高清视频,福利所导航夜趣136

標(biāo)題: 新手實(shí)現(xiàn)花樣流水燈源程序 [打印本頁]

作者: tldbyytmch    時(shí)間: 2018-3-22 09:52
標(biāo)題: 新手實(shí)現(xiàn)花樣流水燈源程序
實(shí)現(xiàn)花樣流水燈單片機(jī)源程序如下:
  1. #include <reg52.h>
  2. #include <intrins.h>
  3. #define uchar unsigned char
  4. #define uint  unsigned int
  5. sbit LED1 = P1^0;
  6. //uint a;
  7. uchar i;
  8. uchar temp;

  9. void delay(uint z)
  10. {
  11.         uint x,y;
  12.         for(x = z; x > 0; x--)
  13.                 for(y = 120; y > 0 ; y--);
  14. }

  15. void main()
  16. {
  17.         temp = 0x7f;
  18.         P1 = temp;
  19.         while(1)
  20.         {
  21.                 for(i = 0; i < 8; i++)
  22.                 {
  23.                         temp = _cror_(temp,1);
  24.                         P1 = temp;
  25.                         delay(1000);       
  26.                 }
  27.         }
  28. }
復(fù)制代碼

所有資料51hei提供下載:
例程.rar (7.98 KB, 下載次數(shù): 6)







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