KR19990065220A - Key input device with key matrix - Google Patents

Key input device with key matrix Download PDF

Info

Publication number
KR19990065220A
KR19990065220A KR1019980000429A KR19980000429A KR19990065220A KR 19990065220 A KR19990065220 A KR 19990065220A KR 1019980000429 A KR1019980000429 A KR 1019980000429A KR 19980000429 A KR19980000429 A KR 19980000429A KR 19990065220 A KR19990065220 A KR 19990065220A
Authority
KR
South Korea
Prior art keywords
key
input
matrix
key input
microcontroller
Prior art date
Application number
KR1019980000429A
Other languages
Korean (ko)
Inventor
오우람
Original Assignee
윤종용
삼성전자 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 윤종용, 삼성전자 주식회사 filed Critical 윤종용
Priority to KR1019980000429A priority Critical patent/KR19990065220A/en
Publication of KR19990065220A publication Critical patent/KR19990065220A/en

Links

Landscapes

  • Input From Keyboards Or The Like (AREA)

Abstract

본 발명의 키 입력 장치는 키 입력을 위해 할당된 마이크로 컨트롤러의 입/출력 포트 수를 절감하기 위해 입/출력 포트에 각각 디코더와 엔코더를 구성한다. 디코더와 엔코더를 사용하게 되므로 키 스캐닝 동작시 입/출력되는 데이터 비트 수가 절감되어 적은 비트 수의 입/출력 포트로 키 매트릭스의 스캐닝 동작을 수행할 수 있다. 그리고 키 스캐닝 동작에 따른 시간을 절감하기 위해 인터럽트 방식을 이용하게 된다. 키 입력에 응답하여 인터럽트가 발생되고 이는 마이크로 컨트롤러에 입력된다. 마이크로 컨트롤러는 키 입력에 따른 인터럽트 신호가 접수되면 키 스캐닝을 위한 인터럽트 루틴을 수행하게 된다.The key input device of the present invention configures decoders and encoders in the input / output ports, respectively, in order to reduce the number of input / output ports of the microcontroller allocated for key input. Since the decoder and the encoder are used, the number of input / output data bits during the key scanning operation is reduced, and the scanning operation of the key matrix can be performed with a small number of input / output ports. In addition, an interrupt method is used to save time due to the key scanning operation. An interrupt is generated in response to a keystroke, which is entered into the microcontroller. When the microcontroller receives an interrupt signal according to a key input, the microcontroller performs an interrupt routine for key scanning.

Description

키 메트릭스를 구비한 키 입력 장치(KEY INPUT APPARATUS HAVING KEY MATRIX)KEY INPUT APPARATUS HAVING KEY MATRIX

본 발명은 키 입력 장치에 관한 것으로 구체적으로는 키 매트릭스(Key Matrix)를 이용한 키 입력 장치에 관한 것이다.The present invention relates to a key input device, and more particularly, to a key input device using a key matrix.

현재 마이크로 컨트롤러(Micro Controller)는 산업 전반에 널리 응용되고 있으며, 그 기능이 더욱 향상되어 가고 있다. 이러한 마이크로 컨트롤러의 응용에 있어서, 사용자의 선택에 따라 해당되는 기능을 수행하기 위해 일반적으로 키 매트릭스(Key Matrix)를 이용하고 있다. 첨부 도면 도 1에 그 일 예가 도시되어 있다.Microcontrollers are widely used throughout the industry, and their functions are getting better. In the application of such a microcontroller, a key matrix is generally used to perform a corresponding function according to a user's selection. An example is shown in the accompanying drawings, FIG.

도 1을 참조하여, 8*8 매트릭스 구조로 된 키 매트릭스(20)가 마이크로 컨트롤러(10)의 입력 포트 PA0∼PA7와 출력 포트 PB0∼PB7에 연결되어 있다. 이와 같이 키 매트릭스(20)가 마이크로 컨트롤러(10)에 연결되어 있을 때 마이크로 컨트롤러(10)의 키 입력 동작은 다음과 같다.Referring to FIG. 1, a key matrix 20 having an 8 * 8 matrix structure is connected to the input ports PA0 to PA7 and the output ports PB0 to PB7 of the microcontroller 10. As such, when the key matrix 20 is connected to the microcontroller 10, the key input operation of the microcontroller 10 is as follows.

먼저, 마이크로 컨트롤러(10)는 키 매트릭스(20)를 스캐닝하기 위한 신호를 출력 포트 PA0∼PA7로 출력하고 이에 응답하여 발생되는 신호를 키 매트릭스(20)로부터 입력 포트 PB0∼PB7를 통해 입력 받는다. 그리고 입력된 신호를 판단하여 현재 입력된 키가 어떤 키인지를 판단하게 된다. 이러한 동작은 마이크로 컨트롤러(10)가 주기적으로 수행하므로서 키 입력을 동작을 수행하게 된다.First, the microcontroller 10 outputs a signal for scanning the key matrix 20 to the output ports PA0 to PA7 and receives a signal generated in response thereto from the key matrix 20 through the input ports PB0 to PB7. The input signal is judged to determine which key is the currently input key. This operation is performed by the microcontroller 10 periodically to perform a key input operation.

그런데 이와 같은 종래의 키 매트릭스를 이용한 키 입력 장치는 마이크로 컨트롤러에게 많은 부담을 주게 된다. 왜냐하면, 일반적으로 마이크로 컨트롤러는 키 입력 동작 뿐만 아니라 다른 제어 동작도 수행해야 하는데, 많은 부분을 키 입력을 처리하는데 소모해야 하기 때문이다. 특히 고속의 제어 동작을 수행해야 하는 경우에는 더욱 그러하다. 또한, 키 매트릭스가 많은 수의 키를 구비하게 되는 경우에는 마이크로 컨트롤러의 입/출력 포트의 상당 부분이 키 매트릭스에 할당되어져야 하는 문제점도 발생하게 된다.However, such a key input device using a conventional key matrix places a heavy burden on the microcontroller. Because, in general, the microcontroller must perform not only a key input operation but also other control operations, because much of the time is spent in processing the key input. This is especially true when a high speed control operation is to be performed. In addition, when the key matrix has a large number of keys, a problem arises in that a large portion of the input / output ports of the microcontroller must be allocated to the key matrix.

따라서, 본 발명의 목적은 상술한 제반 문제점을 해결하기 위해 제안된 것으로서 키 입력 처리를 위한 마이크로 컨트로러의 입/출력 포트수를 절감 할 수 있는 키 입력 장치를 제공하는데 있다.Accordingly, an object of the present invention is to provide a key input device capable of reducing the number of input / output ports of a microcontroller for key input processing as proposed to solve the above-mentioned problems.

본 발명의 다른 목적은 키 입력 처리 시간을 감소할 수 있는 키 입력 장치를 제공하는데 있다.Another object of the present invention is to provide a key input device that can reduce the key input processing time.

도 1은 종래의 키 입력 장치의 일 예를 보여주는 회로도; 그리고1 is a circuit diagram showing an example of a conventional key input device; And

도 2는 본 발명의 제 1 실 실시예에 따른 키 입력 장치의 회로도; 그리고2 is a circuit diagram of a key input device according to a first embodiment of the present invention; And

도 3은 본 발명의 제 2 실시예에 따른 키 입력 장치의 회로도이다.3 is a circuit diagram of a key input device according to a second embodiment of the present invention.

*도면의 주요 부분에 대한 부호의 설명** Description of the symbols for the main parts of the drawings *

10, 30, 60: 마이크로 컨트롤러 20: 키 매트릭스10, 30, 60: microcontroller 20: key matrix

40: 디코더 50: 엔코더40: decoder 50: encoder

70: 논리 회로 80: 필터70: logic circuit 80: filter

상술한 바와 같은 본 발명의 목적을 달성하기 위한 본 발명의 일 특징에 의하면, 키 입력 장치는: 복수개의 키들이 매트릭스 형태로 구성된 키 매트릭스와; 상기 키 매트릭스를 스캐닝하여 입력 키를 판단하는 키 입력 처리부와; 상기 키 입력 처리부의 출력 포트에 구성된 디코더와; 상기 키 입력 처리부의 입력 포트에 구성된 엔코더를 포함하여, 상기 키 입력 처리부의 키 스캐닝 동작시 출력되는 신호는 상기 디코더에 의해 디코딩되어 상기 키 매트릭스로 입력되고, 이에 응답하여 상기 키 매트릭스로부터 출력되는 신호는 상기 엔코더에 의해 엔코딩되어 상기 키 입력 처리부로 제공된다.According to an aspect of the present invention for achieving the object of the present invention as described above, the key input device comprises: a key matrix consisting of a plurality of keys in the form of a matrix; A key input processing unit which scans the key matrix to determine an input key; A decoder configured at an output port of the key input processing unit; Including an encoder configured at the input port of the key input processing unit, the signal output during the key scanning operation of the key input processing unit is decoded by the decoder and input into the key matrix, and in response thereto, a signal output from the key matrix. Is encoded by the encoder and provided to the key input processor.

본 발명의 다른 특징에 의하면, 키 입력 처리 장치는: 복수개의 키들이 매트릭스 형태로 구성된 키 매트릭스와; 키 입력에 따른 인터럽트 신호를 발생하는 수단과; 상기 인터럽트 신호를 입력하여 상기 키 매트릭스를 스캐닝하여 입력 키를 판단하는 키 입력 처리부를 포함한다.According to another aspect of the present invention, a key input processing apparatus includes: a key matrix composed of a plurality of keys in a matrix form; Means for generating an interrupt signal according to a key input; And a key input processing unit configured to input the interrupt signal and scan the key matrix to determine an input key.

이 실시예에 있어서, 상기 인터럽트 발생 수단은 상기 키 매트릭스의 출력을 입력하여 논리 연산하여 상기 키 입력 처리부로 인터럽트 신호를 제공하는 논리회로를 포함한다.In this embodiment, the interrupt generating means includes a logic circuit for inputting and outputting the output of the key matrix to provide an interrupt signal to the key input processing section.

이 실싱예에 있어서, 상기 인터럽트 신호의 노이즈를 제거하기 위한 필터를 포함한다.In this practical example, a filter for removing noise of the interrupt signal is included.

(실시예)(Example)

이하 본 발명에 따른 실시예를 첨부된 도면을 참조하여 상세히 설명한다.Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings.

먼저 제 1 실시예로 키 입력 처리를 위한 마이크로 컨트롤의 입출력 포트 수를 절감하는 경우를 설명하고, 이어 제 2 실시예로 마이크로 컨트롤러의 키 입력 처리 시간을 절감하는 경우를 나누어 설명한다. 후술하겠지만, 이러한 제 1 및 제 2 실시예를 병행하여 실시하는 것은 이 분야의 통상의 지식을 구비한 기술자에 의해 용이하게 실시 될 수 있다.First, the case of reducing the number of input / output ports of the microcontroller for key input processing will be described in the first embodiment, and the case of reducing the key input processing time of the microcontroller will be described in the second embodiment. As will be described later, the implementation of these first and second embodiments in parallel can be easily carried out by those skilled in the art.

실시예 1Example 1

도 2에 본 발명의 제 1 실시예에 따른 키 입력 장치의 회로도가 도시되어 있다.2 is a circuit diagram of a key input device according to a first embodiment of the present invention.

도 2에 도시된 바와 같이, 마이크로 컨트롤러(30)와 키 매트릭스(20) 사이에 디코더(Decoder)(40)와 엔코더(Encoder)(50)가 구성되어 있다. 마이크로 컨트롤러(30)의 출력 포트 PA0∼PA2에는 디코더(40)가 연결되고 이 디코더(40)의 출력 단자는 키 매트릭스(20)에 연결된다. 엔코더(50)의 입력 단자는 키 매트릭스(20)에 연결되고, 이 엔코더(50) 출력 단자는 마이크로 컨트롤러(30)의 입력 포트 PB0∼PB2에 연결되어 있다. 상기 디코더(40)와 엔코더(50)는 키 메트릭스(20)의 매트릭스 수에 따라 그 특징이 결정된다. 예를 들어, 키 매트릭스(20)가 8*8 매트릭스로 구성되는 경우에 디코더(40)는 3*8 디코더를 사용하고, 엔코더(50)는 8*3 엔코더를 사용하게 된다. 이와 같이 디코더(40)와 엔코더(50)를 사용하므로서 마이크로 컨트롤러(30)의 해당 입/출력 포트의 종래와 비교하여 많이 절감할 수 있다. 디코더와 엔코더를 이용하는 경우에도 키 스캐닝 프로그램은 종래와 동일한 프로그램으로 적용이 가능하며, 단지 스케닝을 위한 데이터들을 이에 적합하도록 변경하면 된다.As shown in FIG. 2, a decoder 40 and an encoder 50 are configured between the microcontroller 30 and the key matrix 20. The decoder 40 is connected to the output ports PA0 to PA2 of the microcontroller 30, and the output terminal of the decoder 40 is connected to the key matrix 20. The input terminal of the encoder 50 is connected to the key matrix 20, and the output terminal of the encoder 50 is connected to the input ports PB0 to PB2 of the microcontroller 30. The decoder 40 and the encoder 50 are characterized by the number of matrices of the key matrix 20. For example, when the key matrix 20 is configured with an 8 * 8 matrix, the decoder 40 uses a 3 * 8 decoder, and the encoder 50 uses an 8 * 3 encoder. By using the decoder 40 and the encoder 50 in this way, the conventional input / output port of the microcontroller 30 can be saved much compared with the related art. Even when a decoder and an encoder are used, the key scanning program can be applied to the same program as the conventional one, and only the data for scanning can be changed to suit this.

이와 같이, 키 매트릭스를 이용한 키 입력 장치에 디코더와 엔코더를 사용하게 되므로서 키 입력을 위한 마이크로 컨트롤러의 입/출력 포트 수를 상당 부분 절감하게 된다. 이에 따른 여분의 입/출력 포트는 다른 용도로 유용하게 사용될 수 있다.As such, since the decoder and the encoder are used in the key input device using the key matrix, the number of input / output ports of the microcontroller for key input is substantially reduced. This extra input / output port can be useful for other purposes.

실시예 2Example 2

도 3에 본 발명의 제 2 실시예에 따른 키 입력 장치의 회로도가 도시되어 있다.3 is a circuit diagram of a key input device according to a second embodiment of the present invention.

도 3에 도시된 바와 같이, 마이크로 컨트롤러(60)의 입력 포트 PA0∼PA7와 출력 포트 PB0∼PB7에는 키 매트릭스(20)가 연결되어 있다. 마이크로 컨트롤러(60)의 입력 포트 PB0∼PB7에는 NAND 게이트 논리 회로(70)가 연결되어 있고, 이 논리 회로(70)의 출력단에는 필터(80)가 연결되어 논리 회로(70)의 출력을 입력하고 필터링하여 마이크로 컨트롤러(60)의 인터럽트 단자(INT)로 입력한다.As shown in FIG. 3, a key matrix 20 is connected to the input ports PA0 to PA7 and the output ports PB0 to PB7 of the microcontroller 60. A NAND gate logic circuit 70 is connected to the input ports PB0 to PB7 of the microcontroller 60, and a filter 80 is connected to an output terminal of the logic circuit 70 to input an output of the logic circuit 70. The filter is input to the interrupt terminal INT of the microcontroller 60.

이와 같이 구성된 키 입력 장치의 동작은 다음과 같다.The operation of the key input device configured as described above is as follows.

키 매트릭스(20)에 키입력이 발생되면 마이크로 컨트롤러(60)에 인터럽트 신호가 입력되고, 이어 마이크로 컨트롤러(60)는 키 스캐닝 동작의 수행을 위한 인터럽트 루틴을 수행하게 된다. 키 스캐닝을 위한 인터럽트 루틴의 수행에 의해 키 입력을 감지하게 된다. 이와 같은 방식에 의하면 마이크로 컨트롤러(60)는 주기적인 키 스캐닝 동작을 수행할 필요가 없다. 단지, 키 입력에 따른 인터럽트가 발생될 때에만 키 스캐닝 동작을 수행하면 된다. 그러므로 키 입력 여부에 상관없이 키 스캐닝 동작을 수행하는 불필요한 동작을 수행 할 필요가 없게 된다.When a key input is generated in the key matrix 20, an interrupt signal is input to the microcontroller 60, and then the microcontroller 60 performs an interrupt routine for performing a key scanning operation. Keystrokes are detected by the execution of an interrupt routine for key scanning. In this manner, the microcontroller 60 does not need to perform a periodic key scanning operation. The key scanning operation only needs to be performed when an interrupt is generated according to the key input. Therefore, it is not necessary to perform an unnecessary operation of performing a key scanning operation regardless of whether a key is pressed or not.

이상과 같은 본 발명에 의하면, 키 입력을 위한 마이크로 컨트롤러의 입/출력 포트 수를 종래와 비교하여 상당 부분 절감 할 수 있고, 주기적인 키 스캐닝 동작을 하지 않게 되므로 키 스캐닝 동작에 소요되는 시간을 절감 할 수 있다.According to the present invention as described above, the number of input / output ports of the microcontroller for key input can be reduced considerably compared with the conventional, and the time required for the key scanning operation is reduced because the periodic key scanning operation is not performed. can do.

Claims (4)

키 입력 장치에 있어서:In a key input device: 복수개의 키들이 매트릭스 형태로 구성된 키 매트릭스와;A key matrix in which a plurality of keys are formed in a matrix form; 상기 키 매트릭스를 스캐닝하여 입력 키를 판단하는 키 입력 처리부와;A key input processing unit which scans the key matrix to determine an input key; 상기 키 입력 처리부의 출력 포트에 구성된 디코더와;A decoder configured at an output port of the key input processing unit; 상기 키 입력 처리부의 입력 포트에 구성된 엔코더를 포함하여,Including an encoder configured in the input port of the key input processing unit, 상기 키 입력 처리부의 키 스캐닝 동작시 출력되는 신호는 상기 디코더에 의해 디코딩되어 상기 키 매트릭스로 입력되고, 이에 응답하여 상기 키 매트릭스로부터 출력되는 신호는 상기 엔코더에 의해 엔코딩되어 상기 키 입력 처리부로 제공되는 것을 특징으로 하는 키 입력 처리 장치.The signal output during the key scanning operation of the key input processing unit is decoded by the decoder and input into the key matrix, and in response thereto, the signal output from the key matrix is encoded by the encoder and provided to the key input processing unit. Key input processing device, characterized in that. 키 입력 처리 장치에 있어서:In a key input processing device: 복수개의 키들이 매트릭스 형태로 구성된 키 매트릭스와;A key matrix in which a plurality of keys are formed in a matrix form; 키 입력에 따른 인터럽트 신호를 발생하는 수단과;Means for generating an interrupt signal according to a key input; 상기 인터럽트 신호를 입력하여 상기 키 매트릭스를 스캐닝하여 입력 키를 판단하는 키 입력 처리부를 포함하는 것을 특징으로 하는 키 입력 장치.And a key input processing unit which inputs the interrupt signal to scan the key matrix to determine an input key. 제 2 항에 있어서,The method of claim 2, 상기 인터럽트 발생 수단은The interrupt generating means 상기 키 매트릭스의 출력을 입력하여 논리 연산하여 상기 키 입력 처리부로 인터럽트 신호를 제공하는 논리회로를 포함하는 것을 특징으로 하는 키 입력 처리 장치.And a logic circuit for inputting and outputting the output of the key matrix to provide an interrupt signal to the key input processing unit. 제 3 항에 있어서,The method of claim 3, wherein 상기 인터럽트 신호의 노이즈를 제거하기 위한 필터를 포함하는 것을 특징으로 하는 키 입력 장치.And a filter for removing noise of the interrupt signal.
KR1019980000429A 1998-01-09 1998-01-09 Key input device with key matrix KR19990065220A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019980000429A KR19990065220A (en) 1998-01-09 1998-01-09 Key input device with key matrix

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019980000429A KR19990065220A (en) 1998-01-09 1998-01-09 Key input device with key matrix

Publications (1)

Publication Number Publication Date
KR19990065220A true KR19990065220A (en) 1999-08-05

Family

ID=65728332

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019980000429A KR19990065220A (en) 1998-01-09 1998-01-09 Key input device with key matrix

Country Status (1)

Country Link
KR (1) KR19990065220A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100471547B1 (en) * 2002-09-17 2005-03-10 현대모비스 주식회사 Circuit for expanding ports number of micom

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100471547B1 (en) * 2002-09-17 2005-03-10 현대모비스 주식회사 Circuit for expanding ports number of micom

Similar Documents

Publication Publication Date Title
ATE400965T1 (en) MOBILE DEVICE AND METHOD OF OPERATION USING CONTEXT-SENSITIVE MENU KEYS IN A KEYBOARD LOCKING MODE
US4591833A (en) Keyboard unit control system using block scanning techniques
KR19990065220A (en) Key input device with key matrix
US5619441A (en) High speed dynamic binary incrementer
GB2263991A (en) Computer keyboard
KR100492566B1 (en) A device of bit serial adder with partial inactive for low power consumption
KR200195093Y1 (en) Keyboard input
KR950008424Y1 (en) Key-pad interface for micam
KR100219560B1 (en) Key scanning device using multiplexer or demultiplexer
KR100316645B1 (en) Hard reset device of CPU and corresponding hard reset method
KR950007122B1 (en) Keyboard control circuit
KR940000295B1 (en) Function implementing interface circuit of color video printer
KR100242985B1 (en) A circuit of adder
JPS6051725B2 (en) Keyboard with foot switch for shift key
JPS6123230A (en) Cursor shift system
JPS58211239A (en) Keyboard device
KR900000604B1 (en) Processing control circuit of key input data
KR100202611B1 (en) Keyboard scanning device
JPH05274077A (en) Keyboard
KR200156144Y1 (en) A circuit of absolute value
KR880000422B1 (en) Matrix key and data selector
KR20000005352U (en) Keyboard and Mouse I / O Controller
KR19990066311A (en) Keystroke processing unit
JPH0667782A (en) Key input device
KR950024479A (en) Integrated circuit for control of digital key phones

Legal Events

Date Code Title Description
WITN Withdrawal due to no request for examination