APPARATUS AND METHOD FOR USING EXPANSION KEY IN PORTABLE TERMINAL

Information

  • Patent Application
  • 20080034124
  • Publication Number
    20080034124
  • Date Filed
    August 07, 2007
    17 years ago
  • Date Published
    February 07, 2008
    16 years ago
Abstract
An input apparatus for using an expansion key in a portable terminal includes an expansion key matrix unit which forms a key matrix through which a plurality of expansion keys are input; an input/output (I/O) expansion chip which, in response to a key input through the expansion key matrix unit, transmits a value of an input port of the input/output (I/O) expansion chip to store in an internal parameter, changes the input port to an output port, and vice versa, reads a value of the changed input port, and transmits the read value to the MSM chip to be stored in the internal parameter; and the MSM chip which recognizes a corresponding expansion key based on the stored parameters.
Description

BRIEF DESCRIPTION OF THE DRAWINGS

The above and other objects, features and advantages of the present invention will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings in which:



FIG. 1 is a block diagram of a key pad input apparatus of a 5*6 key matrix in a conventional portable terminal;



FIG. 2 is a block diagram of a conventional apparatus having an expansion key, using a spare External Interrupt port of a Mobile Station Modem (MSM) chip;



FIG. 3 is a block diagram of an apparatus for providing a plurality of expansion keys, by use of an input/output (I/O) expansion chip according to the present invention;



FIG. 4 is a block diagram of an apparatus for providing a plurality of expansion keys, by use of an input/output (I/O) expansion chip according to the present invention; and



FIG. 5 is a flowchart for illustrating the process of recognizing a plurality of expansion keys, by use of an input/output (I/O) expansion chip according to the present invention.





DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

Preferred embodiments of the present invention will be described herein below with reference to the accompanying drawings. In the following description, well-known functions or constructions are not described in detail since they would obscure the invention in unnecessary detail.


An apparatus and a method for using an expansion key, which uses a general purpose input/output (GPIO) extension according to an exemplary embodiment of the present invention, will be explained below.



FIG. 3 is a block diagram of an apparatus for providing a plurality of expansion keys, by use of an input/output (I/O) expansion chip according to the present invention.


Referring to FIG. 3, an expansion key input apparatus of a portable terminal includes a Mobile Station Modem (MSM) chip 300 which recognizes information of an input key by processing an interrupt generated according to a key input through a key matrix unit 306, and which processes the interrupt of an expansion key based on I2C (Inter-IC) communication with an input/output (I/O) expansion chip 302 via an external interface, a key matrix unit 306 connected with I/O ports such as KEYSENSE of the MSM chip 300 to form a key matrix such that numeral and text information, including English, Korean, symbols or the like, and various functional information is input there through, an expansion key matrix unit 304 connected with a general purpose input/output (GPIO) port of the I/O expansion chip 302 to form a N*M key matrix to provide a plurality of expansion key inputs, and the I/O expansion chip 302 which provides a plurality of GPIO to supplement insufficient I/O ports of the MSM chip 300, and which generates a corresponding interrupt in response to an expansion key input through the expansion key matrix unit 304, and provides the MSM chip 300 with the generated interrupt using I2C communication.



FIG. 4 is a block diagram of an apparatus for providing a plurality of expansion keys, by use of an I/O expansion chip according to the present invention.


Referring to FIG. 4, an exemplary implementation configures 3*3 key matrix for expansion key input, by using six GPIO ports of the I/O expansion chip 400. GPIO 1, 2 and 3, corresponding to the columns of the key matrix, are used as output ports and set to high state, while GPIO 4, 5 and 6, corresponding to the rows of the key matrix, are used as input ports and set to low state.


For example, if a key corresponding to GPIO 2 (column) and GPIO 6 (row) is pressed in the I/O expansion chip 400, GPIO 2 remains in high state, and GPIO 6 changes from low state to high state. That is, by the pressing of the keys corresponding to GPIO 2 and GPIO 4-6, the values of GPIO 4, 5 and 6 respectively are changed to LOW LOW HIGH (001), and due to the change of the input ports, an expansion key interrupt is generated, and the value of the input port is transmitted to the MSM chip 300 through I2C communication and stored in an internal register of the MSM chip 300. Because GPIO 2 does not have any change of signal, it is not recognizable which port is pressed. The output and input direction of GPIO may be changed to read values of other output ports. That is, the input ports GPIO 4, 5 and 6 are changed to output ports, and the output ports GPIO 1, 2 and 3 are changed to input ports. The change of input and output direction may be made by changing a register value of the I/O expansion chip 400 which determines the input and output direction of the ports.


The changed values of the input ports GPIO 1, 2 and 3 are read, transmitted to the MSM chip 300 by I2C communication, and stored in the internal register of the MSM chip 300. For the next key input, the input and output direction of the GPIO is initialized, that is, GPIO 4, 5 and 6 are reset to input ports, and GPIO 1, 2 and 3 are reset to output ports.



FIG. 5 is a flowchart for illustrating the process of recognizing a plurality of expansion keys, by use of an input/output (I/O) expansion chip according to the present invention.


Referring to FIG. 5, a 3*3 key matrix is configured by use of six GPIO ports of I/O extension. GPIO 1, 2 and 3, corresponding to the columns of the key matrix, are set to output ports and high state, and GPIO 4, 5 and 6, corresponding to the rows of the key matrix, are set to input ports and low state in step 500.


If an expansion key is pressed and an expansion key interrupt is generated in step 502, the process moves to step 504 and reads out values of the input ports GPIO 4, 5 and 6. For example, if a key corresponding to GPIO 2 (column) and GPIO 6 (row) is pressed, GPIO 2 remains in the high state, while GPIO 6 is changed from low state to high state. Because it is not possible to confirm which port is pressed based on the values of column ports, that is, GPIO 1, 2 and 3, the values of row ports, that is, the values of GPIO 1, 2 and 3 are read in step 504. The key corresponding to GPIO 6 is pressed such that the values of GPIO 4, 5 and 6 are read as LOW LOW HIGH (001).


The read values (001) of the input ports are transmitted to the MSM chip 300 by I2C communication, and stored in an internal register in step 506.


Direction setting is performed in step 508, such that the input ports GPIO 4, 5 and 6 are changed to output ports, and the output ports GPIO 1, 2 and 3 are changed to input ports. The input ports are set to low state, and the output ports are set to high state.


The direction setting of the input and output ports is performed, by changing a register value of the GPIO, which determines input and output direction.


The values of the changed input ports GPIO 1, 2 and 3 are read in step 510.


In the state that the key corresponding to GPIO 2 (column) and GPIO 6 (row) is pressed, GPIO 2 is changed from low state to high state, and GPIO 6 remains in high state. Accordingly, the values of the changed GPIO 1, 2 and 3, corresponding to the columns, are read. The values of the changed GPIO 1, 2 and 3, in the state that the key corresponding to GPIO 2 is pressed, are read as LOW HIGH LOW (010).


The values (010) of the changed input ports are transmitted to the MSM chip 300 by I2C communication and stored in the register in step 510.


The input and output direction of the GPIO ports are initialized for the next key input in step 514. Accordingly, GPIO 4, 5 and 6 ports are reset to input ports, and GPIO 1, 2 and 3 are reset to output ports. The algorithm according to the present invention is completed.


The algorithm according to the present invention is generally processed in the duration that the user presses the keys. It takes 1 ms at 300 kbps I2C communication between the MSM chip 300 and the I/O expansion chip 400, and thus the algorithm may be processed within 2˜3 ms. Considering that a general user presses the key for approximately 50˜100 ms, minimum 10 ms will be sufficient to switch input and output ports and recognize keys. Accordingly, the embodiments of the present invention are realizable, because the current Embedded System uses I2C bus of more than 100 kbps.


Because relatively economic GIPO expansion chip is used to extend the keys, rather than an expensive custom integrated circuit, supplement I/O ports can be provided to the MSM chip 300 at a low cost.


While the invention has been shown and described with reference to certain preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims
  • 1. An input apparatus for using an expansion key in a portable terminal, comprising: an expansion key matrix unit for forming a key matrix through which a plurality of expansion keys are input;an input/output (I/O) expansion chip for, in response to a key input through the expansion key matrix unit, reading a first value of an initial input port of the I/O expansion chip, transmitting the first value to a Mobile Station Modem (MSM) chip to be stored in an internal register, changing the initial input port to an output port and changing an initial output port to an input port, reading a second value of the changed initial input port, and transmitting the second value to the MSM chip to be stored in the internal register; andthe MSM chip for recognizing a corresponding expansion key based on values transmitted from the I/O expansion chip.
  • 2. The apparatus of claim 1, further comprising a key matrix unit connected with an input/output port of the MSM chip, the key matrix unit for forming a key matrix such that numerical and text information, including English, Korean and symbols, and other functional information are input therethrough.
  • 3. The apparatus of claim 1, wherein the expansion key matrix unit realizes a key matrix, using an input/output (I/O) port of the I/O expansion chip.
  • 4. The apparatus of claim 1, wherein the I/O expansion chip and the MSM chip communicate with each other by Inter IC (I2C) communication.
  • 5. The apparatus of claim 1, wherein the change of the initial input port to the output port and the initial output port to the input port is realized by changing an internal register value of the I/O expansion chip to determine input and output directions, according to the instruction from the MSM chip.
  • 6. The apparatus of claim 1, wherein values being transmitted to the MSM chip for being stored in the internal register include the first value and the second value.
  • 7. The apparatus of claim 1, wherein the expansion keys are identified by a combination of I/O port of the I/O expansion chip.
  • 8. An input method for using an expansion key in a portable terminal, comprising: in response to a key input through an expansion key matrix unit, reading a first value of an initial input port of an input/output (I/O) expansion chip, and transmitting the first value to a Mobile Station Modem (MSM) chip to be stored in an internal register;changing the initial input port to an output port, and changing an initial output port to an input port; andreading a second value of the changed initial input port and transmitting the second value to the MSM chip to be stored in the internal register.
  • 9. The method of claim 8, wherein the expansion key matrix unit realizes a key matrix, using an input/output (I/O) port of the I/O expansion chip.
  • 10. The method of claim 8, wherein the I/O expansion chip and the MSM chip communicate with each other by Inter IC (I2C) communication.
  • 11. The method of claim 8, wherein the change of the initial input port to the output port and the initial output port to the input port is realized by changing an internal register value of the I/O expansion chip to determine input and output direction, according to the instruction from the MSM chip.
  • 12. The method of claim 8, wherein values being transmitted to the MSM chip for being stored in the internal register include the first value and the second value.
  • 13. The method of claim 8, wherein the expansion keys are identified by a combination of I/O port of the I/O expansion chip.
  • 14. A computer-readable recording medium having recorded thereon a program for using an expansion key in a portable terminal, comprising: a first code segment, reading a first value of an initial input port of an input/output (I/O) expansion chip, and transmitting the first value to a Mobile Station Modem (MSM) chip to be stored in an internal register;a second code segment, changing the initial input port to an output port, and changing an initial output port to an input port; anda third code segment, reading a second value of the changed initial input port and transmitting the second value to the MSM chip to be stored in the internal register.
Priority Claims (1)
Number Date Country Kind
2006-0074097 Aug 2006 KR national