JPH03253901A - External contact input device - Google Patents

External contact input device

Info

Publication number
JPH03253901A
JPH03253901A JP5298790A JP5298790A JPH03253901A JP H03253901 A JPH03253901 A JP H03253901A JP 5298790 A JP5298790 A JP 5298790A JP 5298790 A JP5298790 A JP 5298790A JP H03253901 A JPH03253901 A JP H03253901A
Authority
JP
Japan
Prior art keywords
signal
threshold level
contact
noise
contact signal
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
JP5298790A
Other languages
Japanese (ja)
Inventor
Hiroshi Nara
浩 奈良
Masami Honma
雅美 本間
Norihiko Umei
紀彦 梅井
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.)
Yokogawa Electric Corp
Original Assignee
Yokogawa Electric Corp
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 Yokogawa Electric Corp filed Critical Yokogawa Electric Corp
Priority to JP5298790A priority Critical patent/JPH03253901A/en
Publication of JPH03253901A publication Critical patent/JPH03253901A/en
Pending legal-status Critical Current

Links

Landscapes

  • Feedback Control In General (AREA)
  • Safety Devices In Control Systems (AREA)

Abstract

PURPOSE:To surely output a contact signal without causing an erroneous judgement even if a noise goes in by considering width of a noise predicted in advance, and setting a threshold level to a high side and a low side so that the threshold level can be switched to the side which is not influenced by the noise in accordance with a contact state. CONSTITUTION:The device is provided with a threshold level switching means which inputs an analog voltage signal corresponding to a state of contacts m1, m2, has a comparing means 71 for comparing that which is converted by an analog-to-digital converter 4, and a threshold level, and switches the threshold level in accordance with a result of the comparing means 71, and an output means 9 for deciding a contact signal to be ON or OFF, based on a result of comparison of the comparing means 71, and outputs it. That is, the threshold level switching means switches the threshold level from a low side to a high side, when the contact signal is varied from OFF to ON, and switches the level from the high side to the low side, when the signal is varied from ON to OFF. In such a way, even if a noise gets on the contact signal, ON/OFF can be judged appropriately.

Description

【発明の詳細な説明】 〈産業上の利用分野〉 本発明は温調計のスイッチなどに用いられる外部接点入
力装置に関し、さらに詳しくは、温調計の入力信号に対
する誤判断防止対策に関するものである。
[Detailed Description of the Invention] <Industrial Application Field> The present invention relates to an external contact input device used in a temperature controller switch, etc., and more specifically, to measures to prevent misjudgment regarding temperature controller input signals. be.

〈従来の技術〉 第4図、第5図は従来の外部接点入力装置の回路構成図
である。第4図において、m 1 、m 2は接点入力
端子、Rは一端が接点入力端子m1、他端は電位がVC
Cに保たれた1ルアツブ抵抗、1は接点入力端子からの
接点信号に応じたa点の電圧信号を導入するマイクロプ
ロセッサである。
<Prior Art> FIGS. 4 and 5 are circuit configuration diagrams of a conventional external contact input device. In Fig. 4, m 1 and m 2 are contact input terminals, one end of R is contact input terminal m1, and the other end has a potential of VC.
1 is a Luasub resistor held at C, and 1 is a microprocessor that introduces a voltage signal at point A according to a contact signal from a contact input terminal.

この装置では、接点入力端子m  、m2からの接1 点信号を入力し、この信号に応じたa点のアナログ電圧
信号をマイクロプロセッサ−でスレッシュホールドレベ
ルと比較し、オン、オフを判断する。
In this device, contact signals from contact input terminals m and m2 are input, and a microprocessor compares an analog voltage signal at point a corresponding to this signal with a threshold level to determine whether it is on or off.

第5図においては、R2、R3は抵抗、Trlはデジタ
ルIC2の保護用のトランジスタfPNP型)である、
この装置において、接点入力端子m1、m2をオフの状
態では、b点の電位はVccに保たれるので、トランジ
スタTr1はオフとなる。
In FIG. 5, R2 and R3 are resistors, and Trl is a transistor fPNP type for protecting the digital IC2.
In this device, when the contact input terminals m1 and m2 are off, the potential at point b is maintained at Vcc, so the transistor Tr1 is off.

このとき、抵抗R3には電流は流れないので、0点はロ
ーレベルとなる。接点入力端子m 1 、m 2をオン
の状態にすると、トランジスタTr1のエミッターコレ
クタ間に電流が流れ、トランジスタTr1はオンとなる
。従って、0点はハイレベルとなる。このオン/オフ信
号が、デジタルIC2に入力され、マイクロプロセッサ
−に割り込み信号を送るとともにオン/オフ信号を送る
At this time, since no current flows through the resistor R3, the 0 point becomes a low level. When the contact input terminals m 1 and m 2 are turned on, a current flows between the emitter and collector of the transistor Tr1, and the transistor Tr1 is turned on. Therefore, 0 point is a high level. This on/off signal is input to the digital IC 2, which sends an interrupt signal and an on/off signal to the microprocessor.

〈発明が解決しようとする課題〉 第4図の外部接点入力装置においては、接点抵抗が0で
ない場合や、接点入力端子にノイズがのる場合に、その
信号によりスレッシュホールドレベル付近でオン/オフ
を誤判断してしまう問題がある。第6図にその例を示す
<Problems to be Solved by the Invention> In the external contact input device shown in Fig. 4, when the contact resistance is not 0 or when noise is present at the contact input terminal, the signal turns on/off near the threshold level. There is a problem of misjudgment. An example is shown in FIG.

第6図(a)は第4図の外部接点入力装置のスイッチの
オン/オフによるa点の電位変化を示す波形図、第6図
(b)はこの入力信号に対し、マイクロプロセッサが認
識した接点信号を示す波形図である。第6図(a)にお
いて、Cb8は予め設定されたスレッシュホールドレベ
ルで、通常は電圧信号の中間点に設定されていて、この
場合Cba= V c c / 2である。Tはサンプ
リング周期で、温調計の場合通常500m5程度である
0図において、e点ではスレッシュホールドレベルCb
aより入力電圧信号のほうが大きいので、マイクロプロ
セッサは接点状態オフと判断する。しかし、e−で間で
図のようにノイズが入り、そのノイズ幅がスレッシュホ
ールドレベルCbaを越えてしまうと、接点を閉じてい
ないのにf点でオンと判断してしまう、この後、g点で
再びオフと判断するが、h−i間で再び図のようなノイ
ズが入ると1点でまたオフであると誤判断してしまう、
このように接点状態が安定した状態の時にノイズが入り
、そのノイズがスレッシュホールドレベルを越えてしま
うと、誤判断をしてしまう問題がある。
Figure 6 (a) is a waveform diagram showing the potential change at point a due to the on/off switch of the external contact input device in Figure 4, and Figure 6 (b) is a waveform diagram showing the change in potential at point a due to the on/off switch of the external contact input device in Figure 4. FIG. 3 is a waveform diagram showing a contact signal. In FIG. 6(a), Cb8 is a preset threshold level, usually set at the midpoint of the voltage signal, in this case Cba=Vcc/2. T is the sampling period, which is usually about 500 m5 for a temperature controller. In Figure 0, at point e, the threshold level Cb
Since the input voltage signal is greater than a, the microprocessor determines that the contact state is off. However, if noise occurs between e- and the width of the noise exceeds the threshold level Cba, it will be determined that the contact is on at point f even though it is not closed. It is judged that the signal is off again at a point, but if noise like the one shown in the figure appears again between h and i, it is incorrectly judged that the signal is off again at a point.
If noise enters when the contact state is stable in this way and exceeds the threshold level, there is a problem of erroneous judgment.

また、第5図の外部接点入力装置においては、接点抵抗
がOである場合でも、トランジスタのエミッターコレク
タ間の電圧が残り、デジタルICのスレッシュホールド
レベルによっては、オン/オフの誤判断をする可能性が
ある。
In addition, in the external contact input device shown in Figure 5, even if the contact resistance is O, voltage remains between the emitter and collector of the transistor, and depending on the threshold level of the digital IC, erroneous on/off judgments may occur. There is sex.

本発明はこのような問題を解決するために為されたもの
で、接点抵抗が存在する場合でも、接点信号にノイズが
のる場合でも、適切にオン/オフが判断できるような外
部接点入力装置を提供することを目的とする。
The present invention was made to solve such problems, and is an external contact input device that can appropriately determine on/off even when contact resistance exists or when noise is added to the contact signal. The purpose is to provide

く課題を解決するための手段〉 本発明は、 外部からの接点信号を入力してスレッシュホールドレベ
ルと比較し、比較結果に応じて接点信号をオンまたはオ
フと判断し、出力する外部接点入力装置において、 接点の状態に応じたアナログ電圧信号を取り入れ、デジ
タル信号に変換するアナログ・デジタル変換器と、 このアナログ・デジタル変換器により変換されたものと
、前記スレッシュホールドレベルを比較する比較手段と
、 この比較手段の結果に応じて前記スレッシュホールドレ
ベルをノイズのレベルに応じた分だけハイ側、またはロ
ー側に切り替えるスレッシュホールドレベル切り替え手
段と、 前記比較手段の比較結果に基づいて、接点信号をオンま
たはオフと判断し、出力する出力手段とを具備し、 前記スレッシュホールドレベル切り替え手段は、接点信
号がオフからオンに変化したときにスレッシュホールド
レベルをロー側からハイ側に切り替え1.オンからオフ
に変化したときにハイ側からロー側に切り替えることを
特徴とする外部接点入力装置である。
Means for Solving the Problems> The present invention provides an external contact input device that inputs a contact signal from the outside, compares it with a threshold level, determines whether the contact signal is on or off according to the comparison result, and outputs the result. an analog-to-digital converter that takes in an analog voltage signal according to the state of the contact and converts it into a digital signal; and a comparison means for comparing the converted signal by the analog-to-digital converter with the threshold level; a threshold level switching means for switching the threshold level to a high side or a low side by an amount corresponding to the noise level according to the result of the comparison means; and a threshold level switching means for turning on the contact signal based on the comparison result of the comparison means or output means for determining that the contact signal is off and outputting the output; the threshold level switching means switches the threshold level from the low side to the high side when the contact signal changes from off to on; 1. This external contact input device is characterized by switching from a high side to a low side when changing from on to off.

〈作用〉 このような本発明においては、次のように作用する。<Effect> The present invention operates as follows.

比較手段で現在の接点状態がオンかオフかを検出し、オ
ンである場合とオフである場合で異なった作用をする。
The comparison means detects whether the current contact state is on or off, and operates differently depending on whether it is on or off.

オンである場合は、サンプリング周期のタイミングで接
点状態に応じたアナログ電圧を入力し、A/D変換した
後比較手段によりハイ側のスレッシュホールドレベルと
比較し、入力信号がそのスレッシュホールドレベルより
大きいときは、オフ信号と認識するとともにスレッシュ
ホールドレベル切り替え手段でスレッシュホールドレベ
ルをロー側に切り替え、出力手段によりオフ信号を出力
する。
If it is on, input an analog voltage according to the contact state at the timing of the sampling cycle, perform A/D conversion, and then compare it with the high-side threshold level by the comparison means, and check that the input signal is greater than the threshold level. At this time, it is recognized as an off signal, the threshold level switching means switches the threshold level to the low side, and the output means outputs an off signal.

オフである場合は、アナログ電圧を入力し、A/D変換
した後比較手段によりロー側のスレッシュホールドレベ
ルと比較し、入力信号がそのスレッシュホールドレベル
より小さいときは、オン信号と認識するとともにスレッ
シュホールドレベル切り替え手段でスレッシュホールド
レベルをハイ側に切り替え、出力手段によりオン信号を
出力する。
If it is off, input an analog voltage, perform A/D conversion, and then compare it with the low-side threshold level using a comparing means. If the input signal is smaller than the threshold level, it is recognized as an on signal and the threshold is The hold level switching means switches the threshold level to a high side, and the output means outputs an on signal.

〈実施例〉 以下図面を用いて、本発明の詳細な説明する。<Example> The present invention will be described in detail below using the drawings.

第1図は本発明に係る外部接点入力装置の一実施例のm
能ブロック図である。尚、第4図と同じ構成要素には同
一符号を付し、説明を省略する。
FIG. 1 shows an example of an external contact input device according to the present invention.
FIG. Note that the same components as in FIG. 4 are given the same reference numerals, and their explanations will be omitted.

3はマイクロプロセッサ、4は接点入力端子m1、m2
からの接点入力信号に応じたアナログ電圧信号をデジタ
ル値に変換するA/D変換器で、例えば分解能が8ビツ
トで、V c c = 5 Vとすると、アナログ電圧
信号が0■の時0カウント、5Vの時255カウントに
変換する。5はこのデジタル値に変換された入力信号を
取り込む入力ボート、6はメモリで、ハイ側のスレッシ
ュホールドレベルChigh、ロー側のスレッシュホー
ルドレベルC1o8、現在の接点状態V  、現在のス
レッシュut ホールドレベルの値CXなどのデータが格納されている
。ここで、スレッシュホールドレベルChigh、Cl
owは入力信号のノイズ幅を考慮して設定されている。
3 is a microprocessor, 4 is contact input terminal m1, m2
An A/D converter that converts an analog voltage signal according to a contact input signal from a converter into a digital value. For example, if the resolution is 8 bits and Vcc = 5 V, the count is 0 when the analog voltage signal is 0. , converts to 255 counts at 5V. 5 is an input port that takes in the input signal converted into a digital value, and 6 is a memory, which has a high-side threshold level Chigh, a low-side threshold level C1o8, the current contact state V, and the current threshold ut hold level. Data such as value CX is stored. Here, the threshold level High, Cl
ow is set in consideration of the noise width of the input signal.

7は入力ボート5から入力信号を取り入れるCPUで、
比較手段71とデータ書き替え手段72と出力変化検出
手段73を具備している。比較手段71は、A/D変換
された入力信号とスレッシュホールドレベルを比較する
比較手段で、今までの状態から変化したときに変化信号
を出力する。また、比較手段71は現在の接点状態がオ
ンであるかオフであるか検出する。データ書き替え手段
72はメモリ6にアクセスし、必要とするスレッシュホ
ールドレベルの値、現在の接点信号の状態を読み込み、
また、比較手段73の出力結果に応じて現在のスレッシ
ュホールドレベルCの値、現在の接点状態V。、tを随
時書き替えていく、出力変化検出手段73は、比較手段
71の出力結果より変化信号が検出された時に、データ
書き替え手段72に書き替え信号を送る。8はサンプリ
ング周期のタイミングを与えるクロック発生器、9は比
較手段71により認識された接点信号をCPU7から受
けてそれを出力する出力手段である。
7 is a CPU that receives input signals from input board 5;
Comparing means 71, data rewriting means 72, and output change detecting means 73 are provided. Comparison means 71 is a comparison means that compares the A/D converted input signal with a threshold level, and outputs a change signal when the current state changes. Further, the comparison means 71 detects whether the current contact state is on or off. The data rewriting means 72 accesses the memory 6, reads the required threshold level value and the current state of the contact signal,
Further, the current value of the threshold level C and the current contact state V are determined according to the output result of the comparing means 73. , t as needed, sends a rewriting signal to the data rewriting means 72 when a change signal is detected from the output result of the comparing means 71. Reference numeral 8 denotes a clock generator that provides the timing of the sampling period, and reference numeral 9 denotes an output means that receives the contact signal recognized by the comparison means 71 from the CPU 7 and outputs it.

次に、第1図、第2図、第3図を用いて本発明の詳細な
説明する。第2図は本発明に係る外部接点入力装置の動
作のフローチャート、第3図(a>(c)は入力接点信
号に応じた入力アナログ信号の波形図で、k〜七点はサ
ンプリング点で縦軸はデジタル変換した値を示しである
。第3図(b)(d)はマイクロプロセッサで判断され
た接点信号の波形図である。まず、接点入力端子m1、
m2のスイッチを開いた状態から閉じる場合を考える。
Next, the present invention will be explained in detail using FIGS. 1, 2, and 3. Fig. 2 is a flowchart of the operation of the external contact input device according to the present invention, Fig. 3 (a>(c) is a waveform diagram of the input analog signal according to the input contact signal, and points k to 7 are sampling points vertically The axes indicate the digitally converted values. Figures 3(b) and 3(d) are waveform diagrams of the contact signals determined by the microprocessor. First, the contact input terminals m1,
Consider the case where the m2 switch is closed from an open state.

スイッチを開いた状態では、第1図のd点は5vに保た
れているから、k点以前では接点状態はローレベルで、
メモリ6のV。utにはオフ信号が格納しである。
When the switch is open, point d in Figure 1 is maintained at 5V, so before point k, the contact state is low level,
Memory 6 V. An off signal is stored in ut.

第3図のkでサンプリングするときは、まず、メモリ6
に格納されたV。utをデータ書き替え手段72で読み
だし、比較手段71でそれがオン信号であるかどうか比
較する。d点においてはオフ状態であるので、メモリ6
のスレッシュホールドレベルCは、ロー側のスレッシュ
ホールドレベ× ルClawの値が入っている。に点での入力信号をA/
D変換4で変換し、入力ボート5を介して読み込む、こ
こで、データ書き替え手段72でメモリ6の現在のスレ
ッシュホールドレベルCxを読み出し、比較手段71で
C8と読み込み値を比較する。読み込み値がCより大き
いときは、デー× 夕書き替え手段72によりメモリ6のV。、tにオフ信
号を書き込むとともに、出力手段9によりオフ信号を出
力する。読み込み値が08より小さいときは、比較手段
71から出力変化検出手段73に出力変化信号を送り、
出力変化検出手段73はこの信号を受けてデータ書き替
え手段に書き替え信号を送り、データ書き替え手段72
でメモリ6の接点信号V。、1をオン信号に書き替える
とともにスレッシュホールドレベルCをハイ側のスレッ
シュホールドレベルChighに書き替える。ところで
、この場合、k点では入力信号はClowより大きいの
で、CPU9は接点信号をオフと認識する。(以後、マ
イクロプロセッサ3内の信号の授受、メモリ6へのアク
セスの動作説明は省く)以後、1点、n点においては、
相変わらず読み込み値がスレッシュホールドレベルC1
owより大きいので、出力手段9はオフ信号を出力する
0m点で大きなノイズが入っているが、この値もC8□
より大きいのでオフ信号を出力している。第3図の縦軸
のCoは、従来のスレッシュホールドレベルで、従来な
らば出力が反転してしまっている。
When sampling at k in Fig. 3, first, the memory 6
V stored in The data rewriting means 72 reads ut, and the comparing means 71 compares whether it is an on signal. Since it is in the off state at point d, memory 6
The threshold level C contains the value of the low side threshold level × Claw. The input signal at the point A/
The data is converted by the D conversion 4 and read through the input port 5. Here, the data rewriting means 72 reads the current threshold level Cx of the memory 6, and the comparing means 71 compares C8 with the read value. When the read value is larger than C, data is written to V in the memory 6 by the data rewriting means 72. , t, and the output means 9 outputs the off signal. When the read value is smaller than 08, an output change signal is sent from the comparing means 71 to the output change detecting means 73,
The output change detection means 73 receives this signal and sends a rewriting signal to the data rewriting means 72.
and the contact signal V of memory 6. , 1 is rewritten to an on signal, and the threshold level C is rewritten to a high-side threshold level Chigh. By the way, in this case, since the input signal is larger than Clow at point k, the CPU 9 recognizes the contact signal as OFF. (Hereinafter, explanations of the operation of sending and receiving signals within the microprocessor 3 and accessing the memory 6 will be omitted.) Hereafter, at points 1 and n,
The read value is still at the threshold level C1
Since it is larger than ow, the output means 9 contains a large noise at the 0m point where it outputs the off signal, but this value is also C8□
Since it is larger, an off signal is output. Co on the vertical axis in FIG. 3 is the conventional threshold level, and in the conventional case, the output would be inverted.

(第2図ステップA〜F) 次に、0点で初めて読み込み値がC8Wより小さくなる
ので、スレッシュホールドレベルをハイ側のChlgh
に切り替え、出力手段9でオン信号を出力する。(ステ
ップA〜D、G−H)ここで、スレッシュホールドレベ
ルは、信号が安定した状態において、大きなノイズが入
っても越えられないほどの値が予め設定されている。
(Steps A to F in Figure 2) Next, since the read value becomes smaller than C8W for the first time at point 0, set the threshold level to the high side Chlgh.
, and the output means 9 outputs an on signal. (Steps A to D, GH) Here, the threshold level is set in advance to a value that cannot be exceeded even when a large amount of noise enters when the signal is stable.

今度は、読み込み値がスレッシュホールドレベルChi
ghより大きいかどうか比較手段71で比較し、小さけ
ればオン信号を出力し、大きければオフ信号を出力する
。ここで、9点においては、読み込み値がChighよ
り小さいので、出力手段9はオン信号を出力する。以後
、同様にq点、r点、5点においても、読み込み値はス
レッシュホールドレベルChighより小さいので、オ
ン信号を出力する。(ステップA、工〜M) を点では、読み込み値がスレッシュホールドレベルCh
ighを越えるので、マイクロプロセッサ3は再び接点
信号をオフ信号と認識してオフ信号を出力するとともに
、スレッシュホールドレベルをロー側のClowに切り
替える。(ステップA、 I〜に、N〜O〉 以後、読み込み値がハイ側で安定しているとき、つまり
接点状態がオフのときは、ロー側のスレッシュホールド
レベルCと比較し、Clowを越ow えない間はオフ信号を出力し、Clowを越えたときに
(Cより小さくなったときに)、オン信ow 号を出力するとともにスレッシュホールドレベルをハイ
側のChighに切り替える。一方、読み込み値がロー
側で安定しているとき、つまり接点状態がオンのときは
、ハイ側のスレッシュホールドレベルCと比較し、Ch
ighを越えない間はオンigh 信号を出力し、Chighを越えたときに(Chigh
より大きくなったときに)、オフ信号を出力するととも
にスレッシュホールドレベルを再びロー側のClowに
切り替える。
This time, the read value is at the threshold level Chi
Comparison means 71 compares whether it is larger than gh, and if smaller, outputs an on signal, and if larger, outputs an off signal. Here, at the 9th point, the read value is smaller than High, so the output means 9 outputs an on signal. Thereafter, since the read values at points q, r, and 5 are also smaller than the threshold level High, ON signals are output. (Steps A, T~M) At the point, the read value is at the threshold level Ch
Since the contact signal exceeds ``high'', the microprocessor 3 again recognizes the contact signal as an OFF signal, outputs the OFF signal, and switches the threshold level to CLOW on the low side. (Steps A, I~, N~O> After that, when the read value is stable on the high side, that is, when the contact state is off, it is compared with the low side threshold level C, and the low When the read value exceeds Clow (when it becomes smaller than C), it outputs an on signal and switches the threshold level to High.On the other hand, when the read value When it is stable on the low side, that is, when the contact state is on, compare it with the high side threshold level C, and
Outputs an on-high signal while it does not exceed high, and outputs an on-high signal when it exceeds high.
(when the threshold level becomes higher), an off signal is output and the threshold level is again switched to the low side Clow.

〈発明の効果〉 以上詳細に説明したように、このような本発明において
は、外部接点入力装置において、予め予想されるノイズ
幅を考慮し、スレッシュホールドレベルをハイ側とロー
側に設定し、接点状態に応じてノイズの影響を受けない
側へスレッシュホールドレベルを切り替えられるように
したために、接点信号が安定した状態でノイズが入って
も誤判断をすることがなく、確実に接点信号を出力する
ことができる。
<Effects of the Invention> As described above in detail, in the present invention, in the external contact input device, the threshold level is set to the high side and the low side, taking into consideration the expected noise width, Since the threshold level can be switched to the side that is not affected by noise depending on the contact status, there will be no misjudgment even if there is noise while the contact signal is stable, and the contact signal will be output reliably. can do.

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

第1図は本発明に係る外部接点入力装置の一実施例の機
能ブロック図、第2図は本発明の動作フローチャート、
第3図は接点状態に応じた入力アナログ信号の波形図と
、マイクロプロセッサで判断した接点信号の波形図、第
4図、第5図は従来の外部接点入力装置の一例を示す図
、第6図は第4図の装置のアナログ信号波形図と、マイ
クロプロセッサで判断した接点信号の波形図である。 3・・・マイクロプロセッサ 4・・・A/D変換器 5・・・入力ポート ロ・・・メモリ 7・・・CPU 71・・・比較手段 72・・・データ書き替え手段 73・・・出力変化検出手段 8・・・クロック発生器 9・・・出力手段 m  、m2・・・接点入力端子 R1・・・プルアップ抵抗
FIG. 1 is a functional block diagram of an embodiment of an external contact input device according to the present invention, and FIG. 2 is an operation flowchart of the present invention.
Figure 3 is a waveform diagram of an input analog signal according to the contact state and a waveform diagram of a contact signal determined by a microprocessor; Figures 4 and 5 are diagrams showing an example of a conventional external contact input device; The figure shows an analog signal waveform diagram of the device shown in FIG. 4 and a waveform diagram of a contact signal determined by a microprocessor. 3... Microprocessor 4... A/D converter 5... Input port controller... Memory 7... CPU 71... Comparison means 72... Data rewriting means 73... Output change Detection means 8...Clock generator 9...Output means m, m2...Contact input terminal R1...Pull-up resistor

Claims (1)

【特許請求の範囲】 外部からの接点信号を入力してスレッシュホールドレベ
ルと比較し、比較結果に応じて接点信号をオンまたはオ
フと判断し、出力する外部接点入力装置において、 接点の状態に応じたアナログ電圧信号を取り入れ、デジ
タル信号に変換するアナログ・デジタル変換器と、 このアナログ・デジタル変換器により変換されたものと
、前記スレッシュホールドレベルを比較する比較手段と
、 この比較手段の結果に応じて前記スレッシュホールドレ
ベルをノイズのレベルに応じた分だけハイ側、またはロ
ー側に切り替えるスレッシュホールドレベル切り替え手
段と、 前記比較手段の比較結果に基づいて、接点信号をオンま
たはオフと判断し、出力する出力手段とを具備し、 前記スレッシュホールドレベル切り替え手段は、接点信
号がオフからオンに変化したときにスレッシュホールド
レベルをロー側からハイ側に切り替え、オンからオフに
変化したときにハイ側からロー側に切り替えることを特
徴とする外部接点入力装置。
[Claims] An external contact input device that inputs a contact signal from the outside, compares it with a threshold level, determines whether the contact signal is on or off according to the comparison result, and outputs the contact signal according to the state of the contact. an analog-to-digital converter that takes in an analog voltage signal and converts it into a digital signal; a comparing means for comparing the converted signal by the analog-to-digital converter with the threshold level; threshold level switching means for switching the threshold level to a high side or a low side by an amount corresponding to the noise level, and determining that the contact signal is on or off based on the comparison result of the comparing means, and outputting the resultant signal. and output means for switching the threshold level from the low side to the high side when the contact signal changes from off to on, and from the high side to the high side when the contact signal changes from on to off. An external contact input device characterized by switching to the low side.
JP5298790A 1990-03-05 1990-03-05 External contact input device Pending JPH03253901A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5298790A JPH03253901A (en) 1990-03-05 1990-03-05 External contact input device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5298790A JPH03253901A (en) 1990-03-05 1990-03-05 External contact input device

Publications (1)

Publication Number Publication Date
JPH03253901A true JPH03253901A (en) 1991-11-13

Family

ID=12930272

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5298790A Pending JPH03253901A (en) 1990-03-05 1990-03-05 External contact input device

Country Status (1)

Country Link
JP (1) JPH03253901A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8416012B2 (en) 2010-01-22 2013-04-09 Ricoh Company, Ltd. Reference voltage generating circuit and analog circuit using the same

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8416012B2 (en) 2010-01-22 2013-04-09 Ricoh Company, Ltd. Reference voltage generating circuit and analog circuit using the same

Similar Documents

Publication Publication Date Title
US5412644A (en) Serial bus system with a single-wire line
US5436853A (en) Remote control signal processing circuit for a microcomputer
JP3328572B2 (en) Switch status detector
JPH03253901A (en) External contact input device
CN109709373B (en) Signal self-adaptive acquisition circuit and acquisition method
JPH0771003B2 (en) Refrigerator controller
US5327016A (en) Load control circuit including automatic AC/DC discernment
JP3207392B2 (en) Data storage control circuit
JP4047466B2 (en) Capacitance sensor circuit
JPH03505805A (en) Switch status detection device on transmission line
JPH02223215A (en) Decision method of input of self power source counter
JPS5953730B2 (en) contact reading circuit
JP2002043902A (en) Chattering elimination circuit
JPS6115418A (en) Electric circuit device
JP2604210Y2 (en) Security system
JP2878606B2 (en) D / A conversion circuit
KR950002410Y1 (en) Over current protecting circuit
JPS6215958Y2 (en)
KR100336130B1 (en) An apparatus of noise removal for microcomputer
JP2583446B2 (en) Clock signal stop detection circuit
JPH0537256Y2 (en)
JPH0449536Y2 (en)
JP4381029B2 (en) Storage device and storage control system
JPS6228838A (en) Interruption control circuit
JPH0470675B2 (en)