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

正文內(nèi)容

交通燈拔控制器設(shè)計(jì)-文庫(kù)吧

2024-12-30 01:27 本頁(yè)面


【正文】 動(dòng) LED, data_sel_temp為送到兩位數(shù)碼中要顯示的時(shí)間 ? 模塊輸出信號(hào)分別為:led_b0,ledb1,led_data,led_oe_n,led_rck,led_srck。 led_b0,led_b1作為選通數(shù)碼管信號(hào),高電平有效。 led_data,串行輸入數(shù)據(jù)信號(hào) led_oe_n,選通 74HC595, 低電平有效。 led_rck,串行數(shù)據(jù)轉(zhuǎn)并信號(hào) led_srck,數(shù)據(jù)串行輸入 74HC595移位信號(hào)。 led1,led2,顯示紅綠黃燈 間隔定時(shí)器 ? 設(shè)計(jì)的目的是在 ST信號(hào)進(jìn)行設(shè)置之后,產(chǎn)生 TL和 TS信號(hào)。使用一個(gè)計(jì)數(shù)器和外部譯碼器邏輯。當(dāng) ST信號(hào)為真時(shí),計(jì)數(shù)器清零,而當(dāng)計(jì)數(shù)器的計(jì)數(shù)值到達(dá)一個(gè)適當(dāng)?shù)拈撝禃r(shí),外部邏輯就使得 TL或 TS信號(hào)為真。假設(shè)計(jì)數(shù)到 0111時(shí), TS為真,當(dāng)?shù)竭_(dá) 1111時(shí), TL為真 時(shí)鐘分頻與計(jì)時(shí)模塊 () ? 輸入信號(hào) clk,reset_n,ST, ST為計(jì)數(shù)器復(fù)位后重新啟動(dòng)信號(hào), traffic_state為 當(dāng)前顯示狀態(tài) ? 輸出信號(hào)為 TS, TL, data_sel_temp,當(dāng) TS為 1,表示短時(shí)間計(jì)時(shí)已到,當(dāng) TL為 1,表示長(zhǎng)時(shí)間計(jì)時(shí)已到。 data_sel_temp表示定時(shí)器剩余的定時(shí)時(shí)間值(用于顯示)。 時(shí)鐘分頻與計(jì)時(shí)模塊 () // purpose : Divide the clk to 1HZ, generate the TS and TL signal。used for controlling the display time of traffic light module timer( TS, TL, ST, clk, reset_n, traffic_state, data_sel_temp)。 output TS。 output TL。 output [7:0] data_sel_temp。 reg [7:0] data_sel_temp。 input ST。 input clk。 input reset_n。 input [1:0] traffic_state。 reg [3:0] value。 reg [24:0] counter。 reg clk1hz。 wire time10s。 wire time5s。 時(shí)鐘分頻與計(jì)時(shí)模塊 () always@(posedge clk or negedge reset_n) begin if(reset_n==139。b0) begin counter =2539。d0。 clk1hz =1。 end else if( counter2539。d33333333) counter = counter+1。 else begin counter = 2539。d0。 clk1hz = ~clk1hz。 end end //Divide the clk to 1HZ always @(posedge clk1hz or negedge reset_n or posedge ST) begin if(reset_n==139。b0) value = 0。 else if (ST) value =0。 else value = value + 1。 end assign TS = (value = 5)?139。b1:139。b0。 assign TL = (value = 10)?139。b1:139。b0。 assign time10s=(traffic_state[0]==1‘b0)amp。ST。 //綠燈延時(shí) 10S assign time5s=(traffic_state[0]==1‘b1)amp。ST。 //黃燈延時(shí) 5S reg time10s_delay。 reg time5s_delay。 always@(negedge reset_n or posedge clk) begin if(reset_n==139。b0) begin time10s_delay=0。 time5s_delay=0。 end else begin time10s_delay=time10s。 time5s_delay=time5s。
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1