2012年10月16日 星期二

設計一電燈控制器,當按鈕按下時可開/關電燈



設計一電燈控制器,當按鈕按下時可開/關電燈 

KEY[0] PIN_G26
KEY[1] PIN_N23
KEY[2] PIN_P23
KEY[3] PIN_W26
LEDG[0] PIN_AE22
LEDG[1] PIN_AF22
LEDG[2] PIN_W19
LEDG[3] PIN_V18
LEDG[4] PIN_U18
LEDG[5] PIN_U17
LEDG[6] PIN_AA20
LEDG[7] PIN_Y18
LEDG[8] PIN_Y12





// 設計一電燈控制器,當按鈕按下時可開/關電燈 
module buttom_cnt_LED ( 
    input ButtenClk ,  
    output reg Light);               // 宣告輸入輸出 
        
    /*initial 
    Light = 1'b0;  */
     
    always @ (posedge ButtenClk) 
         begin 
Light = ~Light ;  //輸出改變狀態 
         end 
    endmodule 

沒有留言:

張貼留言

Node-Red Dashboard UI Template + AngularJS 參考 AngularJS教學 --3

  Node-Red Dashboard UI Template + AngularJS 參考 AngularJS教學 --3 AngularJS 實例 <!DOCTYPE html> <html> <head> <meta charse...