English
Language : 

SPRUGZ8D Datasheet, PDF (1599/3016 Pages) Texas Instruments – Technical Reference Manual
www.ti.com
Architecture
Where the DEBOUNCETIME field value in the GPIO_DEBOUNCINGTIME register is from 0 to 255.
• The debouncing feature must be enabled in the debouncing enable register (write 1 to the
corresponding DEBOUNCEENABLE bit in the GPIO_DEBOUNCENABLE register).
10.2.4.5 GPIO as a Keyboard Interface
The general-purpose interface can be used as a keyboard interface (Figure 10-6). You can dedicate
channels based on the keyboard matrix size. Figure 10-6 shows row channels configured as inputs with
the input debounce feature enabled. The row channels are driven high with an external pull-up. Column
channels are configured as outputs and drive a low level.
When a keyboard matrix key is pressed, the corresponding row and column lines are shorted together and
a low level is driven on the corresponding row channel. This generates an interrupt based on the proper
configuration (see Section 10.2.3).
When the keyboard interrupt is received, the processor can disable the keyboard interrupt and scan the
column channels for the key coordinates.
• The scanning sequence has as many states as column channels: For each step in the sequence, the
processor drives one column channel low and the others high.
• The processor reads the values of the row channels and thus detects which keys in the column are
pressed.
At the end of the scanning sequence, the processor establishes which keys are pressed. The keyboard
interface can then be reconfigured in the interrupt waiting state.
Figure 10-6. General-Purpose Interface Used as a Keyboard Interface
Device
VDD
L4
interconnect
....
Keyboard matrix
I/O
pads
Row
channels
....
D
Interrupt
generation
Column
channels
General Purpose Interface
SPRUGZ8D – 14 November 2011 – Revised April 2013
General-Purpose I/O (GPIO) Interface
Submit Documentation Feedback
Copyright © 2011–2013, Texas Instruments Incorporated
1599