Interrupt-driven keypad scanning method and apparatus
First Claim
1. An interrupt-driven keypad scanner comprising:
- a keypad matrix having a row line and a column line;
a switch coupled to the row line for setting the row line to either an input state or an output state;
a first disableable interrupt generator coupled to the column line for detecting a keypress; and
a second disableable interrupt generator coupled to the column line for detecting a keyrelease.
4 Assignments
0 Petitions
Accused Products
Abstract
The interrupt-driven keypad scanning method and apparatus accurately interprets keypresses in single-keypress applications. Initially, interrupts (16, 26, 36, 46) associated with each column line (10, 20, 30, 40) of a keypad matrix (70) are set to trigger when a key is pressed. Once an interrupt triggers, a microcontroller (99) polls the row lines (15, 25, 35, 45, 55, 65) to determine which key, if any, was validly pressed. If exactly one keypress is detected, the keypress is valid. Next, the interrupt for the valid key'"'"'s column line is enabled while the other column line interrupts are disabled. When a next interrupt is received, the keypad returns to the row-scan state for determination of which keys are depressed. If no keys are depressed, which occurs when the validly-pressed key has been released, the keypad returns to the keypress-detect state. The method also interprets pathological keypresses such as key rollover, multiple keypresses, and key mis-hits.
42 Citations
14 Claims
-
1. An interrupt-driven keypad scanner comprising:
-
a keypad matrix having a row line and a column line; a switch coupled to the row line for setting the row line to either an input state or an output state; a first disableable interrupt generator coupled to the column line for detecting a keypress; and a second disableable interrupt generator coupled to the column line for detecting a keyrelease. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A radiotelephone comprising:
-
a keypad matrix having a row line and a first column line and a second column line; a switch coupled to the row line for setting the row line to either an input state or an output state; a first disableable interrupt generator coupled to the first column line for detecting a keypress; a second disableable interrupt generator coupled to the first column line for detecting a keyrelease; a third disableable interrupt generator coupled to the second column line; and a microcontroller coupled to the switch, the first disableable interrupt generator, the second disableable interrupt generator, and the third disableable interrupt generator.
-
-
7. An interrupt-driven keypad scanning method, for a keypad matrix having at least one row line and at least one column line and more than one key, comprising the steps of:
-
setting the at least one column line to an input state having a second signal level and setting the at least one row line to an output state having a first signal level; and enabling an interrupt generator to generate a column interrupt to a microcontroller when the at least one column line transitions from the second signal level to the first signal level detecting the column interrupt using the microcontroller; scanning the at least one row line to determine whether zero, exactly one, or more than one key is depressed; if more than one key is depressed; setting the at least one column line to an input state having a second signal level and setting the at least one row line to an output state having a third signal level; enabling the interrupt generator to generate a next column interrupt to the microcontroller when the at least one column line transitions from the third signal level to the second signal level; and detecting the next column interrupt using the microcontroller. - View Dependent Claims (8, 9)
-
-
10. An interrupt-driven keypad scanning method, for a keypad matrix having a first row line, a second row line, a first column line, a second column line and more than one key comprising the steps of:
-
setting the first column line and the second column line to an input state having a logic one signal level; setting the first row line and the second row line to an output state having a logic zero signal level; enabling an interrupt generator to generate a column interrupt to a microcontroller when the first column line transitions from the logic one signal level to the logic zero signal level detecting the column interrupt using the microcontroller; scanning the first row line and the second row line to determine whether zero, exactly one, or more than one key is depressed; if more than one key is depressed; setting the first column line to an input state having a logic one signal level and setting the first row line to an output state having a logic zero signal level; enabling the interrupt generator to generate a next column interrupt to the microcontroller when the first column line transitions from the logic zero signal level to the logic one signal level; and detecting the next column interrupt using the microcontroller. - View Dependent Claims (11, 12, 13, 14)
-
Specification