[go: up one dir, main page]

JPH02170717A - Switch input system - Google Patents

Switch input system

Info

Publication number
JPH02170717A
JPH02170717A JP32561988A JP32561988A JPH02170717A JP H02170717 A JPH02170717 A JP H02170717A JP 32561988 A JP32561988 A JP 32561988A JP 32561988 A JP32561988 A JP 32561988A JP H02170717 A JPH02170717 A JP H02170717A
Authority
JP
Japan
Prior art keywords
switch
turned
condition
state
changed
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
JP32561988A
Other languages
Japanese (ja)
Inventor
Hideyuki Yoshida
吉田 英之
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.)
Toyo Communication Equipment Co Ltd
Original Assignee
Toyo Communication Equipment 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 Toyo Communication Equipment Co Ltd filed Critical Toyo Communication Equipment Co Ltd
Priority to JP32561988A priority Critical patent/JPH02170717A/en
Publication of JPH02170717A publication Critical patent/JPH02170717A/en
Pending legal-status Critical Current

Links

Landscapes

  • Keying Circuit Devices (AREA)
  • Electronic Switches (AREA)

Abstract

PURPOSE:To prevent a malfunction even when a switch contact point is unstable by deciding that the switch is not turned off when the switch is turned on again in a time set beforehand even if the switch in turned-on condition is changed over to a turned-off condition. CONSTITUTION:A switch matrix 1 arranged in a matrix is connected through a bus line, etc., to main CPU 6, a ROM 7, and a RAM 8. When the switch condition is changed and restored to the original condition in a prescribed period, the changed-over condition of the switch is made null, and when the switch condition is restored after the prescribed period, the changed-over condition of the switch is made effective. Thus even when the contact condition of the switch is unstable, the malfunction is not generated.

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明はスイッチ接点のチャタリングによる誤入力の発
生を防止したスイッチ入力方式に関する。
DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention relates to a switch input method that prevents the occurrence of erroneous inputs due to chattering of switch contacts.

(従来の技術) スイッチ接点が不安定な場合においても誤入力の発生を
防止し得るスイッチ入力方式として、従来スキャン方式
のチャタリング防止入力方式が知られている。
(Prior Art) As a switch input method that can prevent the occurrence of erroneous inputs even when switch contacts are unstable, a chattering prevention input method using a conventional scan method is known.

この入力方式では、第3図に示す如く一定時間間隔毎に
スイッチの状態を監視してオン/オフ状態を判定する。
In this input method, as shown in FIG. 3, the state of the switch is monitored at regular time intervals to determine the on/off state.

例えば、スイッチの状態がオフからオンに切り変わった
ときには、予め設定されているデバウンス期間(例えば
、10m5ec〜20m5ec)後に再度スイッチの状
態を取り込み、このときの状態がオンであるとき、初め
てスイッチの状態をオンと判定する。
For example, when the state of a switch changes from off to on, the state of the switch is captured again after a preset debounce period (for example, 10m5ec to 20m5ec), and when the current state is on, the switch is turned off for the first time. Determine the status as on.

また、スイッチの状態がオンからオフに切り変わったと
きにも同様である。
The same applies when the state of the switch changes from on to off.

しかしながら、このような従来のスイッチ入力方式にお
いては、スイッチオン/オフ時のチャタリングによる誤
動作を有効に防止し得るものの、第4図に示す如くスイ
ッチの押下中に、例えば手が動いてその押圧力が弱まり
スイッチが明断した場合(例えば期間F)、期間E中ス
イッチをオン操作しているのにかかわらず、期間Fで一
旦オフと判定されてしまうという問題があった。
However, although such conventional switch input methods can effectively prevent malfunctions due to chattering during switch on/off, as shown in FIG. When the switch is turned on due to weakening (for example, period F), there is a problem in that the switch is once determined to be off during period F, even though the switch is turned on during period E.

このため、スイッチのオン/オフ回数に意味がある場合
、例えばテンキーから数値データなどを入力する場合な
どに誤ったデータが入力される。
Therefore, when the number of times the switch is turned on and off has a meaning, for example when inputting numerical data using the numeric keypad, incorrect data is input.

−例を示せば、テンキーから数字データを人力する場合
に同一キーを短時間で多数回押圧することがあるが、こ
の場合に正確な押圧回数が入力されずに1回しかオンし
ないとの誤判断が行われたり、或いは長時間継続してオ
ンされていたとの誤判断が行われることがある。このよ
うな誤判断は誤ったデータの入力の原因となっていた。
- For example, when manually inputting numerical data from the numeric keypad, the same key may be pressed many times in a short period of time, but in this case, the correct number of presses may not be entered and the key will turn on only once. A false judgment may be made, or an erroneous judgment may be made that it has been turned on for a long time. Such misjudgment caused incorrect data to be input.

そこでこのような不都合を除くために、デバウンス時間
(通常、10m5ec〜20m5ec)を長くすること
も考えられるが、この場合スイッチオンを認識させるた
めに同一スイッチを長時間押下しなければならず、キー
ボード操作のスピードアップが阻害されるのみならず、
このようしても再度スイッチの状態を取り込んだときこ
のスイッチの接触状態が不安定になっているときなどに
誤入力が発生する。
Therefore, in order to eliminate this inconvenience, it may be possible to lengthen the debounce time (usually 10m5ec to 20m5ec), but in this case, the same switch must be held down for a long time to recognize the switch on, and the keyboard This not only hinders the speed up of operations, but also
Even if this is done, an erroneous input may occur when the switch state is retrieved again and the contact state of the switch is unstable.

(発明の目的) 本発明は上記の事情に鑑みてなされたものであって、ス
イッチの接触状態が不安定な場合においても誤動作しな
いようにすることができるスイッチ入力方式を提供する
ことを目的としている。
(Object of the Invention) The present invention was made in view of the above circumstances, and an object of the present invention is to provide a switch input method that can prevent malfunction even when the contact state of the switch is unstable. There is.

(発明の概要) 上記の問題点を解決するために本発明によるスイッチ入
力方式においては、スイッチの状態が変化した時点から
所定期間以内に前記スイッチの状態が元に戻ったときに
は前記スイッチの切替を無効にし、前記所定期間を経過
してから前記スイッチの状態が元に戻ったとき前記スイ
ッチの切替を有効と判定することを特徴としている。
(Summary of the Invention) In order to solve the above problems, in the switch input method according to the present invention, when the state of the switch returns to its original state within a predetermined period from the time when the state of the switch changes, the switch is switched. The switching of the switch is determined to be valid when the state of the switch returns to its original state after the predetermined period has elapsed.

(実施例) 第1図は本発明によるスイッチ入力方式を適用したシス
テムの一例を示すブロック図である。
(Embodiment) FIG. 1 is a block diagram showing an example of a system to which a switch input method according to the present invention is applied.

この図に示す実施例は、マトリックス状に配置されたス
イッチマトリックス1がパスライン等を介してメインC
PU6.ROM7及びRAM8に接続されたシステムに
本発明を適用する場合を示したもので、このスイッチマ
トリックス1をスキャンして各スイッチの押下状態を取
り込むスイッチスキャン回路2と、このスイッチスキャ
ン回路2によって得られたスイッチ押下状態に関する情
報を取り込んでチャタリングの処理及び接触不安定期間
の除去処理を行なうスイッチ入力処理部3とを備え、前
記スイッチマトリックス1の操作した結果が上記スイッ
チスキャン回路2とスイッチ入力処理部3を経てパスラ
インを介してアプリケーションプログラムや定数データ
が格納されているROM7と、このROM7に格納され
ているアプリケーションプログラムや前記スイッチ入力
処理部3の処理結果に基づいて処理を実行するメインC
PU6と、このメインCPU6の作業エリアとして使用
されるRAM8とに伝達される。
In the embodiment shown in this figure, a switch matrix 1 arranged in a matrix is connected to a main C through a pass line or the like.
PU6. This shows a case in which the present invention is applied to a system connected to a ROM 7 and a RAM 8, including a switch scan circuit 2 that scans this switch matrix 1 and captures the pressed state of each switch, and and a switch input processing section 3 that takes in information regarding the pressed state of the switch and performs chattering processing and contact unstable period removal processing, and the result of the operation of the switch matrix 1 is transmitted to the switch scan circuit 2 and the switch input processing section. 3 and a main C which executes processing based on the application program stored in this ROM 7 and the processing results of the switch input processing section 3.
The information is transmitted to the PU 6 and the RAM 8 used as a work area for the main CPU 6.

尚ここで、以下詳述する制御はスイッチ入力処理部3に
内蔵したロジック回路又は簡単なCPUにて実行される
が、このCPUに代えて上記メインCPU6にて実行し
ても良い。
Here, the control described in detail below is executed by a logic circuit built in the switch input processing section 3 or by a simple CPU, but it may be executed by the main CPU 6 instead of this CPU.

前記スイッチ入力処理部3はデバウンス時間を測定する
デバウンスタイマ4と、スイッチがオフになってから次
にオンするまでの時間を測定するスイッチオフタイマ5
とを備え、スイッチがオフからオンになったときにはデ
バウンスタイマ4を使用してチャタリング除去処理を行
ない、またスイッチがオンからオフになったときにはス
イッチオフタイマ5を使用して接触不安定除去処理を行
なう。
The switch input processing section 3 includes a debounce timer 4 that measures debounce time, and a switch off timer 5 that measures the time from when a switch is turned off until it is turned on again.
When the switch is turned on from off, a debounce timer 4 is used to remove chattering, and when the switch is turned from on to off, a switch off timer 5 is used to remove unstable contact. Let's do it.

次に、第2図に示すフローチャートを参照しながら上述
したスイッチ入力処理部3の動作を説明する。
Next, the operation of the switch input processing section 3 described above will be explained with reference to the flowchart shown in FIG.

まず、スイッチマトリックス1のいずれかのスイッチ、
例えば“P 71がオンされると、スイッチスキャン回
路2によってこれが検出されるまでスイッチ入力処理部
3は待機する(ステップS ’I” l )次に、この
検出結果に基づいてスイッチ入力処理部3はいずれかの
スイッチ、例えばスイッチ“′P″がオンされたことを
検知すると、デバウンスタイマ4をクリアしこれをスタ
ートさせる(ステップ5T2)。
First, any switch in switch matrix 1,
For example, when "P71" is turned on, the switch input processing section 3 waits until it is detected by the switch scan circuit 2 (step S'I"l). Then, based on this detection result, the switch input processing section 3 When detecting that any switch, for example switch "'P", is turned on, it clears the debounce timer 4 and starts it (step 5T2).

そして、このデバウンスタイマ4がタイムアツプしたと
き(ステップ5T3) 、スイッチ入力処理部3は前記
スイッチ“P”がオンされているか否かを再度チエツク
しく一ステップ5T4)、オンされていなければ、これ
を無効と判定して最初の状態に戻る。
When the debounce timer 4 times up (step 5T3), the switch input processing section 3 checks again whether the switch "P" is turned on (step 5T4), and if it is not turned on, turns it off. It is determined to be invalid and returns to the initial state.

また、スイッチ“P ITの再チエツクを行なったとき
、オンであれば、スイッチ入力処理部3はこの状態変化
を有効と判定して、パスラインを介して所要部、例えば
メインCPU6にスイッチit P IIがオンされた
ことを知らせる(ステップ5T5)。
Further, when the switch "PIT" is checked again, if it is on, the switch input processing section 3 determines that this state change is valid, and sends the switch "PIT" to a required part, for example, the main CPU 6 via the pass line. It is notified that II has been turned on (step 5T5).

この後、スイッチ入力処理部3は既にオンと判定したス
イッチ“P”がオフされるまで待つ(ステップ5TY)
After this, the switch input processing unit 3 waits until the switch "P", which has already been determined to be on, is turned off (step 5TY)
.

そして、このスイッチ“p IIがオフされれば。Then, if this switch "p II" is turned off.

スイッチ入力処理部3はスイッチオフタイマ5をクリア
してこれをスタートさせるとともに(ステップ5T7)
 、スイッチマトリックス1のいずれかのスイッチがオ
ンされているか否かをチエツクする(ステップ5T9)
The switch input processing section 3 clears the switch-off timer 5 and starts it (step 5T7).
, checks whether any switch in switch matrix 1 is turned on (step 5T9).
.

ここで、スイッチ“P”以外のものがオンされていれば
、スイッチ入力処理部3は上述したデバウンス除去処理
(ステップST2〜5T4)に戻って今オンされている
スイッチのオン処理を行なう。
Here, if a switch other than "P" is turned on, the switch input processing section 3 returns to the above-described debounce removal processing (steps ST2 to 5T4) to turn on the switch that is currently turned on.

また、スイッチII P ITがオンされていれば、ス
イッチ入力処理部3はスイッチオフタイマ5の値を読み
出しくステップ5TIO)、これが予め設定されている
設定時間(例えば、100m5ec)以上か否かをチエ
ツクしくステップ5TII)、スイッチオフタイマ5の
値が設定時間以下である場合にはスイッチ“P IIの
オフは接点の接触不安定に起因するものであると判定し
て上述したスイッチ“′P”のオフ検出動作(ステップ
5T6)に戻る。
Furthermore, if the switch II PIT is turned on, the switch input processing unit 3 reads the value of the switch off timer 5 (step 5TIO) and checks whether this is longer than a preset time (for example, 100m5ec). Check step 5 (TII), if the value of the switch-off timer 5 is less than the set time, it is determined that the off of the switch "P II" is due to unstable contact of the contact, and the above-mentioned switch "'P" is turned off. The process returns to the off detection operation (step 5T6).

また、スイッチオフタイマ5の値が設定時間以上であれ
ば、スイッチ入力処理部3はスイッチ“P”が−旦オフ
され、この後再度オンされたと判定して上述したデバウ
ンス除去処理(ステップST2〜5T4)に戻って今オ
ンされているスイッチ“P”のオン処理を行なう。
Further, if the value of the switch-off timer 5 is equal to or longer than the set time, the switch input processing section 3 determines that the switch "P" was turned off once and then turned on again, and performs the debounce removal process described above (steps ST2 to Returning to step 5T4), the currently turned on switch "P" is turned on.

このようにこの実施例においては、スイッチマトリック
ス1のスイッチがオンしている状態からオフに切り変わ
った場合においても、これが予め設定されている設定時
間以内に再度オンした時には、このスイッチがオフされ
なかったものと判定するようにしているので、スイッチ
の接触状態が不安定になった場合においてもこのスイッ
チのオン/オフ回数を正確に判定することができる。
As described above, in this embodiment, even if the switch in the switch matrix 1 is switched from on to off, if it is turned on again within a preset time, the switch will be turned off. Since it is determined that there was no such switch, even if the contact state of the switch becomes unstable, the number of on/off times of this switch can be accurately determined.

また上述した実施例においては、設定時間を100m5
ecにしているが、スイッチの種類や使用目的に対応し
て他の値を用いるようにしても良いことは明白である。
Furthermore, in the above-mentioned embodiment, the setting time is 100 m5.
Although ec is used, it is obvious that other values may be used depending on the type of switch and purpose of use.

尚5以上の説明は本発明の一実施例にすぎず、種々変更
が可能であって、適用するスイッチもマトリックス状の
ものに限らず、単一のスイッチにおいても実施し得る。
It should be noted that the above description is only one embodiment of the present invention, and various modifications are possible, and the switch to be applied is not limited to a matrix type, but may also be implemented with a single switch.

(発明の効果) 以上説明したように本発明によれば、スイッチの接触状
態が不安定な場合においても誤動作しないようにするこ
とができる。
(Effects of the Invention) As described above, according to the present invention, it is possible to prevent malfunction even when the contact state of the switch is unstable.

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

第1図は本発明によるスイッチ入力方式の一実施例を適
用したシステムの一例を示すブロック図、第2図は同実
施例の動作例を示すフローチャート、第3図は従来から
知られているスイッチ入力方式の一例を説明するための
波形図、第4図は従来から知られているスイッチ入力方
式の問題点を説明するための波形図である。 1・・・スイッチマトリックス、2・・・スイッチスキ
ャン回路、3・・・スイッチ入力処理部、5・・・スイ
ッチオフタイマ。 特許出願人  東洋通信機株式会社
FIG. 1 is a block diagram showing an example of a system to which an embodiment of the switch input method according to the present invention is applied, FIG. 2 is a flowchart showing an example of the operation of the same embodiment, and FIG. 3 is a conventional switch FIG. 4 is a waveform diagram for explaining an example of an input method. FIG. 4 is a waveform diagram for explaining problems with the conventionally known switch input method. DESCRIPTION OF SYMBOLS 1... Switch matrix, 2... Switch scan circuit, 3... Switch input processing part, 5... Switch off timer. Patent applicant: Toyo Tsushinki Co., Ltd.

Claims (1)

【特許請求の範囲】[Claims] (1)スイッチがオン状態からオフ状態又はオフ状態か
らオン状態までの時間を計測する手段を設け、該時間が
所定値以下の場合前記スイッチの切替を無効にしたこと
を特徴とするスイッチ入力方式。
(1) A switch input method characterized in that means is provided for measuring the time from the on state to the off state or from the off state to the on state, and when the time is less than a predetermined value, switching of the switch is disabled. .
JP32561988A 1988-12-23 1988-12-23 Switch input system Pending JPH02170717A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP32561988A JPH02170717A (en) 1988-12-23 1988-12-23 Switch input system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP32561988A JPH02170717A (en) 1988-12-23 1988-12-23 Switch input system

Publications (1)

Publication Number Publication Date
JPH02170717A true JPH02170717A (en) 1990-07-02

Family

ID=18178881

Family Applications (1)

Application Number Title Priority Date Filing Date
JP32561988A Pending JPH02170717A (en) 1988-12-23 1988-12-23 Switch input system

Country Status (1)

Country Link
JP (1) JPH02170717A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008310279A (en) * 2007-06-18 2008-12-25 Samsung Electronics Co Ltd Timing controller, liquid crystal display device including the same, and driving method of liquid crystal display device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008310279A (en) * 2007-06-18 2008-12-25 Samsung Electronics Co Ltd Timing controller, liquid crystal display device including the same, and driving method of liquid crystal display device
US8659530B2 (en) 2007-06-18 2014-02-25 Samsung Display Co., Ltd. Timing controller counts clock signals to produce a control signal only after a number of clock pulses are counted
KR101503684B1 (en) * 2007-06-18 2015-03-19 삼성디스플레이 주식회사 Timing controller, liquid crystal display including same, and driving method of liquid crystal display

Similar Documents

Publication Publication Date Title
JPH0528063A (en) Microcomputer
JPH02170717A (en) Switch input system
JPS6051926A (en) Key inputting system
JPH0277921A (en) Overcurrent preventing circuit
KR200280669Y1 (en) interrupt equipement having an error detecting function
JPH08286719A (en) Input history storage device for working machine
JP3017192B1 (en) N-key rollover keyboard system
JP2546386B2 (en) Redundant device
JPH08194570A (en) Key scan circuit
JPS5852702A (en) Programmable controller
JPH05108503A (en) Power failure processing system
JP2002039501A (en) Control circuit for apparatus
JP3231743B2 (en) Control method and method of power control device
KR100533879B1 (en) Apparatus and method for hardware reset and anti-deadlock state using software control
JPH0716216U (en) Keyboard input monitoring device
KR100721828B1 (en) Microcomputer Signal Processing Method
JPH0895831A (en) Method for recoverying from system abnormality
JPH1173346A (en) Semiconductor control device
JPS63298516A (en) Automatic resetting keyboard
JPH01155416A (en) Memory initializing device
JPH03263080A (en) Printer
JPH04246735A (en) In-circuit emulator
JPS59194254A (en) Decision system of factor of change in operation state
WO1998041914A1 (en) Input apparatus
JPH087649B2 (en) Reset method