鍵盤控制點(diǎn)陣進(jìn)行ASIC字符顯示_第1頁
鍵盤控制點(diǎn)陣進(jìn)行ASIC字符顯示_第2頁
鍵盤控制點(diǎn)陣進(jìn)行ASIC字符顯示_第3頁
鍵盤控制點(diǎn)陣進(jìn)行ASIC字符顯示_第4頁
鍵盤控制點(diǎn)陣進(jìn)行ASIC字符顯示_第5頁
已閱讀5頁,還剩10頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

1、中北大學(xué)課 程 設(shè) 計(jì) 說 明 書學(xué)生姓名:學(xué) 院:專 業(yè): 學(xué) 號: 08060441 電子與計(jì)算機(jī)科學(xué)技術(shù)學(xué)院 電子科學(xué)與技術(shù)題 目: 利用鍵盤控制點(diǎn)陣進(jìn)行ASIC字符顯示指導(dǎo)教師: 張會新 職稱: 講師2011 年 6月 23 日目錄目錄21、 課程設(shè)計(jì)目的32、課程設(shè)計(jì)內(nèi)容和要求 32.1、設(shè)計(jì)內(nèi)容32.2、設(shè)計(jì)要求33、設(shè)計(jì)方案及實(shí)現(xiàn)情況 33.1、設(shè)計(jì)思路33.2、工作原理及框圖33.3、各模塊功能描述3.4、仿真結(jié)果3.5、實(shí)驗(yàn)箱驗(yàn)證情況4、課程設(shè)計(jì)總結(jié)5、參考文獻(xiàn)1、課程設(shè)計(jì)目的1.學(xué)習(xí)操作數(shù)字電路設(shè)計(jì)實(shí)驗(yàn)開發(fā)系統(tǒng),掌握矩陣鍵盤輸入模塊和點(diǎn)陣顯示模塊的工作原理及應(yīng)用。2.掌握組

2、合邏輯電路、時(shí)序邏輯電路的設(shè)計(jì)方法。3.學(xué)習(xí)掌握可編程器件設(shè)計(jì)的全過程。2、課程設(shè)計(jì)內(nèi)容和要求:2.1、設(shè)計(jì)內(nèi)容利用鍵盤控制點(diǎn)陣進(jìn)行26個(gè)字母的顯示2.2、設(shè)計(jì)要求1學(xué)習(xí)掌握鍵盤控制模塊、點(diǎn)陣顯示模塊的工作原理及應(yīng)用;2. 熟練掌握VHDL編程語言,編寫鍵盤控制模塊的控制邏輯;3. 仿真所編寫的程序,模擬驗(yàn)證所編寫的模塊功能;4. 下載程序到芯片中,硬件驗(yàn)證所設(shè)置的功能,能夠?qū)崿F(xiàn)ASIC字符顯示;5. 整理設(shè)計(jì)內(nèi)容,編寫設(shè)計(jì)說明書。3、 設(shè)計(jì)方案及實(shí)現(xiàn)情況3.1、設(shè)計(jì)思路根據(jù)題目設(shè)計(jì)要求,本系統(tǒng)擬采用自頂向下設(shè)計(jì)方法,頂層采用原理圖設(shè)計(jì)方法,將整個(gè)系統(tǒng)分為鍵盤控制16×16點(diǎn)陣顯示(

3、key)一個(gè)模塊,通過模塊編寫程序?qū)崿F(xiàn)模塊功能,最后將模塊進(jìn)行綜合實(shí)現(xiàn)整個(gè)系統(tǒng)的功能,通過鍵盤控制點(diǎn)陣進(jìn)行ASIC字符的顯示。3.2、工作原理及框圖圖1 系統(tǒng)整體設(shè)計(jì)原理圖系統(tǒng)的輸入信號有:系統(tǒng)時(shí)鐘信號CLK,按鍵信號(KININ3.0)。系統(tǒng)的輸出信號有:點(diǎn)陣行驅(qū)動輸出信號(LEDOUT0.15),點(diǎn)陣列選和鍵盤掃描公用信號(SEL3.0)。系統(tǒng)工作過程為:鍵盤上按下一個(gè)鍵,掃描信號掃描到按鍵按下時(shí),在點(diǎn)陣上顯示對應(yīng)的字母。如鍵盤上按下“0”鍵時(shí),點(diǎn)陣顯示字母“48”;按下鍵“1”,點(diǎn)陣顯示字母“49”如此,鍵盤上前16個(gè)鍵就分別對應(yīng)了16個(gè)ASIC字符。3.3、各模塊功能描述實(shí)驗(yàn)箱中4&#

4、215;8矩陣鍵盤的電路原理圖如圖2所示。圖2 4×8矩陣鍵盤電路原理圖該矩陣鍵盤的工作原理為:掃描信號為BCOM8.1,在BCOM8.1前已接有一個(gè)3-8譯碼器,3-8譯碼器的輸入為SEL0SEL2。當(dāng)3-8譯碼器的輸入為000時(shí),即BCOM1為0,其他位為1,我們按下第一排第一鍵,此時(shí)KIN0輸出0,KIN1KIN3輸出全為1,按下第二排第二鍵時(shí),KIN1輸出0,其他輸出1;當(dāng)3-8譯碼器輸入為001時(shí),即BCOM2為0,我們按下第一排第二鍵,此時(shí)KIN0輸出0,KIN1KIN3輸出全為1,同理其他鍵依此類推。鍵盤上的每個(gè)按鍵就是一個(gè)開關(guān),當(dāng)某鍵被按下時(shí),該按鍵的接點(diǎn)會呈現(xiàn)0狀態(tài)

5、,反之為1。掃描信號為SEL2.0進(jìn)入3-8譯碼器,再從譯碼器輸出到鍵盤,所以第一次只能掃描一排,依此周而復(fù)始。若從KIN3.0輸出的皆為1時(shí),表示沒有按鍵按下,代表該列沒有按鍵被按下,則不進(jìn)行按鍵編碼的操作,反之,如果有被按下時(shí),則應(yīng)將KIN3.0讀出的值送到譯碼電路進(jìn)行編碼。按鍵位置與數(shù)碼的關(guān)系如下表所示:3.4、仿真結(jié)果1、VHDL語言源程序library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity key isarchitecture rtl of key isbeginprocess(

6、clk)variable tmp: std_logic_vector(3 downto 0); variable sel: std_logic_vector(3 downto 0); variable dat: std_logic_vector(3 downto 0); beginif clk'event and clk='1' thenif tmp="1111" thentmp:="0000"elsetmp:=tmp+1;end if;end if;if kin = "1111" then sel:=tmp;

7、 dat := "1111" else end if; selout <= tmp; if (sel="0000" or sel="1000") and kin="1110" then dat := "0000" dat := "0001" - 0 - 1 elsif (sel="0001" or sel="1001") and kin="1110" then elsif (sel="0010&quo

8、t; or sel="1010") and kin="1110" then port(clk:in std_logic; ledout:out std_logic_vector(15 downto 0); selout:out std_logic_vector(3 downto 0); kin:in std_logic_vector(3 downto 0); end key; -dat := "0010" dat := "0011" dat := "0100" dat := "0101

9、" dat := "0110"- 2 - 3 - 4 - 5 - 6elsif (sel="0011" or sel="1011") and kin="1110" then elsif (sel="0110" or sel="1110") and kin="1110" then elsif (sel="0111" or sel="1111") and kin="1110" then el

10、sif (sel="0000" or sel="1000") and kin="1101" then elsif (sel="0001" or sel="1001") and kin="1101" thendat := "0111" - 7 dat := "1000" - 8 dat := "1001" - 9 dat := "1010" - A dat := "1011"-

11、Belsif (sel="0100" or sel="1100") and kin="1101" then elsif (sel="0101" or sel="1101") and kin="1101" then elsif (sel="0110" or sel="1110") and kin="1101" then elsif (sel="0111" or sel="1111"

12、;) and kin="1101" then elsif (sel="0010" or sel="1010") and kin="1011" thendat := "1100" - C dat := "1101" - D dat := "1110" - E dat := "1111" - Felsif (sel="0011" or sel="1011") and kin="1011&qu

13、ot; then elsif (sel="0100" or sel="1100") and kin="1011" then elsif (sel="0101" or sel="1101") and kin="1011" then end if;- if kin = "1111" thencase dat iswhen"0000"=> -0 zhongcase tmp iswhen "0001" => le

14、dout<="0000000000000000" when "0010" => ledout<="0011111000110000" when "0011" => ledout<="0110001100111000" when "0100" => ledout<="0110001100111100" when "0101" => ledout<="0110001100110

15、110" when "0110" => ledout<="0011111000110011" when "0111" => ledout<="0110001101111111" when "1000" => ledout<="0110001100110000" when "1010" => ledout<="0110001100110000"when "0000&quo

16、t; => ledout<="0000000000000000" -0when "1001" => ledout<="0110001100110000"when "1011" => ledout<="0011111001111000" when "1100" => ledout<="0000000000000000" when "1101" => ledout<="0

17、000000000000000" when "1111" => ledout<="0000000000000000" when others => null; when "0001" => -1 end case; case tmp iswhen "0000" => ledout<="0000000000000000" when "0001" => ledout<="0000000000000000"

18、; when "0010" => ledout<="0000000000000000" when "0011" => ledout<="0011111000110000" when "0100" => ledout<="0110001100111000" when "0101" => ledout<="0110001100111100" when "0110" =>

19、; ledout<="0110001100110110" when "0111" => ledout<="0111111000110011" when "1000" => ledout<="0110000001111111" when "1001" => ledout<="0110000000110000" when "1010" => ledout<="011000000

20、0110000" when "1011" => ledout<="0011000000110000" when "1100" => ledout<="0001111001111000" when "1101" => ledout<="0000000000000000" when "1110" => ledout<="0000000000000000" when "111

21、1" => ledout<="0000000000000000" when others => null; when "0010" => -2 when "0000" => ledout<="0000000000000000" when "0001" => ledout<="0000000000000000" when "0010" => ledout<="0000000000

22、000000" when "0011" => ledout<="0001110001111111" when "0100" => ledout<="0011011000000011" when "0101" => ledout<="0110001100000011" when "0110" => ledout<="0110000110000011" when "0111

23、" => ledout<="0110101100111111" when "1000" => ledout<="0110101101100000" when "1001" => ledout<="0110001101100000" when "1010" => ledout<="0110001101100000" when "1011" => ledout<=&quo

24、t;0011011001100011" when "1100" => ledout<="0001110000111110" when "1101" => ledout<="0000000000000000" when "1110" => ledout<="0000000000000000" when "1111" => ledout<="0000000000000000" end

25、 case; case tmp iswhen others => null; when "0011" => -3 end case;case tmp iswhen "0000" => ledout<="0000000000000000" when "0001" => ledout<="0000000000000000" when "0010" => ledout<="0000000000000000" whe

26、n "0011" => ledout<="0001100001111111" when "0100" => ledout<="0001110000000011" when "0101" => ledout<="0001111000000011" when "0110" => ledout<="0001100000000011" when "0111" => led

27、out<="0001100000111111" when "1000" => ledout<="0001100001100000" when "1001" => ledout<="0001100001100000" when "1010" => ledout<="0001100001100000" when "1011" => ledout<="00011000011000

28、11" when "1100" => ledout<="0111111000111110" when "1101" => ledout<="0000000000000000" when "1110" => ledout<="0000000000000000" when "1111" => ledout<="0000000000000000" when others => n

29、ull;end case;when "0100" => -4 52 case tmp iswhen "0000" => ledout<="0000000000000000" when "0001" => ledout<="0000000000000000" when "0010" => ledout<="0000000000000000" when "0011" => ledout<

30、="0011111001111111" when "0100" => ledout<="0110001100000011" when "0101" => ledout<="0110000000000011" when "0110" => ledout<="0011000000000011" when "0111" => ledout<="0001100000111111"

31、; when "1000" => ledout<="0000110001100000" when "1001" => ledout<="0000011001100000" when "1010" => ledout<="0000001101100000" when "1011" => ledout<="0110001101100011" when "1100" =>

32、; ledout<="0111111100111110" when "1101" => ledout<="0000000000000000" when "1110" => ledout<="0000000000000000" when "1111" => ledout<="0000000000000000" when others => null;end case;when "0101"

33、=> -5 53 case tmp iswhen "0000" => ledout<="0000000000000000" when "0001" => ledout<="0000000000000000" when "0010" => ledout<="0000000000000000" when "0011" => ledout<="0011111001111111" when

34、"0100" => ledout<="0110001100000011" when "0101" => ledout<="0110000000000011" when "0110" => ledout<="0110000000000011" when "0111" => ledout<="0011110000111111" when "1000" => ledou

35、t<="0110000001100000" when "1001" => ledout<="0110000001100000" when "1010" => ledout<="0110000001100000" when "1011" => ledout<="0110001101100011" when "1100" => ledout<="0011111000111110

36、" when "1101" => ledout<="0000000000000000" when "1110" => ledout<="0000000000000000" when "1111" => ledout<="0000000000000000" when others => null;end case;when "0110" => -6 54 case tmp iswhen "0

37、000" => ledout<="0000000000000000" when "0001" => ledout<="0000000000000000" when "0010" => ledout<="0000000000000000" when "0011" => ledout<="0011000001111111" when "0100" => ledout<=&

38、quot;0011100000000011" when "0101" => ledout<="0011110000000011" when "0110" => ledout<="0011011000000011" when "0111" => ledout<="0011001100111111" when "1000" => ledout<="0111111101100000"

39、when "1001" => ledout<="0011000001100000" when "1010" => ledout<="0011000001100000" when "1011" => ledout<="0011000001100011" when "1100" => ledout<="0111100000111110" when "1101" =>

40、ledout<="0000000000000000" when "1110" => ledout<="0000000000000000" when "1111" => ledout<="0000000000000000" when others => null;end case;when "0111" => -7 55 case tmp iswhen "0000" => ledout<="00

41、00000000000000" when "0001" => ledout<="0000000000000000" when "0010" => ledout<="0000000000000000" when "0011" => ledout<="0111111101111111"when "0100" => ledout<="0000001100000011" when &qu

42、ot;0101" => ledout<="0000001100000011" when "0110" => ledout<="0000001100000011" when "0111" => ledout<="0011111100111111" when "1000" => ledout<="0110000001100000" when "1001" => ledout&l

43、t;="0110000001100000" when "1010" => ledout<="0110000001100000" when "1011" => ledout<="0110001101100011" when "1100" => ledout<="0011111000111110" when "1101" => ledout<="0000000000000000&qu

44、ot; when "1110" => ledout<="0000000000000000" when "1111" => ledout<="0000000000000000" when others => null;end case;when "1000" => -8 56 case tmp iswhen "0000" => ledout<="0000000000000000" when "0001

45、" => ledout<="0000000000000000" when "0010" => ledout<="0000000000000000" when "0011" => ledout<="0001110001111111" when "0100" => ledout<="0000011000000011" when "0101" => ledout<=&quo

46、t;0000001100000011" when "0110" => ledout<="0000001100000011" when "0111" => ledout<="0011111100111111" when "1000" => ledout<="0110001101100000" when "1001" => ledout<="0110001101100000" whe

47、n "1010" => ledout<="0110001101100000" when "1011" => ledout<="0110001101100011" when "1100" => ledout<="0011111000111110" when "1101" => ledout<="0000000000000000" when "1110" => led

48、out<="0000000000000000" when "1111" => ledout<="0000000000000000" when others => null;end case;when "1001" => -9 57 case tmp iswhen "0000" => ledout<="0000000000000000" when "0001" => ledout<="00000

49、00000000000" when "0010" => ledout<="0000000000000000" when "0011" => ledout<="0111111101111111" when "0100" => ledout<="0110001100000011" when "0101" => ledout<="0110000000000011" when "

50、;0110" => ledout<="0110000000000011" when "0111" => ledout<="0011000000111111"when "1000" => ledout<="0001100001100000" when "1001" => ledout<="0000110001100000" when "1010" => ledout<=

51、"0000110001100000" when "1011" => ledout<="0000110001100000" when "1100" => ledout<="0000110000111110" when "1101" => ledout<="0000000000000000" when "1110" => ledout<="0000000000000000"

52、 when "1111" => ledout<="0000000000000000" when others => null;end case;when "1010" => -A 65 case tmp iswhen "0000" => ledout<="0000000000000000" when "0001" => ledout<="0000000000000000" when "0010&qu

53、ot; => ledout<="0000000000000000" when "0011" => ledout<="0111111100011100" when "0100" => ledout<="0000001100000110" when "0101" => ledout<="0000001100000011" when "0110" => ledout<="0

54、000001100000011" when "0111" => ledout<="0011111100111111" when "1000" => ledout<="0110000001100011" when "1001" => ledout<="0110000001100011" when "1010" => ledout<="0110000001100011" when &

55、quot;1011" => ledout<="0110001101100011" when "1100" => ledout<="0011111000111110" when "1101" => ledout<="0000000000000000" when "1110" => ledout<="0000000000000000" when "1111" => ledout

56、<="0000000000000000" when others => null;end case;when "1011" => -B 66 case tmp iswhen "0000" => ledout<="0000000000000000" when "0001" => ledout<="0000000000000000" when "0010" => ledout<="00000000

57、00000000" when "0011" => ledout<="0001110000011100" when "0100" => ledout<="0000011000000110" when "0101" => ledout<="0000001100000011" when "0110" => ledout<="0000001100000011" when "01

58、11" => ledout<="0011111100111111" when "1000" => ledout<="0110001101100011" when "1001" => ledout<="0110001101100011" when "1010" => ledout<="0110001101100011" when "1011" => ledout<=&q

59、uot;0110001101100011"when "1100" => ledout<="0011111000111110" when "1101" => ledout<="0000000000000000" when "1110" => ledout<="0000000000000000" when "1111" => ledout<="0000000000000000" wh

60、en others => null;end case; when "1100" => -c 67 case tmp iswhen "0000" => ledout<="0000000000000000" when "0001" => ledout<="0000000000000000" when "0010" => ledout<="0000000000000000" when "0011"

61、; => ledout<="0111111100011100" when "0100" => ledout<="0110001100000110" when "0101" => ledout<="0110000000000011" when "0110" => ledout<="0110000000000011" when "0111" => ledout<="001

62、1000000111111" when "1000" => ledout<="0001100001100011" when "1001" => ledout<="0000110001100011" when "1010" => ledout<="0000110001100011" when "1011" => ledout<="0000110001100011" when &qu

63、ot;1100" => ledout<="0000110001111111" when "1101" => ledout<="0000000000000000" when "1110" => ledout<="0000000000000000" when "1111" => ledout<="0000000000000000" when others => null;end case;when

64、 "1101" => -D 68 case tmp iswhen "0000" => ledout<="0000000000000000" when "0001" => ledout<="0000000000000000" when "0010" => ledout<="0000000000000000" when "0011" => ledout<="0011111000

65、011100" when "0100" => ledout<="0110001100000110" when "0101" => ledout<="0110001100000011" when "0110" => ledout<="0110001100000011" when "0111" => ledout<="0011111000111111" when "1000

66、" => ledout<="0110001101100011" when "1001" => ledout<="0110001101100011" when "1010" => ledout<="0110001101100011" when "1011" => ledout<="0110001101100011" when "1100" => ledout<=&quo

67、t;0011111000111110" when "1101" => ledout<="0000000000000000" when "1110" => ledout<="0000000000000000" when "1111" => ledout<="0000000000000000"when others => null;when "0000" => ledout<="0000

68、000000000000" when "0001" => ledout<="0000000000000000" when "0010" => ledout<="0000000000000000" when "0011" => ledout<="0011111000011100" when "0100" => ledout<="0110001100000110" when &quo

69、t;0101" => ledout<="0110001100000011" when "0110" => ledout<="0110001100000011" when "0111" => ledout<="0111111000111111" when "1000" => ledout<="0110000001100011" when "1001" => ledout<="0110000001100011" when "1010" => ledout<="0110000001100011" when "1011" => ledout<="0011000001100011" when "1100" => ledout<="0001111000111110"

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論