JPH02252014A - Switch input circuit - Google Patents
Switch input circuitInfo
- Publication number
- JPH02252014A JPH02252014A JP1071729A JP7172989A JPH02252014A JP H02252014 A JPH02252014 A JP H02252014A JP 1071729 A JP1071729 A JP 1071729A JP 7172989 A JP7172989 A JP 7172989A JP H02252014 A JPH02252014 A JP H02252014A
- Authority
- JP
- Japan
- Prior art keywords
- input
- terminals
- switch
- switches
- microcomputer
- 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
Links
Landscapes
- Input From Keyboards Or The Like (AREA)
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明は、スイッチ数が多い場合のマイクロコンピュー
タによるスイッチ入力回路に関する。DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a switch input circuit using a microcomputer when the number of switches is large.
従来のスイッチ入力回路は、例えば実開昭54−172
622号公報に記載されているように、マイクロコンピ
ュータによるキーボードとして、マトリクス状に配置さ
れたスイッチ(キーボード)のスイッチにはマイクロコ
ンピュータへの1つの出力端子と1つの入力端子が接続
されていた。A conventional switch input circuit is, for example, disclosed in Japanese Utility Model Application No. 54-172.
As described in Japanese Patent No. 622, as a keyboard for a microcomputer, one output terminal and one input terminal to the microcomputer were connected to the switches (keyboard) of switches arranged in a matrix.
上記従来技術においては1m本の出力端子群とn本の入
力端子群とからなるマイクロコンピュータではm X
n個のスイッチしか接続できず、それ以上のスイッチが
必要な場合にはスイッチ入力回路の入力端子、或は出力
端子を増やす必要があった。In the above conventional technology, in a microcomputer consisting of a group of 1 m output terminals and a group of n input terminals, m
Only n switches can be connected, and if more switches are required, it is necessary to increase the number of input terminals or output terminals of the switch input circuit.
本発明は、上記のようなマイクロコンピュータであって
もmXnよりも多いスイッチをスイッチ入力口メa・の
入力端子6或は出力端子を増やすことなく入力でき、さ
らにスイッチの多重押しによる誤動作を防止するために
多重押しを検知することができるスイッチ入力回路を提
供することを目的とする。The present invention allows inputting more switches than mXn without increasing the number of input terminals 6 or output terminals of the switch input port a, even in the above-mentioned microcomputer, and further prevents malfunctions due to multiple presses of switches. An object of the present invention is to provide a switch input circuit that can detect multiple presses.
上記目的は、1−個のスイッチを押すと1個以上の出力
端子と2個以上の入力端子、又は2個以上の出力端子と
1個以上の入力端子を導通させるスイッチ回路を設け、
これを従来のスイッチ入力回路に追加することにより達
成され4る。The above object is to provide a switch circuit that connects one or more output terminals and two or more input terminals, or two or more output terminals and one or more input terminals when one or more switches are pressed;
This is accomplished by adding this to a conventional switch input circuit.
また、上記スイッチ回路の追加によって、追加したスイ
ッチを多重押ししたときに起こる誤動作を防止するため
には、マイクロコンピュータが入力端子群のうち順次1
個を入力動作から出力動作に切り換えて信号を出力し、
出力端子詳記入力動作にして、この端子群において上記
信号が入力されるか否かを検出することにより行う。In addition, in order to prevent malfunctions that occur when the added switch is pressed multiple times by adding the switch circuit described above, it is necessary for the microcomputer to
Switch the unit from input operation to output operation and output a signal.
This is performed by detecting whether or not the above-mentioned signal is input to this terminal group in an output terminal detailed input operation.
〔作用〕
新たに設けたスイッチ回路により追加されたスイッチを
導通すること1.こより、1個の出力端子から出た信号
は2@、或は2個以上の入力端子へ入力される。[Operation] Conducting the added switch using the newly installed switch circuit 1. Therefore, a signal output from one output terminal is input to two or more input terminals.
マイクロコンピコ、−夕は入力端子群の内のどの入力端
子に信号が入力されたかを調べ、2個以上の入力端子に
信号が入力されたことを検知することで、追加されたス
イッチと1個の出力端子と1個の入力端子を導通させる
従来のスイッチとを区別することができるい
マイクロコンピュータは入力端子群の内の1個を順次入
力動作から/J5力動作に切り換えて信号製出力する、
この際、出力端子群を入力動作にして、この端子群のい
ずれかに上記信号が入力されればマイクロコンピュータ
はスイッチが2個以上導通されていることに検知できる
ので誤動作を防ぐことができる。Microcompico, -Yu checks which input terminal of the input terminal group the signal is input to, and by detecting that the signal is input to two or more input terminals, the added switch and one A microcomputer that can distinguish between two output terminals and a conventional switch that conducts one input terminal sequentially switches one of the input terminals from input operation to /J5 force operation and outputs a signal. do,
At this time, if the output terminal group is set to input operation and the above-mentioned signal is input to any of the terminal group, the microcomputer can detect that two or more switches are conductive, thereby preventing malfunction.
(実施例〕 以下1本発明の実施例を図面を用いて説明する。(Example〕 An embodiment of the present invention will be described below with reference to the drawings.
第1図は本発明によるスイッチ入力回路の一実施例を示
す回路図6第2図は第1図に示した各スイッチの回路図
であって、マイクロコンピュータ】には脹)1〜P8の
8つの入出力端子があるものとする8上記入出力端子の
内、端子P1〜P4に接続する信号線、端子15〜P7
に接続する信号線はそれぞれマトリクス状に交差し、各
々の交点には第2図に示す回路からなるスイッチO1〜
12を接続する。FIG. 1 is a circuit diagram showing an embodiment of the switch input circuit according to the present invention. FIG. 2 is a circuit diagram of each switch shown in FIG. Of the 8 input/output terminals above, signal lines connected to terminals P1 to P4, terminals 15 to P7
The signal lines connected to each other intersect in a matrix, and at each intersection there are switches O1 to O1 consisting of the circuit shown in Figure 2.
Connect 12.
更に、端子P1〜P4に接続する信号線に対して3本の
信号線を交差させ、各々の交点に第2図に示す回路から
なるスイッチ13〜24を接続する。Further, three signal lines are made to intersect with the signal lines connected to the terminals P1 to P4, and switches 13 to 24 made of the circuit shown in FIG. 2 are connected to each intersection point.
上記3本の信号線には】信号線に対して2個づつ計6個
のダイオード2a〜2fをキースイッチ側がアノードに
なるように接続する。ダイオード2a〜2cのカソード
は全て端子P8に接続する。ダイオード2d〜2fはそ
れぞれ端子P7〜P8に接続する。A total of six diodes 2a to 2f, two for each signal line, are connected to the three signal lines so that the key switch side becomes the anode. The cathodes of diodes 2a to 2c are all connected to terminal P8. Diodes 2d-2f are connected to terminals P7-P8, respectively.
第3図は第14図のスイッチ19が押された場合の各入
出力端子のタイミング図であって、マイクロコンピュー
タ】は時刻1−1〜t4にかけて端子P1−P4に順次
パルスを発生する。FIG. 3 is a timing diagram of each input/output terminal when the switch 19 in FIG. 14 is pressed, and the microcomputer sequentially generates pulses at terminals P1 to P4 from time 1-1 to t4.
スイッチ19が押されていれば時刻t2において端子P
6と端子P8にパルスが入力され、これによりマイクロ
コンピュータ1はスイッチ19が押されていると判断す
る。If switch 19 is pressed, terminal P is activated at time t2.
6 and terminal P8, and the microcomputer 1 determines that the switch 19 is pressed.
更に、マイクロコンビコータ1は時刻t5〜t7にかけ
て端子P5〜P7に順次パルスを発生する。この際に、
端子PI−P4にはパルスが入力されないので、他のス
イッチは押されていないと判断する。Further, the micro combi coater 1 sequentially generates pulses at the terminals P5 to P7 from time t5 to time t7. At this time,
Since no pulse is input to the terminal PI-P4, it is determined that no other switch is pressed.
第4図はスイッチ19とスイッチ07の二つが押された
場合の各入出力端子のタイミング図であって。FIG. 4 is a timing diagram of each input/output terminal when both switch 19 and switch 07 are pressed.
スイッチ19とスイッチ07が押されている場合には、
時刻t1〜t4の期間はスイッチ19だけが押されてい
る場合と同じとなるが1時刻t5〜t7にかけて端子P
5〜P7に順次パルスを出力したときには、時刻1,6
において端子P2にパルスを入力する。これによりマイ
クロコンピュータ1はスイッチ19以外のスイッチが押
されたと判断する。If switch 19 and switch 07 are pressed,
The period from time t1 to t4 is the same as when only the switch 19 is pressed, but from time t5 to t7, the terminal P
When pulses are sequentially output from 5 to P7, at times 1 and 6
A pulse is input to terminal P2. As a result, the microcomputer 1 determines that a switch other than switch 19 has been pressed.
第1図の回路において、スイッチ回路のダイオード28
〜2fの極性を逆向き及びマイクロコンピュータの入出
力端子群を逆に動作させるようにして、2以上のスイッ
チの出力端子とJ以−にのマイクロコンピュータの入力
端子とを導通するようにしてもよい。In the circuit of FIG. 1, the diode 28 of the switch circuit
Even if the polarity of ~2f is reversed and the input/output terminal group of the microcomputer is operated in the opposite direction, the output terminals of two or more switches and the input terminals of the microcomputers J and above are electrically connected. good.
従来のスイッチ入力回路では8個の入出力端子を有する
マイクロコンピュータでは4X4=16個のキースイッ
チしか接続できないのに対して本実施例によれば4X6
=24個のキースイッチを接続でき、従来のものに比べ
て8個のキースイッチを余分に接続することができる。In a conventional switch input circuit, a microcomputer with 8 input/output terminals can only connect 4×4=16 key switches, but in this embodiment, 4×6 key switches can be connected.
= 24 key switches can be connected, which means 8 extra key switches can be connected compared to the conventional one.
また、16個の入出力端子を有する場合は8×8=64
個しか接続されないが、本実施例では8X14=112
個接続でき、従来のものに比べて48個のキースイッチ
を余分に接続することができる。In addition, if there are 16 input/output terminals, 8×8=64
In this example, 8×14=112
It is possible to connect 48 additional key switches compared to the conventional type.
(発明の効果〕
以上説明したように、本発明によれば、多くのキースイ
ッチをマイクロコンピュータに接続できるので、多機能
なスイッチ入力回路とすることができ、またキースイッ
チの多重押しを検知することができるので、多重押しに
よる誤動作を防止することができ、上記従来技術の問題
点を解決して。(Effects of the Invention) As explained above, according to the present invention, many key switches can be connected to a microcomputer, so a multifunctional switch input circuit can be provided, and multiple key switch presses can be detected. This makes it possible to prevent malfunctions caused by multiple presses, thus solving the problems of the prior art described above.
優れた機能のスイッチ入力回路を提供することができる
。A switch input circuit with excellent functionality can be provided.
第1図は本発明によるスイッチ入力回路の一実施例を示
す回路図、第2図は第1図に示した各スイッチの回路図
、第3図は第1図のスイッチ19が押された場合の各入
出力端子のタイミング図、第4図はスイッチ19とスイ
ッチ07の二つが押された場合の各入出力端子のタイミ
ング図である。
1・・・マイクロコンピュータ、 2a〜2f・・・ダ
イオード(スイッチ回路)、01〜24・・・マトリク
ス状スイッチ、 PI〜P8・・・入出力端子(PI〜
P4・・・出力端子、 P5〜P8・・・入力端子)。
纂 1 図
第 32
第 2 図
1:マイクロコンピータ
2ユへ2チ: タ゛イオード
O1〜2+:マトリクス弔くスイツナ
纂十 図FIG. 1 is a circuit diagram showing an embodiment of the switch input circuit according to the present invention, FIG. 2 is a circuit diagram of each switch shown in FIG. 1, and FIG. 3 is a case where switch 19 in FIG. 1 is pressed. FIG. 4 is a timing diagram of each input/output terminal when both switch 19 and switch 07 are pressed. 1... Microcomputer, 2a-2f... Diode (switch circuit), 01-24... Matrix switch, PI-P8... Input/output terminal (PI-
P4...output terminal, P5-P8...input terminal). 1. Figure 32. 2. Figure 1: Microcomputer 2 to 2: Diodes O1 to 2+: Matrix connection diagram
Claims (1)
群を備えたマイクロコンピュータからなるスイッチ入力
回路において、1つの上記スイッチを導通することによ
って、1以上のマイクロコンピュータの出力端子と2以
上のマイクロコンピュータの入力端子(又は、2以上の
出力端子と1以上の入力端子)とを導通させるスイッチ
回路を備えることを特徴とするスイッチ入力回路。 2、請求項1において、上記入力端子群のうち1つの入
力端子を順次入力動作から出力動作に切り換えて信号を
出力し、上記出力端子群において上記信号が入力される
か否かを検出することによって、2つ以上のスイッチが
同時に導通されたことを検知することを特徴とするスイ
ッチ入力回路。[Claims] 1. In a switch input circuit consisting of a microcomputer equipped with switches arranged in a matrix and a group of input/output terminals, the output of one or more microcomputers can be controlled by making one of the switches conductive. A switch input circuit comprising a switch circuit that connects a terminal to input terminals (or two or more output terminals and one or more input terminals) of two or more microcomputers. 2. In claim 1, one input terminal of the input terminal group is sequentially switched from an input operation to an output operation to output a signal, and it is detected whether or not the signal is input to the output terminal group. A switch input circuit characterized in that it detects that two or more switches are turned on at the same time.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1071729A JPH02252014A (en) | 1989-03-27 | 1989-03-27 | Switch input circuit |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1071729A JPH02252014A (en) | 1989-03-27 | 1989-03-27 | Switch input circuit |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH02252014A true JPH02252014A (en) | 1990-10-09 |
Family
ID=13468901
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP1071729A Pending JPH02252014A (en) | 1989-03-27 | 1989-03-27 | Switch input circuit |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH02252014A (en) |
-
1989
- 1989-03-27 JP JP1071729A patent/JPH02252014A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US6509846B1 (en) | Key matrix circuit | |
| JPH02252014A (en) | Switch input circuit | |
| CA2083635A1 (en) | Digital signal hardware protection switching | |
| US5702625A (en) | Encoder key input device for a microwave oven and interrupt processing method using the same | |
| JP2548023Y2 (en) | Key input device | |
| US5233602A (en) | Switching system for computers with 2-bit condition-representing signals | |
| JPH06332597A (en) | Key matrix circuit | |
| JPH0221321A (en) | Input device for coordinate position | |
| JPH0445057Y2 (en) | ||
| JPS61148521A (en) | Keyboard input device | |
| JPS6349917A (en) | Circuit for recognizing opened/closed state of switch | |
| JP2594502Y2 (en) | Key matrix circuit | |
| JPH0257633U (en) | ||
| JPS5872226A (en) | Clock switching circuit | |
| JPH0441386Y2 (en) | ||
| JPH04205406A (en) | key input device | |
| JP2503299Y2 (en) | Power board start control circuit | |
| JPS61196333U (en) | ||
| JPH04139519A (en) | Keyboard | |
| JPH03212519A (en) | Back hoe | |
| JPH02151127A (en) | System for detecting depressing of specific key | |
| JPS62101145A (en) | Signal transmission system | |
| JPS6126121A (en) | Input device of keyboard | |
| JPS63143935U (en) | ||
| JPH0354820B2 (en) |