1 / 29

Keyboard Scanning

Keyboard Scanning. 指導老師 : 紀新洲老師 助教 : 馮至芬 . 謝耀文 . 吳主文 日期 : 2010/05/04. 行列式鍵盤簡介. 以微處理器做應用的例子,已廣泛出現在日常生活中,行列式按鍵為其中常看到的例子之ㄧ,如手機、電視遙控器 … 等。 微處理器的 I/O 埠是有限的,假如一項應用需用到較多的按鍵時,將每個按鍵連接到微處理器上,使微處理器剩餘的可用的接腳變少也或許會超出所提供的接腳數;也因上述原因,使用行列式 按鍵是可以有效減少接腳的使用方法。. 行列式鍵盤原理 (1/6). 將每一行與每一列的交叉點接上一個按鍵,以按鍵來接通。

lou
Download Presentation

Keyboard Scanning

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Keyboard Scanning 指導老師:紀新洲老師 助教:馮至芬.謝耀文.吳主文 日期:2010/05/04

  2. 行列式鍵盤簡介 • 以微處理器做應用的例子,已廣泛出現在日常生活中,行列式按鍵為其中常看到的例子之ㄧ,如手機、電視遙控器…等。 • 微處理器的I/O埠是有限的,假如一項應用需用到較多的按鍵時,將每個按鍵連接到微處理器上,使微處理器剩餘的可用的接腳變少也或許會超出所提供的接腳數;也因上述原因,使用行列式 按鍵是可以有效減少接腳的使用方法。

  3. 行列式鍵盤原理(1/6) • 將每一行與每一列的交叉點接上一個按鍵,以按鍵來接通。 • 假設Port A有4條I/O埠,Port B也有4條I/O埠,分別作為列線與行線,則可組成4×4共16個行列式鍵盤,因此只需8條I/O,可以省下I/O埠資源。

  4. 行列式鍵盤原理(2/6) EINT0 EINT2 EINT11 EINT19

  5. 行列式鍵盤原理(3/6)

  6. 行列式鍵盤原理(4/6)

  7. 行列式鍵盤原理(5/6)

  8. 行列式鍵盤原理(6/6)

  9. 行列式鍵盤掃描方法 • 將每一行(Column)設置為0。在沒有任何鍵按下時,每一列(Row)將讀到1。任何鍵的導通將造成其中的一列變為0。 • 依序給予0至每一個行,然後檢查相關列的值,若全為1,則按下的按鍵不在此行,進入下一行的掃描,若不全為1,則按下的按鍵必在此行當中,所按按鍵必是此行與讀取到0的列的交點上。

  10. 實驗所需暫存器(1/4) Port F(GPF) Control Register

  11. 實驗所需暫存器(2/4) Port G(GPG) Control Register

  12. 實驗所需暫存器(3/4) EXTINTn (External Interrupt Control Register n) External Interrupt Mask Register External Interrupt Pending Register

  13. 實驗所需暫存器(4/4) Interrupt Pending Register

  14. 實驗Demo要求 • 將按鍵結果顯示於終端機上 • 按鍵結果包含中斷、行與列 • 請將之前實驗課程所學的功能整合入本實驗

  15. 實驗參考資料 – 中斷接腳 Port F(GPF) Configuration

  16. 實驗參考資料 – 中斷接腳 Port G(GPG) Configuration

  17. 實驗參考資料 – 中斷接腳設定(Cont.) Port F Control Register

  18. 實驗參考資料 – 中斷接腳設定(Cont.) Port G Control Register

  19. 實驗參考資料 – 中斷接腳設定(Cont.) Port G Control Register

  20. External Interrupt Control Register 0

  21. External Interrupt Control Register 1

  22. External Interrupt Control Register 1

  23. External Interrupt Control Register 2

  24. External Interrupt Control Register 2

More Related