| 数据搜索系统,热门电子元器件搜索 |
|
PC87366 数据表(PDF) 156 Page - National Semiconductor (TI) |
|
|
|
|||||||||||||||||||||||||||||
PC87366 数据表(HTML) 156 Page - National Semiconductor (TI) |
|
156 / 240 page ![]() 9.0 Game Port (GMP) (Continued) 156 www.national.com 9.2.3 Button Status Indication The button(s) status indication mechanism is described in Figure 30. Although this figure shows an active-low button (RBU0>>RBD0), the polarity of the button can be either high or low, assuming that the Game Port software is aware of the button’s polarity. Figure 30. Game Device Button Status Indication Mechanism A simple push-button mechanism is usually used to implement the game device buttons. The status of each button is sensed by the Game Port via the JOYnBTN0,1 pins as either high or low, and reflected by the GMPLST register. It is the responsi- bility of the software to determine the actual status of the buttons according to their polarity, which depends on the specific implementation of the system and the game device. 9.2.4 Operation Modes The Game Port can be used to monitor the position and button status indicators in one of the following operation modes: q Legacy mode q Enhanced mode. Legacy Mode Legacy mode is enabled when bit 0 of the GMPCTL register is set to 0, which is its default state. In this mode, the game device indicators are monitored by polling their momentary status via the Game Port Legacy Status register (GMPLST, see Section 9.3.3). The process of reading the position status of the game device(s) is initiated by performing a write access to offset 1 in the Game Port address space. This write access causes the Game Port to release the JOYnX,Y pins. When a JOYnX,Y pin is released, the corresponding bit in the GMPLST register is set to 1. To capture the position indicated by the game device, the software must poll the GMPLST register and measure the time it takes for the JOYnX,Y to go high. This measurement should be performed by measuring the time during which an axis bit is 1. Reading the status of the buttons of the game device is done by polling the GMPLST register and looking for changes in the bits reflecting the status of the JOYnBTN0,1 pins. No debounce of the input signals is performed by the Game Port in Legacy mode. It is the responsibility of the software to implement such debounce, if necessary. Enhanced Mode Enhanced mode is enabled when bit 0 of the GMPCTL register is set to 1. In Enhanced mode, the Game Port hardware monitors the status indicators of the game device(s), and provides processed data that can be easily used by software to determine the complete status of the game device. The process of reading the position status of the game device(s) is initiated the same way it is done in Legacy mode. How- ever, in Enhanced mode the Game Port hardware measures the CX/Y charging time using four 16-bit up-counters. Each one of the four axis status lines (two lines per game device) has a dedicated counter. Once the Game Port releases the JOYnX,Y to go high, each one of the counters starts counting until its associated axis status line reaches the voltage level of logic 1. RBU0 Game Port JOYnBTN0 JOYnBTN1 Game Device Button Status Circuit Pins Buttons 0,1 Status Indicators Input Path RBD0 |
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |