【正文】
的可調 溫度有限制,所以計數器的計數范圍也是有限的,我設定的溫度為 10 到 26 攝氏度。模式的控制可以是一個兩位二進制計數器,四個狀態(tài)與四種模式相對應,而且四個模式循環(huán)顯示 2 設計原理及總體框圖 總體框圖 模式選擇模塊 模式選擇模塊由一個選擇模塊和四個控制模塊組成。 模式選擇器 由一個二進制計數器構成 library ieee。event and en=39。 30 進制計數器 library ieee。 begin process(clk,clr) variable t0:std_logic_vector(3 downto 0)。cin=39。 end if。 elsif clk 39。 else t1:=t1+1。 end process。 end entity。139。cin=39。139。co=39。 end if。 entity shezhiqi is port( inc,clr: in std_logic。 process(inc,clr) begin if clr=39。039。 end if。 then if(t10=0010 and o1=0110) then t10=0001。 end arc。139。039。都說實踐才是檢驗真理的唯一標準,在學習的時候馬馬虎虎、眼高手低,到了真正進行設計的時候勢必不會順順利利。 仿真波形見圖五 4 編譯及仿真 圖 1 圖二 圖三 圖四 圖五 5 硬件 調試 與結果 分析 仿真 結果如上圖所示。139。 entity kaiguan is port(shuru1,shuru2,ting:in std_logic。 then t10=t10+1。 then t10=0000。 else o1=o1+1。event and inc=39。 signal o1:std_logic_vector(3 downto 0)。 仿真波形見圖三 溫度設置 library ieee。039。139。 one=t0。 elsif t0=1001 then cin=39。139。 use