freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

畢業(yè)設(shè)計(jì)-plc自動(dòng)售貨機(jī)控制系統(tǒng)設(shè)計(jì)(編輯修改稿)

2025-01-08 20:00 本頁(yè)面
 

【文章內(nèi)容簡(jiǎn)介】 Coin 10: 投入 10元硬幣的動(dòng)作按鍵; 22 Select cola: 選擇傳統(tǒng)可樂(lè)的按鍵信號(hào) 。 Select diet: 選擇減肥可樂(lè)的按鍵信號(hào) 。 另外,系統(tǒng)必須響應(yīng)顧客的各種操作行為,以利于顧客的選擇判斷,因此定義下列系統(tǒng)輸出信號(hào)。 Led cola ok: 燈亮顯示還有傳統(tǒng)可樂(lè) 。 Led diet ok: 燈亮顯示還有減肥可樂(lè) 。 Led cola sel: 燈亮顯示傳統(tǒng)可樂(lè)選擇按鍵被按 。與 Led diet sel 只有一個(gè)燈亮,后按著優(yōu)先; Led diet sel: 燈亮顯示傳統(tǒng)可樂(lè)選擇按鍵被按 。與 Led cola sel 只有一個(gè)燈亮,后按著優(yōu)先; Led buy: 燈亮顯示按了購(gòu)買確認(rèn)鍵; Led cancle: 燈亮顯示按了購(gòu)買取消鍵; Led five( 1 to 3): 3個(gè) LED,投入 1個(gè) 5元硬幣亮一個(gè) LED。 Led ten( 1 to 2): 2個(gè) LED,投入 1個(gè) 10 元硬幣亮一個(gè) LED。 Led five return: 3 個(gè) LED , 以每秒 4 次的閃爍代表被推出的硬幣; Led ten renturn: 2 個(gè) LED, 以每秒 4次的閃爍代表被推出的硬幣; Led cola out: 燈亮顯示 cola 已出貨; Led diet out: 燈亮顯示 diet 已出貨; 在 Xilinx 的 FPGA Express 設(shè)計(jì)環(huán)境中,對(duì)所有 VHDL 程序都加入下列幾行有關(guān)庫(kù)及程序包的調(diào)用語(yǔ)句。 Library ieee Use 。 Use 。 Use 。 另外,應(yīng)將抖動(dòng)消除電路 debounce 放在 my_pkg 的程序包中,故在主程序中應(yīng)加上一行: Use 23 下面列出 entity 模塊的程序代碼。 Entity 模塊的 VHDL 碼 Library and package declaraction Library ieee。 use 。 use 。 use 。 use work 。package including ‘ debounce’ ponent input and output pins declaraction entity vendor is port( reset: in std logic。power reset to another buying. Clk:in std logic。system clock lkhz ok_ in std logic。button to confirm buying cancle in std logic。button to cancle buying coin_5: in std_ logic。button to throw coin $5 coin_10: in std_ logic。 button to throw coin $10 select cola in std_ logic。button to choose drink cola select diet in std_ logic。button to choose drink diet led cola ok:out std_ logic。 led for cola avaiable led diet ok: out std_ logic。 led for diet avaiable led cola sel: out std_ logic。 led to show coal choosen led diet sel: out std_ logic。 led to show diet choosen led buy: out std_ logic。led to show buying confimed led cancle: out std_ logic。led for cancle led five out std_ logic vector(2to0)。leds to show coin five numbers. led ten out std_ logic vector(1to0)。 leds to show coin ten numbers. led five return: out std_ logic vector(2to0)。 leds to show coin five 24 returned led ten renturn:out std_ logic vector(1to0)。 leds to show coin ten returned led cola out: out std_ logic。 led for cola delivery led diet out: out std_ logic。 led for diet delivery end. architecture 模塊 此處,我們必須定義一些功能快之間整體共享的傳遞信號(hào),以整合所有快的功能。這些信號(hào)將成為各個(gè)塊外部輸入或輸出信號(hào),諸如: ok: 用來(lái)維持 ok _buy 狀態(tài) 。 cancle: 用來(lái)維持 cancle 狀態(tài) 。 money_ok: 投入金額正確的指針 。 renturn_ok: 退幣的閃爍警示信號(hào); cola_choice: 用來(lái)維持 cola_selection 狀態(tài) 。 diet_choice: 用來(lái)維持 diet_selection 狀態(tài) 。 total amount five: 5元硬幣的累計(jì)投入金額(最高為 15 元); total amount ten: 10元硬幣的累計(jì)投入金額(最高為 20 元); cola_out: cola 已經(jīng)出貨的信號(hào); diet_out: diet 已經(jīng)出貨的信號(hào); 下面列出 architecture 模塊的程序代碼 architecture 模塊的 VHDL 碼 define the signal structure and flow of the device Architecture arch of vendor is global signal flowing among different circuit blocks signal ok std_ logic。edgad ok buy signal cancle std_ logic。 edged cancle buy signal money ok std_ logic。 signal for sufficient money signal return std_ logic。 twinkling singal for coin returned 25 signal cola choice std_ logic。 to maintain the cola selection status signal diet choice std_ logic。 to maintain the diet selection status signal total amount – five:integer range0 to 15。 total amount of coin five signal total amount – ten:integer range0 to 20。 total amount of coin ten signal cola ok:out std_ logic。 signal for cola delivery signal diet ok:out std_ logic。 signal for diet delivery begin 產(chǎn)生退幣閃爍信號(hào)的電路模塊( return_clk) 為了提醒退幣,設(shè)計(jì)輸出 4HZ 閃爍信號(hào)給對(duì)應(yīng)的 LED。本模塊的輸入信號(hào)reset 與 clk 均為系統(tǒng)輸入信號(hào),輸出信號(hào) return_clk 為內(nèi)部傳遞用的全局信號(hào)。本模塊采用一個(gè) 8 位自動(dòng)計(jì)數(shù)器,將 1024HZ 的系統(tǒng)時(shí)鐘除以 2^8=256,可以得到 4HZ 的閃爍信號(hào)。其中 8位的計(jì)數(shù)信號(hào)為此模塊的局部信號(hào),該信號(hào)并不傳遞到模塊外。下面列出 return_clk 模塊的程序代碼。 return_clk 模塊的 VHDL 碼 to generate 4hz renturn clk by dividing 1024hz clock by 256 return_clk:block input_clk reset output_clk reset singal count std_logic_vector(7downto0)。free count from 0 to 255 begin process(reset_clk) begin if reset=’ 1’ then count﹤ =” 00000000” return_clk﹤ =’ 0’ 。 26 elsifrising_ed_(clk) then count﹤ =count+00000001; if count( 7) =‘ 1’ then return_clk﹤ =’ 1’ 。 else renturn_clk﹤ =’ 0’ 。 end if。 and if。 and process。 and block。 設(shè)計(jì) 1KHZ 的系統(tǒng)輸入信號(hào) clk 以及 reset,可以得到除以 256 之后的 4hz( 256ms)的整體共享信號(hào) return_clk,信號(hào)仿真結(jié)果如圖 : 圖 退幣閃爍信號(hào)電路仿真圖 投入 10 元硬幣的處理電路模塊( coin 10 counting) 本模塊計(jì)算 10 元硬幣的投入數(shù)量及累計(jì)金額,并點(diǎn)亮對(duì)應(yīng)數(shù)量的 LED。模塊輸入信號(hào)有 clk 與 coin 兩個(gè)系統(tǒng)輸入信號(hào), led ten 為系統(tǒng)輸出信號(hào),輸出total amount ten 為全局信號(hào)??紤]到投幣為記次行為,故將 coin ten 信號(hào)進(jìn)行抖動(dòng)消除處理,以利于計(jì)數(shù)。 no coin ten 信號(hào)用來(lái)累計(jì) 10 元硬幣的投入數(shù)量,這兩個(gè)信號(hào)都是局部信號(hào),不向外傳遞。下面列出 coin 10 counting 模塊的程序代碼。 coin 10 counting 模塊的 VHDL to count the number and amount of coin 10 and light the leds coin 10 counting。block input: led ten total amount 10 signal coin10 std_logic。 cleared coin 10 signal to count push button frequency 27 signal mo coin ten integaer range 0 to 2 no of throw coin ten begin ul: debounce portmap( clk﹥ =clk, touch﹥ =coin 10, push out﹥ =coin10) process( reset coin 10) begin if reset=‘ 1’ then total amount ten﹤ =0; no coin ten﹤ =0 led ten ﹤ =00 els if rising dege( coin 10) thentriggered by coin10 total
點(diǎn)擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1