KEY_4x4扫描键盘FPGAVerilog逻辑源码Quartus工程文件.rar

上传者: guoruibin123 | 上传时间: 2021-08-06 19:02:52 | 文件大小: 203KB | 文件类型: RAR
KEY_4x4扫描键盘FPGAVerilog逻辑源码Quartus工程文件,FPGA为CYCLONE4系列中的EP4CE6E22C8. 完整的工程文件,可以做为你的学习设计参考。 module KEY_4x4 ( input sys_clk, //50MHZ input sys_rst_n , input [3:0] key_row , //�� //output wire [3:0] key_col , //�� output reg [3:0] key_col , //�� output wire [7:0] LED , //��ʾ��ֵ output reg [3:0] key_value //��ֵ ); reg [5:0] count;//delay_20ms reg [2:0] state; //״̬��־ reg key_flag; //������־λ reg clk_500khz; //500KHZʱ���ź� reg [3:0] key_col_reg; //�Ĵ�ɨ����ֵ reg [3:0] key_row_reg; //�Ĵ�ɨ����ֵ always @(posedge sys_clk or negedge sys_rst_n) begin if (!sys_rst_n) begin clk_500khz <= 0 ; count= 50 ) begin clk_500khz <= ~clk_500khz ; count<=0; end else count <= count + 1; end end always @(posedge clk_500khz or negedge sys_rst_n) if(!sys_rst_n) begin key_col<=4'b0000; state<=0; end else begin case (state) 0: begin key_col[3:0]<=4'b0000; key_flag<=1'b0; if(key_row[3:0]!=4'b1111) begin //�м����£�ɨ����һ�� state<=1; key_col[3:0]<=4'b1110; end else state<=0; end 1: begin if(key_row[3:0]!=4'b1111) //�ж��Ƿ��ǵ�һ�� state<=5; else begin state<=2; key_col[3:0]<=4'b1101; //ɨ���ڶ��� end end 2: begin if(key_row[3:0]!=4'b1111) //�ж��Ƿ��ǵڶ��� state<=5; else begin //ɨ�������� state<=3; key_col[3:0]<=4'b1011; end end 3: begin if(key_row[3:0]!=4'b1111) //�ж��Ƿ��ǵ���һ�� state<=5; else begin state<=4; key_col[3:0]<=4'b0111; end //ɨ�������� end 4: begin if (key_row

文件下载

资源详情

[{"title":"( 21 个子文件 203KB ) KEY_4x4扫描键盘FPGAVerilog逻辑源码Quartus工程文件.rar","children":[{"title":"KEY_4x4","children":[{"title":"KEY_4x4.cdf <span style='color:#111;'> 321B </span>","children":null,"spread":false},{"title":"KEY_4x4.sof <span style='color:#111;'> 349.98KB </span>","children":null,"spread":false},{"title":"RTL","children":[{"title":"KEY_4x4.v <span style='color:#111;'> 3.40KB </span>","children":null,"spread":false},{"title":"KEY_4x4.v.bak <span style='color:#111;'> 3.07KB </span>","children":null,"spread":false}],"spread":true},{"title":"KEY_4x4.fit.smsg <span style='color:#111;'> 513B </span>","children":null,"spread":false},{"title":"KEY_4x4.fit.summary <span style='color:#111;'> 616B </span>","children":null,"spread":false},{"title":"KEY_4x4.asm.rpt <span style='color:#111;'> 7.77KB </span>","children":null,"spread":false},{"title":"新建文本文档.txt <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"db","children":null,"spread":false},{"title":"KEY_4x4.fit.rpt <span style='color:#111;'> 567.88KB </span>","children":null,"spread":false},{"title":"KEY_4x4.pin <span style='color:#111;'> 19.92KB </span>","children":null,"spread":false},{"title":"KEY_4x4.qpf <span style='color:#111;'> 1.23KB </span>","children":null,"spread":false},{"title":"KEY_4x4.qsf <span style='color:#111;'> 4.06KB </span>","children":null,"spread":false},{"title":"KEY_4x4.sta.rpt <span style='color:#111;'> 820.07KB </span>","children":null,"spread":false},{"title":"KEY_4x4.sta.summary <span style='color:#111;'> 1.60KB </span>","children":null,"spread":false},{"title":"KEY_4x4.map.summary <span style='color:#111;'> 473B </span>","children":null,"spread":false},{"title":"KEY_4x4.pof <span style='color:#111;'> 512.18KB </span>","children":null,"spread":false},{"title":"KEY_4x4.map.rpt <span style='color:#111;'> 202.52KB </span>","children":null,"spread":false},{"title":"KEY_4x4.done <span style='color:#111;'> 26B </span>","children":null,"spread":false},{"title":"led.stp <span style='color:#111;'> 12.31MB </span>","children":null,"spread":false},{"title":"KEY_4x4.flow.rpt <span style='color:#111;'> 25.04KB </span>","children":null,"spread":false},{"title":"KEY_4x4.jdi <span style='color:#111;'> 4.29KB </span>","children":null,"spread":false}],"spread":false}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明