單片機(jī)做的半導(dǎo)體制冷小冰箱_第1頁
單片機(jī)做的半導(dǎo)體制冷小冰箱_第2頁
單片機(jī)做的半導(dǎo)體制冷小冰箱_第3頁
單片機(jī)做的半導(dǎo)體制冷小冰箱_第4頁
單片機(jī)做的半導(dǎo)體制冷小冰箱_第5頁
已閱讀5頁,還剩8頁未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

第第頁單片機(jī)做的半導(dǎo)體制冷小冰箱最近天氣比較炎熱閑來無事,自己在家DIY了一個(gè)小冰箱,試了一下制冷效果還可以的,下面就把制作步驟和技術(shù)資料和大家共享一下:

這個(gè)冰冰可樂什么的真的太適合不過了。。器材:一個(gè)電源模塊,220v轉(zhuǎn)12v,6A。以及一個(gè)封裝好的制冷器,元件清單都在原理圖上可以看出來,繼電器用的是繼電器模塊。

防水型的18B20,繼電器模塊,12c887時(shí)間芯片,12864液晶屏,蜂鳴器,89c58單片機(jī)芯片,接線子,什么開關(guān),按鍵,電阻電容的你也應(yīng)該知道的,就是一個(gè)單片機(jī)模塊。。這些就是控制板的元件了,然后你還要去淘寶上買制冷器和制冷器血藥的配套的電源模塊。。然后你就可以自己DAY一個(gè)小冰箱了。。

廢話不多說先上圖:這是系統(tǒng)控制板子需要自己DIY的板子散件,待焊接焊接好的系統(tǒng)控制板成品連接好的待測試品接上顯示LCD后可以顯示的功能

系統(tǒng)完整演示圖智能小冰箱的C語言參考源代碼:

#include#include

#defineucharunsignedchar#defineuintunsignedintsbitds=P2^2;sbitrs=P3^5;sbitrw=P3^6;sbiten=P3^4;sbitpsb=P3^7;sbitfeng=P2^0;sbitdscs=P1^4;sbitdsas=P1^5;sbitdsrw=P1^6;sbitdsds=P1^7;sbitdsirq=P3^3;sbitjidianqi=P2^3;bitflag1,flag_ri;sbitxuanzhe=P1^0;sbitqueding=P1^1;sbitfanhui=P1^2;sbittiaozheng=P1^3;sbitzengjia=P3^0;sbitjianxiao=P3^1;uinttemp;intx1,x3;ucharflog1,flog,count,count1,acount1,count2,acount2,s1num,flag,t0_num,ff,xh,xh1,xh2,xw,xw1,xw2,xx,xt,axt,xt1,axt1,hh,ahh;charmiao,shi,fen,year,month,day,week,amiao,afen,ashi;floatf_temp;ucharcodetable00[]={"系統(tǒng)初始化…“};ucharcodetable01[]={”以關(guān)閉"};ucharcodetable02[]={"以開啟"};

ucharcodetable0_0[]={“電氣與”};ucharcodetable0_1[]={"信息工程學(xué)院"};ucharcodetable0_2[]={"–電氣1302唐小旺"};ucharcodetable0_3[]={"湖南工學(xué)院"};

ucharcodetable11[]={“2023年00月00日”};ucharcodetable12[]={"“};ucharcodetable13[]={”00:00:00"};ucharcodetable14[]={“當(dāng)前溫度:”};

ucharcodetable1[]={“菜1:溫度調(diào)節(jié)”};ucharcodetable2[]={“單2:定時(shí)關(guān)閉”};ucharcodetable3[]={“13:報(bào)警溫度調(diào)”};ucharcodetable4[]={"4:時(shí)間調(diào)節(jié)"};ucharcodetable5[]={“菜5:鬧鐘調(diào)節(jié)”};ucharcodetable6[]={“單6:小小游戲”};ucharcodetable7[]={“27:小小說明”};ucharcodetable8[]={"–在按選擇鍵返回"};

ucharcodetable1_1[]={“設(shè)置溫度:”};ucharcodetable1_2[]={"00"};ucharcodetable1_3[]={""};ucharcodetable1_4[]={""};ucharcodetable1_5[]={"設(shè)置成功"};ucharcodetable1_6[]={""};ucharcodetable1_7[]={""};ucharcodetable1_8[]={""};

ucharcodetable2_1[]={“設(shè)置定時(shí)開關(guān):”};ucharcodetable2_2[]={"1:開啟定時(shí)關(guān)閉"};ucharcodetable2_3[]={"2:關(guān)閉定時(shí)關(guān)閉"};ucharcodetable2_4[]={"~~~~~~~~~~~~~~~~"};ucharcodetable2_5[]={“設(shè)置時(shí)間:”};ucharcodetable2_6[]={"00:00:00"};ucharcodetable2_7[]={""};ucharcodetable2_8[]={"設(shè)置成功"};ucharcodetable2_9[]={“正在計(jì)時(shí)關(guān)閉中”};ucharcodetable2_a[]={""};ucharcodetable2_b[]={""};ucharcodetable2_c[]={"設(shè)置成功"};ucharcodetable2_d[]={“以關(guān)閉定時(shí)關(guān)閉”};ucharcodetable2_e[]={""};

ucharcodetable3_1[]={“設(shè)置報(bào)警溫度:”};ucharcodetable3_2[]={"00"};ucharcodetable3_3[]={""};ucharcodetable3_4[]={""};ucharcodetable3_5[]={"設(shè)置成功"};ucharcodetable3_6[]={"滴滴滴滴"};ucharcodetable3_7[]={“定時(shí)炸彈即將爆炸”};

ucharcodetable4_1[]={“設(shè)置時(shí)間:”};ucharcodetable4_2[]={“2023年03月22日”};ucharcodetable4_3[]={"Sun“};ucharcodetable4_4[]={”00:00:00“};ucharcodetable4_5[]={”設(shè)置成功"};ucharcodetable4_6[]={“春天到了!”};ucharcodetable4_7[]={“Iamcoming”};ucharcodetable4_8[]={"師院"};

ucharcodetable5_1[]={“設(shè)置鬧鐘:”};ucharcodetable5_2[]={"1:開啟鬧鐘"};ucharcodetable5_3[]={"2:關(guān)閉鬧鐘"};ucharcodetable5_4[]={"00:00:00“};ucharcodetable5_7[]={”設(shè)置成功"};ucharcodetable5_8[]={"小雞小雞"};ucharcodetable5_9[]={“小雞小雞咕咕day”};ucharcodetable5_a[]={"(咦,我的鬧鈴)~~"};ucharcodetable5_5[]={“設(shè)置時(shí)間:”};ucharcodetable5_6[]={"00:00:00"};ucharcodetable5_b[]={""};ucharcodetable5_c[]={"設(shè)置成功"};ucharcodetable5_d[]={“鬧鐘以關(guān)閉”};ucharcodetable5_e[]={""};

ucharcodetable6_1[]={"咦?。?!"};ucharcodetable6_2[]={"游戲捏?"};

ucharcodetable7_1[]={“小慧是傻逼”};ucharcodetable7_2[]={"小慧是傻逼"};ucharcodetable7_3[]={"小慧是傻逼"};ucharcodetable7_4[]={"小慧是傻逼"};ucharcodetable7_5[]={“當(dāng)前溫度:”};ucharcodetable7_6[]={"--’fierce’"};ucharcodetable7_7[]={"noway!!"};ucharcodetable7_8[]={"謝謝合作"};

voiddelay(uintz){uintx,y;for(x=z;x>0;x–)for(y=110;y>0;y–);}

voiddi(){feng=0;delay(100);feng=1;}

voidwrite_com(ucharcom){rs=0;rw=0;en=0;P0=com;delay(5);en=1;delay(5);en=0;}

voidwrite_dat(uchardat){rs=1;rw=0;en=0;P0=dat;delay(5);en=1;delay(5);en=0;}

voiddsreset(void){uinti;ds=0;i=103;while(i>0)i–;ds=1;i=4;while(i>0)i–;}

bittempreadbit(void){uinti;bitdat;ds=0;i++;ds=1;i++;i++;dat=ds;i=8;while(i>0)i–;return(dat);}

uchartempread(void){uchari,j,dat;dat=0;for(i=1;i>1);

}return(dat);}

voidtempwritebyte(uchardat){uinti;ucharj;bittestb;for(j=0;j>1;if(testb){ds=0;i++;i++;ds=1;i=8;while(i>0)i–;}else{ds=0;i=8;while(i>0)i–;ds=1;i++;i++;}}}

voidtempchang(void){dsreset();delay(1);tempwritebyte(0xcc);tempwritebyte(0x44);}uintget_temp(){uchara,b;dsreset();delay(1);tempwritebyte(0xcc);tempwritebyte(0xbe);a=tempread();b=tempread();temp=b;temp<<=8;temp=temp|a;f_temp=temp0.0625;temp=f_temp10+0.5;f_temp=f_temp+0.05;returntemp;}

voidwrite_ds(ucharadd,uchardat){dscs=0;dsas=1;dsds=1;dsrw=1;P0=add;dsas=0;dsrw=0;P0=dat;dsrw=1;dsas=1;dscs=1;}

ucharread_ds(ucharadd){uchards_date;dsas=1;dsds=1;dsrw=1;dscs=0;P0=add;dsas=0;dsds=0;P0=0xff;ds_date=P0;dsds=1;dsas=1;dscs=1;returnds_date;}

/*voidset_time(){write_ds(0,0);write_ds(1,0);write_ds(2,0);write_ds(3,0);write_ds(4,0);write_ds(5,0);write_ds(6,0);write_ds(7,0);write_ds(8,0);write_ds(9,0);}*/

voidinit1(){EA=1;EX1=1;IT1=1;t0_num=0;s1num=0;week=1;//write_ds(0x0A,0x20);//write_ds(0x0B,0x26);//set_time();}

voidsfm_(ucharadd,chardat){ucharsi,ge;si=dat/10;ge=dat%10;write_com(add);write_dat(0x30+si);write_dat(0x30+ge);}

voidasfm_(ucharadd,chardat){ucharsi,ge;si=dat/10;ge=dat%10;write_com(add);wr

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論