JPH05134799A - Switch scanning system - Google Patents

Switch scanning system

Info

Publication number
JPH05134799A
JPH05134799A JP3325239A JP32523991A JPH05134799A JP H05134799 A JPH05134799 A JP H05134799A JP 3325239 A JP3325239 A JP 3325239A JP 32523991 A JP32523991 A JP 32523991A JP H05134799 A JPH05134799 A JP H05134799A
Authority
JP
Japan
Prior art keywords
level
switch
input
output
line
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
JP3325239A
Other languages
Japanese (ja)
Inventor
Hideyuki Yoshida
英之 吉田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toyo Communication Equipment Co Ltd
Original Assignee
Toyo Communication Equipment Co Ltd
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 Toyo Communication Equipment Co Ltd filed Critical Toyo Communication Equipment Co Ltd
Priority to JP3325239A priority Critical patent/JPH05134799A/en
Publication of JPH05134799A publication Critical patent/JPH05134799A/en
Pending legal-status Critical Current

Links

Landscapes

  • Electronic Switches (AREA)
  • Input From Keyboards Or The Like (AREA)

Abstract

PURPOSE:To easily input switches arranged in the shape of matrix at high speed by making bidirectional the respective input/output direction in X-direction line and Y-direction line of plural switches arranged in the shape of matrix. CONSTITUTION:The output of an IC 1 is set at H-level, an IC 3i is set in an output mode, and its output is set at L-level. The IC 3o is set in an input mode. When no switch 9 is pressed, the input data of the IC 3o is all at H-level. When any one of the switches 9 is pressed, the input data in the Y-direction line corresponding to the switch 9 is at L-level and the output of an IC 7 is also at L-level. When a switch 9K is pressed, for example, the input data of the IC 3o is at L-level only in Y3 and the others are at H-level. Under such condition, the position in X-direction can be specified from the input data of an IC 5o. Thus, by scanning only the line in which the switch 9 is pressed, the input of the switches can be performed at high speed.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、マトリクス状に配列さ
れたスイッチの入力を高速かつ簡単に行うことのできる
スイッチスキャン方式に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a switch scan system which enables input of switches arranged in a matrix at high speed and easily.

【0002】[0002]

【従来の技術】近年、スイッチスキャン方式が種々提案
されている。このようなスイッチスキャン方式による回
路を図3に示す。この図3に示す回路はマトリクス状に
配列された複数のスイッチ109の内どのスイッチが押
されたかを検知するための回路であり、また、これらの
複数のスイッチ群は、例えばコンピュータのキーボード
や制御パネル等のキーボードスイッチに対応し、各スイ
ッチ109がキーボードの各スイッチである。
2. Description of the Related Art In recent years, various switch scan systems have been proposed. A circuit based on such a switch scan system is shown in FIG. The circuit shown in FIG. 3 is a circuit for detecting which of the plurality of switches 109 arranged in a matrix is pressed, and the plurality of switch groups are, for example, a computer keyboard and a control. Each switch 109 corresponds to a keyboard switch of a panel or the like, and each switch 109 is each switch of the keyboard.

【0003】このスイッチ109は、それぞれスイッチ
とダイオードによって構成され、このダイオードのアノ
ード端子はマトリクス状に配列された複数のスイッチの
X方向ラインと接続され、カソード端子は該スイッチを
介して同Y方向ラインと接続される。したがって、X方
向ラインが抵抗を介して電源と接続されていることか
ら、通常このX方向ラインは“High”レベル(以
下、単にHレベルという)に設定され、スイッチがオン
され且つこのスイッチと接続されるY方向ラインがLレ
ベルとされたときにのみ当該X方向ラインをLレベルに
する。
Each of the switches 109 is composed of a switch and a diode, the anode terminal of the diode is connected to the X direction line of a plurality of switches arranged in a matrix, and the cathode terminal is connected through the switch in the Y direction. Connected with the line. Therefore, since the X-direction line is connected to the power supply via the resistor, the X-direction line is normally set to the “High” level (hereinafter, simply referred to as the H level), the switch is turned on, and the switch is connected. Only when the Y-direction line is set to the L level, the X-direction line is set to the L level.

【0004】上述した、スイッチスキャン方式による回
路において、マトリクス状に配列された複数のスイッチ
のY方向ラインY1〜Ynの各電圧レベルを順次“Lo
w”レベル(以下、単にLレベルという)にしていくス
キャンを高速で行い、各ラインスキャン毎に当該複数の
スイッチのX方向ラインX1〜Xmの出力(Higho
r Low)をそれぞれ検知することによって、いずれ
のキーが押されたかが判別される。
In the above-described circuit of the switch scan system, the voltage levels of the Y-direction lines Y1 to Yn of a plurality of switches arranged in a matrix are sequentially set to "Lo".
The scan for shifting to the w "level (hereinafter, simply referred to as the L level) is performed at high speed, and the output (High) of the X-direction lines X1 to Xm of the plurality of switches is performed every line scan.
It is possible to determine which key is pressed by detecting each of r Low).

【0005】すなわち、この従来の検出方式では、n本
のY方向ラインY1〜Ynのスキャンラインの内、1本
だけをLレベルにし、その時のリターンラインのデータ
を入力回路より入力することにより、該当するスキャン
ライン上のスイッチの状態を入力するものである。その
ため、この動作をすべてのスキャンラインについて行
い、すべてのスイッチの状態を入力する必要が生じる。
That is, in this conventional detection system, only one of the n Y-direction lines Y1 to Yn is set to the L level, and the data of the return line at that time is input from the input circuit. The state of the switch on the corresponding scan line is input. Therefore, it is necessary to perform this operation for all scan lines and input the states of all switches.

【0006】しかしながら、このような従来の方式で
は、上述のようにスキャンラインのLレベル出力及びリ
ターンラインの入力という動作を各スキャンライン毎に
繰り返さなければならないことから、スイッチを1回入
力するためにかなりの時間を要した。また、この作業を
CPUに行わせると負荷が大きい為、全体のスループッ
トが低下する。
However, in such a conventional method, since the operation of outputting the L level of the scan line and inputting the return line as described above must be repeated for each scan line, the switch is input once. It took quite a while. Further, if the CPU is made to perform this work, the load is heavy, and the overall throughput is reduced.

【0007】[0007]

【発明の目的】本発明は、上記課題に鑑みてなされたも
ので、マトリクス状に配列されたスイッチの入力を高速
かつ簡単に行うことのできるスイッチスキャン方式を提
供することを目的とする。
SUMMARY OF THE INVENTION The present invention has been made in view of the above problems, and it is an object of the present invention to provide a switch scan system which can input switches arranged in a matrix at high speed and easily.

【0008】[0008]

【発明の概要】上記目的を達成するため本発明は、マト
リクス状に配列された複数のスイッチ9からなるスイッ
チ群の各スイッチ9の状態を入力するスイッチスキャン
方式において、前記マトリクス状に配列された複数のス
イッチ9のX方向ライン、Y方向ラインのそれぞれの入
出力方向を双方向とすること特徴とする。
SUMMARY OF THE INVENTION In order to achieve the above object, the present invention is a switch scan system for inputting the state of each switch 9 of a switch group consisting of a plurality of switches 9 arranged in a matrix, and arranged in the matrix. The input / output directions of the X-direction line and the Y-direction line of the plurality of switches 9 are bidirectional.

【0009】本発明のスイッチスキャン方式は、マトリ
クス状に配列された複数のスイッチのX方向ライン、Y
方向ラインのそれぞれの入出力方向を双方向としたこと
から、各スイッチの状態を入力するスイッチスキャンを
全てのY方向ラインについて、ライン毎に順次行う必要
がない。
According to the switch scan method of the present invention, the X-direction line of a plurality of switches arranged in a matrix, Y
Since the input and output directions of the directional lines are bidirectional, it is not necessary to sequentially perform the switch scan for inputting the state of each switch for each of the Y direction lines.

【0010】[0010]

【実施例】以下、本発明の一実施例を図面を参照して詳
細に説明する。図1は本発明によるスイッチスキャン方
式による第1の実施例の回路図である。この図1に示す
ように、X方向m個、Y方向n個のマトリクス状に配列
された複数のスイッチ9と、このマトリクスのX方向及
びY方向のラインに接続するY方向IC3i,3o及び
X方向IC5i,5oによって構成される。なお、Y方
向IC3i及びX方向IC5iは入力側ICであり、Y
方向IC3o及びX方向IC5oは出力側ICである。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described in detail below with reference to the drawings. FIG. 1 is a circuit diagram of a first embodiment of the switch scan system according to the present invention. As shown in FIG. 1, a plurality of switches 9 arranged in a matrix of m in the X direction and n in the Y direction, and Y-direction ICs 3i, 3o, and X connected to lines in the X-direction and the Y-direction of the matrix. It is constituted by the directions IC5i and 5o. The Y direction IC 3i and the X direction IC 5i are input side ICs, and
The direction IC 3o and the X direction IC 5o are output side ICs.

【0011】また、入力側IC3iと出力側IC3oは
n本のY方向ラインによって接続され、入力側IC5i
と出力側5oはm本のX方向ラインによって接続され
る。そして、さらに、これらn本のY方向ラインとm本
のX方向ラインはX方向m本、Y方向n本のマトリクス
状になるように接続され、その交点には前記X方向m
個、Y方向n個のマトリクス状に配列されたm×n個の
スイッチ9がそれぞれ配設される。
The input-side IC 3i and the output-side IC 3o are connected by n lines in the Y direction, and the input-side IC 5i
And the output side 5o are connected by m X-direction lines. Further, the n Y-direction lines and the m X-direction lines are connected so as to form a matrix of m X-direction and n Y-direction lines, and the intersections thereof are the X-direction m
And m × n switches 9 arranged in a matrix of n pieces in the Y direction.

【0012】このスイッチ9は、それぞれスイッチとダ
イオードによって構成され、このダイオードのカソード
端子はマトリクス状に配列された複数のスイッチのX方
向ラインと接続され、アノード端子は該スイッチを介し
て同Y方向ラインと接続される。
Each of the switches 9 is composed of a switch and a diode, the cathode terminal of the diode is connected to the X-direction line of a plurality of switches arranged in a matrix, and the anode terminal is connected through the switch in the Y-direction. Connected with the line.

【0013】次に、本実施例による入力手順を説明す
る。まずIC1の出力をHレベルにし、またIC3iを
出力モードとし、その出力はすべてLレベルとする。ま
た、IC3oは入力モードとする。この状態で、もし1
つのスイッチも押されていなければIC3oの入力デー
タはすべてHレベルである。しかし、1つでもスイッチ
9が押されていれば、このスイッチ9に該当するY方向
ラインの入力データがLレベルとなり、またIC7の出
力もLレベルとなる。たとえばスイッチ9Kが押されて
いるものとすると、IC3の入力データはY3のみLレ
ベルとなり、他はHレベルである。IC7の出力は全ス
イッチ中1つでも押されればLレベルとなるので、この
信号をCPUに対する割り込み信号とする。
Next, the input procedure according to this embodiment will be described. First, the output of IC1 is set to H level, IC3i is set to the output mode, and all its outputs are set to L level. Further, the IC 3o is in the input mode. In this state, if 1
Unless the three switches are pressed, the input data of IC3o are all H level. However, if even one switch 9 is pressed, the input data of the Y-direction line corresponding to this switch 9 becomes L level, and the output of the IC 7 also becomes L level. For example, assuming that the switch 9K is pressed, the input data of the IC3 is L level only for Y3, and the other is H level. The output of the IC 7 becomes L level if even one of all the switches is pressed, so this signal is used as an interrupt signal to the CPU.

【0014】ここで、スイッチ9Kが押されているY方
向ライン、すなわちY3ラインのみHレベルとし、他の
ラインの出力はLレベルとする。この状態でIC5oの
入力データを見れば、X方向の位置が特定できる。即
ち、X3ラインだけがHレベルとなり、他はLレベルと
なる。このLレベルのYラインすべてについてIC3i
の出力を変化させ、その時のデータをIC5iから入力
することによってm×n個すべてのスイッチの状態を入
力することができる。
Here, only the line in the Y direction in which the switch 9K is pressed, that is, the Y3 line is set to H level, and the outputs of the other lines are set to L level. By looking at the input data of the IC 5o in this state, the position in the X direction can be specified. That is, only the X3 line becomes the H level, and the other lines become the L level. IC3i for all Y lines of this L level
By changing the output of the switch and inputting the data at that time from the IC 5i, the states of all m × n switches can be input.

【0015】この方式によれば、従来方式のように、す
べてのスキャンラインについてスキャンを行う必要がな
く、スイッチの押されているラインのみスキャンすれば
良い。通常はスイッチの同時押下はせいぜい2個ぐらい
である。この場合は2本のラインのみスキャンすれば良
いことになる。この結果、従来方式よりスキャン時間が
少なくて良いので、高速にすべてのスイッチを入力する
ことができる。また、CPUの処理も少なくなるため、
他の仕事を中断する時間も短くなる。結果としてCPU
のスループットが向上する。
According to this method, unlike the conventional method, it is not necessary to scan all the scan lines, and only the line on which the switch is pressed may be scanned. Normally, at most two switches are pressed at the same time. In this case, only two lines need be scanned. As a result, the scan time is shorter than in the conventional method, so that all the switches can be input at high speed. Also, since the processing of the CPU is reduced,
The time to suspend other work is also reduced. As a result CPU
Throughput is improved.

【0016】これは、スキャンラインの本数が増えれば
増えるほど従来方式に較べ有利性がます事を意味するも
のである。
This means that the greater the number of scan lines, the more advantageous the conventional method becomes.

【0017】図2は本発明に係るスイッチスキャン方式
の第2の実施例である。この図に示すように、マトリク
スのX方向及びY方向のラインに接続されているIC1
3,15はPLD(Programmable Log
ic Device、PAL(Programmabl
e Array Logic)ともいう)双方向ICで
ある。
FIG. 2 shows a second embodiment of the switch scan system according to the present invention. As shown in this figure, the IC1 connected to the lines in the X and Y directions of the matrix
3, 15 are PLD (Programmable Log)
ic Device, PAL (Programmable
e Array Logic)) Bidirectional IC.

【0018】以下に本実施例による入力手順を説明す
る。
The input procedure according to this embodiment will be described below.

【0019】まず、手順1として、IC1の出力をHレ
ベルにして、IC15を出力モードとする。このIC1
5の出力、すなわちY方向ラインの出力はすべてLレベ
ルとする。また、IC13は入力モードとする。この状
態で、もし1つのスイッチも押されていなければIC1
3の入力データはすべてHレベルである。しかし、1つ
でもスイッチが押されていればIC13の該当するライ
ンの入力データがLレベルとなり、またIC7の出力も
Lレベルとなる。たとえば第2図に示すスイッチ9Kが
押されているものとすると、IC13の入力データはY
3ラインのみLレベルとなり、他はHレベルである。I
C7の出力は全スイッチ中1つでも押されればLレベル
となるので、この信号をCPUに対する割り込み信号と
すれば、手順2の処理のトリガとすることができる。
First, as a procedure 1, the output of IC1 is set to H level and IC15 is set to the output mode. This IC1
The output of No. 5, that is, the output of the Y direction line is all at the L level. Further, the IC 13 is in the input mode. In this state, if no switch is pressed, IC1
The input data of 3 are all at H level. However, if at least one switch is pressed, the input data of the corresponding line of IC13 becomes L level, and the output of IC7 also becomes L level. For example, if the switch 9K shown in FIG. 2 is pressed, the input data of the IC 13 is Y
Only 3 lines are at L level and the other lines are at H level. I
The output of C7 becomes L level if even one of all the switches is pressed. Therefore, if this signal is used as an interrupt signal to the CPU, the process of step 2 can be triggered.

【0020】次に、手順2では、まずIC7出力のLレ
ベルをトリガとして、IC1の出力がLレベルとされ、
IC15は入力モード、IC13は出力モードとされ
る。手順1で得られたIC13の入力データのうちLレ
ベルであったラインの内、1本だけをHレベルとし、他
はLレベルとする。例えば手順1と同様にスイッチ9K
が押されているとすれば、Y3ラインのみHレベルと
し、他のラインの出力はLレベルとする。この状態でI
C15の入力データを見れば、X方向の位置が特定でき
る。即ち、スイッチ9Kが押されているならば、X3ラ
インだけがHレベルとなり、他はLレベルとなる。
Next, in procedure 2, first, the L level of the output of IC7 is used as a trigger to set the output of IC1 to the L level,
The IC 15 is in the input mode and the IC 13 is in the output mode. Of the lines that were L level of the input data of the IC 13 obtained in the procedure 1, only one line is set to H level and the other lines are set to L level. For example, switch 9K as in step 1
If is pressed, only the Y3 line is set to the H level and the outputs of the other lines are set to the L level. I in this state
The position in the X direction can be specified by looking at the input data of C15. That is, if the switch 9K is pressed, only the X3 line becomes the H level and the other lines become the L level.

【0021】従って、手順1で得られたLレベルのYラ
インすべて、換言すればLレベルのYラインについての
みIC13の出力を変化させるだけで、その時のデータ
をIC15から入力することによってm×n個すべての
スイッチの状態を入力することができる。
Therefore, by changing the output of the IC 13 only for all the L level Y lines obtained in the procedure 1, in other words, for the L level Y line, the data at that time is input from the IC 15 to obtain m × n. You can enter the status of all switches.

【0022】また、本発明は以下のように変形しても良
い。即ち、図1のIC7を使用せず、CPUが随時手順
1の状態において、IC13の入力データを監視し、1
つでもLレベルの入力がある時のみ、手順2の処理を行
うようにしても良い。こうすることにより、割り込み機
能を使用しなくても良いようになる。
Further, the present invention may be modified as follows. That is, without using the IC 7 of FIG. 1, the CPU constantly monitors the input data of the IC 13 in the state of the procedure 1 and
The process of step 2 may be performed only when there is L level input. By doing so, it becomes unnecessary to use the interrupt function.

【0023】上述してきたように、本実施例のスイッチ
スキャン方式によれば、マトリクス状に配列された複数
のスイッチのX方向ライン、Y方向ラインのそれぞれの
入出力方向を双方向としたので、スイッチの入力時間を
短縮し、かつ、入力処理CPUの負荷を軽減することが
できる。
As described above, according to the switch scan method of this embodiment, the input and output directions of the X direction line and the Y direction line of the plurality of switches arranged in a matrix are bidirectional. The input time of the switch can be shortened and the load on the input processing CPU can be reduced.

【0024】[0024]

【発明の効果】以上述べたように本発明のスイッチスキ
ャン方式によれば、マトリクス状に配列された複数のス
イッチのX方向ライン、Y方向ラインのそれぞれの入出
力方向を双方向としたので、多数のスイッチの状態を高
速に、かつ簡単な処理で入力することができる。
As described above, according to the switch scan method of the present invention, the input and output directions of the X direction line and the Y direction line of the plurality of switches arranged in a matrix are bidirectional. It is possible to input the states of a large number of switches at high speed with simple processing.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明の一実施例を示す回路図である。FIG. 1 is a circuit diagram showing an embodiment of the present invention.

【図2】本発明に係る第2の実施例を示した回路図であ
る。
FIG. 2 is a circuit diagram showing a second embodiment according to the present invention.

【図3】従来例の回路図である。FIG. 3 is a circuit diagram of a conventional example.

【符号の説明】[Explanation of symbols]

1 IC 3 Y方向ラインIC 5 X方向ラインIC 7 IC 9 スイッチ 1 IC 3 Y-direction line IC 5 X-direction line IC 7 IC 9 switch

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 マトリクス状に配列された複数のスイッ
チからなるスイッチ群の各スイッチの状態を入力するス
イッチスキャン方式において、 前記マトリクス状に配列された複数のスイッチのX方向
ライン、Y方向ラインのそれぞれの入出力方向を双方向
とすることを特徴とするスイッチスキャン方式。
1. A switch scan system for inputting the state of each switch of a switch group composed of a plurality of switches arranged in a matrix, wherein the X-direction line and the Y-direction line of the plurality of switches arranged in a matrix are provided. A switch scan method characterized in that each input / output direction is bidirectional.
JP3325239A 1991-11-13 1991-11-13 Switch scanning system Pending JPH05134799A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3325239A JPH05134799A (en) 1991-11-13 1991-11-13 Switch scanning system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3325239A JPH05134799A (en) 1991-11-13 1991-11-13 Switch scanning system

Publications (1)

Publication Number Publication Date
JPH05134799A true JPH05134799A (en) 1993-06-01

Family

ID=18174585

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3325239A Pending JPH05134799A (en) 1991-11-13 1991-11-13 Switch scanning system

Country Status (1)

Country Link
JP (1) JPH05134799A (en)

Similar Documents

Publication Publication Date Title
US4591833A (en) Keyboard unit control system using block scanning techniques
JP2003029908A (en) Key input device provided with braille input function
JPH05134799A (en) Switch scanning system
JP2979416B2 (en) Key input device
KR950014977B1 (en) Control device for operating panel
JPH024030A (en) Keyboard device
US5583498A (en) Input device
KR0181586B1 (en) Computer having a separable keyboard
KR960038534A (en) Switch input device of programmable controller (PLC) using scan method and its control method
JPH06187080A (en) Key matrix scan accelerating system
JPH07202660A (en) Key matrix circuit
JPS63282515A (en) Input device
JPH02310714A (en) Keyboard switch
JP2500473B2 (en) Keyboard device
JPS59121528A (en) Key input device
JPS6314217A (en) Keyboard control method
JPS60175135A (en) Key scanning circuit
JPH06149443A (en) Keyboard
JPS6125233A (en) Keyboard
JPH0451310A (en) Command input system for communication controller
JPH083776B2 (en) Matrix scanning input device
JPH01295319A (en) Key input device
JPH01220515A (en) Key matrix device
JPH04293113A (en) Key scan method and keyboard device
JPS63150717A (en) Input signal code processing system by two sets of input key devices