設(shè)計(jì)基于VHDL的簡(jiǎn)易全自動(dòng)控制洗衣機(jī).doc_第1頁
設(shè)計(jì)基于VHDL的簡(jiǎn)易全自動(dòng)控制洗衣機(jī).doc_第2頁
設(shè)計(jì)基于VHDL的簡(jiǎn)易全自動(dòng)控制洗衣機(jī).doc_第3頁
設(shè)計(jì)基于VHDL的簡(jiǎn)易全自動(dòng)控制洗衣機(jī).doc_第4頁
設(shè)計(jì)基于VHDL的簡(jiǎn)易全自動(dòng)控制洗衣機(jī).doc_第5頁
已閱讀5頁,還剩12頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

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

文檔簡(jiǎn)介

華東理工大學(xué)2009 -2010 學(xué)年第2學(xué)期電子綜合設(shè)計(jì)dea課程設(shè)計(jì)作業(yè) 2010.6 班級(jí):xxxx 學(xué)號(hào): xxx 姓名:xxxx開課學(xué)院:信息學(xué)院 任課老師: xxxx 成績(jī): 題目:1、簡(jiǎn)易全自動(dòng)洗衣機(jī)控制器設(shè)計(jì) 2、通信系統(tǒng)信道編碼器設(shè)計(jì)作業(yè)要求:電子系統(tǒng)設(shè)計(jì)eda課程是電子信息工程、自動(dòng)控制、計(jì)算機(jī)科學(xué)與工程等專業(yè)的技術(shù)課之一,具有很強(qiáng)的工程實(shí)踐性。課程學(xué)習(xí)要求學(xué)生:掌握現(xiàn)代硬件數(shù)字電路的軟件化設(shè)計(jì)的基本方法、掌握應(yīng)用vhdl及eda工具開發(fā)設(shè)計(jì)數(shù)字系統(tǒng)的基本方法以及對(duì)現(xiàn)代電子系統(tǒng)設(shè)計(jì)技術(shù)有一定的了解 設(shè)計(jì)報(bào)告要求:1、按照設(shè)計(jì)題目要求構(gòu)建設(shè)計(jì)框圖 2、用eda設(shè)計(jì)軟件按照設(shè)計(jì)題目要求進(jìn)行原型設(shè)計(jì)并給出仿真結(jié)果 3、對(duì)仿真結(jié)果進(jìn)行一定的討論 4、原程序和仿真波形等附錄。教師評(píng)語: 教師簽名: 年 月 日電子綜合設(shè)計(jì)eda綜合設(shè)計(jì)題設(shè)計(jì)一簡(jiǎn)易全自動(dòng)洗衣機(jī)控制器。該控制器由兩大狀態(tài)a和b組成,每個(gè)狀態(tài)分三個(gè)子狀態(tài),每個(gè)狀態(tài)分別由選擇a和選擇b控制。其中a為步進(jìn)選擇按紐,每步跳轉(zhuǎn)一個(gè)子狀態(tài)、b也為步進(jìn)選擇按紐,但每步選擇b中的所有組合中的一種。當(dāng)啟動(dòng)時(shí),時(shí)間序列控制器按已選的b類子狀態(tài)順序執(zhí)行。過程啟動(dòng)由啟動(dòng)/暫停鍵控制(暫停鍵在過程啟動(dòng)后任意時(shí)間可暫停/恢復(fù)過程)過程啟動(dòng)后機(jī)蓋開啟應(yīng)均能暫停過程,復(fù)蓋間停30秒后重新繼續(xù)原過程。a:強(qiáng)洗 標(biāo)準(zhǔn) 弱洗b:洗滌 漂洗 甩干 (洗滌,漂洗時(shí)電機(jī)分別正轉(zhuǎn)、反轉(zhuǎn))強(qiáng)洗:(共36分鐘) 洗滌 18分漂洗 14分甩干 4分(洗滌時(shí)電機(jī)分別正轉(zhuǎn)4分、反轉(zhuǎn)4分,正反轉(zhuǎn)間停30秒;漂洗時(shí)電機(jī)分別正轉(zhuǎn)3分、反轉(zhuǎn)3分,正反轉(zhuǎn)間停30秒;甩干時(shí)電機(jī)分別正轉(zhuǎn)1.5分,間停30秒)標(biāo)準(zhǔn):(共26分鐘) 洗滌 14分漂洗 8 分甩干 4分(洗滌時(shí)電機(jī)分別正轉(zhuǎn)3分、反轉(zhuǎn)3分,正反轉(zhuǎn)間停30秒;漂洗時(shí)電機(jī)分別正轉(zhuǎn)1.5分、反轉(zhuǎn)1.5分,正反轉(zhuǎn)間停30秒;甩干時(shí)電機(jī)分別正轉(zhuǎn)1.5分,間停30秒)弱洗(共20分鐘) 洗滌 10分漂洗 6分甩干 4分(洗滌時(shí)電機(jī)分別正轉(zhuǎn)2分、反轉(zhuǎn)2分,正反轉(zhuǎn)間停30秒;漂洗時(shí)電機(jī)分別正轉(zhuǎn)1分、反轉(zhuǎn)1分,正反轉(zhuǎn)間停30秒;甩干時(shí)電機(jī)分別正轉(zhuǎn)1.5分,間停30秒)設(shè)定秒脈沖已給定,指示為led,整過程完成后,蜂鳴器響30秒。整個(gè)設(shè)計(jì)為正邏輯。一、程序如下:library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity xiyiji is port(count_n,count_m,start,cook,clk:in std_logic; look:out std_logic; dout :out std_logic_vector(1 downto 0);end xiyiji;architecture behav of xiyiji issignal dt1,dt2:std_logic_vector(1 downto 0);signal dicsount,tem:std_logic_vector(3 downto 0);signal dcp:std_logic_vector(3 downto 0);signal ct:std_logic_vector(5 downto 0);signal ct1,ct2:std_logic_vector(3 downto 0);signal sg,cmks:std_logic;begin process(count_n,sg) beginif sg=1 thendt1=00;elsif count_nevent and count_n=1 thenif dt1=3 thendt1=01;elsedt1=dt1+1;end if;end if;end process;process(count_m,sg)beginif sg=1 thendt2=00;elsif count_mevent and count_m=1 thenif dt2=3 thendt2=01;elsedt2=dt2+1;end if;end if;end process; process(start)beginif sg=1 thencmks=0;elsif startevent and start=1 then dicsount=dt1&dt2;cmks=cmks xor 1;end if;end process; process(clk,start,cook)beginif start=1 and dcp=0000 thendcp=dicsount;elsif clkevent and clk=1 thenif cook=1 thendout0000 thendout=00;elsif sg=1 thenif ct10001 thenct1=0000;sgif ct35 thenct=ct+1;if ct18 thendout=01;ct1=ct1+1;elsif ct1=8 thendout=00;ct1=ct1+1;elsif ct28 thendout=10;ct2=ct2+1;elsif ct2=8 thendout=00;ct1=0000;ct2=0000;end if;elsedcp=0110;ct=000000;ct1=0000;ct2=0000;doutif ct27 thenct=ct+1;if ct16 thendout=01;ct1=ct1+1;elsif ct1=6 thendout=00;ct1=ct1+1;elsif ct26 thendout=10;ct2=ct2+1;elsif ct2=6 thendout=00;ct1=0000;ct2=0000;end if;elsedcp=0111;ct=000000;ct1=0000;ct2=0000;doutif ct8 thenct=ct+1;if ct13 thendout=01;ct1=ct1+1;elsif ct1=3 thendout=00;ct1=ct1+1;elsif ct23 thendout=10;ct2=ct2+1;elsif ct2=3 thendout=00;ct1=0000;ct2=0000;end if;elsedcp=0000;ct=000000;ct1=0000;ct2=0000;sgif ct27 thenct=ct+1;if ct16 thendout=01;ct1=ct1+1;elsif ct1=6 thendout=00;ct1=ct1+1;elsif ct26 thendout=10;ct2=ct2+1;elsif ct2=6 thendout=00;ct1=0000;ct2=0000;end if;elsedcp=1010;ct=000000;ct1=0000;ct2=0000;doutif ct15 thenct=ct+1;if ct13 thendout=01;ct1=ct1+1;elsif ct1=3 thendout=00;ct1=ct1+1;elsif ct23 thendout=10;ct2=ct2+1;elsif ct2=3 thendout=00;ct1=0000;ct2=0000;end if;elsedcp=1011;ct=000000;ct1=0000;ct2=0000;doutif ct8 thenct=ct+1;if ct13 thendout=01;ct1=ct1+1;elsif ct1=3 thendout=00;ct1=ct1+1;elsif ct23 thendout=10;ct2=ct2+1;elsif ct2=3 thendout=00;ct1=0000;ct2=0000;end if;elsedcp=0000;ct=000000;ct1=0000;ct2=0000;sgif ct19 thenct=ct+1;if ct14 thendout=01;ct1=ct1+1;elsif ct1=4 thendout=00;ct1=ct1+1;elsif ct24 thendout=10;ct2=ct2+1;elsif ct2=4 thendout=00;ct1=0000;ct2=0000;end if;elsedcp=1110;ct=000000;ct1=0000;ct2=0000;doutif ct11 thenct=ct+1;if ct12 thendout=01;ct1=ct1+1;elsif ct1=2 thendout=00;ct1=ct1+1;elsif ct22 thendout=10;ct2=ct2+1;elsif ct2=2 thendout=00;ct1=0000;ct2=0000;end if;elsedcp=1111;ct=000000;ct1=0000;ct2=0000;doutif ct8 thenct=ct+1;if ct13 thendout=01;ct1=ct1+1;elsif ct1=3 thendout=00;ct1=ct1+1;elsif ct23 thendout=10;ct2=ct2+1;elsif ct2=3 thendout=00;ct1=0000;ct2=0000;end if;elsedcp=0000;ct=000000;ct1=0000;ct2=0000;sgdout=00;end case;end if;end if;end process;look=sg; end behav;二、仿真波形如下強(qiáng)洗全部過程強(qiáng)洗 漂洗、甩干強(qiáng)洗(甩干)標(biāo)準(zhǔn)全部過程標(biāo)準(zhǔn)(漂洗、甩干)標(biāo)準(zhǔn)(甩干)弱洗全過程弱洗(漂洗、甩干)九、弱洗(甩干)強(qiáng)開蓋子:一、強(qiáng)洗強(qiáng)開蓋一、 標(biāo)準(zhǔn)強(qiáng)開蓋二、 弱洗強(qiáng)開蓋暫停和啟動(dòng)一、 強(qiáng)洗暫停二、 強(qiáng)洗重新啟動(dòng)三、 標(biāo)準(zhǔn)暫停四、 標(biāo)準(zhǔn)重新啟動(dòng)五、 弱洗暫停六、 弱洗重新啟動(dòng)兩次洗衣一、 兩次強(qiáng)洗兩次標(biāo)準(zhǔn)(漂洗、甩干)二、 兩次弱甩干三、設(shè)計(jì)思想討論設(shè)計(jì)時(shí)參考了已有程序,此芯片有五個(gè)輸入和三個(gè)輸出,輸入count_m和輸入count_n是狀態(tài)控制鍵,輸入start是輸入啟動(dòng)和暫停鍵,以及一個(gè)時(shí)鐘clk。輸出是洗衣結(jié)束鈴聲端口和電機(jī)驅(qū)動(dòng)端口。在設(shè)計(jì)中,為便于調(diào)試和觀察將時(shí)鐘周期假設(shè)為30s。本次設(shè)計(jì)大致可以分成兩個(gè)模塊來看待,控制端和工作端??刂撇糠质褂昧巳齻€(gè)進(jìn)程來處理,進(jìn)程一控制狀態(tài)count_m,進(jìn)程二控制狀態(tài)count_n,進(jìn)程三控制開始和暫停。工作部分使用了一個(gè)進(jìn)程來處理,在該進(jìn)程中主要處理強(qiáng)制開蓋,洗衣的各個(gè)狀態(tài),以及洗衣結(jié)束后的鈴聲??刂贫薱ount_m中,sg是工作結(jié)束標(biāo)志信號(hào),信號(hào)ts控制洗衣機(jī)的暫停和重新啟動(dòng),dt是狀態(tài)的中間變量。cookk為強(qiáng)開洗衣機(jī)蓋子信號(hào)端,dcp輸入狀態(tài)中間信號(hào)。洗衣機(jī)正常工作過程:洗衣機(jī)總共有九種工作狀態(tài),這九種狀態(tài)可以分成三大部分,強(qiáng)洗,標(biāo)準(zhǔn),弱洗,此三種狀態(tài)的洗衣過程類似,因此以強(qiáng)洗來解釋說明。洗滌完成后,將信號(hào)tp變換到漂洗狀態(tài),然后變換到甩干,甩干結(jié)束后

溫馨提示

  • 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)論