《输入输出电路设计》由会员分享,可在线阅读,更多相关《输入输出电路设计(27页珍藏版)》请在金锄头文库上搜索。
1、键盘编码电路设计设计一个有09十个键的编码电路 。电路输入是09十个十进制数,输 出是它们的二进制编码,并有一个原 码、反码选择输入端CE和一个确认是 否有键被按下的输出端BT。1.用MIS设计2.用VHDL设计library ieee;use ieee.std_logic_1164.all;entity keyboard isport(I0,I1,I2,I3,I4,I5,I6,I7,I8,I9:in std_logic;CE:in std_logic;OD,OC,OB,OA:out std_logic;BT:out std_logic);end keyboard;architecture a
2、rt of keyboard issignal outs:std_logic_vector(3 downto 0);beginouts(3 downto 0)OE_CTRLOE_CTRLOE_CTRLOE_CTRLOE_CTRLOE_CTRLOE_CTRLOE_CTRLOE_CTRLSEG_OUTSEG_OUTSEG_OUTSEG_OUTSEG_OUTSEG_OUTSEG_OUTSEG_OUTSEG_OUTSEG_OUTSEG_OUTSEG_OUTSEG_OUTSEG_OUTSEG_OUTSEG_OUTSEG_OUTSEG_OUTSEG_OUTSEG_OUTSEG_OUTSEG_OUTSEG_OUTSEG_OUTSEG_OUTSEG_OUTSEG_OUTSEG_OUTSEG_OUTSEG_OUTSEG_OUTSEG_OUTSEG_OUTledoutledoutledoutledoutledoutledoutledoutledoutledout=“00000000“;end case; end process; end art;4.顶层电路设计