JPH0218821A - Switch input circuit - Google Patents

Switch input circuit

Info

Publication number
JPH0218821A
JPH0218821A JP63167097A JP16709788A JPH0218821A JP H0218821 A JPH0218821 A JP H0218821A JP 63167097 A JP63167097 A JP 63167097A JP 16709788 A JP16709788 A JP 16709788A JP H0218821 A JPH0218821 A JP H0218821A
Authority
JP
Japan
Prior art keywords
resistor
circuit
converter
switch
switches
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.)
Granted
Application number
JP63167097A
Other languages
Japanese (ja)
Other versions
JPH0664964B2 (en
Inventor
Koichi Sugino
杉野 光一
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.)
Seikosha KK
Original Assignee
Seikosha KK
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 Seikosha KK filed Critical Seikosha KK
Priority to JP63167097A priority Critical patent/JPH0664964B2/en
Publication of JPH0218821A publication Critical patent/JPH0218821A/en
Publication of JPH0664964B2 publication Critical patent/JPH0664964B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Input From Keyboards Or The Like (AREA)
  • Keying Circuit Devices (AREA)
  • Analogue/Digital Conversion (AREA)
  • Logic Circuits (AREA)

Abstract

PURPOSE:To read out the states of two switches with one input terminal by changing the input voltage of an AD converter with combinations of the opened/ closed states of two switches. CONSTITUTION:The states of two switches 3 and 5 can be read out via one AD converter 1. Combinations of the opened/closed states of two switches 3 and 5 are four, a circuit is constituted so that input voltage values of the AD converter 1 are changed respectively for these combinations. Resistance values of resistors are determined and the circuit is constituted so that the power voltage is uniformly divided and the input voltage values of the AD converter 1 are set to nearly 0, a/3, 2a/3, and (a) for these combinations, where (a) is the voltage value of a power source. The AD converter rarely has an effect of the error of the resistance values or the like, the states of two switches can be correctly read out via one AD converter.

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明はスイッチ入力回路に関するものである。[Detailed description of the invention] [Industrial application field] The present invention relates to a switch input circuit.

[従来の技術] 従来は、例えばプリンタにおいては、モードスイッチや
種々の設定スイッチ等多数のスイッチを必要とし、各ス
イッチの状態を読み取るために、1つのスイッチに1つ
の入力ポートを割り当てている。
[Prior Art] Conventionally, for example, a printer requires a large number of switches such as a mode switch and various setting switches, and one input port is assigned to one switch in order to read the status of each switch.

[解決しようとする課ffiコ 上記従来のものでは、スイッチの数だけ入力ポートが必
要となり、回路が大型化してしまうものであった。
[Issue to be Solved] In the above conventional system, the number of input ports equal to the number of switches is required, resulting in an increase in the size of the circuit.

本発明は1本の入力端子で2つのスイッチの状態を読み
取れるスイッチ入力回路を提供することを目的としてい
る。
An object of the present invention is to provide a switch input circuit that can read the states of two switches with one input terminal.

[課題を解決するための手段] 本発明は抵抗値が所定の関係にある4つの抵抗と、2つ
のスイッチと、ADコンバータとにより構成した回路を
用い、上記2つのスイッチの開閉状態の組合わせによっ
て上記ADコンバータの入力電圧値を異ならせるように
して上記課題を解決するものである。
[Means for Solving the Problems] The present invention uses a circuit composed of four resistors whose resistance values have a predetermined relationship, two switches, and an AD converter, and combines the open and closed states of the two switches. The above problem is solved by varying the input voltage value of the AD converter.

[実施例] 以下、本発明の一実施例を図面に基づいて説明する。[Example] Hereinafter, one embodiment of the present invention will be described based on the drawings.

第1図において、1は入力端子の電圧Vを2ビツトの出
力Q  、Q  に変換するADコンバータである。2
は第1の抵抗、3は第1のスイッチであり、これらが直
列に接続されて第1の回路4が構成される。5は第2の
スイッチ、6は第2の抵抗であり、これらが直列に接続
されて第2の回路7が構成される。第2の抵抗6は第1
の抵抗2の抵抗値のほぼ2分の1の抵抗値を有し、例え
ばそれぞれを2にΩ、1にΩに設定しである。。さらに
第1の回路4と第2の回路7とが直列に接続されて第4
の回路8が構成される。9は第1の抵抗2の抵抗値より
も十分に大きい抵抗値、例えばIMΩの第3の抵抗、1
0は第3の抵抗9の抵抗値のほぼ2倍の抵抗値、例えば
2MΩの第4の抵抗であり、これらが直列に接続されて
第3の回路11が構成される。また、本例においては電
源V。Cは5■である。
In FIG. 1, 1 is an AD converter that converts the voltage V at the input terminal into 2-bit outputs Q 1 and Q 2 . 2
is a first resistor, and 3 is a first switch, which are connected in series to form a first circuit 4. 5 is a second switch, 6 is a second resistor, and these are connected in series to form a second circuit 7. The second resistor 6 is the first
The resistor 2 has a resistance value that is approximately half that of the resistor 2, and is set, for example, to 2 Ω and 1 Ω, respectively. . Further, the first circuit 4 and the second circuit 7 are connected in series to form a fourth circuit.
A circuit 8 is constructed. 9 is a third resistor 1 whose resistance value is sufficiently larger than that of the first resistor 2, for example, IMΩ.
0 is a fourth resistor having a resistance value approximately twice that of the third resistor 9, for example, 2 MΩ, and these are connected in series to form the third circuit 11. Further, in this example, the power supply V. C is 5 ■.

つぎに動作を説明する。第1のスイッチ3と第2のスイ
ッチ5の開閉状態と、その各組合せのときの電圧Vおよ
びADコンバータ1の出力Q1、Q2の状態を第2図に
示す。
Next, the operation will be explained. FIG. 2 shows the open/close states of the first switch 3 and the second switch 5, the voltage V for each combination, and the states of the outputs Q1 and Q2 of the AD converter 1.

第1のスイッチ3と第2のスイッチ5の両方が開いた状
態のときには、第3の抵抗9と第4の抵抗10の抵抗値
の比が約1:2なので電圧Vは約3.3vとなる。この
ときADコンバータ1からはQ に“1° Q2に“0
°が出力される。
When both the first switch 3 and the second switch 5 are open, the ratio of the resistance values of the third resistor 9 and the fourth resistor 10 is approximately 1:2, so the voltage V is approximately 3.3V. Become. At this time, AD converter 1 outputs “1° to Q2” and “0” to Q2.
° is output.

第1のスイッチ3が閉じ第2のスイッチ5が開いた状態
のときは、第4の抵抗10の抵抗値は第1の抵抗2の抵
抗値よりも十分に大きいので、第1の抵抗2は無視する
ことができ電圧Vは約5゜0■となる。このときADコ
ンバーターからはQlに“1” 、Q2に“1”が出力
される。
When the first switch 3 is closed and the second switch 5 is open, the resistance value of the fourth resistor 10 is sufficiently larger than the resistance value of the first resistor 2. The voltage V can be ignored and is approximately 5°0. At this time, the AD converter outputs "1" to Ql and "1" to Q2.

第1のスイッチ3が開いて第2のスイッチ5が閉じた状
態のときには、第3の抵抗9の抵抗値は第2の抵抗6の
抵抗値よりも十分に大きいので第2の抵抗6は無視する
ことができ電圧Vは約Ovとなる。このときADコンバ
ーターからはQlに“0° Q2に、“0”が出力され
る。
When the first switch 3 is open and the second switch 5 is closed, the resistance value of the third resistor 9 is sufficiently larger than the resistance value of the second resistor 6, so the second resistor 6 is ignored. The voltage V can be approximately Ov. At this time, the AD converter outputs "0°" to Ql and "0" to Q2.

第1のスイッチ3と第2のスイッチ5の両方が閉じた状
態のときには、第3の抵抗9および第4の抵抗10の抵
抗値は第1の抵抗2および第2の抵抗6の抵抗値より十
分大きいので、第3の抵抗9および第4の抵抗10は無
視でき、電圧Vは第1の抵抗2と第2の抵抗6の抵抗値
の比で決まる。
When both the first switch 3 and the second switch 5 are closed, the resistance values of the third resistor 9 and the fourth resistor 10 are lower than the resistance values of the first resistor 2 and the second resistor 6. Since they are sufficiently large, the third resistor 9 and the fourth resistor 10 can be ignored, and the voltage V is determined by the ratio of the resistance values of the first resistor 2 and the second resistor 6.

第1の抵抗2と第2の抵抗6の抵抗値の比は約2:1な
ので電圧Vは約1.7vとなる。このときADコンバー
ターからはQ にmo# Q2に“1”が出力される。
Since the ratio of the resistance values of the first resistor 2 and the second resistor 6 is approximately 2:1, the voltage V is approximately 1.7V. At this time, the AD converter outputs "1" to Q and mo# Q2.

以上の動作により、1つのADコンバータによって2つ
のスイッチの状態を読み取ることができる。
With the above operation, the states of two switches can be read by one AD converter.

[効果] 本発明によれば、1つのADコンバータニヨって2つの
スイッチの状態が読み取れるものである。
[Effects] According to the present invention, the states of two switches can be read from one AD converter.

2つのスイッチの開閉状態の組合せは4通りであるが、
この各組合せのときのADコンバータの入力電圧値がそ
れぞれ異なるように回路を構成しである。しかも、上記
各組合せのときのADコンバータの入力端子値は、電源
の電圧値をaとすると、はぼ0、a/3.2a/3、a
というように、電源電圧が均等に分割されるように各抵
抗の抵抗値を定め、回路を構成したので、抵抗値の誤差
等の影響を受けにくく、2つのスイッチの状態を1つの
ADコンバータで間違いなく読み取ることができる。
There are four combinations of the open/closed states of the two switches.
The circuit is configured such that the input voltage values of the AD converter for each combination are different. Moreover, the input terminal values of the AD converter for each of the above combinations are approximately 0, a/3.2a/3, a
Since the resistance value of each resistor was determined and the circuit was configured so that the power supply voltage was divided equally, it was less susceptible to errors in resistance values, and the states of the two switches could be determined using one AD converter. It can definitely be read.

また、ボート数の削減によってICの数またはICの端
子数゛を削減することができ、回路の小型化、コスト低
減、信頼性向上に大きく貢献するものである。
Further, by reducing the number of boards, the number of ICs or the number of IC terminals can be reduced, which greatly contributes to circuit miniaturization, cost reduction, and reliability improvement.

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

第1図は本発明の一実施例を示した電気回路図、第2図
は第1図の回路における各スイッチの状態とADコンバ
ータの出力状態を示した説明図である。 1・・・ADコンバータ 2・・・第1の抵抗 3・・・第1のスイッチ 4・・・第1の回路 5・・・第2のスイッチ 6・・・第2の抵抗 7・・・第2の回路 8・・・第4の回路 9・・・第3の抵抗 10・・・第4の抵抗 11・・・第3の回路 第2図
FIG. 1 is an electric circuit diagram showing an embodiment of the present invention, and FIG. 2 is an explanatory diagram showing the states of each switch and the output state of the AD converter in the circuit of FIG. 1. 1... AD converter 2... First resistor 3... First switch 4... First circuit 5... Second switch 6... Second resistor 7... Second circuit 8...Fourth circuit 9...Third resistor 10...Fourth resistor 11...Third circuit FIG.

Claims (1)

【特許請求の範囲】 ADコンバータと、 第1の抵抗と、 第1の抵抗の抵抗値のほぼ2分の1の抵抗値をもつ第2
の抵抗と、 第1の抵抗の抵抗値よりも十分に大きい抵抗値をもつ第
3の抵抗と、 第3の抵抗の抵抗値のほぼ2倍の抵抗値をもつ第4の抵
抗と、 第1のスイッチと、 第2のスイッチとを有し、 第1の抵抗と第1のスイッチとを直列に接続して第1の
回路を構成し、 第2の抵抗と第2のスイッチとを直列に接続して第2の
回路を構成し、 第3の抵抗と第4の抵抗とを直列に接続して第3の回路
を構成し、 第1の回路と第2の回路とを直列に接続して第4の回路
を構成し、 第3の回路と第4の回路を電源間に並列に接続し、 第1の回路と第2の回路の接続点および第3の抵抗と第
4の抵抗の接続点を接続し、 この接続端子を上記ADコンバータの入力に接続したこ
とを特徴とするスイッチ入力回路。
[Claims] An AD converter, a first resistor, and a second resistor having a resistance value approximately half the resistance value of the first resistor.
a third resistor having a resistance value sufficiently greater than the resistance value of the first resistor; a fourth resistor having a resistance value approximately twice the resistance value of the third resistor; and a second switch, the first resistor and the first switch are connected in series to form a first circuit, and the second resistor and the second switch are connected in series. A third resistor and a fourth resistor are connected in series to constitute a third circuit, and the first circuit and the second circuit are connected in series. The third circuit and the fourth circuit are connected in parallel between the power supplies, and the connection point of the first circuit and the second circuit and the connection point of the third resistor and the fourth resistor are connected in parallel between the power supplies. A switch input circuit characterized in that connection points are connected, and this connection terminal is connected to an input of the AD converter.
JP63167097A 1988-07-05 1988-07-05 Switch input circuit Expired - Fee Related JPH0664964B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63167097A JPH0664964B2 (en) 1988-07-05 1988-07-05 Switch input circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63167097A JPH0664964B2 (en) 1988-07-05 1988-07-05 Switch input circuit

Publications (2)

Publication Number Publication Date
JPH0218821A true JPH0218821A (en) 1990-01-23
JPH0664964B2 JPH0664964B2 (en) 1994-08-22

Family

ID=15843369

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63167097A Expired - Fee Related JPH0664964B2 (en) 1988-07-05 1988-07-05 Switch input circuit

Country Status (1)

Country Link
JP (1) JPH0664964B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5420496A (en) * 1992-01-07 1995-05-30 Mitsubishi Denki Kabushiki Kaisha Electronic device
JP2006134608A (en) * 2004-11-02 2006-05-25 Omron Corp Circuit for detecting state of switch and automobile window opening device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5420496A (en) * 1992-01-07 1995-05-30 Mitsubishi Denki Kabushiki Kaisha Electronic device
JP2006134608A (en) * 2004-11-02 2006-05-25 Omron Corp Circuit for detecting state of switch and automobile window opening device

Also Published As

Publication number Publication date
JPH0664964B2 (en) 1994-08-22

Similar Documents

Publication Publication Date Title
JPH0218821A (en) Switch input circuit
JP2851730B2 (en) Programmable controller
JPS63299699A (en) Switching circuit device
CN218678840U (en) Time sequence electrifying circuit, MPU chip circuit and electronic equipment
CN219801969U (en) Power supply switching circuit and source meter board card
CN111435153B (en) Battery pack voltage adjusting device and voltage adjusting control method thereof
SU1039034A1 (en) Analog signal electronic switch
JPS6214526A (en) Voltage dividing circuit
JPWO2002047268A1 (en) Driver circuit
CN116449792A (en) ECU test box and ECU and vehicle comprising same
SU1374257A1 (en) Device for modelling quasinegative resistance
JPH06259690A (en) Terminal block for receiving gauge
JPH04153809A (en) Controller
SU1576892A1 (en) Mutichannel stabilized power source of dissimilar voltages
KR960016136B1 (en) Input current measuring circuit using multiflexer
JP2001309648A (en) Power supply device and power supply unit
JPS61158640A (en) Operation switch circuit
JPH0319420A (en) Reference level conversion circuit
JPS63299506A (en) Constant current drive circuit
JPS61170139A (en) Digital-analog converter
JPS59185123A (en) Power source
JPS61194518A (en) Input device
JPH0643950A (en) Power unit
KR20020084461A (en) Circuit of analog current output
JPS5862932A (en) Analog switch circuit

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees