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

標題: 單片機蔬菜大棚通風系統課程設計,含原理圖,源碼,仿真 [打印本頁]

作者: 蛋蛋向上跳    時間: 2016-12-2 10:48
標題: 單片機蔬菜大棚通風系統課程設計,含原理圖,源碼,仿真
上個月做的蔬菜大棚通風系統
附件包含通風系統的單片機源代碼
Proteus仿真圖
請大家多多指教


單片機源程序:
  1. #include <reg52.H>
  2. #include <stdio.H>
  3. #include <intrins.H>
  4. sbit KEY=P1^0;
  5. sbit LE_0=P2^5;
  6. sbit LE_1=P2^7;
  7. #define PORT_373 P0

  8. void SendData74ls373(unsigned char dat,unsigned char ChipN)
  9. {
  10.    switch(ChipN)
  11.    {
  12.              case 0:  LE_0=0;LE_1=0; PORT_373=dat;LE_0=0;_nop_();_nop_();LE_0=1; break;
  13.           case 1:  LE_0=0;LE_1=0; PORT_373=dat;LE_1=0; _nop_();_nop_();LE_1=1;break;
  14.           default:   LE_0=1; PORT_373=dat;LE_0=0; break;
  15.    }
  16. }
  17. unsigned char LS373Dat[2]={0xff,0xff};
  18. bit flag;
  19. void main()
  20. {
  21.   while(1)
  22.   {
  23.             if(KEY==0)
  24.           {
  25.                 LS373Dat[0]=0x00;
  26.                 LS373Dat[1]&=~(0x01<<5);
  27.                 if(flag)
  28.                 {  
  29.                         flag=~flag;
  30.                         LS373Dat[1]&=~(0x01<<6);
  31.                 }
  32.                 else
  33.                 {
  34.                          flag=~flag;
  35.                         LS373Dat[1]|=(0x01<<6);
  36.                 }
  37.           }
  38.           else
  39.           {
  40.                 LS373Dat[0]=0xff;
  41.                 LS373Dat[1]=0xff;
  42.           }
  43.            SendData74ls373(LS373Dat[0],0);
  44.            SendData74ls373(LS373Dat[1],1);
  45.   }
  46. }
復制代碼

所有資料打包下載:
通風程序.rar (94.72 KB, 下載次數: 71)

作者: admin    時間: 2017-1-10 00:28
好資料,51黑有你更精彩。。

作者: Veson    時間: 2018-11-26 14:52
學習一下,感謝樓主
作者: zhouwei0815    時間: 2018-12-2 22:56
有想法 用途還可以延伸 不僅僅用在蔬菜大棚  不錯 值得學習




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