Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
CODE_TRAN.VHD
Package: codeofvhdl2006.rar [view]
Upload User: dgjihui88
Upload Date: 2013-07-23
Package Size: 43k
Code Size: 1k
Category:
VHDL-FPGA-Verilog
Development Platform:
MultiPlatform
- --code_tran.vhd keyboard position to button code transformer
- library ieee ;
- use ieee.std_logic_1164.all;
- use ieee.std_logic_arith.all;
- use ieee.std_logic_unsigned.all;
- entity code_tran is
- port(
- scan_cnt : in std_logic_vector(3 downto 0) ;--keybord scan count
- clk : in std_logic ;--clock
- butt_code : out std_logic_vector(3 downto 0)) ;--button code
- end code_tran ;
- architecture behavior of code_tran is
- begin
- code_tran:process(clk)
- begin
- if(clk'event and clk='1') then
- case scan_cnt is --encoding
- when "0000"=> butt_code <= "0001";--1
- when "0001"=> butt_code <= "0010";--2
- when "0010"=> butt_code <= "0011";--3
- when "0011"=> butt_code <= "1100";--c
- when "0100"=> butt_code <= "0100";--4
- when "0101"=> butt_code <= "0101";--5
- when "0110"=> butt_code <= "0110";--6
- when "0111"=> butt_code <= "1101";--d
- when "1000"=> butt_code <= "0111";--7
- when "1001"=> butt_code <= "1000";--8
- when "1010"=> butt_code <= "1001";--9
- when "1011"=> butt_code <= "1110";--e
- when "1100"=> butt_code <= "1010";--a
- when "1101"=> butt_code <= "0000";--0
- when "1110"=> butt_code <= "1011";--b
- when others => butt_code <= "1111";--f
- end case;
- end if;
- end process;
- end behavior;