正在加载图片...
end if; end process; process(clk) --get the result of the key begin if(clk'event and clk='1')then if(kcount=5)then if(keyr="1110")then case keyc is when"1110"=>buff7<="0111111":-display0 when "0111"=>buff7<="1110001";--display f when others=>buff7<=buff7: -no change end case; end if; end if; end if; end process; process(clk) --display process begin if(clk'event and clk='1')then sa<=dcount(0); sb<=dcount(1); sc<=dcount(2); case dcount is when "111"=>display<=buff0; 。。 when "110"=>display<=buff7; when others=>display<="0000000": end case; end if; end process; process(clk) -In this process,a,b,c,d,e,f,g will output begin if(clk'event and clk='1')then a<=display(0); 0。年ge g<=display(6); end if; end process: end behave: 七、实验报告要求 1、总结FPGA是如何识别按键的?与单片机读取键值有何不同? 2、在深入理解了4×4键盘实现的原理基础上,试试利用VHDL在目标器件FPGA/CPLD上实 现PS/2键盘接口。 3、比较4×4键盘与PS/2键盘接口用FPGA实现方法的异同点。end if; end process; process(clk) -- get the result of the key begin if(clk'event and clk='1') then if(kcount=5) then if(keyr="1110") then case keyc is when "1110"=>buff7<="0111111"; --display 0 …… when "0111"=>buff7<="1110001"; --display f when others=>buff7<=buff7; --no change end case; end if; end if; end if; end process; process(clk) --display process begin if(clk'event and clk='1') then sa<=dcount(0); sb<=dcount(1); sc<=dcount(2); case dcount is when "111"=>display<=buff0; …… when "110"=>display<=buff7; when others=>display<="0000000"; end case; end if; end process; process(clk) --In this process, a,b,c,d,e,f,g will output begin if(clk'event and clk='1') then a<=display(0); …… g<=display(6); end if; end process; end behave; 七、实验报告要求 1、 总结 FPGA 是如何识别按键的?与单片机读取键值有何不同? 2、 在深入理解了 4×4 键盘实现的原理基础上,试试利用 VHDL 在目标器件 FPGA/CPLD 上实 现 PS/2 键盘接口。 3、 比较 4×4 键盘与 PS/2 键盘接口用 FPGA 实现方法的异同点
<<向上翻页
©2008-现在 cucdc.com 高等教育资讯网 版权所有