JPH044419A - Method and circuit for detecting input of microcomputer - Google Patents

Method and circuit for detecting input of microcomputer

Info

Publication number
JPH044419A
JPH044419A JP2106255A JP10625590A JPH044419A JP H044419 A JPH044419 A JP H044419A JP 2106255 A JP2106255 A JP 2106255A JP 10625590 A JP10625590 A JP 10625590A JP H044419 A JPH044419 A JP H044419A
Authority
JP
Japan
Prior art keywords
switch
input
microcomputer
closed
limiting resistor
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
JP2106255A
Other languages
Japanese (ja)
Other versions
JP3067027B2 (en
Inventor
Akira Hashimoto
明 橋本
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.)
Sanyo Electric Co Ltd
Original Assignee
Sanyo Electric 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 Sanyo Electric Co Ltd filed Critical Sanyo Electric Co Ltd
Priority to JP2106255A priority Critical patent/JP3067027B2/en
Publication of JPH044419A publication Critical patent/JPH044419A/en
Application granted granted Critical
Publication of JP3067027B2 publication Critical patent/JP3067027B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Power Sources (AREA)
  • Microcomputers (AREA)

Abstract

PURPOSE:To reduce the power consumption in a switch by limiting the current flowing through the switch by turning off a control transistor so as to set a current limiting resistance to a non-short-circuited state when the switch is closed from an opened state. CONSTITUTION:While a switch 1 is in an opened state, the state of the switch is repeatedly detected until the switch 1 is closed. When the switch 1 is closed in such a condition, a detecting signal '0' is outputted from a control circuit 5 and the signal '0' is statically latched by a latch circuit 8. In other words, the circuit 8 is reset. Accordingly, a control transistor 11 is turned off and an electric current which is limited by a series resistance of a resistance 2 and current limiting resistance 7 flows to the switch 1 after the lapse of time (t) from the time the switch 1 is closed. Therefore, the power consumption in the switch 1 can be reduced while the switch 1 is closed.

Description

【発明の詳細な説明】 (イ)産業上の利用分野 本発明は、マイクロコンピュータの入力検出方法及び入
力検出回路に関するものである。   “(ロ)従来の
技術 第3図は、従来回路を示す回路図である。第3図におい
て、スイッチ(1)の一端(接点)は銀メツキ処理され
ている。該スイッチ(1)の一端は抵抗(2)を介して
電源Vddと接続され、該スイッチ(1)の他端は接地
される。スイッチ(1)及び抵抗(2)はマイクロコン
ピュータ(3)に外部接続され、特に、スイッチ(1)
の一端はマイクロコンピュータ(3)の入力ポート(4
)と接続される。マイクロコンピュータ(3)内部の制
御回路(5)は、スイッチ(1)の開放/閉成状態を示
す入力信号が入力ポート(4)及びインバータ(6)を
介して印加されることによって、スイッチ(1)の開放
/閉成状態を検出する。そして、マイクロコンピュータ
(3)は、制御回路(5)の検出出力によって動作する
。ここで、スイッチ(1)の一端は、銀メツキ処理によ
って酸化膜を生じ易く、接触不良を生じ易い。その為、
スイッチ(1)の閉成状態を示す正確な入力信号がマイ
クロコンピュータ(3)の入力ポート(4)に印加され
ず、マイクロコンピュータ(3)が誤動作する恐れがあ
る。そこで、スイッチ(1)の一端が酸化膜を生じても
、該酸化膜を無視できる程度の大電流がスイッチ(1)
を流れる様に、抵抗(2)の抵抗値を小に設定し、マイ
クロコンピュータ(3)の誤動作を防止していた。
DETAILED DESCRIPTION OF THE INVENTION (a) Field of Industrial Application The present invention relates to an input detection method and an input detection circuit for a microcomputer. (B) Prior art FIG. 3 is a circuit diagram showing a conventional circuit. In FIG. 3, one end (contact) of a switch (1) is silver-plated. One end of the switch (1) is connected to the power supply Vdd via a resistor (2), and the other end of the switch (1) is grounded.The switch (1) and the resistor (2) are externally connected to the microcomputer (3), and in particular, the switch (1)
One end is the input port (4) of the microcomputer (3).
) is connected. The control circuit (5) inside the microcomputer (3) controls the switch (1) by applying an input signal indicating the open/closed state of the switch (1) via the input port (4) and the inverter (6). 1) Detect the open/closed state. The microcomputer (3) operates based on the detection output of the control circuit (5). Here, one end of the switch (1) tends to form an oxide film due to silver plating, and is likely to cause poor contact. For that reason,
An accurate input signal indicating the closed state of the switch (1) is not applied to the input port (4) of the microcomputer (3), which may cause the microcomputer (3) to malfunction. Therefore, even if an oxide film is formed at one end of the switch (1), a large current that can ignore the oxide film will flow through the switch (1).
The resistance value of the resistor (2) was set to a small value so that the current flow occurred, thereby preventing the microcomputer (3) from malfunctioning.

(ハ)発明が解決しようとする課題 しかしながら、スイッチ(1)の閉成期間中、常に大電
流がスイッチ(1)を流れてしまい、電力消費量が大と
なってしまう問題点があった。特に、電源V66が電池
の場合、電池の寿命が短くなってしまう問題点があった
(c) Problems to be Solved by the Invention However, there is a problem in that a large current always flows through the switch (1) during the period when the switch (1) is closed, resulting in a large amount of power consumption. In particular, when the power source V66 is a battery, there is a problem that the life of the battery is shortened.

そこで、本発明は、スイッチの閉成期間中であっても、
電力消費量を小とできるマイクロコンピュータの入力検
出方法及び入力検出回路を提供することを目的とする。
Therefore, the present invention provides that even during the closing period of the switch,
An object of the present invention is to provide an input detection method and an input detection circuit for a microcomputer that can reduce power consumption.

(ニ)課題を解決するための手段 本発明は、前記問題点を解決する為に成されたものであ
る。
(d) Means for Solving the Problems The present invention has been accomplished in order to solve the above-mentioned problems.

第1に、マイクロコンピュータの入力検出方法としては
、入力ポートと、該入力ポートの入力データに応じた出
力データを出力する出力ポートと、を備えたマイクロコ
ンピュータにおいて、第1電源と前記入力ポートとの間
に接続された電流制限抵抗と、第2電源と前記入力ポー
トとの間に接続されたスイッチと、入力が前記出力ポー
トと接続され、且つ、出力路が前記電流制限抵抗と並列
接続された制御トランジスタと、を備え、前記スイッチ
が開放状態の時、前記制御トランジスタをオンして前記
電流制限抵抗を短絡状態とし、前記スイッチが開放状態
から閉成された時、前記制御トランジスタをオフして前
記電流制限抵抗を非短絡状態とすることによって、前記
スイッチを流ねる電流を制限することを特徴とする。
First, as an input detection method for a microcomputer, in a microcomputer equipped with an input port and an output port that outputs output data according to input data of the input port, a first power source and the input port are connected to each other. a switch connected between a second power source and the input port, an input connected to the output port, and an output path connected in parallel to the current limit resistor; and a control transistor, when the switch is in an open state, the control transistor is turned on to short-circuit the current limiting resistor, and when the switch is closed from the open state, the control transistor is turned off. The present invention is characterized in that the current flowing through the switch is limited by bringing the current limiting resistor into a non-short-circuited state.

第2に、マイクロコンピュータの入力検出回路としては
、入力ポートと、該入力ポートの入力データに応じた出
力データを出力する出力ポートと、を備えたマイクロコ
ンピュータにおいて、第1電源と前記入力ポートとの間
に接続された電流制限抵抗と、第2電源と前記入力ポー
トとの間に接続されたスイッチと、入力が前記出力ポー
トと接続され、且つ、出力路が前記電流制限抵抗と並列
接続された制御トランジスタと、前記スイッチが開放状
態の時、前記制御トランジスタをオンして前記電流制限
抵抗を短絡状態とし、且つ、前記スイッチが開放状態か
ら閉成された時、前記制御トランジスタをオフして前記
電流制限抵抗を非短絡状態とすることによって前記スイ
ッチを流れる電流を制限するための制御回路と、を備え
たことを特徴とする。
Second, as an input detection circuit for a microcomputer, in a microcomputer equipped with an input port and an output port that outputs output data according to input data of the input port, a first power supply and the input port are connected to each other. a switch connected between a second power source and the input port, an input connected to the output port, and an output path connected in parallel to the current limit resistor; a control transistor; when the switch is in an open state, the control transistor is turned on to short-circuit the current limiting resistor; and when the switch is closed from the open state, the control transistor is turned off. The present invention is characterized by comprising a control circuit for limiting the current flowing through the switch by bringing the current limiting resistor into a non-short-circuited state.

(ホ)作用 本発明によれば、スイッチが開放状態の時、制御トラン
ジスタがオンして電流制限抵抗が短絡状態とされ、且つ
、スイッチを開放状態から閉成した時、制御トランジス
タがオフして電流制限抵抗が非短絡状態とされ、スイッ
チを流れる電流が制限される。これより、スイッチの閉
成期間中における電力消費量が低減される。
(E) Function According to the present invention, when the switch is in the open state, the control transistor is turned on and the current limiting resistor is short-circuited, and when the switch is closed from the open state, the control transistor is turned off. The current limiting resistor is non-shorted and the current flowing through the switch is limited. This reduces power consumption during the switch closure period.

(へ)実施例 本発明の詳細を図面に従って具体的に説明する。(f) Example The details of the present invention will be specifically explained with reference to the drawings.

第1図は本発明回路を示す回路図、第2図は制御回路の
動作を示すフローチャートである。尚、第1図において
、第3図と同一構成には同一符号を付しである。
FIG. 1 is a circuit diagram showing the circuit of the present invention, and FIG. 2 is a flow chart showing the operation of the control circuit. In FIG. 1, the same components as in FIG. 3 are given the same reference numerals.

第1図において、電流制限抵抗(7)は、電源■1と抵
抗(2)との間に接続され、電流制限抵抗(7)の抵抗
値は、抵抗(2)の抵抗値より大に設定される。制御回
路(5)は、スイッチ(1)を閉成した時に「0」、ス
イッチ日)を開放した時に「1」の検出信号を出力する
。ラッチ回路(8)は、制御回路(5)の検出信号をス
タティックにラッチし、インバータ(9)及び出カポ−
) (10)を介して出力する。制御トランジスタ(1
1)において、ベースはベース抵抗(12)を介して出
力ポート(10)と接続され、エミッタ・コレクタ路は
電流制限抵抗(7)と並列接続される。そして、電流制
限抵抗(11)は、スイッチ(1)を開放した時にオン
し、スイッチ(1)を閉成した時にオフする。
In Figure 1, the current limiting resistor (7) is connected between the power supply ■1 and the resistor (2), and the resistance value of the current limiting resistor (7) is set to be greater than the resistance value of the resistor (2). be done. The control circuit (5) outputs a detection signal of "0" when the switch (1) is closed and "1" when the switch (1) is opened. The latch circuit (8) statically latches the detection signal of the control circuit (5) and connects the inverter (9) and the output port.
) (10). Control transistor (1
In 1), the base is connected to the output port (10) via the base resistor (12), and the emitter-collector path is connected in parallel with the current-limiting resistor (7). The current limiting resistor (11) is turned on when the switch (1) is opened, and turned off when the switch (1) is closed.

第1図の動作を第2図を用いて説明する。The operation shown in FIG. 1 will be explained using FIG. 2.

初期状態として、制御回路(5)から「1」の検出信号
が出力され、「1」の検出信号がラッチ回路(8)にス
タティックにラッチされ、即ち、ラッチ回路(8日よセ
ットされる。これより、制御トランジスタ(11)がオ
ンし、電流制限抵抗(7)は短絡される(ステップ■)
。次に、スイッチ(1)が開放状態の場合(ステップ■
NOI、スイッチ(1)が閉成されるまでスイッチ(1
)の状態を繰り返し検出するが、スイッチ(1)が閉成
された場合(ステップ■YES)、制御回路(5)から
「0」の検出信号が出力され、「0」の検出信号がラッ
チ回路(8)にスタティックにラッチされ、即ち、ラン
チ回路(8)はリセットされる。これより、スイッチ(
1)が閉成されてから時間を後において、制御トランジ
スタ(11)がオフし、スイッチ(1)には抵抗(2)
及び電流制限抵抗(7)の直列抵抗によって制限された
電流が流れ、スイッチ(1)の閉成期間中における電力
消費量の低減が実現される(ステップ■)。
As an initial state, a detection signal of "1" is output from the control circuit (5), and the detection signal of "1" is statically latched in the latch circuit (8), that is, the latch circuit (8 days) is set. From this, the control transistor (11) is turned on and the current limiting resistor (7) is short-circuited (step ■)
. Next, if switch (1) is open (step ■
NOI, switch (1) until switch (1) is closed.
) is repeatedly detected, but if the switch (1) is closed (step ■YES), a detection signal of "0" is output from the control circuit (5), and the detection signal of "0" is output from the latch circuit. (8) is statically latched, that is, the launch circuit (8) is reset. From now on, the switch (
1) is closed, the control transistor (11) is turned off, and the switch (1) is connected to the resistor (2).
A current limited by the series resistance of the current limiting resistor (7) flows, and a reduction in power consumption during the closing period of the switch (1) is realized (step (2)).

尚、時間tはステップ■YESからステップ■までのプ
ログラムを実行するのに要する時間である為、電力消費
量の低減に影響はない。次に、スイッチ(1)が閉成状
態の場合(ステップ■No)、スイッチ(1)が開放さ
れるまでスイッチ(1)の状態を繰り返し検出するが、
スイッチ(1)が開放された場合(ステップ■YES)
 、ステップ■に戻り、電流制限抵抗(7)は制御トラ
ンジスタ(11)によって再び短絡される。
It should be noted that since the time t is the time required to execute the program from step (2) YES to step (2), it does not affect the reduction in power consumption. Next, if the switch (1) is in the closed state (step ■No), the state of the switch (1) is repeatedly detected until the switch (1) is opened.
When switch (1) is opened (step ■YES)
, returning to step (2), the current limiting resistor (7) is again short-circuited by the control transistor (11).

以上より、スイッチ(1)の閉成期間中における電力消
費量を低減できる。特に、電源が電池で供給される場合
、電池を長寿命化できることになる。
As described above, power consumption during the period when the switch (1) is closed can be reduced. Particularly, when power is supplied by a battery, the life of the battery can be extended.

(ト)発明の効果 本発明によれば、スイッチの閉成期間中における電力消
費量を低減できる。特に、電源が電池で供給される場合
、電池を長寿命化できる利点が得られる。
(G) Effects of the Invention According to the present invention, power consumption during the switch closing period can be reduced. Particularly, when the power is supplied by a battery, there is an advantage that the life of the battery can be extended.

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

第1図は本発明を示す回路図、第2図は第1図の動作を
示すフローチャート、第3図は従来回路を示す回路図で
ある。 +1)  スイッチ、+3)  マイクロコンピュータ
、(4) 入力ポート、(5)・・制御回路、(7)・
・電流制限抵抗、(10)・・出力ポート、(11)・
・・制御トランジスタ。
FIG. 1 is a circuit diagram showing the present invention, FIG. 2 is a flowchart showing the operation of FIG. 1, and FIG. 3 is a circuit diagram showing a conventional circuit. +1) Switch, +3) Microcomputer, (4) Input port, (5)...Control circuit, (7)...
・Current limiting resistor, (10)...Output port, (11)・
...Control transistor.

Claims (3)

【特許請求の範囲】[Claims] (1)入力ポートと、該入力ポートの入力データに応じ
た出力データを出力する出力ポートと、を備えたマイク
ロコンピュータにおいて、 第1電源と前記入力ポートとの間に接続された電流制限
抵抗と、 第2電源と前記入力ポートとの間に接続されたスイッチ
と、 入力が前記出力ポートと接続され、且つ、出力路が前記
電流制限抵抗と並列接続された制御トランジスタと、を
備え、 前記スイッチが開放状態の時、前記制御トランジスタを
オンして前記電流制限抵抗を短絡状態とし、前記スイッ
チが開放状態から閉成された時、前記制御トランジスタ
をオフして前記電流制限抵抗を非短絡状態とすることに
よって、前記スイッチを流れる電流を制限することを特
徴とするマイクロコンピュータの入力検出方法。
(1) In a microcomputer equipped with an input port and an output port that outputs output data according to input data of the input port, a current limiting resistor connected between a first power source and the input port; , a switch connected between a second power source and the input port, and a control transistor whose input is connected to the output port and whose output path is connected in parallel to the current limiting resistor, the switch is in an open state, the control transistor is turned on to bring the current limiting resistor into a short-circuited state, and when the switch is closed from an open state, the control transistor is turned off and the current limiting resistor is brought into a non-shorted state. A method for detecting an input for a microcomputer, characterized in that the current flowing through the switch is limited by:
(2)入力ポートと、該入力ポートの入力データに応じ
た出力データを出力する出力ポートと、を備えたマイク
ロコンピュータにおいて、 第1電源と前記入力ポートとの間に接続された電流制限
抵抗と、 第2電源と前記入力ポートとの間に接続されたスイッチ
と、 入力が前記出力ポートと接続され、且つ、出力路が前記
電流制限抵抗と並列接続された制御トランジスタと、 前記スイッチが開放状態の時、前記制御トランジスタを
オンして前記電流制限抵抗を短絡状態とし、且つ、前記
スイッチが開放状態から閉成された時、前記制御トラン
ジスタをオフして前記電流制限抵抗を非短絡状態とする
ことによって前記スイッチを流れる電流を制限するため
の制御回路と、 を備えたことを特徴とするマイクロコンピュータの入力
検出回路。
(2) In a microcomputer equipped with an input port and an output port that outputs output data according to input data of the input port, a current limiting resistor connected between a first power source and the input port; , a switch connected between a second power source and the input port; a control transistor whose input is connected to the output port and whose output path is connected in parallel with the current limiting resistor; and the switch is in an open state. When , the control transistor is turned on to bring the current limiting resistor into a short-circuited state, and when the switch is closed from an open state, the control transistor is turned off and the current-limiting resistor is brought into a non-shorted state. An input detection circuit for a microcomputer, comprising: a control circuit for limiting the current flowing through the switch; and a control circuit for limiting the current flowing through the switch.
(3)制御回路は、マイクロコンピュータ内部に設けら
れたことを特徴とする請求項(2)記載のマイクロコン
ピュータの入力検出回路。
(3) The input detection circuit for a microcomputer according to claim (2), wherein the control circuit is provided inside the microcomputer.
JP2106255A 1990-04-20 1990-04-20 Microcomputer input detection method and detection circuit Expired - Fee Related JP3067027B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2106255A JP3067027B2 (en) 1990-04-20 1990-04-20 Microcomputer input detection method and detection circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2106255A JP3067027B2 (en) 1990-04-20 1990-04-20 Microcomputer input detection method and detection circuit

Publications (2)

Publication Number Publication Date
JPH044419A true JPH044419A (en) 1992-01-08
JP3067027B2 JP3067027B2 (en) 2000-07-17

Family

ID=14428995

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2106255A Expired - Fee Related JP3067027B2 (en) 1990-04-20 1990-04-20 Microcomputer input detection method and detection circuit

Country Status (1)

Country Link
JP (1) JP3067027B2 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02227975A (en) * 1989-02-28 1990-09-11 Canon Inc Connecting device
JPH02278620A (en) * 1989-04-19 1990-11-14 Oki Electric Ind Co Ltd No-voltage contact input system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02227975A (en) * 1989-02-28 1990-09-11 Canon Inc Connecting device
JPH02278620A (en) * 1989-04-19 1990-11-14 Oki Electric Ind Co Ltd No-voltage contact input system

Also Published As

Publication number Publication date
JP3067027B2 (en) 2000-07-17

Similar Documents

Publication Publication Date Title
Puglisi et al. SIMPLY: Design of a RRAM-based smart logic-in-memory architecture using RRAM compact model
KR101821327B1 (en) Input circuit capable of reducing dark current
JPH044419A (en) Method and circuit for detecting input of microcomputer
RU2257003C1 (en) Controlled pulse shaper
JPH06289087A (en) Circuit for intelligent power switch
JPH09325058A (en) Electromagnetic flowmeter
JP2003124797A (en) Input circuit
CN212695704U (en) Current limiting circuit
JPH06245362A (en) Circuit breaker
JP2565965B2 (en) Open / closed state detection method for non-voltage contacts
JPS5919992Y2 (en) Electronic counter circuit of tape recorder
JPH06331677A (en) Load fault diagnostic circuit
JPH03252797A (en) Alarm monitoring device
JP2559639Y2 (en) Power supply control device
JPH04188455A (en) Tape-end detecting apparatus
JP2613913B2 (en) Semiconductor integrated circuit
JPH08254563A (en) Open error detection circuit for input pin
JPH0399282A (en) Device for detecting information on contact
JP2512993B2 (en) Reset circuit
JP3632108B2 (en) Input state detection circuit
JPS61170891A (en) Sensor input circuit
JPH05342380A (en) Operation mode control circuit for microcomputer
JPH03134928A (en) Relay driving circuit
JPH09163589A (en) Actuator drive circuit
JPS6314393A (en) Function driver for magnetic bubble memory device

Legal Events

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