KR0136346B1 - Data input circuit - Google Patents

Data input circuit

Info

Publication number
KR0136346B1
KR0136346B1 KR1019940038239A KR19940038239A KR0136346B1 KR 0136346 B1 KR0136346 B1 KR 0136346B1 KR 1019940038239 A KR1019940038239 A KR 1019940038239A KR 19940038239 A KR19940038239 A KR 19940038239A KR 0136346 B1 KR0136346 B1 KR 0136346B1
Authority
KR
South Korea
Prior art keywords
output
input
data
signal
processing unit
Prior art date
Application number
KR1019940038239A
Other languages
Korean (ko)
Other versions
KR960024849A (en
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 KR1019940038239A priority Critical patent/KR0136346B1/en
Publication of KR960024849A publication Critical patent/KR960024849A/en
Application granted granted Critical
Publication of KR0136346B1 publication Critical patent/KR0136346B1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/02Input arrangements using manually operated switches, e.g. using keyboards or dials
    • G06F3/023Arrangements for converting discrete items of information into a coded form, e.g. arrangements for interpreting keyboard generated codes as alphanumeric codes, operand codes or instruction codes
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M11/00Coding in connection with keyboards or like devices, i.e. coding of the position of operated keys
    • H03M11/02Details

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Input From Keyboards Or The Like (AREA)

Abstract

본 발명은 키패드(Key pad)에 의한 데이타를 중앙처리장치(CUP)로 입력하는 회로에 관한 것으로, 특히 클럭발생부로부터 발생되는 클럭(Clock)으로 키패드의 상태를 검출하여 키가 온접점으로 되는 경우에 중앙처리장치로 인터럽트(Interrupt)를 걸어줌으로써, 상기 중앙처리장치는 실행중인 프로그램을 일단중지 하고 키패드에 의한 데이타를 필요한 코드로 변환하여 입력으로하는 키패드에 의한 데이타 입력회로에 관한 것이다.The present invention relates to a circuit for inputting data from a keypad to a central processing unit (CUP). In particular, the key is brought into contact by detecting a state of the keypad with a clock generated from a clock generator. In this case, by interrupting the central processing unit, the central processing unit relates to a data input circuit by the keypad which stops the program being executed and converts the data by the keypad into a necessary code and inputs the same.

Description

키패드에 의한 데이타 입력회로Data input circuit by keypad

제1도는 종래에 사용하고 있는 키패드에 의한 데이타 입력회로.1 is a conventional data input circuit using a keypad.

제2도는 본 발명에 의한 키패드에 의한 데이타 입력회로.2 is a data input circuit by a keypad according to the present invention.

제3도는 본 발명에 따라 제2도에 도시한 입력회로의 상세도.3 is a detailed view of the input circuit shown in FIG. 2 in accordance with the present invention.

제4도는 본 발명에 따라 제2도 및 제3도에 도시한 코드변화회로(27)의 상세도,4 is a detailed view of the code change circuit 27 shown in FIGS. 2 and 3 according to the present invention;

제5도는 본 발명에 설명하기 위한 키매트릭스(24)의 부분적인 번호할당도이다.5 is a partial number allocation diagram of key matrix 24 for explaining the present invention.

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

21:클럭발생회로22:카운터21: Clock generation circuit 22: Counter

23:디코더24:키매트릭스23: decoder 24: key matrix

25:인터럽트신호발생회로26:데이타 검색회로25: interrupt signal generating circuit 26: data searching circuit

27:코드변환회로28:래치27: code conversion circuit 28: latch

29:입/출력장치100:중앙처리장치29: input / output device 100: central processing unit

본 발명은 키패드(Key pad)에 의한 데이타를 중앙처리장치(CPU)로 입력하는 회로에 관한 것으로, 특히 클럭발생부로부터 발생되는 클럭(Clck)으로 키패드의 상태를 검출하여 키가 온접점으로 되는 경우에 중앙처리장치로 인터럽트(Interrupt)를 걸어줌으로써, 상기 중앙처리장치는 실행중인 프로그램을 일단중기하고 키패드에 의한 데이타를 필요한 코드로 변환하여 입력하는 키패드에 의한 데이타 입력회로에 관한 것이다.The present invention relates to a circuit for inputting data by a keypad to a central processing unit (CPU). In particular, the state of the keypad is detected by a clock (Clck) generated from a clock generator, whereby the key is brought into contact. In this case, by interrupting to the central processing unit, the central processing unit relates to a data input circuit by the keypad which first terminates the program being executed and converts the data by the keypad into the necessary code and inputs it.

일반적으로, 키패드(Key pad)는 시스템에 데이타를 입력하는 범용입력장치로서 자동화시스템이나 통신분야 등에서 널리 사용하고 있다. 자동화시스템분야를 예를들면 산업로보트를 제어하는 컨트롤박스의 조작부, 인쇄회로기판에 전자부품을 자동적으로 장착하는 칩마운터의 조작부, 무인경비시스템의 조작부등이 있다.In general, a keypad is a general-purpose input device for inputting data into a system and is widely used in automation systems and communication fields. Examples of automation systems include control panels for industrial robots, chip mounters for automatically mounting electronic components on printed circuit boards, and unmanned security systems.

제1도는 종래에 사용하고 있는 키패드에 의한 데이타 입력회로이다.1 is a data input circuit using a keypad used in the related art.

제1도의 동작을 간단히 살펴보면, 중앙처리장치(CPU)(10)는 입/출력장치(20)로 제어신호를 출력하여 상기 입/출력장치(20)는 출력단자(01)로 하이신호를 출력한후에 입력단자(I1)가 하이상태인가를 검색하여 하이상태이면 출력단자(01)와 입력단자(I1)에 의해 결정되는 해당 키데이타를 입력으로 받아들인다. 이와같은 방법으로 입력단자(I1)에서 (I4)까지 검색한다.Referring briefly to the operation of FIG. 1, the CPU 10 outputs a control signal to the input / output device 20, and the input / output device 20 outputs a high signal to the output terminal 01. After that, it is searched whether the input terminal I1 is in a high state. If the input terminal I1 is in a high state, the corresponding key data determined by the output terminal 01 and the input terminal I1 is accepted as an input. In this way, the input terminals I1 to I4 are searched.

상기와 같은 과정을 출력단자(01)에서 (06)까지 반복적으로 수행하여 키패드(30)에 의해서 입력되는 데이타를 키검색루프를 돌면서 키하나하나에 대하여 일일이 검색을 하고, 상기 중앙처리장치(10)에서 필요한 데이타가 있을 경우에는 이 데이타가 입력될때까지 키검색루프를 무한루프로 돌린다. 또한 상기 중앙처리장치에서는 입력된 데이타를 필요한 코드변환을 직접수행한다.By repeating the above process from the output terminal (01) to (06), the data input by the keypad 30 is searched one by one while rotating the key search loop, and the central processing unit (10) If there is any necessary data in the loop, the key search loop is turned into an infinite loop until this data is entered. In addition, the central processing unit directly performs the necessary code conversion of the input data.

예를들면 중앙처리장치의 내부처리시 BCD(Binary-Coded Decimal)코드를 HEX(HEXadecimal)코드로 변환하고, 모니터상에 출력을 시킬때에는 BCD코드를 ASCII(American Standard Code for Information Interchange:정보교환용 미국표준 부호)코드로 변환한다.For example, BCD code can be converted to HEX code when the internal processing of the central processing unit is executed, and BCD code can be converted to ASCII (American Standard Code for Information Interchange) for information output. US standard code).

최근, 중앙처리장치는 시스템전체를 소프트웨어적으로 제어하기 때문에 제어량이 많으며, 상기 시스템들은 점차로 고속으로 운용되고 있고, 이 고속화의 추세는 앞으로 계속되어 중앙처리장치가 시스템전체를 제한된 시간내에 소프트웨어적으로 제어하지 못하게 될 것으므로, 고속화에 대응하기 위해서는 하드웨어적으로 제어하는 것이 필요하다.In recent years, since the central processing unit controls the whole system in software, there is a large amount of control, and the systems are being operated at a high speed gradually. Since it will not be possible to control, it is necessary to control in hardware to cope with the speed.

그러나, 상기와 같이 동작하는 종래에 사용하고 있는 키패드에 의한 데이타 입력회로는 중앙처리장치(10)가 키패드의 데이타를 입력받을때 상기 키패드상의 키 하나하나를 전부 검색하여 키가 온접점으로 되었는지를 확인해야하고, 또한 상기 중앙처리장치(10)에서 필요한 데이타가 입력될때까지 무한루프를 돌면서 검색을 하였으므로 상기 중앙처리장치의 처리속도가 낮다. 뿐만아니라 상기 중앙처리장치에서는 입력된 데이타를 필요한 코드변환을 직접수행하여 더욱 처리속도는 떨어지는 문제점이 있었다.However, the conventional data input circuit using the keypad operating as described above, when the central processing unit 10 receives the data of the keypad, searches all of the keys on the keypad to determine whether the keys are in contact. Also, since the search was carried out in an infinite loop until the required data was input from the CPU 10, the processing speed of the CPU was low. In addition, the CPU has a problem that the processing speed is further reduced by directly performing the necessary code conversion of the input data.

본 발명의 목적은 상기와 같은 문제점을 해소하기 위한 것으로서, 클럭발생부로 부터 발생되는 클럭(Clok)으로 키패드의 상태를 검출하여 키가 온접점으로 되는 경우에 중앙처리장치로 인터럽트(Interrupt)를 걸어줌으로써, 상기 중앙처리장치는 실행중인 프로그램을 일시중단하고 키패드로부터의 데이타를 입력으로하는 키패드에 의한 데이타 입력회로를 제공함에 있다.An object of the present invention is to solve the above problems, by detecting the state of the keypad with a clock (Clok) generated from the clock generator to interrupt the interrupt to the central processing unit when the key is on contact In this case, the CPU provides a data input circuit by the keypad for suspending a running program and inputting data from the keypad.

본 발명의 다른목적은 키패드로부터의 데이타를 필요한 코드로 변환하여 입력으로하는 키패드에 의한 데이타 입력회로를 제공함에 있다.Another object of the present invention is to provide a data input circuit by a keypad for converting data from a keypad into a necessary code and inputting the same.

본 고안의 또 다른목적은 클럭발생부로부터 발생되는 클럭(Clock)으로 키패드의 상태를 검출하여 키가 온접점으로 되는 경우에 중앙처리장치로 인터럽트(Interrupt)를 걸어주고, 상기 중앙처리장치는 실행중인 프로그램을 일단중지하고 키패드에 의한 데이타를 필요한 코드로 변환하여 입력함으로써, 중앙처리장치의 고속화를 꾀함에 있다.Another object of the present invention is to detect the state of the keypad by the clock (Clock) generated from the clock generator to interrupt the (Interrupt) to the central processing unit when the key is on contact, the central processing unit is executed It is intended to speed up the central processing unit by stopping the program in operation and converting the data by the keypad into the necessary code.

상기와 같은 목적을 달성하기 위한 기술적인 수단으로써,As a technical means for achieving the above object,

본 발명은The present invention

래치로부터 출력되는 데이타를 중앙처리장치로 전송하고 상기 중앙처리장치의 제어신호를 따라 코드변환회로로 2비트의 신호를 출력하는 입/출력장치;An input / output device for transmitting data output from the latch to a central processing unit and outputting a 2-bit signal to a code conversion circuit according to a control signal of the central processing unit;

상기 입/출력장치에 제어신호를 보내어 필요한 코드로 변환된 데이타를 전송받는 중앙처리장치;A central processing unit sending control signals to the input / output device and receiving data converted into necessary codes;

입의의 발진주파수로 클록펄스를 발생시키는 클럭발생회로;A clock generation circuit for generating clock pulses at the oscillation frequency of the mouth;

상기 클럭발생회로로부터 출력하는 클럭펄스가 카운트업 입력단자로 입력될때마다 2진코드를 1씩 상승 계수하여 출력하는 카운터;A counter for counting and outputting a binary code by one whenever a clock pulse output from the clock generation circuit is input to a count-up input terminal;

상기 카운터로부터 출력하는 2진코드를 해독하여 키매트릭스로 상기 해독된 코드에 해당하는 출력단자를 통해 로직1을 출력하는 디코더;A decoder which decodes the binary code outputted from the counter and outputs logic 1 through an output terminal corresponding to the decrypted code with a key matrix;

키를 눌림으로써 데이타를 중앙처리장치로 입력하기 위한 키매트릭스;A key matrix for inputting data to the central processing unit by pressing a key;

상기 키매트릭스로부터 출력되는 신호중에 로직1이 있는 경우에 중앙처리장치의 인터럽트입력단자로 인터럽트요구신호를 출력하는 인터럽트신호발생회로;An interrupt signal generation circuit for outputting an interrupt request signal to an interrupt input terminal of a central processing unit when a logic 1 is among the signals output from the key matrix;

상기 키매트릭스로부터 출력되는 신호를 검색하여 검색데이타를 출력하는 데이타검색회로;A data retrieval circuit for retrieving a signal output from the key matrix and outputting retrieval data;

상기 데이타검색회로로부터 입력되는 데이타를 입/출력장치를 통한 중앙처리장치의 제어신호에 따라서 데이타의 코드를 변환하여 출력하는 코드변환부;A code conversion unit for converting and outputting data inputted from the data retrieval circuit according to a control signal of a central processing unit through an input / output device;

상기 카운터의 출력신호와 데이타검색회호의 출력신호를 받아서 유지 출력하는 래치를 구비함에 의한다.And a latch for receiving and outputting the output signal of the counter and the output signal of the data search signal.

이하 본 발명을 첨부한 도면을 참조하여 설명한다.Hereinafter, the present invention will be described with reference to the accompanying drawings.

제2도는 본 발명에 의한 키패드에 의한 데이타 입력회로로서, 임의의 발진주파수로 클록펄스를 발생시키는 클럭발생회로(21)와, 상기 클럭발생회로(21)로부터 출력하는 클럭펄스가 카운트업 입력단자로 입력될때마다 2진코드를 1씩 상승 계수하여 출력하는 카운터(22)와, 상기 카운터(22)로부터 출력하는 2진코드를 해독하여 키매트릭스로 상기 해독된 코드에 해당하는 출력단자를 통해 로직1을 출력하는 디코더(23)와, 키를 눌림으로써 데이타를 중앙처리장치로 입력하기 위한 키매트릭스(24)와, 상기 키매트릭스(24)로부터 출력되는 신호중에 로직1이 있는 경우에 중앙처리장치의 인터럽트입력단자로 인터럽트요구신호를 출력하는 인터럽트신호발생회로(25)와, 상기 키매트릭스(24)로부터 출력되는 신호를 검색하여 검색데이타를 출력하는 데이타 검색회로(26)와, 상기 데이타 검색회로(26)로부터 입력되는 데이타를 입/출력장치를 통한 중앙처리장치의 제어신호에 따라서 데이타의 코드를 변환하여 출력하는 코드변환회로(27)와, 상기 카운터(22)의 출력신호와 데이타검색회로(26)의 출력신호를 받아서 유지 출력하는 래치(28)와, 상기 래치(28)로부터 출력되는 데이타를 중앙처리장치로 전송하고 상기 중앙처리장치의 제어신호에 따라 코드변환회로(27)로 2비트의 신호를 출력하는 입/출력장치(29)와, 상기 입/출력장치(29)에 제어신호를 보내어 필요한 코드로 변환된 데이타를 전송받는 중앙처리장치(30)로 구성된다.2 is a data input circuit using a keypad according to the present invention, in which a clock generation circuit 21 for generating a clock pulse at an arbitrary oscillation frequency and a clock pulse output from the clock generation circuit 21 are counted up input terminals. The counter 22 outputs the binary code by 1 and counts the binary code each time it is inputted to the controller. The binary code outputted from the counter 22 is decoded to generate a logic through an output terminal corresponding to the decoded code using a key matrix. A decoder 23 for outputting 1, a key matrix 24 for inputting data to the central processing unit by pressing a key, and a central processing unit when logic 1 is among the signals output from the key matrix 24 An interrupt signal generating circuit 25 for outputting an interrupt request signal to an interrupt input terminal of the signal; and a data searching circuit for searching for a signal output from the key matrix 24 and outputting search data (2). 6), a code conversion circuit 27 for converting and outputting data inputted from the data retrieval circuit 26 according to a control signal of a central processing unit through an input / output device, and the counter 22 And a latch 28 for receiving and outputting the output signal of the data search circuit 26 and the output signal of the data retrieval circuit 26, and transmitting the data output from the latch 28 to the central processing unit and according to the control signal of the central processing unit. An input / output device 29 for outputting a 2-bit signal to the code conversion circuit 27, and a central processing unit 30 for sending control signals to the input / output device 29 to receive data converted into necessary codes. It is composed of

제3도는 본 발명에 따라 제2도에 도시한 입력회로의 상세도로서, 상기 클럭발생회로(21)는 임의의 발진주파수로 클록펄스를 발생시키는데, RES(RESst)은 리세트단자이고, TRI(TRIgger)은 트리거단자, CV(Control Voltage)는 컨트롤전압단자, OUT는 출력단자, DIS(DIScharge)는 방전단자, THR(THRESHOLD)는 드레쓰홀드단자를 포함하는 타이머555(35)를 이용하여 비안정 멀티바이브레이터를 구성하였다.3 is a detailed view of the input circuit shown in FIG. 2 in accordance with the present invention, wherein the clock generation circuit 21 generates a clock pulse at an arbitrary oscillation frequency, where RES (RESst) is a reset terminal and TRI (TRIgger) is a trigger terminal, CV (Control Voltage) is a control voltage terminal, OUT is an output terminal, DIS (DIScharge) is a discharge terminal, THR (THRESHOLD) is a timer 555 (35) including a hold terminal An unstable multivibrator was constructed.

상기 카운터(22)는 트랜지스터-트랜지스터 논리회로(TTL) 업/다운 카운터로, 카운터업 입력단자(UP)를 상기 클럭발생회로(21)의 출력단자(OUT)에 접속하고, 카운터다운 입력단자(DN)를 전원단자(+Vcc)에 접속하여 로직1로 유지하여 업카운터를 구성하였다.The counter 22 is a transistor-transistor logic circuit (TTL) up / down counter. The counter-up input terminal (UP) is connected to the output terminal (OUT) of the clock generation circuit (21), and the counter-down input terminal ( The up counter was configured by connecting DN) to the power supply terminal (+ Vcc) and maintaining it at logic 1.

상기 디코더(23)는 상기 카운터(22)로부터 출력되는 3비트의 2진코드를 해독하여 8개의 출력단자(Y0∼Y7)중에 하나의 출력단자로 하이상태를 출력한다.The decoder 23 decodes the 3-bit binary code output from the counter 22 and outputs a high state to one output terminal among the eight output terminals Y0 to Y7.

상기 키매트릭스(24)는 8×4스위치 매트릭스로 제1열, 제2열, 제3열, 제4열에는 각각 8개의 키스위치가 형성되어 있으며, 상기 제1열상에 형성된 8개의 키스위치중에서 하나를 누르면 저항(R1)에 전압이 걸리게 된다, 상기 제2열상 8개의 키스위치중에서 하나를 누르면 저항(R2)에 전압이 걸리게 되고, 상기 제3열상의 8개의 키스위치중에서 하나를 누르면 저항(R3)에 전압이 걸리게 되며, 상기 제4열상의 8개의 키스위치중에서 하나를 누르면 저항(R4)에 전압이 걸리게 된다.The key matrix 24 is an 8 × 4 switch matrix, in which eight key switches are formed in the first row, the second row, the third row, and the fourth row, and among the eight key switches formed on the first row. When one is pressed, a voltage is applied to the resistor R1. When one of the eight keyswitches of the second row is pressed, a voltage is applied to the resistor R2. When one of the eight keyswitches of the third row is pressed, a resistor ( A voltage is applied to R3), and when one of the eight key switches on the fourth column is pressed, a voltage is applied to the resistor R4.

상기 인터럽트신호발생회로(25)는 상기 키매트릭스(24)로부터 출력되는 신호중에 로직1이 있는 경우를 검출하기 위하여 상기 키매트릭스(24)의 제1열, 제2열, 제3열, 제4열에 각각 접속한 4입력단자를 갖는 오아케이트(OR gate)(25a)와 상기 오아게이트의 출력을 반전하여 중앙처리장치(30)의 인터럽트단자(INT)로 출력하는 인버터(25b)로 구성된다.The interrupt signal generating circuit 25 detects a case where logic 1 is present among the signals output from the key matrix 24. The first, second, third, and fourth columns of the key matrix 24 are detected. An OR gate 25a having four input terminals connected to the columns, respectively, and an inverter 25b which inverts the output of the oragate and outputs it to the interrupt terminal INT of the central processing unit 30.

상기 데이타 검색회로(26)는 키매트릭스(24)로부터 출력되는 신호를 검색하기 위하여 상기 키매트릭스(24)의 제1열과 제2열에 각각 접속한 2입력단자를 갖는 오아게이트(26b)와 제3열과 제4열에 각각 접속한 2입력단자를 갖는 오아게이트(26a)로 구성된다.The data retrieval circuit 26 has an orifice 26b and a third having two input terminals respectively connected to the first and second columns of the key matrix 24 to retrieve the signal output from the key matrix 24. It consists of an oragate 26a having two input terminals connected to the row and the fourth column, respectively.

제4도는 본 발명에 따라 제2도 및 제3도에 도시한 코드변환회로(27)의 상세도로서, 상기 코드변환회로(27)는 상기 입/출력장치(29)의 제어신호출력단자(C1)를 입력되는 신호가 하이이며 3-상태버퍼(B1)가 오프상태로 되어 익스크루시브오아게이트(XOP gate)의 출력이 로우상태로 출력하도록 구성하고, 또한 상기 입/출력장치(29)의 제어신호출력단자(C2)를 입력되는 신호가 로우이면 3-상태버퍼(B2)가 온 상태로 되어 출력이 로우상태로 출력하도록 구성한다.4 is a detailed view of the code conversion circuit 27 shown in FIGS. 2 and 3 according to the present invention, wherein the code conversion circuit 27 is a control signal output terminal of the input / output device 29 ( The input signal C1) is high and the three-state buffer B1 is turned off so that the output of the exclusive OOP gate is output in a low state, and the input / output device 29 If the signal input to the control signal output terminal (C2) of the low state is configured to output the low state of the three-state buffer (B2) is turned on.

상기 래치(28)는 입력단자(Q0∼Q2)는 상기 카운터(22)의 출력단자(OA∼OC)에 접속하고, 입력단자(Q3)는 상기 키매트릭스(24)의 제4열에 접속하며, 입력단자(Q4,Q5)는 상기 코드변환회로(27)의 출력단자에 접속한다. 또한 입력단자(Q6)는 데이타검출회로(26)의 오아게이트(26b)의 출력단자에 접속하고, 입력단자(Q7)는 접지시킨다.The latch 28 is connected to the input terminals Q0 to Q2 to the output terminals OA to OC of the counter 22, and the input terminal Q3 is connected to the fourth column of the key matrix 24. The input terminals Q4 and Q5 are connected to the output terminal of the code conversion circuit 27. The input terminal Q6 is connected to the output terminal of the or gate 26b of the data detection circuit 26, and the input terminal Q7 is grounded.

상기 입/출력장치(29)는 입/출력인터페이스라고도 하며, 상기 중앙처리장치의 제어에 따라 상기 코드변환회로로 제어신호를 출력하고, 상기 래치(28)로부터 출력되는 데이타를 중앙처리장치로 전송한다. 상기 중앙처리장치(30)는 상기 입/출력장치(29)에 제어신호를 보내어 필요한 코드로 변환된 데이타를 전송받는다.The input / output device 29 is also called an input / output interface, and outputs a control signal to the code conversion circuit under control of the central processing unit, and transmits data output from the latch 28 to the central processing unit. do. The CPU 30 transmits a control signal to the input / output device 29 to receive the data converted into the necessary code.

이하 본 발명에 따른 작용 및 효과를 상세하게 설명한다.Hereinafter will be described in detail the operation and effect according to the present invention.

제2도, 제3도 및 제4도에 있어서, 데이타입력장치인 키패드상의 키스위치를 누르지 않았을 경우에는 상기 키스위치 열방향으로 형성된 저항(R1∼A4)에는 전압이 걸리지 않고, 이에따라 인터럽트신호발생회로(25)에서는 출력이 나타나지 않기 때문에 상기 중앙처리장치(30)에는 인터럽트가 걸리지 않아서 중앙처리장치(30)는 실행중인 프로그램을 계속적으로 실행한다.2, 3, and 4, when the key switch on the keypad, which is a data input device, is not pressed, the resistors R1 to A4 formed in the key switch column direction are not energized, thereby generating an interrupt signal. Since the output does not appear in the circuit 25, the CPU 30 is not interrupted and the CPU 30 continues to execute the program being executed.

한편, 클럭발생회로(21)에서 클럭펄스가 발생되고, 이 클럭펄스를 카운터(22)에서 상승(업) 카운트를 하고, 상기 상승 카운트되어 출력되는 2진 3비트를 더코더(23)에서 해독하여 키매트릭스(24)를 행방향으로 검색을 계속적으로 한다.On the other hand, a clock pulse is generated in the clock generation circuit 21, and the clock pulse is raised (up) by the counter 22, and the binary counted 3 bits outputted by the rising count are decoded by the decoder 23. The key matrix 24 is searched continuously in the row direction.

상기와 같이 키매트릭스(24)를 계속적으로 검색하는 도중에, 제5도에 도시된 키매트릭스(24)의 0번 키스위치를 누르면, 0번의 열방향의 저항(R4)에 전압이 걸리어 인터럽트신호발생회로(25)에서 이를 검출하여 중앙처리장치(30)로 인터럽트신호를 출력하면 상기 중앙처리장치(30)는 실행중인 프로그램을 일시중단하고 데이타를 받을 준비를 한다. 이때 필요한 코드를 입력받기 위하여 입/출력장치로 제어신호를 보낸다.When the key switch No. 0 of the key matrix 24 shown in FIG. 5 is pressed while the key matrix 24 is continuously searched as described above, a voltage is applied to the resistor R4 in the column No. 0 direction and an interrupt signal. When the generation circuit 25 detects this and outputs an interrupt signal to the CPU 30, the CPU 30 suspends the program being executed and prepares to receive data. At this time, control signal is sent to input / output device to receive necessary code.

상기 0번의 열방향의 저항(R4)에 전압이 걸리면, 데이타 검색회로(26)의 오아게이크(26a)의 출력은 하이상태로 코드변환회로(27)로 입력되고, 상기 데이타검색회로(26)와 오아게이트(26a)의 출력은 래치(28)의 입력단자(D6)로 입력된다. 이때 상기 코드변환회로(27)는 상기 입/출력장치(29)의 제어신호(C1,C2가 로우, 하이 상태이면 3-상태버퍼(B1)는 온상태이므로 래치(28)의 입력단자(D4)로 하이상태가 입력되고, 또한 3-상태버퍼(B2)는 오프상태이므로 상기 래치(28)의 입력단자(D5)로 하이상태가 입력된다.When a voltage is applied to the resistor R4 in the zero column direction, the output of the orgage 26a of the data retrieval circuit 26 is input to the code conversion circuit 27 in a high state, and the data retrieval circuit 26 ) And the output of the oar gate 26a are input to the input terminal D6 of the latch 28. In this case, when the control signals C1 and C2 of the input / output device 29 are low and high, the code conversion circuit 27 has the three-state buffer B1 turned on, and thus the input terminal D4 of the latch 28. The high state is inputted to) and the high state is inputted to the input terminal D5 of the latch 28 because the three-state buffer B2 is turned off.

따라서, 상기 카운터(22)에서 0가 출력되는 상태에서 키매트릭스(24)에서 0번이 검색되므로 상기 카운터(22)의 출력0는 상기 래치(28)의 입력단자(D0∼D2)로 입력되고, 상기 래치(28)의 입력단자(D3)에는 0, 입력단자(D4,D5)에는 11, 입력단자(D6)에는 0, 입력단자(D7)에는 0가 각각 입력되어 상기 래치(28)이 입력단자(D7,D6,D5,D4,D3,D2,D1,D0)로는 0011 000가 입력되어 이는 ASCII코드로 표현된 것으로 이는 아라비아숫자 0을 나타낸다.Therefore, since 0 is retrieved from the key matrix 24 while 0 is output from the counter 22, the output 0 of the counter 22 is input to the input terminals D0 to D2 of the latch 28. 0 is input to the input terminal D3 of the latch 28, 11 to the input terminals D4 and D5, 0 to the input terminal D6, and 0 to the input terminal D7, respectively. 0011 000 is input to the input terminals D7, D6, D5, D4, D3, D2, D1, and D0, which is expressed in ASCII code, which represents the Arabic numeral 0.

상기 래치(28)에서는 상기 입력을 유지하여 입/출력장치(29)를 통하여 중앙처리장치(30)로 출력한다.The latch 28 retains the input and outputs the input to the central processing unit 30 through the input / output device 29.

전체적인 동작을 상기에서 설명하였고, 이번에는 코드변환회로(27)에서 코드가 변환되는 과정을 설명하면, 상기 코드변환회로(27)로 제어신호(C1,C2)가 하이, 로우상태가 입력되면 상기 코드변환회로(27)의 3-상태버퍼(B1)는 오프상태이므로 래치(28)의 입력단자(D4)로 로우상태가 입력되고, 또한 3-상태버퍼(B2)는 온상태이므로 상기 래치(28)의 입력단자(D5)로 로우상태가 입력된다.The overall operation has been described above, and this time, the process of converting the code in the code conversion circuit 27 will be described. When the control signals C1 and C2 are input to the code conversion circuit 27 in a high state and a low state, Since the 3-state buffer B1 of the code conversion circuit 27 is in an off state, a low state is input to the input terminal D4 of the latch 28, and since the 3-state buffer B2 is in an on state, the latch ( The low state is input to the input terminal D5 of 28).

상기 코드변환회로(27)에서는 래치(28)의 입력단자(D4,D5)의 입력신호를 처음에 하이, 하이를 로우, 로우로 변환하여 결국 래치(28)의 입력단자(D7,D6,D5,D4,D3,D2,D1,D0)로는 0011 0000이 0000 0000 변환되 것이다. 상기 0000 0000은 HEX코드로 변환된 것이며, 아라비아숫자 0를 표현하는 것이다.The code conversion circuit 27 first converts the input signals of the input terminals D4 and D5 of the latch 28 to high, high to low, and low to eventually input terminals D7, D6 and D5 of the latch 28. , D4, D3, D2, D1, D0) will convert 0011 0000 to 0000 0000. The 0000 0000 is converted into a HEX code and represents an Arabic numeral 0.

상기 설명한바와 같이 본 발명은 클럭발생부로부터 발생되는 클럭(Clock)으로 키패드의 상태를 검출하여 키가 온접점으로 되는 경우에 중앙처리장치로 인터럽트(Interrupt)를 걸어주고, 상기 중앙처리장치는 실행중인 프로그램을 일단중지하고 키패드에 의한 데이타를 필요한 코드로 변환하여 입력할 수 있으므로 중앙처리장치의 고속화를 실현할 수 있는 우수한 효과가 있는 것이다.As described above, the present invention detects the state of the keypad with a clock generated from the clock generator, and interrupts the central processing unit when the key is on-contact, and the central processing unit executes. Since the program being stopped can be stopped once and the data by the keypad can be converted into the required code, the central processing unit can be speeded up, thereby achieving an excellent effect.

Claims (2)

키패드에 의한 데이타 입력회로에 있어서, 래치(28)로부터 출력되는 데이타를 중앙처리장치(30)로 전송하고 상기 중앙처리장치(30)의 제어신호를 따라 코드변환회로(27)로 2비트의 신호를 출력하는 입/출력장치(29); 상기 입/출력장치(29)에 제어신호를 보내어 필요한 코드로 변환된 데이타를 전송받는 중앙처리장치(30); 임의의 발진주파수로 클록펄스를 발생시키는 클럭발생회로(21); 상기 클럭발생회로(21)로부터 출력하는 클럭펄스가 카운트업 입력단자로 입력될때마다 2진코드를 1씩 상승 계수하여 출력하는 카운터(22); 상기 카운터(22)로부터 출력하는 2진코드를 해독하여 키매트릭스(24)로 상기 해독된 코드에 해당하는 출력단자를 통해 로직1을 출력하는 디코더(23); 키를 눌림으로써 데이타를 중앙처리장치로 입력하기 위한 키매트릭스(24); 상기 키매트릭스(24)로부터 출력되는 신호중에 로직1이 있는 경우에 중앙처리장치(30)의 인터럽트입력단자(INT)로 인터럽트요구신호를 출력하는 인터럽트신호발생회로(25); 상기 키매트릭스(24)로부터 출력되는 신호를 검색하여 검색데이타를 출력하는 데이타 검색회로(26); 상기 데이타검색회로(26)로부터 입력되는 데이타를 입/출력장치(29)를 통한 중앙처리장치(30)의 제어신호에 따라서 데이타의 코드를 변환하여 출력하는 코드변환부(27); 상기 카운터(22)의 출력신호와 데이타검색회호의 출력신호를 받아서 유지 출력하는 래치(28)를 구비함을 특징으로 하는 키패드에 의한 데이타 입력회로.In the data input circuit by the keypad, the data output from the latch 28 is transmitted to the central processing unit 30 and a 2-bit signal to the code conversion circuit 27 in accordance with the control signal of the central processing unit 30. An input / output device 29 for outputting the same; A central processing unit (30) for sending a control signal to the input / output device (29) to receive data converted into a necessary code; A clock generation circuit 21 for generating a clock pulse at an arbitrary oscillation frequency; A counter 22 which counts and outputs a binary code by one each time a clock pulse output from the clock generation circuit 21 is input to a count-up input terminal; A decoder 23 for decoding a binary code output from the counter 22 and outputting logic 1 to a key matrix 24 through an output terminal corresponding to the decrypted code; A key matrix 24 for inputting data to the central processing unit by pressing a key; An interrupt signal generation circuit (25) for outputting an interrupt request signal to the interrupt input terminal (INT) of the central processing unit (30) when there is a logic 1 among the signals output from the key matrix (24); A data retrieval circuit 26 for retrieving a signal output from the key matrix 24 and outputting retrieval data; A code converter 27 for converting and outputting data input from the data retrieval circuit 26 according to a control signal of the central processing unit 30 through the input / output device 29; And a latch (28) for receiving and outputting the output signal of the counter (22) and the output signal of a data search signal. 제1항에 있어서, 상기 코드변환회로(27)는 상기 입/출력장치(29)의 제어신호출력단자(C1)를 입력되는 신호가 하이이며 3-상태버퍼(B1)가 오프상태로 되어 익스크루시브오아게이트(XOP gate)의 출력이 로우상태로 출력하도록 구성하고, 또한 상기 입/출력장치(29)의 제어신호출력단자(C2)를 입력되는 신호가 로우이면 3-상태버퍼(B2)가 온 상태로 되어 출력이 로우상태로 출력하도록 구성함을 특징으로 하는 키패드에 의한 데이타 입력회로.The signal conversion circuit 27 is a signal input to the control signal output terminal (C1) of the input / output device 29 is high and the three-state buffer (B1) is turned off, If the output of the XO gate is configured to be output in a low state, and the signal input to the control signal output terminal C2 of the input / output device 29 is low, the three-state buffer B2 is output. The data input circuit by the keypad characterized in that it is configured to output the output state in the low state.
KR1019940038239A 1994-12-28 1994-12-28 Data input circuit KR0136346B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019940038239A KR0136346B1 (en) 1994-12-28 1994-12-28 Data input circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019940038239A KR0136346B1 (en) 1994-12-28 1994-12-28 Data input circuit

Publications (2)

Publication Number Publication Date
KR960024849A KR960024849A (en) 1996-07-20
KR0136346B1 true KR0136346B1 (en) 1998-06-15

Family

ID=19404500

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019940038239A KR0136346B1 (en) 1994-12-28 1994-12-28 Data input circuit

Country Status (1)

Country Link
KR (1) KR0136346B1 (en)

Also Published As

Publication number Publication date
KR960024849A (en) 1996-07-20

Similar Documents

Publication Publication Date Title
CA2197255A1 (en) Peripheral signal protocol to support hosts with either edge-sensitive or level-sensitive interrupt detectors
EP0067516B1 (en) Shift control system for keyboards
US4293849A (en) Keyboard encoder using priority encoders
EP0325884B1 (en) Keyboard arrangement with ghost key condition detection
KR0136346B1 (en) Data input circuit
CA1176727A (en) Keyboard encoder-decoder
US3462736A (en) Data communication system
JPH07334392A (en) Resetting device and abnormal operation detector
KR0131894Y1 (en) Device varifying plc input/output contact point with trigger function
KR970002963B1 (en) Code detecting circuit of digital signal transmission system
AU624508B2 (en) Apparatus for optical encoding
JPH0546535A (en) Data transfer interface device
KR890006610Y1 (en) Cross switch decoder
KR890004536Y1 (en) Micro computer's interrupt circuit
KR100192636B1 (en) Apparatus for collecting alarm and state signal of digital-analog system
KR840001303Y1 (en) Electronic lock
KR940002470B1 (en) Mode display circuit on the computer keyboard
KR0126661Y1 (en) Program loader communication of controller
KR940008481B1 (en) Interrupt circuit in control system
JPS6222874Y2 (en)
KR930004423B1 (en) Mode changer for korean character
KR900002055Y1 (en) Devided circuit of asynchronous typed data
KR850001246Y1 (en) Electronic lock
KR900000604B1 (en) Processing control circuit of key input data
KR0169326B1 (en) Data converting circuit

Legal Events

Date Code Title Description
A201 Request for examination
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20001229

Year of fee payment: 4

LAPS Lapse due to unpaid annual fee