【正文】
行紅綠燈顯示變化 四.源程序(注釋)l LIBRARY IEEE。輸入端口:CLK時鐘信號,EMERGENCY緊急信號,RESET復(fù)位信號輸出端口:COUNTER計數(shù)狀態(tài)信號,BELL報警信號u COUNTDOWN模塊,倒計時顯示模塊,通過輸入的COUNTER和CLK來控制數(shù)碼管共陰極和7段數(shù)碼管數(shù)字顯示控制。u FREQUENCY模塊,由于外部時鐘信號CLK的頻率為50MHz,而實際需要的內(nèi)部計時時鐘頻率為1Hz,需要一個分頻電路。(二)總體框圖CLK LIGHT1EMERGENCYLIGHT2RESETBELLNUMCAT——TEMPCLK開關(guān)1數(shù)碼管顯示輸出數(shù)碼管共陰極控制東西向交通燈南北向交通燈蜂鳴器開關(guān)2控制器緊急請求系統(tǒng)復(fù)位BELL控制器南北燈(包括禁止左轉(zhuǎn)燈)東西燈(包括禁止左轉(zhuǎn)燈)復(fù)位緊急請求分頻器時鐘時間計數(shù)器譯碼器時間倒計時顯示警鈴YES南北綠,東西紅東西禁止左轉(zhuǎn)燈亮是否綠燈時間到20s?對黃燈開始計時南北黃,東西紅東西禁止左轉(zhuǎn)燈亮是否黃燈時間到5s?對綠燈開始計時南北紅,東西綠南北禁止左轉(zhuǎn)燈亮是否綠燈時間到20s?對黃燈開始計時南北紅,東西黃南北禁止左轉(zhuǎn)燈亮是否黃燈時間到5s?對綠燈開始計時YESYESYESNONONONO啟動/復(fù)位任何/當(dāng)前正常運行狀態(tài)警報開關(guān)是否打開?全部亮紅燈+警鈴YESNO(狀態(tài)機(jī))紅綠燈顯示狀態(tài)狀態(tài)S0南北綠燈亮,東西紅燈亮,東西禁止左轉(zhuǎn)S1南北黃燈亮,東西紅燈亮,東西禁止左轉(zhuǎn)S2南北紅燈亮,東西綠燈亮,南北禁止左轉(zhuǎn)S3南北紅燈亮,東西黃燈亮,南北禁止左轉(zhuǎn)S4南北東西紅燈都亮,南北東西都禁止左右轉(zhuǎn)(三)分塊設(shè)計 在VHDL設(shè)計中,采用自頂向下的設(shè)計思路。由于為共陰極控制,輸出一個CAT_TEMP信號控制選擇數(shù)碼管顯示,NUM信號輸出顯示的內(nèi)容。:1) 東西方向和南北方向各使用4個LED顯示,LIGHT1,LIGHT2,紅黃綠各代表紅黃綠燈,剩下兩個紅燈分別表示限制兩個方向的禁止左轉(zhuǎn)。2) 緊急狀態(tài)按鍵撥碼開關(guān)EMERGENCY,當(dāng)將其置為高電平,表示緊急情況發(fā)生,兩個方向均為紅燈亮,計時停止,蜂鳴器蜂鳴;當(dāng)置其為低電平,信號燈和計時器恢復(fù)原來狀態(tài),正常工作。1). 南北和東西方向各有一組綠、黃、紅燈用于指揮交通,綠燈、黃燈和紅燈的持續(xù)時間分別為20 秒、5 秒和25 秒;2). 當(dāng)有特殊情況(如消防車、救護(hù)車等)時,兩個方向均為紅燈亮,計時停止,當(dāng)特殊情況結(jié)束后,控制器恢復(fù)原來狀態(tài),繼續(xù)正常運行;3). 用兩組數(shù)碼管,以倒計時方式顯示兩個方向允許通行或禁止通行的時間;:1). 增加左、右轉(zhuǎn)彎顯示控制功能;2). 緊急狀況時增加聲光警告功能;3). 自擬其它功能。提供系統(tǒng)正常工作/復(fù)位和緊急情況兩種工作模式。路口交通燈控制系統(tǒng)的有東西路和南北路交通燈 R(紅)、Y(黃)、G(綠)三色,所有燈均為高電平點亮。 the information society, return數(shù)字系統(tǒng)與邏輯設(shè)計實驗課題三:交通燈控制器課題三:交通燈控制器課題三:交通燈控制器一.設(shè)計課題的任務(wù)要求(一)、實驗?zāi)康?. 熟練掌握 VHDL 語言和QuartusII 軟件的使用;2. 理解狀態(tài)機(jī)的工作原理和設(shè)計方法;3. 掌握利用 EDA 工具進(jìn)行自頂向下的電子系統(tǒng)設(shè)計方法;(二)、相關(guān)知識本實驗要利用 CPLD 設(shè)計實現(xiàn)一個十字路口的交通燈控制系統(tǒng),與其他控制系統(tǒng)一樣,本系統(tǒng)劃分為控制器和受控電路兩部分。 both hard environment to strengthen and take another look at the soft environment improvement momentum of development at present, depending on the potential for sustainable development. Leave people to talk about values are worthless and leave people to talk about Outlook is not what the performance. 4. people responded to the starting point of the question, and replied to questions point. Man is the sum of social relationships. We cannot leave the chichuanyongdu, housing, tourism and entertainment, entertaining, and even certain political, economic, cultural and social environment, and so on. Due to human needs, all walks of life will e into being. People create for their survival, and continue enjoying the results of the construction. Colorful in the transformation of the people of the world, munity vitality in the creation of man. Therefore, any work we do, the starting point is human, what are people. Us speed up development, the core of which is to meet the needs of people, including survival needs, emotional needs and selfactualization needs. It should be noted that people are not machines, not the slave of an object, not to be controlled. People have their own personality, has its own personality, has its own dignity. Person in need of care, you need to understand, need to meet. It is said that in the agricultural society, people plant。s performance. Achievement evaluation in both economic acplishments, take another look at the effectiveness of social progress。 is deeply concerned that human development and human values, development of social and human development of rational unified, insisted in the material civilization, political civilization and spiritual civilization in the overall advancement of Socialist civilization to a higher level. Also want to see that person39。is one of the practical form of values. The socalled values refers to the objective things are of no value and the value of fundamental perspective. Different values, people39。s behaviour, attitudes, ways are different. Peopleoriented focus on human value and reality, we need the broadest masses as values. Adhere to peopleoriented values, is to make the economy more development, improve democracy, cultural prosperity, and live a happier。s value is not only meet your needs, also is to meet the needs of others and the munity. Adhere to peopleoriented, to strongly advocate every munity member, serve others, beneficial to the munity of people. The socalled Outlook, attitude is on the record, including who, how to create a record of achievements, how to evaluate performance, and so on. What values, what kind of Outlook. Adhere to peopleoriented Outlook, is on the premise of respecting the interests and power of people, creating a popular, warm hearts, steady heart performance, creating serve for one officer, the benefit of achievements, and overall construction of welloff society and promoting the allround development of people39。 changes in both urban and rural change。 in industrial society, man is an animal??刂破魇拐麄€系統(tǒng)按設(shè)定的工作方式交替指揮車輛及行人的通行,并接收受控部分的反饋信號,決定其狀態(tài)轉(zhuǎn)換方向及輸出信號,控制整個系統(tǒng)的工作過程。設(shè)置20s 的通行時間和5s 轉(zhuǎn)換時間的變模定時電路,用數(shù)碼管顯示剩余時間。(三)、實驗任務(wù):設(shè)計制作一個用于十字路口的交通燈控制器。二.系統(tǒng)設(shè)計(包括設(shè)計思路、總體框圖、分塊設(shè)計)(一)設(shè)計思路:1) CLK時鐘頻率輸入,可由實驗板上直接提供,為準(zhǔn)確確定時間長度,選擇High擋的1MHz高頻信號。3) 復(fù)位撥碼開關(guān)RESET,當(dāng)將其置為高電平,表示復(fù)位,工作停止,全部回到初始狀態(tài);當(dāng)置其為低電平,重新開始工作。2) 東西方向和南北方向計時均為2位數(shù),共需要4個LED七段數(shù)碼管顯示。3) 增加一個BELL輸出,控制緊急狀態(tài)下的蜂鳴器。,根據(jù)硬件設(shè)計,設(shè)置如下端口:u 外部時鐘信號:CLKu 緊急狀態(tài)按鍵:EMERGENCYu 南北方向狀態(tài)燈:LIGHT1u 東西方向狀態(tài)燈:LIGHT2u 蜂鳴器控制:BELLu 數(shù)碼管顯示信號:NUMu 數(shù)碼管共陰極控制:CAT_TEMP,把不同功能分模塊設(shè)計。輸入端口:CLK外部時鐘信號輸出端口:CLK_OUT分頻后信號u COUNTER模塊,由于整個過程的顯示周期為50秒,即50個狀態(tài),所以該模塊為計數(shù)器模塊,計數(shù)周期為