| 数据搜索系统,热门电子元器件搜索 |
|
TNETV1002IDZHK 数据表(PDF) 48 Page - Texas Instruments |
|
|
|||||||||||||||||||||||||||||
TNETV1002IDZHK 数据表(HTML) 48 Page - Texas Instruments |
|
48 / 102 page ![]() MCU Subsystem Functional Overview 38 June 2001 -- Revised December 2002 SPRS180C Table 4--2. GPIO Control/Status Bits BIT NAME DESCRIPTION io I/O bit: Writable when I/O is configured as an output (cio=0) Reads value on I/O pin when I/O is configured as an input (cio=1) cio Configure I/O: 0: output 1: input (default) gpio_irqA SeeTable4--3 gpio_irqB SeeTable4--3 ddio Delta detect bit: If gpio is configured as an output (cio=0), always reads as ‘0’ If gpio is configured as an input (cio=1), reads a ‘1’ if io has changed since ddio was last cleared gpio_en Selects register for muxed GPIOs: 0: other signal 1: gpio (default) Non-shared GPIOs are always available at the i/o pin independent of the value of gpio_en Table 4--3. GPIO_IRQ Bits Definition gpio_irqB gpio_irqA FUNCTION 0 0 The associated device pin does not cause assertion of a GPIO interrupt. 0 1 A rising edge on the associated device pin causes assertion of a GPIO interrupt. 1 0 A falling edge on the associated device pin causes assertion of a GPIO interrupt. 1 1 Any change on the associated device pin causes assertion of a GPIO interrupt. The configuration/status bits are accessible through 12 memory-mapped registers: GPIO_IO, KBGPIO_IO, GPIO_CIO, KBGPIO_CIO, GPIO_IRQA, KBGPIO_IRQA, GPIO_IRQB, KBGPIO_IRQB, GPIO_DDIO, KBGPIO_DDIO, GPIO_EN and KBGPIO_EN. The pins KBGPIO(15:8) have on-chip pullup resistors, making them suitable for use as keypad row inputs. To configure the 5471 for an 8x8 keypad [with keypad columns connected to KBGPIO(7:0) and rows connected to KBGPIO(15:8)], use the following settings: • KBGPIO(15:8) pins are configured as inputs (cio=1) for row lines • KBGPIO(7:0) pins are configured as outputs (cio=0) for column lines Keypad scanning can be done by setting the output values on all of the column KBGPIO pins to 0 and enabling KBGPIO(15:8) interrupts. When a KBGPIO(15:8) interrupt is seen, all but one of the the KGBPIO column output values are be changed to 1, and then the KBGPIO row pins are read. If the KBGPIO pin row input value is all 1s, then there are no keys in the column currently driven to 0 that are set. Any bit in the KGBPIO pin row input value that is 0 indicates a closed switch. Next, select a different column by writing a new value to KBGPIO column pins with just one output pin value 0 and the remainder 1. Repeat the KBGPIO row read and check for closed switches. Repeat this for each column in the keyboard array. Once the keypad has been read, the interrupt service routine should set all column outputs back to 0 so that the next key press may be sensed. |
|
链接网址 |
| 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 |