JPH11345090A - Input circuit - Google Patents

Input circuit

Info

Publication number
JPH11345090A
JPH11345090A JP10151310A JP15131098A JPH11345090A JP H11345090 A JPH11345090 A JP H11345090A JP 10151310 A JP10151310 A JP 10151310A JP 15131098 A JP15131098 A JP 15131098A JP H11345090 A JPH11345090 A JP H11345090A
Authority
JP
Japan
Prior art keywords
signal
input
transistor
voltage
general
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.)
Withdrawn
Application number
JP10151310A
Other languages
Japanese (ja)
Inventor
Atsushi Kitahata
厚志 北畠
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.)
Denso Ten Ltd
Original Assignee
Denso Ten 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 Denso Ten Ltd filed Critical Denso Ten Ltd
Priority to JP10151310A priority Critical patent/JPH11345090A/en
Publication of JPH11345090A publication Critical patent/JPH11345090A/en
Withdrawn legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To use a general purpose port in a microcomputer by a using method in proportion to an A/D port. SOLUTION: This input circuit connected to the general purpose port P for fetching the binary signals of a high voltage level signal and a low voltage level signal in the microcomputer is equipped with a comparator CMP for comparing a reference voltage corresponding to a power supply voltage +B with an input signal and outputting a compared result to the general purpose port P and an increase/decrease circuit for increasing/decreasing the reference voltage corresponding to the compared result of the comparator CMP.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、マイクロコンピュ
ータにおける高電圧レベル信号(H信号)と低電圧レベ
ル信号(L信号)の2値信号を入力する汎用ポートに接
続される入力回路に関する。
The present invention relates to an input circuit connected to a general-purpose port for inputting a binary signal of a high voltage level signal (H signal) and a low voltage level signal (L signal) in a microcomputer.

【0002】[0002]

【従来の技術】最近では、電子機器の多くにマイクロコ
ンピュータ(マイコン)が利用されており、高度な制御
が行われている。例えば、自動車においては、エンジン
等の各種駆動系の制御やエアバッグ等の安全装置、また
オーディオ機器等の車載用AV機器等にマイコンが用い
られ、性能向上、環境保護、安全性向上や快適性の向上
が図られている。
2. Description of the Related Art Recently, microcomputers (microcomputers) are used in many electronic devices, and advanced controls are performed. For example, in automobiles, microcomputers are used in the control of various driving systems such as engines, safety devices such as airbags, and in-vehicle AV devices such as audio devices to improve performance, protect the environment, improve safety, and improve comfort. Is being improved.

【0003】マイコンには、各種センサからの信号や他
のマイコン等の外部装置からの信号を取り込むために、
入力ポートが設けられている。この入力ポートには、H
信号とL信号の2値信号を取り込む汎用ポートと、アナ
ログ信号をデジタル信号に変換して取り込むためのA/
D(アナログデジタル変換)ポートがある。
A microcomputer receives signals from various sensors and signals from an external device such as another microcomputer.
An input port is provided. This input port has H
A general-purpose port for capturing a binary signal of a signal and an L signal, and an A / A port for converting an analog signal into a digital signal and capturing the signal.
There is a D (analog-to-digital conversion) port.

【0004】[0004]

【発明が解決しようとする課題】マイコンが制御に用い
る製品専用に設計された場合には問題はないが、特定の
製品専用ではなく各種製品に用いることができるように
設計された汎用マイコンの場合、使用する製品によって
は入力ポートが不足することがある。そして、A/Dポ
ートはソフトウェアを工夫することにより汎用ポートと
して用いることができるが、汎用ポートはA/Dポート
として用いることができないため、どちらかと言えばA
/Dポートが不足することが多い。
There is no problem if the microcomputer is designed exclusively for a product used for control, but a general-purpose microcomputer designed not to be dedicated to a specific product but to be used for various products. Depending on the product used, the input port may be insufficient. The A / D port can be used as a general-purpose port by devising software, but the general-purpose port cannot be used as an A / D port.
The / D port is often short.

【0005】一方、例えば自動車用機器においては、電
源(バッテリ)の電圧変動が比較的大きいため、A/D
変換する場合や、H信号,L信号の判断をする場合に電
源電圧で補正する必要がある。つまり、電源電圧の何パ
ーセントになるのか(A/D変換)、また電源電圧の何
パーセント以上をH信号とする(H信号,L信号の判
断)と言った処理を行う必要がある。また、入力信号が
H信号からL信号に、あるいはL信号からH信号に変化
する時には、ノイズが影響すると入力信号がH信号とL
信号の閾値を挟んで上下動し、その結果入力信号の検出
結果が不安定なものになる。この状態を防ぐために、入
力信号の検出結果が変化すれば、検出結果が反転しにく
い方向に閾値を変化させる処理、所謂ヒステリシスを持
たせる処理が必要となる。そして、これらの処理は通常
マイコンの演算処理により行われるため、入力信号の検
出結果がH信号、L信号の2値信号であってもA/Dポ
ートが必要となる。
On the other hand, for example, in the case of automobile equipment, since the voltage fluctuation of the power supply (battery) is relatively large, the A / D
In the case of conversion, or when judging an H signal or an L signal, it is necessary to correct the power supply voltage. In other words, it is necessary to perform processing such as what percentage of the power supply voltage becomes (A / D conversion), and what percentage or more of the power supply voltage is used as the H signal (determination of the H signal and the L signal). When the input signal changes from the H signal to the L signal or from the L signal to the H signal, if the input signal is affected by noise, the input signal is changed to the H signal and L signal.
The signal moves up and down across the signal threshold, and as a result, the detection result of the input signal becomes unstable. In order to prevent this state, if the detection result of the input signal changes, a process of changing the threshold value in a direction in which the detection result is unlikely to be inverted, that is, a process of providing a so-called hysteresis is required. Since these processes are usually performed by arithmetic processing of the microcomputer, an A / D port is required even if the detection result of the input signal is a binary signal of the H signal and the L signal.

【0006】例えば、最近の自動車では、各席の乗員の
保護のために多くのエアバッグが設置されているが、車
両の廃棄処理を行う前には、焼却装置等の廃棄処理装置
における廃棄処理中のエアバッグ膨張による損傷を防止
するために、事前にエアバッグを膨張させている。しか
し、エアバッグの数が増えてエアバッグの膨張作業に手
間がかかるようになってきたため、外部からバッテリの
電圧の所定パーセント以上と未満のH信号とL信号の所
定の組み合わせにより、全てのエアバッグを膨張させる
ようにプログラミングされた装置が提案されている。こ
のような場合、基本的にはH信号とL信号の入力のため
汎用ポートを用いれば良いのであるが、電源電圧の補正
を行うために、またヒステリシスを持たせるためA/D
ポートを用いている。
For example, in recent automobiles, many airbags are installed to protect occupants in each seat, but before the vehicle is disposed of, the disposal processing in a disposal apparatus such as an incinerator is performed. The airbag is inflated in advance to prevent damage due to the airbag inflation. However, as the number of airbags has increased and the inflation work of the airbags has become more troublesome, all of the air signals are externally provided by a predetermined combination of the H signal and the L signal that is equal to or higher than a predetermined percentage of the battery voltage. Devices programmed to inflate the bag have been proposed. In such a case, it is basically sufficient to use a general-purpose port for inputting the H signal and the L signal. However, in order to correct the power supply voltage and to provide hysteresis, the A / D port is used.
Port is used.

【0007】本発明は、このような場合に汎用ポートを
利用可能とし、マイコンの持つA/Dポートを有効に利
用できるようにすることを課題としている。
It is an object of the present invention to make a general-purpose port available in such a case and to effectively use an A / D port of a microcomputer.

【0008】[0008]

【課題を解決するための手段及びその効果】上記課題を
解決するため、本発明に係る入力回路(1)は、マイク
ロコンピュータにおける高電圧レベル信号と低電圧レベ
ル信号の2値信号を取り込む汎用ポートに接続される入
力回路において、電源電圧に応じた基準電圧と入力信号
を比較し、比較結果を前記汎用ポートに出力する比較器
と、該比較器の比較結果に応じて前記基準電圧を増減す
る増減回路とを備えていることを特徴としている。
In order to solve the above problems, an input circuit (1) according to the present invention is a general-purpose port for receiving a binary signal of a high voltage level signal and a low voltage level signal in a microcomputer. A comparator that compares an input signal with a reference voltage corresponding to a power supply voltage and outputs a comparison result to the general-purpose port; and increases or decreases the reference voltage according to the comparison result of the comparator. And an increase / decrease circuit.

【0009】上記入力回路(1)によれば、入力信号が
前記電源電圧に応じた前記基準電圧と比較され、また該
基準電圧が前記比較器の比較結果により変化するので、
前記電源電圧の変動が吸収され、比較結果にヒステリシ
スを持つ信号が汎用ポートに入力される。
According to the input circuit, the input signal is compared with the reference voltage corresponding to the power supply voltage, and the reference voltage changes according to the comparison result of the comparator.
The fluctuation of the power supply voltage is absorbed, and a signal having a hysteresis in the comparison result is input to the general-purpose port.

【0010】また、本発明に係る入力回路(2)は、マ
イクロコンピュータにおける高電圧レベル信号と低電圧
レベル信号の2値信号を取り込む汎用ポートに接続され
る入力回路において、電源電圧の分圧電圧が非反転入力
端子に印加され、反転入力端子に入力信号が印加され、
比較結果を前記汎用ポートに出力する比較器と、該比較
器の出力を前記非反転入力端子に帰還する帰還抵抗とを
備えていることを特徴としている。
The input circuit (2) according to the present invention is an input circuit connected to a general-purpose port for taking in a binary signal of a high voltage level signal and a low voltage level signal in a microcomputer. Is applied to the non-inverting input terminal, the input signal is applied to the inverting input terminal,
It is characterized by comprising a comparator for outputting a comparison result to the general-purpose port, and a feedback resistor for feeding back the output of the comparator to the non-inverting input terminal.

【0011】上記入力回路(2)によれば、前記反転入
力端子に入力された入力信号が前記非反転入力端子に印
加された前記電源電圧の分圧電圧と比較され、また前記
基準電圧が帰還抵抗で帰還される前記比較器の比較結果
により変化するので、前記電源電圧の変動が吸収され、
比較結果にヒステリシスを持つ信号が汎用ポートに入力
される。
According to the input circuit, the input signal input to the inverting input terminal is compared with the divided voltage of the power supply voltage applied to the non-inverting input terminal, and the reference voltage is fed back. Since it changes according to the comparison result of the comparator fed back by a resistor, the fluctuation of the power supply voltage is absorbed,
A signal having hysteresis in the comparison result is input to the general-purpose port.

【0012】また、本発明に係る入力回路(3)は、マ
イクロコンピュータにおける高電圧レベル信号と低電圧
レベル信号の2値信号を取り込む汎用ポートに接続され
る入力回路において、入力信号に応じて接断する入力ト
ランジスタと、該入力トランジスタの接断状態に応じて
接断し、接断状態に基づき電源電圧に応じた電圧の出力
信号を前記汎用ポートに出力する出力トランジスタと、
前記入力トランジスタの接断状態に応じて接断し、前記
入力トランジスタの接断状態が変化する電圧が増減する
ように前記入力トランジスタの端子に電圧を印加する調
整トランジスタとを備えていることを特徴としている。
Further, the input circuit (3) according to the present invention is an input circuit connected to a general-purpose port for taking in a binary signal of a high voltage level signal and a low voltage level signal in a microcomputer. An input transistor that disconnects, an output transistor that disconnects according to a disconnection state of the input transistor, and outputs an output signal of a voltage corresponding to a power supply voltage to the general-purpose port based on the disconnection state;
An adjustment transistor that disconnects according to the disconnection state of the input transistor, and applies a voltage to a terminal of the input transistor so that a voltage at which the disconnection state of the input transistor changes increases or decreases. And

【0013】上記入力回路(3)によれば、前記出力ト
ランジスタの出力信号が前記電源電圧により変化し、ま
た前記入力トランジスタの接断状態が切り換わる前記入
力信号の電圧が前記入力トランジスタの接断状態により
変化するので、前記電源電圧の変動が吸収され、また比
較結果にヒステリシスを持つ信号が汎用ポートに入力さ
れる。
According to the input circuit (3), the output signal of the output transistor changes according to the power supply voltage, and the voltage of the input signal at which the connection state of the input transistor switches is changed to the connection state of the input transistor. Since the voltage varies depending on the state, the fluctuation of the power supply voltage is absorbed, and a signal having a hysteresis in the comparison result is input to the general-purpose port.

【0014】また、本発明に係る入力回路(4)は、マ
イクロコンピュータにおける高電圧レベル信号と低電圧
レベル信号の2値信号を取り込む汎用ポートに接続され
る入力回路において、ベースに入力信号が印加され、コ
レクタが電源に接続された第1NPNトランジスタと、
該第1NPNトランジスタのエミッタと接地間に直列に
接続された第1、第2抵抗と、前記電源と前記第1NP
Nトランジスタのエミッタの間に接続された第3抵抗
と、エミッタが電源に接続され、ベースが前記第1NP
Nトランジスタのコレクタに接続され、コレクタが前記
汎用ポートに接続されると共に抵抗を介して接地された
PNPトランジスタと、コレクタが前記第1、第2抵抗
間に接続され、エミッタが接地され、ベースに前記PN
Pトランジスタのコレクタの電圧に応じた電圧が印加さ
れる第2NPNトランジスタとを備えていることを特徴
としている。
The input circuit (4) according to the present invention is an input circuit connected to a general-purpose port for taking in a binary signal of a high voltage level signal and a low voltage level signal in a microcomputer. A first NPN transistor having a collector connected to a power supply;
First and second resistors connected in series between the emitter of the first NPN transistor and ground, the power supply and the first NP
A third resistor connected between the emitters of the N transistors, an emitter connected to the power supply, and a base connected to the first NP
A PNP transistor connected to the collector of the N transistor, the collector connected to the general-purpose port and grounded via a resistor, the collector connected between the first and second resistors, the emitter grounded, and the base The PN
A second NPN transistor to which a voltage corresponding to the voltage of the collector of the P transistor is applied.

【0015】上記入力回路(4)によれば、PNPトラ
ンジスタの出力信号が前記電源電圧により変化し、また
前記第1NPNトランジスタの接断状態が切り換わる入
力信号の電圧(第1NPNトランジスタのエミッタ電
圧)が、前記PNPトランジスタの出力信号により接断
状態が変化する前記第2NPNトランジスタの接断状態
により変わるので、前記電源電圧の変動が吸収され、比
較結果にヒステリシスを持つ信号が汎用ポートに入力さ
れる。
According to the input circuit (4), the output signal of the PNP transistor changes according to the power supply voltage, and the voltage of the input signal at which the connection state of the first NPN transistor switches (emitter voltage of the first NPN transistor). Changes according to the connection state of the second NPN transistor whose connection state changes according to the output signal of the PNP transistor. Therefore, the fluctuation of the power supply voltage is absorbed, and a signal having hysteresis in the comparison result is input to the general-purpose port. .

【0016】[0016]

【発明の実施の形態】次に本発明の第1の実施の形態に
ついて説明する。図1は本発明の第1の実施の形態に係
る入力回路を示す回路図である。
Next, a first embodiment of the present invention will be described. FIG. 1 is a circuit diagram showing an input circuit according to the first embodiment of the present invention.

【0017】入力信号が入力される入力端子INは、入
力抵抗R4を介して比較器CMPの反転入力端子−に接
続され、また抵抗R5を介して接地されている。比較器
CMPの非反転入力端子+には、電源(バッテリ)+B
の抵抗R1,R2による分圧電圧が印加されており、ま
た比較器CMPの出力と非反転入力端子+間には帰還抵
抗R3が接続されている。また、比較器CMPの非反転
入力端子+と反転入力端子−間には高周波ノイズ除去用
のコンデンサC1が接続されている。そして、比較器C
MPの出力がマイコン1の汎用ポートPに接続されてい
る。尚、マイコン1の汎用ポートPへの印加電圧の安定
化を図るために、抵抗R6とダイオードD1の並列回路
が、ダイオードD1のカソードが装置内電源回路(装置
内の駆動電圧を出力する安定化電源回路)の出力Vcc
側となるように比較器CMPの出力に接続されている。
An input terminal IN to which an input signal is input is connected to an inverting input terminal of the comparator CMP via an input resistor R4, and is grounded via a resistor R5. The non-inverting input terminal + of the comparator CMP has a power source (battery) + B
A voltage divided by the resistors R1 and R2 is applied, and a feedback resistor R3 is connected between the output of the comparator CMP and the non-inverting input terminal +. A capacitor C1 for removing high-frequency noise is connected between the non-inverting input terminal + and the inverting input terminal-of the comparator CMP. And the comparator C
The output of MP is connected to the general-purpose port P of the microcomputer 1. Note that, in order to stabilize the voltage applied to the general-purpose port P of the microcomputer 1, a parallel circuit of the resistor R6 and the diode D1 is used. Output Vcc of power supply circuit)
Side is connected to the output of the comparator CMP.

【0018】次に入力回路の動作を説明する。入力端子
INの入力信号が比較器CMPの非反転入力端子+の電
圧に達しない場合には、比較器CMPの出力はH信号と
なりマイコン1の汎用ポートPにはH信号が入力され、
また入力端子INの入力信号が比較器CMPの非反転入
力端子+の電圧を超えた場合には、比較器CMPの出力
はL信号となりマイコン1の汎用ポートPにはL信号が
入力される。
Next, the operation of the input circuit will be described. When the input signal of the input terminal IN does not reach the voltage of the non-inverting input terminal + of the comparator CMP, the output of the comparator CMP becomes an H signal, and the H signal is input to the general-purpose port P of the microcomputer 1,
When the input signal at the input terminal IN exceeds the voltage at the non-inverting input terminal + of the comparator CMP, the output of the comparator CMP becomes an L signal, and the L signal is input to the general-purpose port P of the microcomputer 1.

【0019】そして、比較器CMPの出力がL信号の場
合における、比較器CMPの非反転入力端子+の電圧V
Lは、抵抗R1と抵抗R2,R3の並列回路による電源
+Bの電圧VBの分圧電圧となり、次の式のようにな
る。
The voltage V at the non-inverting input terminal + of the comparator CMP when the output of the comparator CMP is an L signal.
L is a divided voltage of the voltage VB of the power supply + B by the parallel circuit of the resistor R1 and the resistors R2 and R3, and is represented by the following equation.

【0020】[0020]

【数1】 (Equation 1)

【0021】また、比較器CMPの出力がH信号の場合
における、比較器CMPの非反転入力端子+の電圧VH
は、抵抗R1と抵抗R2による電源+Bの電圧VBの分
圧電圧に、帰還抵抗R3による比較器CMPの出力電圧
(Vcc)を印加した電圧となり、次の式のようにな
る。
In addition, when the output of the comparator CMP is an H signal, the voltage VH of the non-inverting input terminal + of the comparator CMP
Is a voltage obtained by applying the output voltage (Vcc) of the comparator CMP by the feedback resistor R3 to the divided voltage of the voltage VB of the power supply + B by the resistors R1 and R2, and is expressed by the following equation.

【0022】[0022]

【数2】 (Equation 2)

【0023】つまり、本実施の形態に係る入力回路によ
れば、入力信号が電源電圧VBに応じた基準電圧と比較
され、また基準電圧が比較器の比較結果により変化する
(VL,VH)ので、電源電圧の変動が吸収され、比較
結果にヒステリシスを持つ信号が汎用ポートに入力され
ることとなる。
That is, according to the input circuit of this embodiment, the input signal is compared with the reference voltage corresponding to the power supply voltage VB, and the reference voltage changes according to the comparison result of the comparator (VL, VH). Therefore, the fluctuation of the power supply voltage is absorbed, and a signal having hysteresis in the comparison result is input to the general-purpose port.

【0024】次に本発明の第2の実施の形態について説
明する。図2は本発明の第2の実施の形態に係る入力回
路を示す回路図である。
Next, a second embodiment of the present invention will be described. FIG. 2 is a circuit diagram showing an input circuit according to a second embodiment of the present invention.

【0025】入力信号が入力される入力端子INには、
入力トランジスタを構成するNPNトランジスタTR1
のベースが接続されている。そして、トランジスタTR
1のコレクタは抵抗R11を介して電源+Bに接続さ
れ、エミッタは直列接続された抵抗R12,R13を介
して接地されると共に抵抗R14を介して電源+Bに接
続されている。出力トランジスタを構成するPNPトラ
ンジスタTR2のベースはトランジスタTR1のコレク
タに接続され、エミッタは電源+Bに接続され、そして
コレクタは直列接続された抵抗R15,R16を介して
接地されている。このトランジスタTR2のコレクタが
マイコン1の汎用ポートPに接続されている。またNP
NトランジスタTR3のベースは抵抗R15,R16の
間に接続され、コレクタは抵抗R12,R13の間に接
続され、そしてエミッタは接地されている。尚、マイコ
ン1の汎用ポートPへの印加電圧の安定化を図るため
に、ダイオードD2が、そのカソードが装置内電源回路
(装置内の駆動電圧を出力する安定化電源回路)の出力
Vcc側となるように比較器CMPの出力に接続されて
いる。
An input terminal IN to which an input signal is input includes:
NPN transistor TR1 constituting input transistor
The base is connected. And the transistor TR
The collector of 1 is connected to a power supply + B via a resistor R11, and the emitter is grounded via resistors R12 and R13 connected in series and connected to a power supply + B via a resistor R14. The base of the PNP transistor TR2 constituting the output transistor is connected to the collector of the transistor TR1, the emitter is connected to the power supply + B, and the collector is grounded via resistors R15 and R16 connected in series. The collector of the transistor TR2 is connected to the general-purpose port P of the microcomputer 1. Also NP
The base of the N transistor TR3 is connected between the resistors R15 and R16, the collector is connected between the resistors R12 and R13, and the emitter is grounded. In order to stabilize the voltage applied to the general-purpose port P of the microcomputer 1, the diode D2 has a cathode connected to the output Vcc side of the in-apparatus power supply circuit (stabilized power supply circuit for outputting a drive voltage in the apparatus). Connected to the output of the comparator CMP.

【0026】次に入力回路の動作を説明する。トランジ
スタTR1が遮断状態の時は、トランジスタTR2のベ
ース電圧がH信号であるので、トランジスタTR2も遮
断状態となる。従って、トランジスタTR2のコレクタ
はL信号となり、マイコン1の汎用ポートにはL信号が
入力される。この状態では、トランジスタTR3のベー
ス電圧はL信号で、トランジスタTR3は遮断状態であ
るので、トランジスタTR1のエミッタ電圧VEL、つ
まりトランジスタTR1を接続状態にするのに必要なベ
ースへの印加電圧(厳密にはトランジスタTR1が接続
状態となるのに必要なベース・エミッタ間電圧を更に加
える必要がある)は、抵抗R14,R12,R13の分
圧電圧となり、次の式のようになる。
Next, the operation of the input circuit will be described. When the transistor TR1 is in the cut-off state, the base voltage of the transistor TR2 is the H signal, so that the transistor TR2 is also in the cut-off state. Therefore, the L signal is input to the collector of the transistor TR2, and the L signal is input to the general-purpose port of the microcomputer 1. In this state, since the base voltage of the transistor TR3 is the L signal and the transistor TR3 is in the cut-off state, the emitter voltage VEL of the transistor TR1, that is, the voltage applied to the base necessary to make the transistor TR1 connected (strictly speaking) It is necessary to further apply a base-emitter voltage necessary for the transistor TR1 to be in a connected state), which is a divided voltage of the resistors R14, R12, and R13, and is represented by the following equation.

【0027】[0027]

【数3】 (Equation 3)

【0028】また、トランジスタTR1が接続状態の時
は、トランジスタTR2のベース電圧がL信号であるの
で、トランジスタTR2も接続状態となる。従って、ト
ランジスタTR2のコレクタはH信号となり、マイコン
1の汎用ポートにはH信号が入力される。この状態で
は、トランジスタTR3のベース電圧はH信号で、トラ
ンジスタTR3は接続状態であるので、トランジスタT
R1のエミッタ電圧VEH、つまりトランジスタTR1
を遮断状態にするのに下回らなければならないベースへ
の印加電圧電圧(厳密にはトランジスタTR1が接続状
態となるのに必要なベース・エミッタ間電圧を更に加え
る必要がある)は、抵抗R14,R12の分圧電圧にト
ランジスタTR3の導通電圧VTR3を加えた電圧とな
り、次の式のようになる。
When the transistor TR1 is in the connected state, the base voltage of the transistor TR2 is the L signal, so that the transistor TR2 is also in the connected state. Therefore, the collector of the transistor TR2 becomes an H signal, and the H signal is input to the general-purpose port of the microcomputer 1. In this state, the base voltage of the transistor TR3 is the H signal, and the transistor TR3 is in the connected state.
The emitter voltage VEH of R1, that is, the transistor TR1
The voltage applied to the base, which must be lower to bring the transistor into the cutoff state (strictly, it is necessary to further apply the base-emitter voltage necessary for the transistor TR1 to be in the connected state) is the resistance R14, R12 Is obtained by adding the conduction voltage VTR3 of the transistor TR3 to the divided voltage of the transistor TR3.

【0029】[0029]

【数4】 (Equation 4)

【0030】つまり、本実施の形態に係る入力回路によ
れば、入力トランジスタTR1の接断状態を切り換える
ベース電圧が電源電圧VBに応じて変化し、更に入力ト
ランジスタTR1の状態によりその接断状態を切り換え
るベース電圧が変化する(VEL,VEH)ので、入力
トランジスタTR1の状態によりその接断状態が変化し
て対応する信号を汎用ポートに出力する出力トランジス
タTR2の出力信号は、電源電圧の変動が吸収され、比
較結果にヒステリシスを持つ信号として汎用ポートに出
力されることになる。
That is, according to the input circuit of the present embodiment, the base voltage for switching the connection state of the input transistor TR1 changes according to the power supply voltage VB, and the connection state of the input transistor TR1 is further changed according to the state of the input transistor TR1. Since the switching base voltage changes (VEL, VEH), the disconnection state changes according to the state of the input transistor TR1, and the output signal of the output transistor TR2 that outputs a corresponding signal to the general-purpose port absorbs the fluctuation of the power supply voltage. Then, the comparison result is output to the general-purpose port as a signal having hysteresis.

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

【図1】本発明の第1の実施の形態に係る入力回路を示
す回路図である。
FIG. 1 is a circuit diagram showing an input circuit according to a first embodiment of the present invention.

【図2】本発明の第2の実施の形態に係る入力回路を示
す回路図である。
FIG. 2 is a circuit diagram showing an input circuit according to a second embodiment of the present invention.

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

1・・・マイクロコンピュータ(マイコン) CMP・・・比較器 P・・・汎用ポート TR1,TR2,TR3・・・トランジスタ R1〜R6,R11〜R16・・・抵抗 DESCRIPTION OF SYMBOLS 1 ... Microcomputer CMP ... Comparator P ... General-purpose port TR1, TR2, TR3 ... Transistor R1-R6, R11-R16 ... Resistance

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 マイクロコンピュータにおける高電圧レ
ベル信号と低電圧レベル信号の2値信号を取り込む汎用
ポートに接続される入力回路において、 電源電圧に応じた基準電圧と入力信号を比較し、比較結
果を前記汎用ポートに出力する比較器と、 該比較器の比較結果に応じて前記基準電圧を増減する増
減回路とを備えていることを特徴とする入力回路。
An input circuit connected to a general-purpose port for receiving a binary signal of a high voltage level signal and a low voltage level signal in a microcomputer, compares a reference voltage corresponding to a power supply voltage with an input signal, and compares the comparison result. An input circuit, comprising: a comparator that outputs to the general-purpose port; and an increase / decrease circuit that increases / decreases the reference voltage according to a comparison result of the comparator.
【請求項2】 マイクロコンピュータにおける高電圧レ
ベル信号と低電圧レベル信号の2値信号を取り込む汎用
ポートに接続される入力回路において、 電源電圧の分圧電圧が非反転入力端子に印加され、反転
入力端子に入力信号が印加され、比較結果を前記汎用ポ
ートに出力する比較器と、 該比較器の出力を前記非反転入力端子に帰還する帰還抵
抗とを備えていることを特徴とする入力回路。
2. An input circuit connected to a general-purpose port for receiving a binary signal of a high voltage level signal and a low voltage level signal in a microcomputer, wherein a divided voltage of a power supply voltage is applied to a non-inverting input terminal, and an inverting input is applied. An input circuit, comprising: a comparator to which an input signal is applied to a terminal and outputting a comparison result to the general-purpose port; and a feedback resistor for feeding an output of the comparator back to the non-inverting input terminal.
【請求項3】 マイクロコンピュータにおける高電圧レ
ベル信号と低電圧レベル信号の2値信号を取り込む汎用
ポートに接続される入力回路において、 入力信号に応じて接断する入力トランジスタと、 前記入力トランジスタの接断状態に応じて接断し、接断
状態に基づき電源電圧に応じた電圧の出力信号を前記汎
用ポートに出力する出力トランジスタと、 該入力トランジスタの接断状態に応じて接断し、前記入
力トランジスタの接断状態が変化する電圧が増減するよ
うに前記入力トランジスタの端子に電圧を印加する調整
トランジスタとを備えていることを特徴とする入力回
路。
3. An input circuit connected to a general-purpose port for receiving a binary signal of a high voltage level signal and a low voltage level signal in a microcomputer, comprising: an input transistor that disconnects according to an input signal; An output transistor for disconnecting according to a disconnection state, outputting an output signal of a voltage corresponding to a power supply voltage to the general-purpose port based on the disconnection state, and disconnecting according to a disconnection state of the input transistor; An input circuit, comprising: an adjustment transistor that applies a voltage to a terminal of the input transistor so that a voltage at which a disconnection state of the transistor changes increases or decreases.
【請求項4】 マイクロコンピュータにおける高電圧レ
ベル信号と低電圧レベル信号の2値信号を取り込む汎用
ポートに接続される入力回路において、 ベースに入力信号が印加され、コレクタが電源に接続さ
れた第1NPNトランジスタと、 該第1NPNトランジスタのエミッタと接地間に直列に
接続された第1、第2抵抗と、 前記電源と前記第1NPNトランジスタのエミッタの間
に接続された第3抵抗と、エミッタが電源に接続され、
ベースが前記第1NPNトランジスタのコレクタに接続
され、コレクタが前記汎用ポートに接続されると共に抵
抗を介して接地されたPNPトランジスタと、 コレクタが前記第1、第2抵抗間に接続され、エミッタ
が接地され、ベースに前記PNPトランジスタのコレク
タの電圧に応じた電圧が印加される第2NPNトランジ
スタとを備えていることを特徴とする入力回路。
4. An input circuit connected to a general-purpose port for receiving a binary signal of a high voltage level signal and a low voltage level signal in a microcomputer, wherein an input signal is applied to a base and a collector is connected to a power supply. A transistor; first and second resistors connected in series between the emitter of the first NPN transistor and ground; a third resistor connected between the power supply and the emitter of the first NPN transistor; Connected
A PNP transistor having a base connected to the collector of the first NPN transistor, a collector connected to the general-purpose port and grounded via a resistor, a collector connected between the first and second resistors, and an emitter grounded And a second NPN transistor to a base of which a voltage according to a voltage of a collector of the PNP transistor is applied.
JP10151310A 1998-06-01 1998-06-01 Input circuit Withdrawn JPH11345090A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10151310A JPH11345090A (en) 1998-06-01 1998-06-01 Input circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10151310A JPH11345090A (en) 1998-06-01 1998-06-01 Input circuit

Publications (1)

Publication Number Publication Date
JPH11345090A true JPH11345090A (en) 1999-12-14

Family

ID=15515866

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10151310A Withdrawn JPH11345090A (en) 1998-06-01 1998-06-01 Input circuit

Country Status (1)

Country Link
JP (1) JPH11345090A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014236548A (en) * 2013-05-31 2014-12-15 ミネベア株式会社 Control circuit and drive controller of motor

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014236548A (en) * 2013-05-31 2014-12-15 ミネベア株式会社 Control circuit and drive controller of motor

Similar Documents

Publication Publication Date Title
US7347297B2 (en) Apparatus for activating occupant restraint device
US5205582A (en) Occupant protective system
US5381334A (en) Fault diagnosis apparatus for crew protecting apparatus in vehicle
US6650524B2 (en) Power supply circuit with adaptive error detection and an electronic control circuit including the same
US6373147B1 (en) Control apparatus of occupant protection device
US6246937B1 (en) Control apparatus of occupant protection device
JPH11345090A (en) Input circuit
JP2004243955A (en) Air bag driving device
JPH10138864A (en) Air bag controller
JP3209519B2 (en) Electronic circuit
JP3457515B2 (en) Occupant protection device
JP3484825B2 (en) Driver circuit
JP2904695B2 (en) Squib inspection circuit in vehicle airbag system
KR100391921B1 (en) Pull-high type interrupt generating circuit in vehicle terminal
JP3512058B2 (en) Occupant protection device
CN218243346U (en) Drive protection circuit and vehicle
WO2024009758A1 (en) On-board device
CN112146694B (en) Multipurpose simulated vehicle sensor circuit
JP2989535B2 (en) Ignition circuit diagnostic device for airbag system
JP2004120380A (en) Hysteresis characteristic setting arrangement
US20080109138A1 (en) Diagnosis apparatus for passenger protection system
CN116691885A (en) Wheel movement detection circuit, alarm device and vehicle
JP4118438B2 (en) Control system for occupant protection devices
JP2000085522A (en) Occupant protection device
JP4781320B2 (en) Constant voltage circuit, electronic equipment, electronic control equipment

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20050802