[go: up one dir, main page]

JP2979605B2 - Error detection method of key switch input part in computer - Google Patents

Error detection method of key switch input part in computer

Info

Publication number
JP2979605B2
JP2979605B2 JP2235077A JP23507790A JP2979605B2 JP 2979605 B2 JP2979605 B2 JP 2979605B2 JP 2235077 A JP2235077 A JP 2235077A JP 23507790 A JP23507790 A JP 23507790A JP 2979605 B2 JP2979605 B2 JP 2979605B2
Authority
JP
Japan
Prior art keywords
key switch
port
input
pull
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.)
Expired - Fee Related
Application number
JP2235077A
Other languages
Japanese (ja)
Other versions
JPH04114221A (en
Inventor
哲郎 内田
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.)
Mitsumi Electric Co Ltd
Original Assignee
Mitsumi 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 Mitsumi Electric Co Ltd filed Critical Mitsumi Electric Co Ltd
Priority to JP2235077A priority Critical patent/JP2979605B2/en
Publication of JPH04114221A publication Critical patent/JPH04114221A/en
Application granted granted Critical
Publication of JP2979605B2 publication Critical patent/JP2979605B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Input From Keyboards Or The Like (AREA)
  • Microcomputers (AREA)

Description

【発明の詳細な説明】 [産業上の利用分野] この発明は、コンピユータに於けるキースイツチ入力
部の異常検出方法に関するものであり、特に、キースイ
ツチ入力部の短絡及びプルアツプ抵抗の故障を検出でき
るようにしたコンピユータに於けるキースイツチ入力部
の異常検出方法に関するものである。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for detecting an abnormality in a key switch input section in a computer, and more particularly to a method for detecting a short circuit in a key switch input section and a failure in a pull-up resistor. The present invention relates to a method for detecting an abnormality in a key switch input section in a computer.

[従来の技術] 従来、ワンチツプマイクロコンピユータ等を使用した
情報処理装置に於ては、キースイツチによる入力の異常
を別紙添付図面の第4図に示すフローチヤートに従って
行なっており、第5図の回路ブロツク図を参照して説明
する。先ず、異常検出プログラムの開始(ステツプ10
1)後にワンチツプマイクロコンピユータ(1)がI/Oポ
ート(2)の値を読み込む(ステツプ102)。ここで、
キースイツチ(3)に異常がなくオフの状態であれば、
プルアツプ抵抗(4)を介して電源(5)の電圧がI/O
ポート(2)に印加され、ポート値はHiになる。又、キ
ースイツチ(3)が異常をきたし、電源(5)とグラウ
ンド(6)とが導通するとポート値はLowになる。依っ
て、ステツプ103に於て前記ポート値を判断し、Hiの場
合はステツプ104からメインの処理プログラムに移行す
る。一方、ステツプ103にてポート値がLowのときはステ
ツプ105に進み、コンピユータの動作停止やデイスプレ
イ表示或は警報装置の駆動によつて装置の誤動作を防止
するエラー処理を行う。
2. Description of the Related Art Conventionally, in an information processing apparatus using a one-chip microcomputer or the like, an abnormality of an input by a key switch is performed according to a flowchart shown in FIG. This will be described with reference to a block diagram. First, start the abnormality detection program (step 10
1) Later, the one-chip microcomputer (1) reads the value of the I / O port (2) (step 102). here,
If the key switch (3) is off without any abnormality,
The voltage of the power supply (5) is I / O via the pull-up resistor (4)
It is applied to port (2), and the port value becomes Hi. When the key switch (3) becomes abnormal and the power supply (5) and the ground (6) conduct, the port value becomes low. Accordingly, the port value is determined in step 103, and in the case of Hi, the process proceeds from step 104 to the main processing program. On the other hand, if the port value is low in step 103, the process proceeds to step 105, in which error processing for preventing the malfunction of the device by stopping the operation of the computer, displaying the display, or driving the alarm device is performed.

尚、第5図中(7)はI/Oポート(2)の入力容量並
びに配線パターン容量によるC成分である。
Incidentally, (7) in FIG. 5 is a C component due to the input capacitance of the I / O port (2) and the wiring pattern capacitance.

[発明が解決しようとする課題] 前述した従来の異常検出方法は、キースイツチの短絡
を検出するが、プルアツプ抵抗の異常は検出できない。
前記プルアツプ抵抗に断線等の異常をきたした場合は、
キースイツチ入力信号のレベルや立上がりが不安定にな
り、コンピユータが誤動作することが多い。
[Problem to be Solved by the Invention] The above-described conventional abnormality detection method detects a short circuit of a key switch, but cannot detect an abnormality of a pull-up resistor.
If the pull-up resistor has an abnormality such as disconnection,
The level and rise of the key switch input signal become unstable, and the computer often malfunctions.

そこで、キースイツチの異常と共にプルアツプ抵抗の
故障を検出してコンピユータの不安定動作や誤動作の虞
れの発生を即時に検知できるようにするために解決すべ
き技術的課題が生じてくるのであり、本発明は該課題を
解決することを目的とする。
Therefore, there is a technical problem to be solved in order to detect the failure of the pull-up resistor together with the abnormality of the key switch and to immediately detect the occurrence of the unstable operation or the possibility of malfunction of the computer. The invention aims to solve the problem.

[課題を解決するための手段] この発明は、上記目的を達成するために提案せられた
ものであり、I/Oポートにキースイツチ等の入力部を接
続し、該入力部にプルアツプ抵抗を介して電源電圧を印
加したコンピユータに於て、前記入力部の入力操作によ
りI/Oポートに入力される信号のLowからHiへの立上がり
時間と、前記プルアツプ抵抗が断線した場合の立上がり
時間との範囲内に電圧読み込みの待機時間を設定すると
共、前記I/OポートからLow信号を出力した後に入力状態
とし、前記待機時間経過後に入力レベルを読み込み、該
レベルがLowのときは前記プルアツプ抵抗或はキースイ
ツチの異常と判定するコンピユータに於けるキースイツ
チ入力部の異常検出方法を提供せんとするものである。
[Means for Solving the Problems] The present invention has been proposed to achieve the above object, and has an input unit such as a key switch connected to an I / O port, and the input unit is connected via a pull-up resistor. In the computer to which the power supply voltage is applied, the range between the rise time of the signal input to the I / O port from Low to Hi by the input operation of the input unit and the rise time when the pull-up resistor is disconnected. In addition to setting the standby time for voltage reading, the input state is output after outputting a low signal from the I / O port, and the input level is read after the standby time has elapsed, and when the level is low, the pull-up resistor or It is an object of the present invention to provide a method for detecting an abnormality of a key switch input section in a computer which determines that a key switch is abnormal.

[作用] コンピユータはキースイツチ等の入力部が接続された
I/Oポートを出力状態にセツトし、Low出力とする。これ
により前記入力部の電位はLowになる。続いて前記I/Oポ
ートは入力状態にセットされ、入力部に印加される電位
は、プルアツプ抵抗値並びに配線パターン容量及びI/O
ポートの入力容量による時定数に伴なって上昇し、スレ
ツシヨルド電圧を越えてHiになる。
[Operation] The computer is connected to an input unit such as a key switch.
Set the I / O port to the output state and set it to Low output. As a result, the potential of the input section becomes low. Subsequently, the I / O port is set to the input state, and the potential applied to the input unit is determined by the pull-up resistance value, the wiring pattern capacitance and the I / O.
It rises with the time constant due to the input capacitance of the port, and exceeds the threshold voltage and becomes Hi.

前記コンピユータは、前記LowからHiへの立上がり時
間と、プルアツプ抵抗が断線した場合に遅延される仕上
がり時間との間に待機時間を設定し、該待機時間経過後
に入力電圧を読み込む。従って、この入力電圧は、前記
プルアツプ抵抗並びにキースイツチ等の入力部が正常で
あればHiであり、短絡等の異常をきたした場合はLowに
なり、入力部並びにプルアツプ抵抗の故障の有無が判定
される。
The computer sets a standby time between the rise time from Low to Hi and the finishing time delayed when the pull-up resistor is disconnected, and reads the input voltage after the elapse of the standby time. Accordingly, this input voltage is Hi when the input section such as the pull-up resistor and the key switch is normal, and becomes Low when an abnormality such as a short circuit occurs, and it is determined whether the input section and the pull-up resistor have a failure. You.

[実施例] 以下、この発明の一実施例を別紙添付図面の第1図乃
至第3図に従って詳述する。第1図はキースイツチ入力
部の異常検出方法のフローチヤートであり、第2図のタ
イミングチヤートと、従来例で説明した第5図の回路図
を参照して説明する。先ず、開始(ステツプ201)に伴
なって第5図に示すI/Oポート(2)を「出力」にセツ
トする(ステツプ202)。続いてI/Oポ−ト(2)にLow
を出力し(ステツプ203)、その後にI/Oポート(2)を
「入力」にセツトする(ステツプ204)。これにより、
電源(5)からプルアツプ抵抗(4)を通じて電流が流
れ、I/Oポート(2)の電圧が上昇する。このとき、第
5図に示すように、I/Oポート(2)の入力容量並びに
配線パターン容量によるC成分(7)が存在するので、
前記電圧はプルアツプ抵抗(4)とC成分(7)とによ
る充電カーブに従って上昇する。そして、前記電圧がI/
Oポート(2)の入力状態に於けるスレツシヨルド電圧
を越えHiレベルになるのに要する時間は、例えばプルア
ツプ抵抗値(R1)=10KΩ、C成分(C1)=12.5pF、ス
レツシヨルド電圧(Vc)=2V、電源電圧(Vcc)=3.3V
とすると、 又、プルアツプ抵抗(4)が断線した場合に、I/Oポー
ト(2)の電圧がHiレベルに達するまでの時間は、前記
I/Oポート(2)の入力漏れ電流を1μAとすると TOPEN=C・Vc/i=25μsecになる。
Hereinafter, an embodiment of the present invention will be described in detail with reference to FIGS. 1 to 3 in the accompanying drawings. FIG. 1 is a flow chart of a method for detecting an abnormality of a key switch input unit, which will be described with reference to a timing chart of FIG. 2 and a circuit diagram of FIG. First, at the start (step 201), the I / O port (2) shown in FIG. 5 is set to "output" (step 202). Then I / O port (2) goes low.
Is output (step 203), and then the I / O port (2) is set to "input" (step 204). This allows
A current flows from the power supply (5) through the pull-up resistor (4), and the voltage of the I / O port (2) rises. At this time, as shown in FIG. 5, there is a C component (7) due to the input capacitance of the I / O port (2) and the capacitance of the wiring pattern.
The voltage rises according to a charging curve formed by the pull-up resistor (4) and the C component (7). And the voltage is I /
The time required to exceed the threshold voltage in the input state of the O port (2) and reach the Hi level is, for example, pull-up resistance value (R1) = 10KΩ, C component (C1) = 12.5pF, threshold voltage (Vc) = 2V, power supply voltage (Vcc) = 3.3V
Then Also, when the pull-up resistor (4) is disconnected, the time required for the voltage of the I / O port (2) to reach the Hi level is as described above.
If the input leakage current of the I / O port (2) is 1 μA, T OPEN = C · Vc / i = 25 μsec.

第2図は前述した動作を示すタイミングチヤートであ
り、前述したステツプ203にてI/Oポート(2)出力をLo
wとし、ステツプ204でI/Oポート(2)を「入力」にセ
ツトすると、プルアツプ抵抗(4)並びにキースイツチ
(3)が共に異常がない場合は、T10Kで示すように「入
力」セツト後117nsecでスレツシヨルド電圧(Vc)を越
えてHiレベルになる。一方、キースイツチ(3)が短絡
している場合は、電圧は上昇せず、一点鎖線で示すよう
にLowレベルの状態を継続する。又、キースイツチ
(3)が異常なく、プルアツプ抵抗(4)に異常をきた
した場合は、TOPENで示すように電圧は緩やかに上昇
し、スレツシヨルド電圧(Vc)に達するのに25μsecを
要する。
FIG. 2 is a timing chart showing the operation described above. In step 203, the output of the I / O port (2) is set to Lo.
and w, when excisional I / O port (2) to the "input" in step 204, Puruatsupu resistance (4) and, if Kisuitsuchi (3) is not both abnormal, as shown by T 10K "Input" excisional after At 117nsec, it exceeds the threshold voltage (Vc) and becomes Hi level. On the other hand, when the key switch (3) is short-circuited, the voltage does not rise and the state of the low level is continued as shown by the dashed line. When the key switch (3) is normal and the pull-up resistor (4) is abnormal, the voltage gradually rises as shown by T OPEN and it takes 25 μsec to reach the threshold voltage (Vc).

従って、ステツプ204から117nsec経過後であつて、25
μsec以前にI/Oポート(2)の入力電圧を読み込めば、
プルアツプ抵抗(4)の断線及びキースイツチ(3)の
短絡等の故障を検出することができる。
Therefore, after a lapse of 117 nsec from step 204, 25
If you read the input voltage of I / O port (2) before μsec,
Failures such as disconnection of the pull-up resistor (4) and short-circuit of the key switch (3) can be detected.

従って、前述した時間内に入力電圧を読み込むように
待機時間を設定し、設定時間経過後に第1図に示すステ
ツプ205からステツプ206に進みポート値を読み込む。そ
して、前記入力電圧がHiであればステツプ207から208を
経てメインの処理プログラムへ移行する。又、入力電圧
がLowのときはステツプ207からステツプ209へ進み、警
告、エラー表示等のエラー処理を行う。
Therefore, the standby time is set so that the input voltage is read within the above-described time, and after the set time elapses, the process proceeds from step 205 to step 206 shown in FIG. 1 to read the port value. If the input voltage is Hi, the process proceeds to the main processing program through steps 207 to 208. If the input voltage is low, the process proceeds from step 207 to step 209 to perform error processing such as warning and error display.

第3図は他の実施例を示し、入力ポート(8)と出力
ポート(9)とが分離したマイクロコンピユータ(10)
の回路であり、出力ポート(9)に接続したトランジス
タ(11)のコレクタ(12)にプルアツプ抵抗(4)を介
して電源(5)を供給している。この場合のフローチヤ
ートの図示は省略するが、第1図に示したものからステ
ツプ202とステツプ204とを省き、ステツプ203の「ポー
ト」を「出力ポート」、ステツプ205の「ポート」を
「入力ポート」と読替えるものとする。
FIG. 3 shows another embodiment, in which a micro computer (10) in which an input port (8) and an output port (9) are separated.
The power supply (5) is supplied to the collector (12) of the transistor (11) connected to the output port (9) via the pull-up resistor (4). Although the illustration of the flowchart in this case is omitted, the steps 202 and 204 are omitted from the one shown in FIG. 1, and the "port" of the step 203 is set to the "output port" and the "port" of the step 205 is set to the "input". Port ".

尚、この発明は、この発明の精神を逸脱しない限り種
々の改変を為す事ができ、そして、この発明が該改変せ
られたものに及ぶことは当然である。
The present invention can be variously modified without departing from the spirit of the present invention, and it goes without saying that the present invention extends to the modified one.

[発明の効果] この発明は、上記一実施例に詳述したように、キース
イツチ等の入力部の異常のみならず、該入力部のプルア
ツプ抵抗の故障も検知する。そして、ワンチツプマイク
ロコンピユータのI/Oポートを利用した装置に於ては、
ハードウエアを変更することなくソフトウエアのみによ
つて容易に誤動作及び不安定動作の防止に貢献でき、信
頼性の向上に寄与できる。
[Effect of the Invention] As described in detail in the above embodiment, the present invention detects not only an abnormality in an input unit such as a key switch, but also a failure in a pull-up resistor in the input unit. And in the device using the I / O port of the one-chip microcomputer,
It is possible to easily contribute to prevention of malfunction and unstable operation by using only software without changing hardware, and to contribute to improvement of reliability.

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

第1図乃至第3図は本発明の一実施例を示し、第1図は
キースイツチ入力部の異常検出方法のフローチヤート、
第2図は同タイミングチヤートであり、第3図は他の実
施例を示し、入力ポートと出力ポートが異なる場合のキ
ースイツチ入力部の回路図である。第4図及び第5図は
従来例を示し、第4図は異常検出方法のフローチヤー
ト、第5図はキースイツチ入力部の回路図である。 (1)……ワンチツプマイクロコンピユータ (2)……I/Oポート、(3)……キースイツチ (4)……プルアツプ抵抗、(5)……電源
1 to 3 show an embodiment of the present invention. FIG. 1 is a flowchart of a method for detecting an abnormality in a key switch input unit.
FIG. 2 shows the same timing chart, and FIG. 3 shows another embodiment, which is a circuit diagram of a key switch input section when the input port and the output port are different. 4 and 5 show a conventional example, FIG. 4 is a flowchart of an abnormality detection method, and FIG. 5 is a circuit diagram of a key switch input section. (1) One-chip microcomputer (2) I / O port (3) Key switch (4) Pull-up resistor (5) Power supply

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】I/Oポートにキースイツチ等の入力部を接
続し、該入力部にプルアツプ抵抗を介して電源電圧を印
加したコンピユータに於て、前記入力部の入力操作によ
りI/Oポートに入力される信号のLowからHiへの立上がり
時間と、前記プルアツプ抵抗が断線した場合の立上がり
時間との範囲内に電圧読み込みの待機時間を設定すると
共に、前記I/OポートからLow信号を出力した後に入力状
態とし、前記待機時間経過後に入力レベルを読み込み、
該レベルがLowのときは前記プルアツプ抵抗或はキース
イツチの異常と判定するコンピユータに於けるキースイ
ツチ入力部の異常検出方法。
An input unit such as a key switch is connected to an I / O port, and a power supply voltage is applied to the input unit via a pull-up resistor. A standby time for voltage reading was set within a range between a rise time of the input signal from Low to Hi and a rise time when the pull-up resistor was disconnected, and a Low signal was output from the I / O port. After input state, read the input level after the elapse of the standby time,
A method for detecting an abnormality in a key switch input section in a computer which determines that the pull-up resistor or the key switch is abnormal when the level is Low.
JP2235077A 1990-09-05 1990-09-05 Error detection method of key switch input part in computer Expired - Fee Related JP2979605B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2235077A JP2979605B2 (en) 1990-09-05 1990-09-05 Error detection method of key switch input part in computer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2235077A JP2979605B2 (en) 1990-09-05 1990-09-05 Error detection method of key switch input part in computer

Publications (2)

Publication Number Publication Date
JPH04114221A JPH04114221A (en) 1992-04-15
JP2979605B2 true JP2979605B2 (en) 1999-11-15

Family

ID=16980724

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2235077A Expired - Fee Related JP2979605B2 (en) 1990-09-05 1990-09-05 Error detection method of key switch input part in computer

Country Status (1)

Country Link
JP (1) JP2979605B2 (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2527518B2 (en) * 1992-11-04 1996-08-28 富士通テン株式会社 Electronics
JP6140094B2 (en) * 2014-03-24 2017-05-31 ファナック株式会社 Matrix type key input interface
US11537955B2 (en) 2020-04-20 2022-12-27 Geotab Inc. Device for shared vehicle utilization management
US11107304B1 (en) 2020-04-20 2021-08-31 Geotab Inc. Method for sharing and monitoring vehicles
US11427140B2 (en) 2020-04-20 2022-08-30 Geotab Inc. Shared vehicle I/O expander
US11605032B2 (en) 2020-04-20 2023-03-14 Geotab Inc. System for shared vehicle maintenance and recovery
US20210327013A1 (en) * 2020-04-20 2021-10-21 Geotab Inc. Shared vehicle i/o expander method
US11605031B2 (en) 2020-04-20 2023-03-14 Geotab Inc. System for shared vehicle utilization management
US11613265B2 (en) 2020-04-20 2023-03-28 Geotab Inc. Device for shared vehicle maintenance and recovery
US11210612B2 (en) 2020-04-20 2021-12-28 Geotab Inc. Method for shared vehicle maintenance and recovery
US12118480B2 (en) 2020-04-20 2024-10-15 Geotab Inc. System for sharing and monitoring vehicles
US11314901B2 (en) 2020-04-20 2022-04-26 Geotab Inc. Method for shared vehicle misuse management
CN114515387A (en) * 2020-11-20 2022-05-20 深圳迈瑞生物医疗电子股份有限公司 Defibrillator, self-test method of defibrillator and computer readable storage medium

Also Published As

Publication number Publication date
JPH04114221A (en) 1992-04-15

Similar Documents

Publication Publication Date Title
JP2979605B2 (en) Error detection method of key switch input part in computer
CA1165877A (en) Supervisory control apparatus
KR100190479B1 (en) Device for monitoring the function of an electric switch
JPS6347285B2 (en)
EP4206697A1 (en) Self-locking and detection circuit and apparatus, and control method
JP2793909B2 (en) Input / output module with combination input / output points
JP2621481B2 (en) Drive circuit diagnostic method
JP3748514B2 (en) Sensor state detection device
CN111030036A (en) Circuits, corresponding apparatus and methods with critical operating condition alerts
JPH0142054Y2 (en)
JP2864911B2 (en) Hot-swap method
JPS6230442B2 (en)
JPH0143650Y2 (en)
JPH0755060B2 (en) Inverter retry controller
CN223231156U (en) Voltage monitoring reset system and eddy current testing equipment
JPH0496691A (en) Pulse motor drive control device
JP3340957B2 (en) Abnormality monitoring device
JP3117600B2 (en) Bus connection system
JP2583338Y2 (en) Electronic circuit failure diagnosis device
US20070279818A1 (en) Load abnormality detection circuit
JP2775088B2 (en) Anomaly detection device
JP2000112581A (en) Electronic control unit
CN119253555A (en) A protection circuit, a digital quantity input module and an electronic device
JP3577767B2 (en) Vehicle speed determination method when power is turned on for power steering control device
EP0371296B1 (en) Microcomputer interface arrangement

Legal Events

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