【文章內(nèi)容簡介】
d when(scan=x58 and duanma=39。139。)else capslocked。 tmpAscii= 1609 when scan=00001101 else 1660 when scan=00001110 and shifted=39。039。 else 167E when scan=00001110 and shifted=39。139。 else 1651 when scan=00010101 else 1631 when scan=00010110 and shifted=39。039。 else 1621 when scan=00010110 and shifted=39。139。 else 165A when scan=00011010 else 1653 when scan=00011011 else 1641 when scan=00011100 else 1657 when scan=00011101 else 1632 when scan=00011110 and shifted=39。039。 else 1640 when scan=00011110 and shifted=39。139。 else 1643 when scan=00100001 else 1658 when scan=00100010 else 9 1644 when scan=00100011 else 1645 when scan=00100100 else 1634 when scan=00100101 and shifted=39。039。 else 1624 when scan=00100101 and shifted=39。139。 else 1633 when scan=00100101 and shifted=39。039。 else 1623 when scan=00100101 and shifted=39。139。 else 1620 when scan=00101001 else 1656 when scan=00101010 else 1646 when scan=00101011 else 1654 when scan=00101100 else 1652 when scan=00101101 else 1635 when scan=00101110 and shifted=39。039。 else 1625 when scan=00101110 and shifted=39。139。 else 164E when scan=00110001 else 1642 when scan=00110010 else 1648 when scan=00110011 else 1647 when scan=00110100 else 1659 when scan=00110101 else 1636 when scan=00110110 and shifted=39。039。 else 165E when scan=00110110 and shifted=39。139。 else 164D when scan=00111010 else 164A when scan=00111011 else 1655 when scan=00111100 else 1637 when scan=00111101 and shifted=39。039。 else 1626 when scan=00111101 and shifted=39。139。 else 1638 when scan=00111110 and shifted=39。039。 else 162A when scan=00111110 and shifted=39。139。 else 162C when scan=01000001 and shifted=39。039。 else 163C when scan=01000001 and shifted=39。139。 else 164B when scan=01000010 else 1649 when scan=01000011 else 164F when scan=01000100 else 1630 when scan=01000101 and shifted=39。039。 else 1629 when scan=01000101 and shifted=39。139。 else 1639 when scan=01000110 and shifted=39。039。 else 1628 when scan=01000110 and shifted=39。139。 else 162E when scan=01001001 and shifted=39。039。 else 163E when scan=01001001 and shifted=39。139。 else 162F when scan=01001010 and shifted=39。039。 else 163F when scan=01001010 and shifted=39。139。 else 164C when scan=01001101 else 163B when scan=01001100 and shifted=39。039。 else 163A when scan=01001100 and shifted=39。139。 else 1650 when scan=01001101 else 10 162D when scan=01001110 and shifted=39。039。 else 165F when scan=01001110 and shifted=39。139。 else 1627 when scan=01010010 and shifted=39。039。 else 1622 when scan=01010010 and shifted=39。139。 else 165B when scan=01010100 and shifted=39。039。 else 167B when scan=01010100 and shifted=39。139。 else 163D when scan=01010101 and shifted=39。039。 else 162B when scan=01010101 and shifted=39。139。 else 160D when scan=01011010 else 165D when scan=01011011 and shifted=39。039。 else 167D when scan=01011011 and shifted=39。139。 else 165C when scan=01011101 and shifted=39。039。 else 167C when scan=01011101 and shifted=39。139。 else 1608 when scan=01100110 else 161B when scan=01110110。 ascii=conv_std_logic_vector(tmpAscii+1620,8) when((shifted=39。039。 and capslocked=39。039。)or(shifted=39。139。 and capslocked=39。139。)) and (tmpAscii1640) and (tmpAscii=165A)and duanma=39。139。 else conv_std_logic_vector(tmpAscii,8)when duanma=39。139。 else 10000000。 u1:dff port map(clk,duanma_D,duanma)。 u2:dff port map(clk,shifted_D,shifted)。 u3:dff port map(clk,capslocked_D,capslocked)。 process(rst,clk) begin if(rst=39。039。)then if(clk39。event and clk=39。039。)then if(ASCII(6 downto 0)/=0000000)then flag=39。139。 else flag=39。039。 end if。 end if。 end if。 end process。 process(flag) begin if(flag=39。139。)then dataascii=ascii。 interrupt2=39。139。 else interrupt2=39。039。 end if。 end process。 11 end。 把掃描碼和 ASCII碼顯示在 LED數(shù)碼管上 library ieee。 use 。 use 。 entity leddisp is port(rst:in std_logic。 enabl:in std_logic。 clk:in std_logic。 data_scan:in std_logic_vector(7 downto 0)。 data_ascii:in std_logic_vector(7 downto 0)。 sg:out std_logic_vector(6 downto 0))。 end。 architecture one of leddisp is signal data_scan_h:std_logic_vector(3 downto 0)。 signal data_scan_l:std_logic_vector(3 downto 0)。 signal data_ascii_h:std_logi