JPH01246623A - Switch input device - Google Patents

Switch input device

Info

Publication number
JPH01246623A
JPH01246623A JP63075475A JP7547588A JPH01246623A JP H01246623 A JPH01246623 A JP H01246623A JP 63075475 A JP63075475 A JP 63075475A JP 7547588 A JP7547588 A JP 7547588A JP H01246623 A JPH01246623 A JP H01246623A
Authority
JP
Japan
Prior art keywords
switch
input
microcomputer
switches
terminal
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
JP63075475A
Other languages
Japanese (ja)
Inventor
Takahiro Asai
朝井 貴裕
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.)
Panasonic Ecology Systems Co Ltd
Original Assignee
Matsushita Seiko 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 Matsushita Seiko Co Ltd filed Critical Matsushita Seiko Co Ltd
Priority to JP63075475A priority Critical patent/JPH01246623A/en
Publication of JPH01246623A publication Critical patent/JPH01246623A/en
Pending legal-status Critical Current

Links

Landscapes

  • Input From Keyboards Or The Like (AREA)

Abstract

PURPOSE:To reduce the number of ports of a microcomputer which discriminates a switch input by assigning one output port to the whole of switches and assigning one input port to a pair of switches and detecting a signal with each input port. CONSTITUTION:One terminal of each of switches 1a and 1c is connected to an output terminal 5c of a microcomputer 5, and the other terminals are connected to one-side terminals of switches 1b and 1d. The connection part between switches 1a and 1c is connected to an input terminal 5a of the microcomputer 5. The output from the output terminal 5c is set to the high level, and it is judged that the switch 1c is not through and the control is returned from a switch input discriminating routine when the input terminal 5a is in the low level. When the input terminal 5a is in the high level, it is temporarily judged that the switch 1a or 1c is thrown and the device is held for a certain time. Next, the output from the output terminal 5c is set to the low level to discriminate the level of the input terminal 5a. Switches 1b and 1d are discriminated in the same manner.

Description

【発明の詳細な説明】 産業上の利用分野 本発明は、複数個の入力用スイッチを有した装置におけ
るその豆イッチ入力装置に関するものである。
DETAILED DESCRIPTION OF THE INVENTION Field of the Invention The present invention relates to a small switch input device in an apparatus having a plurality of input switches.

従来の技術 近年、マイクロコンピュータの発達により、複雑な制御
が可能となシ、多数のスイッチを備えたスイッチ入力装
置が使用されている。従来、この種のスイッチ入力装置
は、第3図に示すような構成であった。すなわち、複数
個のスイッチ群1o1の端子はそれぞれマイクロコンピ
ュータ102の入力端子102a 、102bと出力端
子1020,102dに接続され、スイッチ群1o1の
どれか1つが入力操作されたとき、マイクロコンピュー
タ102は出力端子102a、102bを順に出力した
後、入力端子1020.1o2dで入力があるかどうか
を検知してスイッチ群1o1のどのスイッチが入力され
たかを判断するという構成であった。
2. Description of the Related Art In recent years, with the development of microcomputers, switch input devices that are capable of complex control and are equipped with a large number of switches have come into use. Conventionally, this type of switch input device has had a configuration as shown in FIG. That is, the terminals of the plurality of switch groups 1o1 are respectively connected to input terminals 102a, 102b and output terminals 1020, 102d of the microcomputer 102, and when any one of the switch groups 1o1 is inputted, the microcomputer 102 outputs After sequentially outputting terminals 102a and 102b, it was configured to detect whether or not there was an input at input terminal 1020.1o2d to determine which switch in switch group 1o1 was input.

たとえばスイッチ101aが入力操作されたとき、入力
端子102aからの出力電流が入力端子102cに伝わ
シ、マイクロコンピュータ102内で比較演算されて、
スイッチ101aが入力されたことを認知するものであ
る。
For example, when the switch 101a is operated, the output current from the input terminal 102a is transmitted to the input terminal 102c, and is compared and calculated within the microcomputer 102.
This is to recognize that the switch 101a has been input.

発明が解決しようとする課題 このような従来の構成では、スイッチ群1o1が要する
スイッチの数と、そのときにマイクロコンピュータが必
要とする入出力端子の関係は下表1のようになる。
Problems to be Solved by the Invention In such a conventional configuration, the relationship between the number of switches required by the switch group 1o1 and the input/output terminals required by the microcomputer at that time is as shown in Table 1 below.

(表1) このようにスイッチの数が増えると接続端子数が徐々に
増えるが、マイクロコンピュータ102の入出力端子数
は限定されているため、スイッチ以外の用途に使用する
残シの入出力端子数が減ってしまい、スイッチ操作入力
が増えてもそれに対応する入出力制御が制約されてしま
うという課題を有していた。
(Table 1) As the number of switches increases, the number of connection terminals gradually increases, but since the number of input/output terminals of the microcomputer 102 is limited, the remaining input/output terminals are used for purposes other than switches. The problem is that even if the number of switch operation inputs increases, the corresponding input/output control will be restricted.

本発明はこのような課題を解決するもので、複数個のス
イッチを従来に比べて少ない端子数で接続し、他の用途
に使用できる端子数を増やして、マイクロコンピュータ
の使用範囲を拡張することのできるスイッチ入力装置を
提供することを目的とするものである。
The present invention solves these problems by connecting multiple switches with a smaller number of terminals than in the past, increasing the number of terminals that can be used for other purposes, and expanding the scope of use of microcomputers. The object of the present invention is to provide a switch input device that can perform the following functions.

課題を解決するだめの手段 この目的を達成するために本発明は、直列接続した2つ
の入力スイッチの共通線に共通端子を備えたスイッチ対
と、このスイッチ対を複数個並列接続したスイッチ群と
、このスイッチ群の両端に設けた1組のスイッチ群端子
と、前記スイッチ群と接続されるマイクロコンピュータ
とを有し、前記スイッチ群端子の1つは前記マイクロコ
ンピュータに設けた1つの出力端子と接続し、前記スイ
ッチ群端子の他方は前記マイクロコンピュータの電源の
高圧側と接続し、前記共通端子は前記マイクロコンピュ
ータに設けた複数の入力端子の1つに接続し、また、マ
イクロコンピュータに設けた出力端子からはマイクロコ
ンピュータの電源電圧に等しい電圧と電源電圧よシ低い
電圧を交互に発生して、複数の入力端子の1つに入力さ
れる電圧値からスイッチ群の中の1つのスイッチが入力
されたことを判別するという構成を有している。
Means for Solving the Problems To achieve this object, the present invention provides a pair of switches in which a common terminal is provided on the common line of two input switches connected in series, and a switch group in which a plurality of these pairs of switches are connected in parallel. , a set of switch group terminals provided at both ends of the switch group, and a microcomputer connected to the switch group, one of the switch group terminals being connected to one output terminal provided on the microcomputer. the other of the switch group terminals is connected to the high voltage side of the power supply of the microcomputer, the common terminal is connected to one of a plurality of input terminals provided on the microcomputer, and A voltage equal to the power supply voltage of the microcomputer and a voltage lower than the power supply voltage are alternately generated from the output terminal, and one switch in the switch group receives the input from the voltage value input to one of the multiple input terminals. It has a configuration that determines whether it has been done.

作  用 上記構成によシ、スイッチ全体に1つの出力ポートと、
1対のスイッチに1つの入力ポートを割シ当て、出力ポ
ートより高低の出力信号を断続的に与えるときに、それ
ぞれの入力ポートで信号を検出することによシ、スイッ
チ入力を判別するマイクロコンピュータのポート数を減
らすことができる。
Function: According to the above configuration, one output port is provided on the entire switch,
A microcomputer that allocates one input port to a pair of switches and determines the switch input by detecting the signal at each input port when high and low output signals are intermittently applied from the output port. The number of ports can be reduced.

実施例 以下本発明の一実施例を第1図および第2図に基づき説
明する。
EXAMPLE An example of the present invention will be described below with reference to FIGS. 1 and 2.

図示のようにスイッチ1aおよび1cの一方の端子は、
マイクロコンピュータ5のオープンドレインまたはプッ
シュプルで構成された出力端子5aに接続され、スイッ
チ1aおよび1a、他方の端子は、スイッチ1bおよび
1dの片側に接続され、この接続部は、マイクロコンピ
ュータ5の入力端子に接続されているものである。
As shown in the figure, one terminal of switches 1a and 1c is
The terminals of the switches 1a and 1a are connected to one side of the switches 1b and 1d, and the input terminal of the microcomputer 5 is It is connected to the terminal.

上記構成において、実際にスイッチを入力する際の流れ
図を第2図に示し、以下に、その説明をする。
In the above configuration, a flowchart for actually inputting a switch is shown in FIG. 2, and will be explained below.

ただし、わかシ易くするため、スイッチ1aと1cの入
力判別方法を最初に説明する。
However, for the sake of clarity, the input discrimination method for switches 1a and 1c will be explained first.

まずステップ1oの部分で、出力端子6oからの出力t
−ハイレベルとし、ステップ20でスイッチ1aと1c
が接続されている入力端子6aに入力し、ステップ3o
でその入力状態がハイレベルかローレベルか−に判断f
る。ローレベルナラld’、スイッチ1eが入力されて
いないと判断してスイッチ入力判定ルーチンからぬけ、
ノ・イレベルならば、スイッチ1aまたはスイッチ1C
が入力されたものと仮に判断してステップ4oにて一定
時間待機する。次にステップ50にて出力端子50から
の出力をローレベルに設定し、ステップ6oにて入力端
子6aに入力し、ステップ7oにてその入力信号を判定
する。もしローレベルであればステップ9oにてスイッ
チ1Cが入力されたものとしてフラグを立る。また、入
力信号がハイレベルであれば、ステップ80にてスイッ
チ1aが入力されたものとしてフラグを立てる。さらに
ステップ100にて一定時間待機し、ステップ11oに
て出力ボート5oからの出力をハイレベルとし、ステッ
プ12oにて入力端子2aから入力し、ステップ130
にて入力信号がローレベルであれば、このスイッチ入力
判定ルーチンからぬける。ステップ130にて入力信号
がハイレベルであれば、前述のステップ8o及び9oで
立てたフラグを基にして、ステップ140にてそのスイ
ッチの応答処理を行なう。そのあとこのスイッチ入力判
定ルーチンからぬけるというものである。
First, in step 1o, the output t from the output terminal 6o
- Set to high level and switch 1a and 1c in step 20.
is connected to the input terminal 6a, and step 3o
Determine whether the input state is high level or low level with f
Ru. Low level Nara ld', determines that switch 1e is not input and exits from the switch input determination routine.
If the level is NO/I, switch 1a or switch 1C
is assumed to have been input, and the process waits for a certain period of time in step 4o. Next, in step 50, the output from the output terminal 50 is set to low level, and in step 6o, it is input to the input terminal 6a, and in step 7o, the input signal is determined. If the signal is at a low level, a flag is set in step 9o indicating that the switch 1C has been input. If the input signal is at a high level, a flag is set in step 80 indicating that the switch 1a has been input. Further, in step 100, the system waits for a certain period of time, sets the output from the output boat 5o to a high level in step 11o, inputs it from the input terminal 2a in step 12o, and in step 130
If the input signal is at a low level, the switch input determination routine is exited. If the input signal is at a high level in step 130, response processing for that switch is performed in step 140 based on the flags set in steps 8o and 9o. After that, the process exits from this switch input determination routine.

上記の動作を整理すると出力端子5oと入力端子6aの
関係とスイッチの応答状態は表2にまとめることができ
る。
To summarize the above operations, the relationship between the output terminal 5o and the input terminal 6a and the response state of the switch can be summarized in Table 2.

以上のように一つの出力端子20からハイレベル、ロー
レベル、ハイレベルの信号を順次与えて、1つの入力端
子6aで入力して判定することによシ、2つのスイッチ
の入力状態を判別することが可能となシ、マイクロコン
ピュータ6のスイッチに使用される端子数を削減するこ
とができる。
As described above, the input states of the two switches are determined by sequentially applying high-level, low-level, and high-level signals from one output terminal 20 and inputting and determining them at one input terminal 6a. This makes it possible to reduce the number of terminals used for switches of the microcomputer 6.

上記動作説明はスイッチ1 a 、1 cの0N−OF
Fを判定するものであるが、スイッチ1b、1dについ
ても入力端子が2bとなるだけで、他の動作は同じもの
である。
The above operation explanation is 0N-OF of switches 1a and 1c.
F is determined, but the input terminals of the switches 1b and 1d are 2b, and the other operations are the same.

また以下にスイッチ数と入出力端子数の関係を表3に示
す。
Table 3 below shows the relationship between the number of switches and the number of input/output terminals.

発明の効果 前記実施例の説明より明らかなように本発明によれば、
スイッチに接続するマイクロコンピュータの端子数を従
来より削減することによシ、マイクロコンピュータの端
子を他の用途に有効活用することができ、マイクロコン
ピュータの能力が充分発揮できるという優れたスイッチ
入力装置を実現できるものである。
Effects of the Invention As is clear from the description of the above embodiments, according to the present invention,
By reducing the number of microcomputer terminals connected to the switch, the microcomputer terminals can be used effectively for other purposes, creating an excellent switch input device that fully utilizes the microcomputer's capabilities. This is something that can be achieved.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明の一実施例のスイッチ入力装置の回路図
、第2図は同スイッチ入力判定のためのプログラムの一
例を示す流れ図、第3図は従来のスイッチ入力装置の回
路図である。 1・・・・・・スイッチ群、1a〜1d・・・・・・ス
イッチ、2・・・・・・スイッチ対、3・・・・・・共
通端子、4・・・・・・スイッチ群端子、6・・・・・
・マイクロコンピュータ、5a。 6b・・・・・・入力端子、6o・・・・・・出力端子
。 代理人の氏名 弁理士 中 尾 敏 男 ほか1名f−
一一スイ・ツナ(iト 第 1 図         1詞d−・−ス4−/+
2−・−ス4ッチス丁 3−−−チ’<kWrr手 手−−−スイ・ツナ、辱羊立イード 5°−マイ70コソピエーダ 5a、5b−−一人jJiM+ 5o・−出のa+ 第2図
FIG. 1 is a circuit diagram of a switch input device according to an embodiment of the present invention, FIG. 2 is a flow chart showing an example of a program for determining switch input, and FIG. 3 is a circuit diagram of a conventional switch input device. . 1...Switch group, 1a to 1d...Switch, 2...Switch pair, 3...Common terminal, 4...Switch group Terminal, 6...
・Microcomputer, 5a. 6b...Input terminal, 6o...Output terminal. Name of agent: Patent attorney Toshio Nakao and 1 other person f-
11 Sui Tuna (i to 1st figure 1 word d-・-s4-/+
2-・-su 4 chis dō 3---chi'<kWrrte--sui tuna, humiliation sheeptate eid 5°-my 70 cosopieda 5a, 5b--alone jJiM+ 5o・-de no a+ 2nd figure

Claims (2)

【特許請求の範囲】[Claims] (1)直列接続した2つの入力スイッチの共通線に共通
端子を備えたスイッチ対と、このスイッチ対を複数個並
列接続したスイッチ群と、このスイッチ群の両端に設け
た1組のスイッチ群端子と、前記スイッチ群と接続され
るマイクロコンピュータとを有し、前記スイッチ群端子
の一つは前記マイクロコンピュータに設けた1つの出力
ポートと接続し、前記スイッチ群端子の他方は前記マイ
クロコンピュータの電源の高圧側と接続し、前記共通端
子は前記マイクロコンピュータに設けた複数の入力ポー
トの1つに接続してなるスイッチ入力装置。
(1) A switch pair with a common terminal on the common line of two input switches connected in series, a switch group in which a plurality of these switch pairs are connected in parallel, and a set of switch group terminals provided at both ends of this switch group. and a microcomputer connected to the switch group, one of the switch group terminals is connected to one output port provided on the microcomputer, and the other of the switch group terminals is connected to the power supply of the microcomputer. A switch input device, wherein the common terminal is connected to one of a plurality of input ports provided in the microcomputer.
(2)マイクロコンピュータに設けた出力ポートからは
マイクロコンピュータの電源電圧に等しい電圧と電源電
圧より低い電圧を交互に発生して、複数の入力ポートの
1つに入力される電圧値からスイッチ群の中の1つのス
イッチが入力されたことを判別する特許請求の範囲第1
項記載のスイッチ入力装置。
(2) A voltage equal to the power supply voltage of the microcomputer and a voltage lower than the power supply voltage are alternately generated from the output port provided on the microcomputer, and the switch group is Claim 1 for determining whether one switch in the
The switch input device described in section.
JP63075475A 1988-03-29 1988-03-29 Switch input device Pending JPH01246623A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63075475A JPH01246623A (en) 1988-03-29 1988-03-29 Switch input device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63075475A JPH01246623A (en) 1988-03-29 1988-03-29 Switch input device

Publications (1)

Publication Number Publication Date
JPH01246623A true JPH01246623A (en) 1989-10-02

Family

ID=13577363

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63075475A Pending JPH01246623A (en) 1988-03-29 1988-03-29 Switch input device

Country Status (1)

Country Link
JP (1) JPH01246623A (en)

Similar Documents

Publication Publication Date Title
CA2018828C (en) Determining propositional logic theorems by applying values and rules to triplets that are generated from a boolean formula
JPH01246623A (en) Switch input device
JPS6346508A (en) Sequence controller
JP2867649B2 (en) Electronic equipment connection device
JP3141472B2 (en) Switching control method
JP3680446B2 (en) Pipeline control device and data processing method
JPS61262856A (en) Testing circuit
JPS63280315A (en) Key input device
JP2541301B2 (en) Failure detection method
JP2574384B2 (en) Data stream generator
JP2000014644A (en) Device and system for biological information communication
JPS63276178A (en) Wiring pattern generation processing device
JPS621396A (en) Key telephone equipment
JP2976621B2 (en) Semiconductor integrated circuit
JPH11284618A (en) Method and device for monitoring vsa arithmetic circuit
JPS6184762A (en) Multicontrol system
JPS63276132A (en) Duplex system
JPH10336220A (en) Electronic controller test system for vehicle
JPH01124050A (en) Control method for message input/output
JPS59178536A (en) System for judging zero value of plural data
JPS63282535A (en) Signal processor
JPH056808B2 (en)
JPS63124106A (en) Sequence controller
KR900003737A (en) Signal Sequence Arrangement and Circuit with Extensibility
JP2000092722A (en) Charging/discharging system