JPH08221172A - Method and device for key input - Google Patents

Method and device for key input

Info

Publication number
JPH08221172A
JPH08221172A JP7024932A JP2493295A JPH08221172A JP H08221172 A JPH08221172 A JP H08221172A JP 7024932 A JP7024932 A JP 7024932A JP 2493295 A JP2493295 A JP 2493295A JP H08221172 A JPH08221172 A JP H08221172A
Authority
JP
Japan
Prior art keywords
key
scan
circuit
timing signal
state
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP7024932A
Other languages
Japanese (ja)
Other versions
JP3258846B2 (en
Inventor
Masatake Kawaguchi
正剛 川口
Junji Kashiwada
順治 柏田
Teruyuki Fujii
輝幸 藤井
Nobuyuki Shimizu
信行 清水
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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry 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 Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP02493295A priority Critical patent/JP3258846B2/en
Publication of JPH08221172A publication Critical patent/JPH08221172A/en
Application granted granted Critical
Publication of JP3258846B2 publication Critical patent/JP3258846B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PURPOSE: To reduce current consumption and prevent malfunction owing to chattering. CONSTITUTION: When the power source is turned ON, a scanner circuit 200 sets a key-ON detection state. When a key switch of a key matrix circuit 100 is pressed, an oscillation circuit 400 is placed in oscillating operation and scanning is started. The scanner circuit 200 holds an INF signal at 'L' level one scan cycle after the start of the scanning and a CPU 600 does not input scan data. At the end of 2nd and succeeding scan cycles, the TNT signal is held at 'H' level and the CPU 600 inputs the scan data. When all key switches are turned OFF, the oscillation of the oscillation circuit 400 and the scanning are stopped and the key-ON detection state is entered.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、複数のキースイッチを
マトリックス状に配設し、X軸又はY軸の一方をスキャ
ンタイミング信号ラインとして、他方のキー状態検出信
号ラインとするキーマトリックス回路のキースイッチの
オン/オフ状態を検出するキー入力装置及びキー入力方
法に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a key matrix circuit in which a plurality of key switches are arranged in a matrix and one of the X axis and the Y axis is used as a scan timing signal line and the other is used as a key state detection signal line. The present invention relates to a key input device and a key input method for detecting an on / off state of a key switch.

【0002】[0002]

【従来の技術】従来、このような分野の技術としては、
例えば、次のような文献に記載されるものがあった。 文献;特開昭59−87534号公報 従来、この種のスキャン方法は、前記文献に記載される
ものがありキーボード装置の複数のキーを一定周期で繰
り返しスキャンし、少なくとも2回のスキャンで続けて
オン状態にあったキーのみにつきオン出力するととも
に、少なくとも2回のスキャンで続けてオフ状態にあっ
たキーのみにつきオフ出力をする方法であった。この方
法により、キーの接点が開閉時にバウンドして高速でオ
ン・オフを繰り返すいわゆるチャタリング現象によるオ
ン・オフ誤出力を防止していた。
2. Description of the Related Art Conventionally, techniques in such a field include:
For example, some documents were described in the following documents. Reference: Japanese Patent Laid-Open No. 59-87534. Conventionally, this type of scanning method is described in the above-mentioned reference, and a plurality of keys of a keyboard device are repeatedly scanned at a constant cycle, and at least two scans are continuously performed. This is a method in which only the keys that are in the on state are turned on, and the keys that are in the off state are continuously turned off in at least two scans. This method prevents erroneous on / off output due to a so-called chattering phenomenon in which the contact of the key bounces when opening and closing and is repeatedly turned on and off at high speed.

【0003】[0003]

【発明が解決しようとする課題】しかしながら、従来の
キー入力方法においては、次のような課題があった。 (1) 従来の方法では、常時繰り返しスキャンをして
いるため消費電流が大きい。 (2) スキャン時に発生する高周波ノイズが他の回路
に悪影響を与え、誤動作の原因となる。 (3) 2回スキャンを行い、両結果を比較しなければ
ならないため回路に新たな記憶及び比較機能を加える必
要があるため、回路規模が大きくなるという課題があっ
た。
However, the conventional key input method has the following problems. (1) In the conventional method, the current consumption is large because the scanning is always repeated. (2) High-frequency noise generated during scanning adversely affects other circuits, causing malfunction. (3) Since it is necessary to scan twice and compare both results, it is necessary to add a new storage and comparison function to the circuit, which causes a problem that the circuit scale becomes large.

【0004】[0004]

【課題を解決するための手段】第1の発明は、前記課題
を解決するために、複数のキースイッチをマトリックス
状に配設し、X軸、Y軸の一方をスキャンタイミング信
号ラインとし、他方をキー状態検出信号ラインとするキ
ーマトリックス回路と、動作タイミング信号を発生させ
る発振回路と、前記スキャンタイミング信号ラインにス
キャンタイミング信号を出力し、前記キー状態検出信号
ラインより前記キースイッチのオン/オフ状態を検出
し、前記発振回路の制御を行うスキャナー回路とを備え
たキー入力装置のキー入力方法において、スキャナー回
路は、以下の処理を実行する。すなわち、オン状態の前
記キースイッチの入力がなければ、前記発振回路の発振
動作を停止する発振停止処理と、すべての前記スキャン
タイミング信号ラインに常に前記スキャンタイミング信
号を出力して、前記キースイッチのオン状態を検出する
キーオン状態検出処理とを実行する。また、オン状態の
前記キースイッチの入力があれば、前記発振回路の発振
動作をさせる発振動作処理と、前記スキャンタイミング
信号ラインに順に前記スキャンタイミング信号を出力し
て、各キースイッチのオン/オフ状態を検出するスキャ
ン処理とを実行する。
In order to solve the above-mentioned problems, a first invention comprises a plurality of key switches arranged in a matrix, one of the X-axis and the Y-axis being a scan timing signal line, and the other of them. , A key matrix circuit that uses as a key state detection signal line, an oscillation circuit that generates an operation timing signal, and a scan timing signal that is output to the scan timing signal line, and the key state detection signal line turns on / off the key switch. In a key input method of a key input device including a scanner circuit that detects a state and controls the oscillation circuit, the scanner circuit performs the following processing. That is, if there is no input of the key switch in the ON state, an oscillation stop process for stopping the oscillation operation of the oscillation circuit, and the scan timing signal is always output to all the scan timing signal lines, Key-on state detection processing for detecting the on-state is executed. Also, if there is an input to the key switch in the ON state, an oscillation operation process for oscillating the oscillation circuit and the scan timing signal are sequentially output to the scan timing signal line to turn on / off each key switch. The scan process for detecting the state is executed.

【0005】[0005]

【作用】第1の発明によれば、以上のようにキー入力方
法を構成したので、スキャンタイミング信号ラインにス
キャンタイミング信号を出力して、キー状態検出信号ラ
インよりオン状態のキースイッチがあるかどうかを判断
する。オン状態のキースイッチがなければ、発振回路の
発振動作を停止して、すべてのスキャンタイミング信号
ラインに常にスキャンタイミング信号を出力して、キー
スイッチのオン状態を検出する。また、オン状態のキー
スイッチの入力があれば、発振回路の発振動作をさせる
発振動作処理と、スキャンタイミング信号ラインに順に
スキャンタイミング信号を出力して、各キースイッチの
オン/オフ状態を検出する。従って、前記課題を解決で
きるのである。
According to the first aspect of the present invention, since the key input method is configured as described above, it is possible to output the scan timing signal to the scan timing signal line so that there is a key switch in the ON state from the key state detection signal line. Determine whether If there is no key switch in the ON state, the oscillation operation of the oscillation circuit is stopped and the scan timing signal is always output to all the scan timing signal lines to detect the ON state of the key switch. Also, if there is an input to the key switch in the ON state, the oscillation operation processing for oscillating the oscillation circuit and the scan timing signal are sequentially output to the scan timing signal line to detect the ON / OFF state of each key switch. . Therefore, the above problem can be solved.

【0006】[0006]

【実施例】図1は、本発明の実施例のキー入力装置を示
す構成ブロック図である。このキー入力装置は、横(X
軸)と縦(Y軸)の方向にマトリックス状(例えば、4
×4)にキースイッチSWが配設されたキーマトリック
ス回路100、スキャナ回路200、発振回路400、
CPUインターフェース回路500、及び中央処理装置
(以下、CPUと呼ぶ)600により構成されている。
キーマトリックス回路100の4本のX軸信号ラインを
キー状態検出信号ラインとし、4本のY軸信号ラインを
スキャンタイミング信号ラインとする。キーマトリック
ス回路100は、スキャナー回路200にキー状態検出
信号ラインC0、C1、C2、C3を与える。スキャナ
ー回路200は、キーマトリックス回路100にスキャ
ンタイミング信号ラインR0、R1、R2、R3を与え
る。スキャナー回路200は、発振回路400に発振動
作/停止命令信号ラインOSC ENを与え、発振回路
400から発振出力信号ラインφ0 を受ける。スキャナ
ー回路200は、CPU600に割り込み信号ラインI
NTを直接与える。スキャナー回路200は、CPUイ
ンターフェース500にスキャンデータ出力ラインSO
UTを与える。CPUインターフェース500は、CP
U600にデータ入出力ラインデータI/Oを与える。
CPUインターフェース500は、スキャナー回路20
0にINT信号リセットラインINT RSTを与え
る。CPU600は、スキャナー回路200にCPUイ
ンターフェース500を介して、クロック信号ラインc
lockとロード信号ラインLOADとを与える。
1 is a block diagram showing the configuration of a key input device according to an embodiment of the present invention. This key input device
Matrix (vertical axis) and vertical (Y axis) directions (eg 4
4) a key matrix circuit 100 in which a key switch SW is arranged, a scanner circuit 200, an oscillation circuit 400,
It is composed of a CPU interface circuit 500 and a central processing unit (hereinafter referred to as CPU) 600.
The four X-axis signal lines of the key matrix circuit 100 are key state detection signal lines, and the four Y-axis signal lines are scan timing signal lines. The key matrix circuit 100 provides the scanner circuit 200 with key state detection signal lines C0, C1, C2 and C3. The scanner circuit 200 supplies the scan timing signal lines R0, R1, R2, and R3 to the key matrix circuit 100. The scanner circuit 200 gives an oscillation operation / stop command signal line OSC EN to the oscillation circuit 400 and receives an oscillation output signal line φ 0 from the oscillation circuit 400. The scanner circuit 200 sends the interrupt signal line I to the CPU 600.
Give NT directly. The scanner circuit 200 connects the scan data output line SO to the CPU interface 500.
Give UT. CPU interface 500 is CP
Data input / output line data I / O is given to U600.
The CPU interface 500 includes the scanner circuit 20.
0 to the INT signal reset line INT RST. The CPU 600 connects the scanner circuit 200 with the clock signal line c via the CPU interface 500.
Lock and load signal line LOAD are provided.

【0007】図2は、図1中のスキャナー回路200の
機能ブロック図である。図2に示すように、スキャナー
回路200は、入力部210、キーオン検出回路22
0、入力ラッチ回路230、スキャン・発振動作/停止
回路240、1/4分周回路250、スキャナ信号発生
1/4分周回路260、スキャンタイミング信号発生回
路270、出力回路280、キーオールオフ検出回路2
90、INT信号発生回路300とにより構成されてい
る。キーマトリックス回路100は、入力部210にキ
ー状態検出信号ラインC0,C1,C2,C3を与え
る。入力部210は、キーオン検出回路220及び入力
ラッチ回路230にキースイッチがオン状態か否かを示
す信号ラインを与える。キーオン検出回路220は、ス
キャン・発振動作/停止回路240にスキャン動作要求
信号ラインSCAN REQを与える。入力ラッチ回路
230は、キーがオン状態であるか否かの信号ラインを
出力回路280に与える。スキャン・発振動作/停止回
路240は、発振回路400に発振動作/停止命令信号
ラインOSC EN、入力ラッチ回路230、及びIN
T信号発生回路300にリセットタイミング信号、スキ
ャナ信号発生1/4分周回路260にスキャン動作開始
信号ラインSCAN ST、スキャンタイミング信号発
生回路270にスキャン許可信号ラインSCAN EN
をそれぞれ与える。
FIG. 2 is a functional block diagram of the scanner circuit 200 shown in FIG. As shown in FIG. 2, the scanner circuit 200 includes an input unit 210 and a key-on detection circuit 22.
0, input latch circuit 230, scan / oscillation operation / stop circuit 240, 1/4 frequency divider circuit 250, scanner signal generation 1/4 frequency divider circuit 260, scan timing signal generation circuit 270, output circuit 280, key all-off detection Circuit 2
90 and an INT signal generation circuit 300. The key matrix circuit 100 provides the input section 210 with key state detection signal lines C0, C1, C2 and C3. The input unit 210 provides the key-on detection circuit 220 and the input latch circuit 230 with a signal line indicating whether or not the key switch is in the ON state. The key-on detection circuit 220 supplies the scan operation request signal line SCAN REQ to the scan / oscillation operation / stop circuit 240. The input latch circuit 230 provides the output circuit 280 with a signal line indicating whether or not the key is in the ON state. The scan / oscillation operation / stop circuit 240 includes an oscillation operation / stop command signal line OSC EN, an input latch circuit 230, and an IN in the oscillation circuit 400.
The T signal generation circuit 300 has a reset timing signal, the scanner signal generation 1/4 frequency divider circuit 260 has a scan operation start signal line SCAN ST, and the scan timing signal generation circuit 270 has a scan enable signal line SCAN EN.
Give each.

【0008】発振回路400は、1/4分周回路250
に発振出力信号ラインφ0 を与える。1/4分周回路2
50は、入力ラッチ回路230に1/4分周信号ライン
φ1、スキャン・発振動作/停止回路240に1/4分
周信号ラインφ2 、スキャンタイミング信号発生回路2
70にラッチタイミング信号ラインLATCHを与え
る。スキャナ信号発生1/4分周回路260は、スキャ
ン・発振動作/停止回路240、及びINT信号発生回
路300にスキャンサイクル終了信号ラインSCAN
SYCを与えて、スキャンサイクル終了検出回路として
も機能する。出力回路280は、キーオールオフ検出回
路290にスキャンサイクル中のキー状態検出信号、C
PUインターフェース回路500にスキャンデータ出力
信号SOUTを与える。キーオールオフ検出回路290
は、INT信号発生回路300、及びスキャン・発振動
作/停止回路240に全キースイッチOFF信号ALL
ZEROを与える。スキャンタイミング信号発生回路
270は、キーマトリックス回路100にスキャンタイ
ミング信号ラインR0,R1,R2,R3、出力回路2
80にラッチ信号L0,L1,L2,L3を与える。I
NT信号発生回路300は、CPU600にCPU割り
込み信号ラインINT、スキャン・発振動作/停止回路
240に通常スキャン確認信号ラインNOM SCAN
を与える。電源投入時回路リセット信号ラインPOR
が、スキャン・発振動作/停止回路240に与えられ
る。CPUインターフェース回路500からINT信号
発生回路300にINT信号リセット信号ラインINT
RSTが与えられる。CPU600から出力回路28
0にCPUインターフェース500を介して、クロック
信号ラインclockとロード信号ラインLOADとが
与えられる。
The oscillator circuit 400 is a quarter frequency divider circuit 250.
To the oscillation output signal line φ 0 . 1/4 frequency divider circuit 2
50 includes an input latch circuit 230 to the 1/4 frequency signal line phi 1, scan oscillation operation / stop circuit 240 to the 1/4 frequency signal line phi 2, the scan timing signal generating circuit 2
The latch timing signal line LATCH is supplied to 70. The scanner signal generation 1/4 frequency divider circuit 260 supplies the scan / oscillation operation / stop circuit 240 and the INT signal generation circuit 300 with a scan cycle end signal line SCAN.
It also functions as a scan cycle end detection circuit by applying SYC. The output circuit 280 sends the key all-off detection circuit 290 a key state detection signal during the scan cycle, C
The scan data output signal SOUT is supplied to the PU interface circuit 500. Key all-off detection circuit 290
Sends all key switch OFF signals ALL to the INT signal generation circuit 300 and the scan / oscillation operation / stop circuit 240.
Give ZERO. The scan timing signal generation circuit 270 includes the scan timing signal lines R0, R1, R2 and R3 in the key matrix circuit 100 and the output circuit 2.
Latch signals L0, L1, L2 and L3 are supplied to 80. I
The NT signal generation circuit 300 includes a CPU interrupt signal line INT for the CPU 600, and a normal scan confirmation signal line NOM SCAN for the scan / oscillation operation / stop circuit 240.
give. Circuit reset signal line POR at power-on
Are supplied to the scan / oscillation operation / stop circuit 240. From the CPU interface circuit 500 to the INT signal generation circuit 300, the INT signal reset signal line INT
RST is given. Output circuit 28 from CPU 600
The clock signal line clock and the load signal line LOAD are given to the 0 through the CPU interface 500.

【0009】以下、図2を参照しつつ本発明の実施例の
キー入力方法を説明する。パワーオン処理 電源がオンされると、スキャン・発振動作/停止回路2
40に電源投入時リセット信号が与えられて、この情報
がスキャンタイミング信号発生回路270に与えられ
る。スキャンタイミング信号発生回路270により、ス
キャンタイミング信号R0〜R3を“L”にすることに
より、キーオン検出状態にする。キー状態検出処理 キーマトリックス回路100のいずれかのキースイッチ
が押されると、入力部210には、キー状態検出信号ラ
インC0〜C3よりキースイッチがオンされたことが入
力される。キーオン検出回路220により、いずれかの
キーがオンされたことを検出して、それをスキャン・発
振動作/停止回路240に通知する。発振動作処理 スキャン・発振動作/停止回路240により、発振回路
400に発振動作命令信号OSC ENが出力される。
発振回路400により発振が開始されて、発振出力信号
φ0 をスキャナー回路200に与える。つまり、キーマ
トリックス回路100のキースイッチが全てオフ状態に
あるとき、スキャナー回路200のスキャン及び発振回
路400の発振は停止しており、いずれかのキースイッ
チがオンされるとスキャナー回路200がこれを探知し
て、発振回路400に発振を指示することにより発振が
開始される。
The key input method according to the embodiment of the present invention will be described below with reference to FIG. Power-on processing When the power is turned on, the scan / oscillation operation / stop circuit 2
A power-on reset signal is applied to 40, and this information is applied to the scan timing signal generation circuit 270. The scan timing signal generation circuit 270 sets the scan timing signals R0 to R3 to "L" to enter the key-on detection state. When any one of the key switches of the key state detection processing key matrix circuit 100 is pressed, the input of the key switch from the key state detection signal lines C0 to C3 is input to the input unit 210. The key-on detection circuit 220 detects that one of the keys has been turned on and notifies the scan / oscillation operation / stop circuit 240 of it. Oscillation operation processing Scan / oscillation operation / stop circuit 240 outputs oscillation operation command signal OSC EN to oscillation circuit 400.
Oscillation is started by the oscillator circuit 400, and the oscillation output signal φ 0 is given to the scanner circuit 200. That is, when all the key switches of the key matrix circuit 100 are in the off state, the scanning of the scanner circuit 200 and the oscillation of the oscillation circuit 400 are stopped, and when any of the key switches is turned on, the scanner circuit 200 turns this on. The oscillation is started by detecting and instructing the oscillation circuit 400 to oscillate.

【0010】スキャン開始(スキャン処理) スキャナー回路200は、発振出力信号φ0 を同期信号
としたスキャン信号を発生することによりスキャンを開
始する。スキャナー回路200で発生したスキャン信号
は、スキャンタイミング信号ラインR0〜R3の順にキ
ーマトリックス回路100に与えられる。これにより、
まずR0ライン上のキースイッチのオン/オフ状態を、
以下、R1、R2、R3ライン上のキースイッチのオン
/オフ状態を順にキー状態検出信号ラインC0〜C3か
らスキャナー回路200の入力部210に取り込み、所
定のラッチ信号L0〜L3により、出力部280にキー
スイッチのオン/オフ状態を取り込む。R0ライン上の
キースイッチのオン/オフ状態取り込み開始から、R3
ライン上のキースイッチのオン/オフ状態取り込み終了
までが1回のスキャンサイクルである。チャタリング回避処理 スキャナー回路200のINT信号発生回路300は、
スキャン開始(再開)時、第1回目のスキャンサイクル
終了後は、チャタリング防止のために、割り込み信号I
NTはCPU600に与えない。これにより、CPU6
00は、キー状態検出信号ラインC0〜C3から入力さ
れるデータ(以下、スキャンデータと呼ぶ)を無視す
る。このスキャンサイクルをダミースキャンと呼ぶ。
Scan Start (Scan Processing) The scanner circuit 200 starts a scan by generating a scan signal with the oscillation output signal φ 0 as a synchronization signal. The scan signal generated by the scanner circuit 200 is applied to the key matrix circuit 100 in the order of the scan timing signal lines R0 to R3. This allows
First, turn on / off the key switch on the R0 line,
Hereinafter, the on / off states of the key switches on the R1, R2, and R3 lines are sequentially taken into the input section 210 of the scanner circuit 200 from the key state detection signal lines C0 to C3, and the output section 280 is output by a predetermined latch signal L0 to L3. Capture the on / off status of the key switch to. From the start of the on / off state acquisition of the key switch on the R0 line, R3
One scan cycle is until the on / off state acquisition of the key switch on the line is completed. The INT signal generation circuit 300 of the chattering avoidance processing scanner circuit 200 is
At the start (restart) of the scan, after the end of the first scan cycle, an interrupt signal I is provided to prevent chattering.
NT is not given to the CPU 600. As a result, the CPU 6
00 ignores data (hereinafter referred to as scan data) input from the key state detection signal lines C0 to C3. This scan cycle is called a dummy scan.

【0011】スキャンデータの取り込み処理 スキャナー回路200のINT信号発生回路300は、
ダミースキャンでなければ、割り込み信号INTをCP
U600に与える。割り込み信号INTが与えられた
後、CPU600がスキャンデータの取り込みを決定す
ると、CPU600は、LOAD信号、続いてcloc
k信号をスキャナー回路200の出力部280に与え
る。これにより、CPU600は、SOUT信号ライン
からCPUインターフェース500、DATA I/O
を通して、スキャナー回路200のスキャンデータを取
り込む。スキャンデータの取り込みが終了すると、IN
T RSTラインによりCPUインターフェース500
からスキャナー回路200にINT信号リセット命令が
与えられる。これにより、INT信号ラインの割り込み
信号はOFFされる。
The INT signal generating circuit 300 of the scanner circuit 200 for taking in scan data is
If not dummy scan, interrupt signal INT is CP
Give to U600. After the interrupt signal INT is given, when the CPU 600 decides to capture the scan data, the CPU 600 causes the LOAD signal and then the clock
The k signal is applied to the output section 280 of the scanner circuit 200. As a result, the CPU 600 allows the CPU interface 500 and the DATA I / O to be connected from the SOUT signal line.
Through, the scan data of the scanner circuit 200 is captured. When the scan data is captured, IN
CPU interface 500 by T RST line
The scanner circuit 200 is supplied with an INT signal reset command from the scanner. As a result, the interrupt signal on the INT signal line is turned off.

【0012】発振停止処理 すべてのキースイッチがOFF(以下、ALL ZER
O状態と呼ぶ)になると、スキャナー回路200のキー
オールオフ検出回路290により、これを探知して、ス
キャンサイクルを停止する。同時に、スキャナー回路2
00のスキャン・発振停止回路240は、OSC EN
信号ラインより発振回路400に停止命令を与える。停
止命令を受け取った発振回路400は発振を停止する。
その後、スキャンタイミング信号ラインR0〜R3は同
時出力状態、即ち、キーON検出状態となる。スキャン再開処理 キーオン検出状態でのスキャナー回路200は、キーマ
トリックス回路100のいずれかのキースイッチがオン
されるまでの待状態となつている。ここで、いずれかの
キースイッチが押されるとスキャナー回路200は即座
にそれを探知して、再びスキャンを開始する。以上のよ
うに、本実施例では、全てのキースイッチへの入力が無
い場合、スキャンだけでなく発振も停止させることによ
り、消費電流を抑え、しかもスキャン動作により発生す
る高周波ノイズによる他の回路への悪影響を低減すると
いう利点が得られる。
Oscillation stop processing All key switches are turned off (hereinafter, ALL ZER
In the O state), the key all-off detection circuit 290 of the scanner circuit 200 detects this and stops the scan cycle. At the same time, the scanner circuit 2
00 scan / oscillation stop circuit 240
A stop command is given to the oscillation circuit 400 from the signal line. The oscillator circuit 400 that has received the stop command stops the oscillation.
After that, the scan timing signal lines R0 to R3 are in the simultaneous output state, that is, the key ON detection state. In the scan restart processing key-on detection state, the scanner circuit 200 is in a waiting state until one of the key switches of the key matrix circuit 100 is turned on. Here, when any key switch is pressed, the scanner circuit 200 immediately detects it and starts scanning again. As described above, in the present embodiment, when there is no input to all the key switches, not only the scan but also the oscillation is stopped, so that the current consumption is suppressed, and further, the other circuit due to the high frequency noise generated by the scan operation is transmitted. The advantage is reduced.

【0013】図3は、図2のスキャナー回路の詳細な回
路図である。入力部210は、電源VDDとキー状態検出
信号ラインC0〜C3にそれぞれ接続された抵抗211
−0〜211−3と、キー状態検出信号ラインC0〜C
3とにそれぞれ接続されたインバータ212−0〜21
2−3とにより構成されている。キーオン検出回路22
0は、インバータ212−0〜212−3の出力側にそ
れぞれ接続された4入力ORゲート221により構成さ
れている。入力ラッチ回路230は、インバータ212
−0〜212−3の出力側にそれぞれD端子が接続され
た4bit入力信号記憶ラッチ回路231より構成され
ている。入力信号記憶ラッチ回路231のR端子は、電
源投入時回路リセット信号PORが入力される。スキャ
ン・発振動作/停止回路240は、インバータ241、
2入力NANDゲート242、フリップフロップ(以
下、FFと呼ぶ)243、244、2入力NANDゲー
ト245、2入力ANDゲート246、インバータ24
7とにより構成されている。
FIG. 3 is a detailed circuit diagram of the scanner circuit of FIG. The input unit 210 includes a resistor 211 connected to the power supply VDD and the key state detection signal lines C0 to C3, respectively.
-0 to 211-3 and key state detection signal lines C0 to C
And inverters 212-0 to 21 respectively connected to
It is composed of 2-3. Key-on detection circuit 22
0 is composed of a 4-input OR gate 221 connected to the output sides of the inverters 212-0 to 212-3, respectively. The input latch circuit 230 includes an inverter 212
The 4-bit input signal storage latch circuit 231 is connected to the output terminals -0 to 212-3 at the D terminals. The circuit reset signal POR at power-on is input to the R terminal of the input signal storage latch circuit 231. The scan / oscillation operation / stop circuit 240 includes an inverter 241,
Two-input NAND gate 242, flip-flop (hereinafter referred to as FF) 243, 244, two-input NAND gate 245, two-input AND gate 246, inverter 24
7 and.

【0014】インバータ241には、全キースイッチオ
フ信号ALL ZEROが入力される。NANDゲート
242には、インバータ241の出力及び通常スキャン
確認信号NOM SCANが入力される。FF243の
D端子にはNANDゲート242の出力が入力され、S
端子にはスキャン動作要求信号SCAN REQが入力
され、R端子には電源投入時回路リセット信号PORが
入力され、Q端子より発振動作/停止命令信号OSC
ENが出力される。FF244のD端子にはFF243
のQ端子の出力が入力され、R端子にはNANDゲート
245の出力が入力され、Q端子よりスキャン許可信号
SCANENを出力する。FF244のクロック端子に
は、クロック信号φ2 が入力される。ANDゲート24
5には、FF243のQ端子及び電源投入時回路リセッ
ト信号PORが入力され、リセットタイミング信号を出
力する。ANDゲート246には、クロック信号φ2
及びスキャン許可信号SCAN ENが入力されて、ス
キャン動作開始信号SCAN STを出力する。インバ
ータ247には、ORゲート221の出力が入力され、
FF243のS端子に出力する。
The all-key switch-off signal ALL ZERO is input to the inverter 241. The output of the inverter 241 and the normal scan confirmation signal NOMSCAN are input to the NAND gate 242. The output of the NAND gate 242 is input to the D terminal of the FF 243, and S
The scan operation request signal SCAN REQ is input to the terminal, the power-on circuit reset signal POR is input to the R terminal, and the oscillation operation / stop command signal OSC is input from the Q terminal.
EN is output. FF243 is connected to the D terminal of FF244.
The output of the NAND gate 245 is input to the R terminal, and the scan enable signal SCANEN is output from the Q terminal. The clock signal φ 2 is input to the clock terminal of the FF 244. AND gate 24
The Q terminal of the FF 243 and the power-on circuit reset signal POR are input to 5 and output a reset timing signal. The AND gate 246 has a clock signal φ 2 ,
Also, the scan enable signal SCAN_EN is input and a scan operation start signal SCAN_ST is output. The output of the OR gate 221 is input to the inverter 247,
Output to the S terminal of FF243.

【0015】1/4分周回路250は、FF251、2
52、及び2入力NANDゲート253により構成され
ている。FF251のD端子には、FF252のQB端
子の出力が入力され、R端子にはORゲート245の出
力が入力され、Q1 端子からはクロック信号φ1 が出力
される。FF252のD端子はFF1のQ1 端子の出力
が入力され、R端子はANDゲート245の出力が入力
され、Q2 端子からはクロック信号φ2 が出力される。
NANDゲート253には、クロックφ1 及びφ2 が入
力され、ラッチタイミング信号LATCHを出力する。
スキャナ信号発生1/4分周回路260は、FF26
1,262、及びNANDゲート263−0〜263−
3より構成される。FF261のD端子には、FF26
2のQB2 端子の出力が入力され、R端子にはANDゲ
ート245の出力が入力される。FF262のD端子に
は、FF261のQ1 端子の出力が入力され、R端子に
はANDゲート245の出力が入力され、QB2 端子よ
りスキャンサイクル終了信号SCAN SYCが出力さ
れ、この1/4分周回路250はスキャンサイクル信号
発生回路としても機能する。
The 1/4 frequency divider circuit 250 includes FFs 251 and 2
52 and a 2-input NAND gate 253. The output of the QB terminal of the FF 252 is input to the D terminal of the FF 251, the output of the OR gate 245 is input to the R terminal, and the clock signal φ 1 is output from the Q 1 terminal. The output of the Q 1 terminal of FF 1 is input to the D terminal of the FF 252, the output of the AND gate 245 is input to the R terminal, and the clock signal φ 2 is output from the Q 2 terminal.
The clocks φ 1 and φ 2 are input to the NAND gate 253, and the latch timing signal LATCH is output.
The scanner signal generation 1/4 frequency divider circuit 260 uses the FF 26
1, 262, and NAND gates 263-0 to 263-
It consists of 3. The D terminal of FF261 has FF26
The output of the QB 2 terminal of No. 2 is input, and the output of the AND gate 245 is input to the R terminal. The output of the Q 1 terminal of the FF 261 is input to the D terminal of the FF 262, the output of the AND gate 245 is input to the R terminal, and the scan cycle end signal SCAN SYC is output from the QB 2 terminal. The frequency circuit 250 also functions as a scan cycle signal generation circuit.

【0016】NANDゲート263−0には、FF26
1のQ1 端子の出力、及びFF262のQB2 端子の出
力が入力される。NANDゲート263−1には、FF
261のQ1 端子の出力、及びFF262のQ2 端子の
出力が入力される。NANDゲート263−2には、F
F261のQB1 端子の出力、及びFF262のQ2
子の出力が入力される。NANDゲート263−3に
は、FF261のQB1端子の出力、及びFF262の
QB2 端子の出力が入力される。スキャンタイミング信
号発生回路270は、NANDゲート271−0〜27
1−3、NORゲート272−0〜272−3、インバ
ータ273−0〜273−3とにより構成されている。
NANDゲート271−0には、スキャン許可信号SC
AN EN、及びNANDゲート263−0の出力が入
力される。NANDゲート271−1には、スキャン許
可信号SCAN EN、及びNANDゲート263−1
の出力が入力される。NANDゲート271−2には、
スキャン許可信号SCAN EN、及びNANDゲート
263−2の出力が入力される。NANDゲート271
−3には、スキャン許可信号SCAN EN、及びNA
NDゲート263−3の出力が入力される。
The NAND gate 263-0 has an FF 26.
The output of the Q 1 terminal of 1 and the output of the QB 2 terminal of the FF 262 are input. The NAND gate 263-1 has an FF
The output of the Q 1 terminal of 261 and the output of the Q 2 terminal of FF262 are input. The NAND gate 263-2 has an F
The output of the QB 1 terminal of F261 and the output of the Q 2 terminal of FF262 are input. The output of the QB 1 terminal of the FF 261 and the output of the QB 2 terminal of the FF 262 are input to the NAND gate 263-3. The scan timing signal generation circuit 270 includes NAND gates 271-0 to 27-1.
1-3, NOR gates 272-0 to 272-3, and inverters 273-0 to 273-3.
The NAND gate 271-0 has a scan enable signal SC.
The outputs of AN EN and the NAND gate 263-0 are input. The NAND gate 271-1 has a scan enable signal SCAN EN and a NAND gate 263-1.
The output of is input. The NAND gate 271-2 has
The scan enable signal SCAN EN and the output of the NAND gate 263-2 are input. NAND gate 271
-3 includes scan enable signals SCAN EN and NA
The output of the ND gate 263-3 is input.

【0017】NORゲート272−0には、ラッチタイ
ミング信号LATCH、NANDゲート263−0の出
力が入力される。NORゲート272−1には、ラッチ
タイミング信号LATCH、NANDゲート263−1
の出力が入力される。NORゲート272−2には、ラ
ッチタイミング信号LATCH、NANDゲート263
−2の出力が入力される。NORゲート272−3に
は、ラッチタイミング信号LATCH、NANDゲート
263−3の出力が入力される。インバータ273−0
〜273−3からは、スキャンタイミング信号ラインR
0〜R3を出力する。NORゲート272−0〜272
−3からは、ラッチ信号L0〜L3を出力する。出力回
路280は、4ビット出力データラッチ回路281−0
〜281−3、4入力NORゲート282−0〜282
−3、及び16ビットのシフトレジスタ283とにより
構成されている。4bit出力データラッチ回路281
−0〜281−3の各4個のD端子には、4bit入力
信号記憶ラッチ回路231の4個のQ端子の出力が入力
される。NORゲート282−0〜282−3には、そ
れぞれ出力データラッチ回路281−0〜281−3の
Q端子の出力が入力される。シフトレジスタ283に
は、4ビットラッチ回路281−0〜281−3のQ端
子の出力が入力さ、clockライン、LOADライン
が入力される。
The NOR gate 272-0 receives the latch timing signal LATCH and the output of the NAND gate 263-0. The NOR gate 272-1 has a latch timing signal LATCH and a NAND gate 263-1.
The output of is input. The NOR gate 272-2 has a latch timing signal LATCH and a NAND gate 263.
-2 output is input. The NOR gate 272-3 receives the latch timing signal LATCH and the output of the NAND gate 263-3. Inverter 273-0
From 273-3, scan timing signal line R
Outputs 0 to R3. NOR gates 272-0 to 272
-3 outputs latch signals L0 to L3. The output circuit 280 is a 4-bit output data latch circuit 281-0.
~ 281-3, 4-input NOR gates 282-0 ~ 282
-3 and a 16-bit shift register 283. 4-bit output data latch circuit 281
The outputs of the four Q terminals of the 4-bit input signal storage latch circuit 231 are input to the four D terminals of −0 to 281-3, respectively. The outputs of the Q terminals of the output data latch circuits 281-0 to 281-3 are input to the NOR gates 282-0 to 282-3, respectively. The output of the Q terminal of the 4-bit latch circuits 281-0 to 281-3 is input to the shift register 283, and the clock line and the LOAD line are input.

【0018】キーオールオフ検出回路290は、4入力
NANDゲート291により構成されている。NAND
ゲート291には、NORゲート282−0〜282−
3が入力され、全キースイッチオフ信号ALL ZER
Oを出力する。INT信号発生回路300は、ANDゲ
ート301、ORゲート302、FF303、ANDゲ
ート304、FF305、ANDゲート306、AND
ゲート307、ORゲート308、FF309とにより
構成される。ANDゲート301には、FF303のQ
B端子の出力、及びFF309のQB端子の出力が入力
される。ORゲート302には、ANDゲート304の
出力、及びANDゲート301の出力が入力される。F
F303のD端子には、ORゲート302の出力が入力
される。ANDゲート304には、FF303のQ端子
の出力、全キースイッチOFF信号ALL ZEROが
入力される。FF305のD端子には、ANDゲート3
04の出力が入力される。ANDゲート306には、F
F303のQ端子の出力、FF305のQB端子の出
力、及び全キースイッチOFF信号ALL ZEROが
入力される。FF303のQB端子より、通常スキャン
確認信号NOM SCANを出力する。ANDゲート3
07には、FF303のQA 端子の出力、FF305の
B 端子の出力が入力される。ORゲート308には、
ANDゲート306とANDゲート307の出力が入力
される。FF309のD端子にはORゲート308の出
力が入力される。
The key all-off detection circuit 290 is composed of a 4-input NAND gate 291. NAND
The gate 291 includes NOR gates 282-0 to 282-.
3 is input and all key switch off signals ALL ZER
Output O. The INT signal generation circuit 300 includes an AND gate 301, an OR gate 302, an FF 303, an AND gate 304, an FF 305, an AND gate 306, an AND gate.
It is composed of a gate 307, an OR gate 308, and an FF 309. The AND gate 301 has a Q of FF 303.
The output of the B terminal and the output of the QB terminal of the FF 309 are input. The output of the AND gate 304 and the output of the AND gate 301 are input to the OR gate 302. F
The output of the OR gate 302 is input to the D terminal of F303. The output from the Q terminal of the FF 303 and the all-key switch OFF signal ALL ZERO are input to the AND gate 304. AND gate 3 is connected to the D terminal of FF305.
The output of 04 is input. The AND gate 306 has an F
The output of the Q terminal of F303, the output of the QB terminal of FF305, and the all key switch OFF signal ALL ZERO are input. The normal scan confirmation signal NOM SCAN is output from the QB terminal of the FF 303. AND gate 3
The output of the Q A terminal of the FF 303 and the output of the Q B terminal of the FF 305 are input to 07. The OR gate 308 has
The outputs of the AND gate 306 and the AND gate 307 are input. The output of the OR gate 308 is input to the D terminal of the FF 309.

【0019】図4は、図2の動作を示すタイムチャート
である。以下、本発明の主要な内容の1つであるダミー
スキャンを利用したチャタリングによる誤動作の防止に
ついて、図3及び図4を参照しつつ説明する。電源投入
時に、電源投入時回路リセット信号PORにより、入力
信号記憶ラッチ回路231、FF243、出力データラ
ッチ回路281−0〜281−3、FF309がリセッ
トされる。ANDゲート245により、FF244、2
51、252、261、262、FF302、FF30
5がリセットされる。FF244は、リセットによりS
CAN ENに“L”レベルを出力する。このため、N
ANDゲート271−0〜271−3は、“H”レベル
を出力して、インバータ273−0〜273−3よりス
キャンタイミング信号ラインR0〜R3はすべて“L”
レベルになる。よって、キー状態検出信号ラインC0〜
C3は、外部に接続されたキーマトリックス回路100
のラインC0〜C3上のすべてのキースイッチに反応す
る。ただし、どのキースイッチがONされたかを識別す
ることができない。この状態がキーオン検出状態であ
る。また、FF243がリセットされているため、OS
C ENは“L”レベルなので、発振回路400は停止
している。
FIG. 4 is a time chart showing the operation of FIG. Hereinafter, prevention of malfunction due to chattering using dummy scan, which is one of the main contents of the present invention, will be described with reference to FIGS. 3 and 4. When the power is turned on, the input signal storage latch circuit 231, the FF 243, the output data latch circuits 281-0 to 281-3, and the FF 309 are reset by the power-on circuit reset signal POR. The AND gate 245 causes the FFs 244, 2
51, 252, 261, 262, FF302, FF30
5 is reset. FF244 resets to S
Outputs "L" level to CAN EN. Therefore, N
The AND gates 271-0 to 271-3 output "H" level, and the inverters 273-0 to 273-3 output all the scan timing signal lines R0 to R3 to "L".
Become a level. Therefore, the key state detection signal lines C0 to C0
C3 is a key matrix circuit 100 connected to the outside.
Responds to all key switches on lines C0-C3 of. However, it is not possible to identify which key switch is turned on. This state is the key-on detection state. Also, since the FF 243 is reset, the OS
Since C EN is at “L” level, the oscillation circuit 400 is stopped.

【0020】ここで、いずれかのキースイッチがオンさ
れると、そのキースイッチが存在するラインと接続され
たキー状態検出信号ラインC0〜C3が抵抗211−0
〜211−3により“L”レベルとなり、ORゲート2
21及びインバータ222より、SCAN REQに
“H”レベルを出力する。“H”レベルに変わったSC
AN REQは、スキャン・発振動作/停止回路240
のFF243をセットする。セットされたFF243
は、OSC ENラインを“H”レベルにして、スキャ
ナー回路200の外部の発振回路400は、発振を開始
する。発振回路400から与えられた発振信号φ0 は、
1/4分周回路250のFF251、252にクロック
入力される。発振信号φ0 の周期をTとした時、1/4
分周回路250のFF251、252により4Tの周期
に変換された信号は、クロックφ1 、φ2 として出力さ
れる。φ0 、φ1 、φ2 信号の波形は、図4に示す通り
である。φ2 信号は、スキャン・発振動作/停止回路2
40中のFF244にクロック入力される。FF243
はセットされているため、“H”レベルを出力してい
る。φ2 信号のクロック入力により、FF244により
SCAN EN信号を“H”レベルにする。これによ
り、スキャナー信号発生1/4分周回路260で発生す
るスキャナ信号は、NANDゲート271−0〜271
−3からの出力が可能となる。
When any one of the key switches is turned on, the key state detection signal lines C0 to C3 connected to the line in which the key switch exists are connected to the resistor 211-0.
~ 211-3 goes to "L" level and OR gate 2
21 and the inverter 222 output "H" level to SCAN REQ. SC changed to "H" level
AN REQ is a scan / oscillation operation / stop circuit 240
FF 243 of is set. FF243 set
Causes the OSC EN line to go to the “H” level, and the oscillation circuit 400 outside the scanner circuit 200 starts oscillation. The oscillation signal φ 0 given from the oscillation circuit 400 is
The clock is input to the FFs 251 and 252 of the 1/4 frequency divider circuit 250. When the cycle of the oscillation signal φ 0 is T, 1/4
The signals converted into the cycle of 4T by the FFs 251 and 252 of the frequency dividing circuit 250 are output as clocks φ 1 and φ 2 . The waveforms of the φ 0 , φ 1 , and φ 2 signals are as shown in FIG. φ 2 signal is used for scan / oscillation operation / stop circuit 2
The clock is input to the FF 244 in 40. FF243
Has been set, it outputs "H" level. By the clock input of the φ 2 signal, the FF 244 sets the SCAN EN signal to the “H” level. As a result, the scanner signal generated by the scanner signal generation 1/4 frequency dividing circuit 260 is transferred to the NAND gates 271-0 to 271.
Output from -3 is possible.

【0021】一方、SCAN EN信号が“H”レベル
になったことにより、周期4Tのφ2 信号がANDゲー
ト246を通過して、SCAN ST信号としてスキャ
ナ信号発生1/4分周回路260のFF261、262
のクロックに入力される。これにより、4Tのパルス幅
を持った“H”レベルの信号をNANDゲート263−
0〜263−3から順に出力する。出力された“H”レ
ベルの信号は、NANDゲート271−0〜271−
3、インバータ273−0〜273−3を通過して、ス
キャンタイミング出力端子R0〜R3からスキャナー回
路200の外部のキーマトリックス回路100に“L”
レベルとして出力される。このスキャンタイミング信号
R0〜R3の信号波形は、図4に示すようになる。ま
た、FF262のQB2 端子より1スキャンサイクル時
間である16Tの周期のSCAN SYC信号を出力す
る。SCAN SYC信号は、FF243,303、3
05、309にクロック入力される。このクロック信号
に同期して、INT信号発生回路300は、1スキャン
サイクル終了ごとに、INT信号発生の判断を行う。ス
キャナー回路200の外部のキーマトリックス回路10
0中では、まずR0信号ラインが“L”レベルとなる。
ここで、もしR0信号ライン上のあるキースイッチがO
FFであるとすると、キー状態検出信号ラインC0〜C
3のうち、このオフ状態のキースイッチに対応する端子
は、“H”レベルである。このキースイッチがオンされ
ると、入力部210の抵抗211−0〜211−3の電
圧降下により、対応する端子は“L”レベルとなる。こ
うして、R0ラインからR3ラインまで順にキースイッ
チのオン/オフ状態が入力信号記憶ラッチ回路231に
取り込まれる。取り込まれたデータは、入力信号記憶ラ
ッチ231から出力データラッチ281−0〜281−
3にL0〜L3信号により、周期的に振り分けられる。
On the other hand, since the SCAN EN signal becomes the "H" level, the φ 2 signal having a cycle of 4T passes through the AND gate 246 to generate the SCAN ST signal and the FF 261 of the 1/4 frequency dividing circuit 260 for generating the scanner signal. , 262
Is input to the clock. As a result, an "H" level signal having a pulse width of 4T is sent to the NAND gate 263-.
Output from 0 to 263-3 in order. The output "H" level signals are NAND gates 271-0 to 271-
3. After passing through the inverters 273-0 to 273-3, "L" is input from the scan timing output terminals R0 to R3 to the key matrix circuit 100 outside the scanner circuit 200.
Output as a level. The signal waveforms of the scan timing signals R0 to R3 are as shown in FIG. In addition, the QB 2 terminal of the FF 262 outputs a SCAN SYNC signal having a cycle of 16T, which is one scan cycle time. SCAN SYNC signals are FF243, 303, 3
The clock is input to 05 and 309. In synchronization with this clock signal, the INT signal generation circuit 300 determines the generation of the INT signal each time one scan cycle ends. Key matrix circuit 10 external to scanner circuit 200
During 0, the R0 signal line first becomes "L" level.
Here, if some key switch on the R0 signal line is O
If it is FF, key state detection signal lines C0 to C
Of the three, the terminal corresponding to this key switch in the off state is at the “H” level. When this key switch is turned on, the voltage drop across the resistors 211-0 to 211-3 of the input section 210 causes the corresponding terminal to go to the "L" level. In this way, the ON / OFF state of the key switch is sequentially fetched by the input signal storage latch circuit 231 from the R0 line to the R3 line. The fetched data is output from the input signal storage latch 231 and output data latches 281-0 to 281-.
3 are periodically distributed by the L0 to L3 signals.

【0022】ここで、入力信号記憶ラッチ回路231か
ら出力データラッチ281−0〜281−3へのデータ
の転送について説明する。入力信号記憶ラッチ回路23
1は、1/4分周回路250からのクロック信号φ1
より、周期4T間隔で新たなデータの記憶・出力を行
い、これを繰り返す。この入力信号記憶ラッチ回路23
1の出力状態のタイミングは、図4に示す通りである。
一方、1/4分周回路250から出力される周期4Tの
パルス幅Tの“L”レベル信号、LATCHは、NOR
ゲート272−0〜272−3に入力される。LATC
H信号波形は、図4に示す通りである。この“L”レベ
ルのLATCH信号とスキャナー信号発生1/4分周回
路260のNANDゲート263−0〜263−3から
出力されるパルス幅4Tで“L”レベルのスキャンタイ
ミング信号は、それぞれを反転した信号の積としてNO
Rゲート272−0〜272−3を通過する。これがL
0〜L3信号となる。L0〜L3の信号波形は、図4に
示す通りである。L0〜L3信号は、パルス幅Tの
“H”レベル信号として、出力部280の出力データラ
ッチ回路281−0〜281−3のラッチ入力端子Lに
入力される。これにより、出力データラッチ281−0
〜281−3は、入力信号記憶ラッチ回路231からの
スキャンデータを取り込む。
Data transfer from the input signal storage latch circuit 231 to the output data latches 281-0 to 281-3 will now be described. Input signal storage latch circuit 23
1 stores and outputs new data at intervals of 4T in response to the clock signal φ 1 from the 1/4 frequency divider circuit 250, and repeats this. This input signal storage latch circuit 23
The timing of the output state of 1 is as shown in FIG.
On the other hand, the "L" level signal of the pulse width T of the cycle 4T output from the 1/4 frequency divider circuit 250, LATCH is NOR.
It is input to the gates 272-0 to 272-3. LATC
The H signal waveform is as shown in FIG. The "L" level LATCH signal and the "L" level scan timing signal with a pulse width of 4T output from the NAND gates 263-0 to 263-3 of the scanner signal generation quarter frequency divider 260 are inverted. NO as the product of the signals
It passes through the R gates 272-0 to 272-3. This is L
0 to L3 signal. The signal waveforms of L0 to L3 are as shown in FIG. The L0 to L3 signals are input to the latch input terminals L of the output data latch circuits 281-0 to 281-3 of the output unit 280 as "H" level signals having the pulse width T. This causes the output data latch 281-0
˜281-3 take in the scan data from the input signal storage latch circuit 231.

【0023】出力データラッチ回路281−0〜281
−3の出力は、16bitのパラレルINシリアルOU
Tシフトレジスタ283に出力される。パラレルINシ
リアルOUTシフトレジスタ283は、スキャナー回路
200の外部のCPU600からLOAD信号を受け、
出力データラッチ回路281−0〜281−3のスキャ
ンデータを取り込む。続いて、CPU600からclo
ck信号が与えられ、パラレルINシリアルOUTシフ
トレジスタ283は、SOUT信号ラインからCPU6
00へスキャンデータを出力する。この後、スキャナー
回路200は、スキャンタイミング信号端子からの出
力、キー状態検出信号端子からの入力、パラレルINシ
リアルOUTシフトレジスタ283へのデータの入力を
繰り返す。
Output data latch circuits 281-0 to 281
-3 output is 16 bit parallel IN serial OU
It is output to the T shift register 283. The parallel IN serial OUT shift register 283 receives the LOAD signal from the CPU 600 outside the scanner circuit 200,
The scan data of the output data latch circuits 281-0 to 281-3 is fetched. Then, from the CPU 600,
The ck signal is given, and the parallel-in serial-out shift register 283 outputs the CPU6 from the SOUT signal line.
The scan data is output to 00. After that, the scanner circuit 200 repeats the output from the scan timing signal terminal, the input from the key state detection signal terminal, and the input of the data to the parallel IN serial OUT shift register 283.

【0024】次に、スキャナー回路200外部のキーマ
トリックス回路100のすべてのキースイッチがオフさ
れたとする。すべてのキースイッチがオフ状態でのスキ
ャンサイクルが終了すると、出力データラッチ回路28
1−0〜281−3の出力は、すべて“L”レベルとな
る。そのため、NORゲート282−0〜282−3
は、“H”レベルを出力する。これにより、NANDゲ
ート291は、ALL ZERO信号を“L”レベルに
する。ALL ZERO信号は、INT信号発生回路3
00に入力される他、インバータ241で反転され、
“H”レベルとしてスキャン・発振動作/停止回路24
0のNANDゲート242に入力される。このとき、ス
キャンサイクルがダミースキャンでないことを示すNO
M SCAN信号をINT信号発生回路300が“H”
レベルにすると、NANDゲート242が“L”レベル
信号をFF243に出力する。FF243は、OSC
EN信号とFF244の入力を“L”レベルにする。こ
れによりスキャナー回路200の外部の発振回路400
は、発振を停止する。
Next, it is assumed that all the key switches of the key matrix circuit 100 outside the scanner circuit 200 are turned off. When the scan cycle with all the key switches turned off is completed, the output data latch circuit 28
The outputs of 1-0 to 281-3 are all at "L" level. Therefore, NOR gates 282-0 to 282-3
Outputs "H" level. As a result, the NAND gate 291 sets the ALL ZERO signal to the “L” level. The ALL ZERO signal is the INT signal generation circuit 3
In addition to being input to 00, it is inverted by the inverter 241.
Scan / oscillation operation / stop circuit 24 as "H" level
0 to the NAND gate 242. At this time, NO indicating that the scan cycle is not the dummy scan
The INT signal generating circuit 300 outputs the MSCAN signal to "H".
When set to the level, the NAND gate 242 outputs the “L” level signal to the FF 243. FF243 is OSC
The EN signal and the input of the FF 244 are set to "L" level. As a result, the oscillation circuit 400 outside the scanner circuit 200
Stops oscillation.

【0025】同時に、FF244がSCAN ENを
“L”レベルにするので、NANDゲート271−0〜
271−3は、“H”レベルを出力し、スキャンタイミ
ング信号端子R0〜R3はすべて“L”レベルとなる。
つまり、キーオン検出状態に戻るのである。スキャナー
回路200の動作説明の最後に、INT信号発生回路3
00とダミースキャンについて説明する。電源が投入さ
れると、INT信号発生回路300のFF300,30
5,309がリセットされ、FF309の出力INT信
号は“L”レベルでスタートする。ここで、キーマトリ
ックス回路100のいずれかのキースイッチが押された
とすると、1度目のスキャンサイクル終了後、スキャン
サイクル終了を示すSCAN SYC信号がスキャナー
信号発生1/4分周回路260により発生する。1度目
のSCAN SYC信号をクロックとして、FF303
は“H”レベル、FF305は“L”レベル、FF30
9は“L”レベルを出力する。つまり、INT信号は発
生しない。この結果は、キーオールオフ検出回路290
の出力ALLZERO信号のレベルに依存しない。一
方、発振動作については、NOM SCAN信号のリセ
ット時のレベルが“L”レベルのため、スキャン・発振
動作/停止回路240のFF243は、1度目のSCA
N SYC信号が入力されてもOSC EN信号の
“H”レベルを維持し、発振は持続する。
At the same time, since the FF 244 sets the SCAN EN to the "L" level, the NAND gate 271-0.
271-3 outputs "H" level, and the scan timing signal terminals R0 to R3 all become "L" level.
That is, it returns to the key-on detection state. At the end of the operation description of the scanner circuit 200, the INT signal generation circuit 3
00 and dummy scan will be described. When the power is turned on, the FFs 300, 30 of the INT signal generation circuit 300 are
5, 309 are reset, and the output INT signal of the FF 309 starts at "L" level. If any key switch of the key matrix circuit 100 is pressed, the SCAN SYNC signal indicating the end of the scan cycle is generated by the scanner signal generation 1/4 frequency divider circuit 260 after the end of the first scan cycle. FF303 using the first SCAN SYNC signal as a clock
Is "H" level, FF305 is "L" level, FF30
9 outputs "L" level. That is, the INT signal is not generated. As a result, the key all-off detection circuit 290
Output ALLZERO does not depend on the level of the signal. On the other hand, regarding the oscillation operation, since the level of the NOM SCAN signal at the time of reset is “L” level, the FF 243 of the scan / oscillation operation / stop circuit 240 causes the first SCA.
Even if the N SYC signal is input, the “H” level of the OSC EN signal is maintained and oscillation continues.

【0026】次に、2度目のSCAN SYC信号が入
力された時、キースイッチがまだオン状態にあるとする
と、ALL ZERO信号は“H”レベルにある。ゆえ
に、FF303は“H”レベル、FF305は“H”レ
ベル、FF309は“H”レベルを出力する。つまり2
度目のスキャンサイクル終了時には、INT信号が出力
される。発振動作については、NOM SCAN信号の
1度目のスキャンサイクル終了時のレベルが“H”レベ
ルのため、前述した理由で発振は持続する。以下、キー
スイッチがオン状態にあれば、2度目のスキャンサイク
ル終了時と同様に、スキャンサイクルが終了する度に、
INT信号が出力され、発振は持続する。
Next, if the key switch is still on when the second SCAN SYNC signal is input, the ALL ZERO signal is at "H" level. Therefore, the FF 303 outputs the “H” level, the FF 305 outputs the “H” level, and the FF 309 outputs the “H” level. That is 2
At the end of the second scan cycle, the INT signal is output. Regarding the oscillating operation, since the level of the NOM SCAN signal at the end of the first scan cycle is the “H” level, the oscillation continues for the reason described above. Hereinafter, if the key switch is in the ON state, each time the scan cycle ends, as in the case of the end of the second scan cycle,
The INT signal is output and oscillation continues.

【0027】次に、キーオールオフ検出回路290によ
り、すべてのキースイッチがオフ状態にあることが検出
されたとき、ALL ZERO信号は“L”レベルとな
る。ゆえにSCAN SYC信号が入力されたとき、F
F303は“L”レベル、FF305は“L”レベル、
FF309は“H”レベルを出力する。したがって、こ
のときもINT信号は出力される。発振動作について
は、NOM SCAN信号が“H”レベルであり、AL
LZERO信号が“H”レベルであるため、FF243
はSCAN SYC信号の入力により、OSC EN信
号を“L”レベルにし、発振は停止する。スキャナー回
路200の外部のCPU600によるスキャンデータの
取り込みは、INT信号ラインからCPU600に割り
込み信号を出力することで可能となる。CPU600は
INT信号が“H”レベルの時、パラレルINシリアル
OUTシフトレジスタ283からスキャンデータを取り
込むことができる。CPU600による取り込み完了
後、INT RSTが“H”レベルとなり、FF309
がリセットされ、INT信号を“L”レベルにする。I
NT信号発生回路300は、前述のように、ALL Z
EROが“H”レベルから“L”レベルに変化した後、
2度目のクロックが入力されるまで、INT信号を
“L”レベルに維持する。つまり、すべてのキースイッ
チがOFF状態からいずれかのキースイッチがONにな
るとスキャンが開始するが、この1度目のスキャンサイ
クル終了時のINT信号は発生しないのである。このた
めCPU600は、1度目のスキャンによるスキャンデ
ータを取り込むことはない。この1度目のスキャンサイ
クルがダミースキャンである。
Next, when the key all-off detection circuit 290 detects that all the key switches are in the off state, the ALL ZERO signal becomes "L" level. Therefore, when the SCAN SYNC signal is input, F
F303 is "L" level, FF305 is "L" level,
The FF 309 outputs "H" level. Therefore, also at this time, the INT signal is output. Regarding the oscillation operation, when the NOM SCAN signal is at "H" level, the AL
Since the LZERO signal is at "H" level, FF243
When the SCAN SYNC signal is input, the OSC EN signal is set to the “L” level, and the oscillation is stopped. The CPU 600 outside the scanner circuit 200 can take in scan data by outputting an interrupt signal to the CPU 600 from the INT signal line. The CPU 600 can take in scan data from the parallel IN serial OUT shift register 283 when the INT signal is at “H” level. After the CPU 600 completes loading, INT RST becomes “H” level, and FF309
Are reset, and the INT signal is set to "L" level. I
The NT signal generation circuit 300, as described above, uses the ALL Z
After ERO changes from "H" level to "L" level,
The INT signal is maintained at the “L” level until the second clock is input. In other words, when all the key switches are turned off and one of the key switches is turned on, scanning starts, but the INT signal at the end of the first scan cycle is not generated. Therefore, the CPU 600 does not take in the scan data of the first scan. This first scan cycle is a dummy scan.

【0028】次に、本発明の実施例によるダミースキャ
ンのチャタリングに対する利点を詳しく説明する。図5
〜図8は、図2のスキャナー回路を内蔵する図1のキー
入力装置の動作により発生する信号のタイムチャートで
ある。以下の例では、スキャンタイミング信号ラインR
1とキー状態検出信号ラインC1との交点にあるキース
イッチSW1のみがON/OFF動作を行い、他のキー
スイッチは常にオフ(“H”レベル)にあるとする。そ
のため、R1信号が“L”レベルにあるときまたはキー
オン検出状態時のみSW1の状態がC1信号に現れる。
図5は、チャタリングがスキャンサイクルよりも短い場
合を示す図である。SW1は、キースイッチSW1のオ
ン/オフ状態を示す。SCAN REQはキーON検出
回路220の出力の信号レベルを示す。C0〜C3はキ
ー状態検出信号端子C0〜C3の信号レベルを示す。R
0〜R3はスキャンタイミング信号端子R0〜R3の信
号レベルを示す。INTは割り込み信号INTの信号レ
ベルを示す。CPU DATA(SW1)は、CPU6
00が読み取るキースイッチSW1のオン/オフ状態を
示す。
Next, the advantages of the dummy scan according to the embodiment of the present invention with respect to chattering will be described in detail. Figure 5
8 is a time chart of signals generated by the operation of the key input device of FIG. 1 incorporating the scanner circuit of FIG. In the following example, the scan timing signal line R
It is assumed that only the key switch SW1 at the intersection of 1 and the key state detection signal line C1 performs the ON / OFF operation, and the other key switches are always off (“H” level). Therefore, the SW1 state appears in the C1 signal only when the R1 signal is at the "L" level or in the key-on detection state.
FIG. 5 is a diagram showing a case where chattering is shorter than the scan cycle. SW1 indicates the on / off state of the key switch SW1. SCAN REQ indicates the signal level of the output of the key ON detection circuit 220. C0 to C3 indicate the signal levels of the key state detection signal terminals C0 to C3. R
0 to R3 indicate the signal levels of the scan timing signal terminals R0 to R3. INT indicates the signal level of the interrupt signal INT. CPU DATA (SW1) is CPU6
00 indicates the on / off state of the key switch SW1 to be read.

【0029】初め、すべてのキースイッチはオフ状態に
ある。そのため、C0〜C3は“H”レベルであり、S
CAN REQは“L”レベルにある。R0〜R3はす
べて“L”レベルのキーON検出状態である。スキャン
が停止しているので、INTは“L”レベルである。C
PU DATA(SW1)は、SW1のオフ状態を示し
ている。SW1がONされると回路外部から、混入する
ニュアンスがある。チャタリング(SW自体の接触不良
により発生するもの)が発生する。チャタリングによる
最初のON動作により、SCAN REQが“H”レベ
ルとなりスキャンが開始する(a時点)。ただし、始め
のスキャンサイクルT1はダミースキャンであり、T1
終了後もINTは“L”レベルのままである。第2回目
のスキャンサイクルT2では、すでにチャタリングが終
了し、SW1はオン状態で安定している。b時点でスキ
ャンされたC1の“L”レベルはT2終了後、INTが
“H”レベルになることでCPU600に取り込まれ
る。これがCPU DATA(SW1)の立上がり(c
時点)となる。CPU600の取り込みが終了すると、
INTは“L”レベルに戻される。その後も、スキャン
サイクルは繰り返されるがSW1がON状態で安定して
いるため、CPU DATA(SW1)はON状態を維
持する。
Initially, all key switches are in the off state. Therefore, C0 to C3 are at "H" level, and S
CAN REQ is at "L" level. R0 to R3 are all in the "L" level key ON detection state. Since the scanning is stopped, INT is at "L" level. C
PU DATA (SW1) indicates the OFF state of SW1. When SW1 is turned on, there is a nuance of mixing from the outside of the circuit. Chattering (generated by poor contact of SW itself) occurs. By the first ON operation due to chattering, SCAN REQ becomes "H" level and scanning starts (time a). However, the first scan cycle T1 is a dummy scan and T1
After the end, INT remains at "L" level. In the second scan cycle T2, chattering has already ended, and SW1 is in the on state and stable. The "L" level of C1 scanned at time b is taken into CPU 600 when INT becomes "H" level after the end of T2. This is the rise of CPU DATA (SW1) (c
Time point). When the CPU 600 is loaded,
INT is returned to "L" level. After that, the scan cycle is repeated, but since SW1 is stable in the ON state, CPU DATA (SW1) maintains the ON state.

【0030】このようにダミースキャンによりSW1の
立上がり時のチャタリングによる影響がCPU600に
及ばない。同様に、図5を用いて、チャタリングがスキ
ャンサイクルより短い条件で、SW1がオン状態からオ
フされた場合について説明する。SW1がオフされると
チャタリングが発生する。スキャンサイクルT4のd時
点で初めてC1が“H”レベルに変化したことが検出さ
れる。これによりT4終了後、ALL ZEROと判断
され、スキャンは停止して、キーオン検出状態へ戻る。
d時点でスキャンされたC1の“H”レベルは、T4終
了後、INTが“H”レベルになることによりCPU6
00へ取り込まれる。これがCPU DATA(SW
1)の立ち下がり(e時点)となる。このように、SW
1のオフ後、初めてCPU600に取り込まれるオフ状
態以降、CPU DATA(SW1)はオフ状態を維持
する。こうして、CPU DATA(SW1)は、チャ
タリングの影響のない波形となる。以上のように、チャ
タリングがスキャンサイクルよりも短い場合、ダミース
キャンとALL ZERO時のスキャン停止を利用して
チャタリングによるCPU600の誤動作を防止でき
る。
As described above, the dummy scan does not affect the CPU 600 due to chattering at the rising edge of SW1. Similarly, a case where the SW1 is turned off from the on state under the condition that chattering is shorter than the scan cycle will be described with reference to FIG. When SW1 is turned off, chattering occurs. It is detected that C1 has changed to the “H” level for the first time at the time point d of the scan cycle T4. As a result, after the end of T4, it is determined to be ALL ZERO, the scan is stopped, and the state returns to the key-on detection state.
The “H” level of C1 scanned at the time point d is set to “H” level by INT after the end of T4, and thus the CPU 6
It is taken in to 00. This is CPU DATA (SW
It is the fall of 1) (time e). In this way, SW
After turning off 1, the CPU DATA (SW1) maintains the off state after the off state, which is taken into the CPU 600 for the first time. Thus, the CPU DATA (SW1) has a waveform that is not affected by chattering. As described above, when the chattering is shorter than the scan cycle, the dummy scan and the scan stop at the ALL ZERO can be used to prevent the malfunction of the CPU 600 due to the chattering.

【0031】次に、図6を用いてチャタリングがスキャ
ンサイクルよりも長い場合について説明する。初め、す
べてのキースイッチはオフ状態にあり、スキャナー回路
200は、キーオン検出状態である。SW1がオンされ
ると、チャタリングが発生する。ダミースキャンT5が
終了するまでは、図5の場合の説明と同様である。図6
の例では、ダミースキャンT5が終了してもまだチャタ
リングが残っている。通常のスキャンT6のf時点でC
1の“H”レベルがスキャンされると、ALL ZER
Oと判断され、スキャンは停止して、キーオン検出状態
へ戻る(g時点)。f時点でスキャンされたC1の
“H”レベルは、T6終了後、INTが“H”レベルと
なり、CPU600へ取り込まれる。そのため、CPU
DATA(SW1)はオフ状態を維持する。g時点で
スキャナー回路200は、キーON検出状態になるがS
W1はすでに安定しているので、SCAN REQは瞬
時に“H”レベルになりスキャンが再開する(h時
点)。再開時のスキャンサイクルは、ダミースキャンで
あり、INTは“L”レベルのままである。
Next, a case where chattering is longer than the scan cycle will be described with reference to FIG. Initially, all the key switches are in the off state, and the scanner circuit 200 is in the key-on detection state. When SW1 is turned on, chattering occurs. Until the dummy scan T5 ends, the description is the same as in the case of FIG. Figure 6
In the example, chattering still remains even after the dummy scan T5 ends. C at time f of normal scan T6
When the “H” level of 1 is scanned, ALL ZER
It is determined to be O, the scanning is stopped, and the state returns to the key-on detection state (time point g). The “H” level of C1 scanned at the time point “f” is taken into the CPU 600 by INT becoming “H” level after the end of T6. Therefore, the CPU
DATA (SW1) maintains the off state. At time g, the scanner circuit 200 enters the key ON detection state, but S
Since W1 is already stable, SCAN REQ instantly goes to the “H” level and the scanning is restarted (time h). The scan cycle at the time of restart is a dummy scan, and INT remains at "L" level.

【0032】次のスキャンサイクルのi時点でC1の
“L”レベルがスキャンされ、スキャンサイクル終了
後、INTが“H”レベルとなりC1のスキャンデータ
がCPU600に取り込まれる。これが、CPU DA
TA(SW1)の立上がり(j時点)となる。その後
も、スキャンサイクルは繰り返されるが、SW1がオン
状態で安定しているため、CPU DATA(SW1)
はオン状態を維持する。このように、ダミーキャンによ
りSW1の立上がり時のチャタリングの影響がCPU6
00に及ばないのである。同様に、図6を用いてチャタ
リングがスキャンサイクルよりも長い条件でSW1がオ
フされた場合について説明する。SW1がオフされてか
らCPU DATA(SW1)がk時点で立ち下がり、
スキャンが停止、キーオン検出状態になる(l時点)ま
では図5での説明と同じである。
At the time i of the next scan cycle, the "L" level of C1 is scanned, and after the end of the scan cycle, INT becomes "H" level and the scan data of C1 is taken into the CPU 600. This is CPU DA
TA (SW1) rises (at time j). After that, the scan cycle is repeated, but since SW1 is on and stable, CPU DATA (SW1)
Keeps on. In this way, the influence of chattering when the SW1 rises due to the dummy can is reduced by the CPU 6
It is less than 00. Similarly, a case where SW1 is turned off under the condition that chattering is longer than the scan cycle will be described with reference to FIG. After SW1 is turned off, CPU DATA (SW1) falls at time k,
It is the same as the description in FIG. 5 until the scanning is stopped and the key-on detection state is reached (time point l).

【0033】しかし、図6の例では、まだチャタリング
が持続しているため、キーオン検出状態に変わった直
後、最初のチャタリングによるオン動作によりSCAN
REQが“H”レベルとなり、スキャンが再開する
(m時点)。再開時のスキャンサイクルT8はダミース
キャンであり、T8が終了してもINTは“L”レベル
のままである。そのため、CPU DATA(SW1)
は、OFF状態を維持する。次のスキャンサイクルT9
のn時点では、SW1がすでにオフ状態で安定してお
り、C1の“H”レベルがスキャンされる。T9終了
後、ALL ZEROが判断され、スキャンは停止し、
キーオン検出状態となる。また、INTが“H”レベル
になることにより、CPU600がC1のスキャンデー
タを取り込む。しかし、このスキャンデータは、SW1
のOFF状態を示すものであり、CPUDATA(SW
1)はOFF状態を維持する。こうして、CPU DA
TA(SW1)は、チャタリングの影響のない波形とな
る。以上のように、チャタリングがスキャンサイクルよ
りも長い場合においても、ダミースキャンとALL Z
ERO時のスキャン停止を利用しチャタリングによるC
PU600の誤動作を防止できる。図7は、SW1に図
6と同じチャタリングが発生した場合における、ダミー
キャンを利用しない回路のタイムチャートである。図7
に示すように、CPU DATA(SW1)の立上が
り、立ち下がりともにチャタリングによる影響が表れて
いる。
However, in the example of FIG. 6, since chattering still continues, immediately after the state is changed to the key-on detection state, the SCAN is performed by the first turn-on operation due to chattering.
REQ becomes "H" level, and scanning is restarted (time point m). The scan cycle T8 at the time of restart is a dummy scan, and INT remains at "L" level even after T8 ends. Therefore, CPU DATA (SW1)
Keeps the OFF state. Next scan cycle T9
At time n, SW1 is already in the OFF state and stable, and the “H” level of C1 is scanned. After T9, ALL ZERO is judged, scanning stops,
The key-on is detected. Further, when INT becomes "H" level, the CPU 600 takes in the scan data of C1. However, this scan data
Is an OFF state of CPUDATA (SW
In 1), the OFF state is maintained. Thus, CPU DA
TA (SW1) has a waveform that is not affected by chattering. As described above, even if chattering is longer than the scan cycle, dummy scan and ALL Z
C by chattering using scan stop at ERO
The malfunction of PU600 can be prevented. FIG. 7 is a time chart of a circuit that does not use dummy cans when the same chattering as in FIG. 6 occurs in SW1. Figure 7
As shown in, the influence of chattering appears on both the rising and falling edges of CPU DATA (SW1).

【0034】次に、キースイッチがオフ時にノイズが混
入した場合のダミーキャンの効果について図8を用いて
説明する。ここで、すべてのキースイッチはオフ状態に
あり、スキャナー回路200はキーオン検出状態にあ
る。SW1にノイズが混入したとすると、SCAN R
EQが“H”レベルとなり、スキャンが開始する。スキ
ャンサイクルT10は、ダミースキャンであり、CPU
600はスキャンデータを取り込むことはない。さらに
通常のスキャンサイクルT11が開始したときには、す
でにSW1は定常なオフ状態に戻っている。そのため、
C1からスキャンされるデータは、“H”レベルであ
り、T11終了後、INTが“H”レベルになること
で、CPU600に取り込まれるスキャンデータはSW
1のオフ状態である。このように、ノイズが混入しても
CPU DATA(SW1)は、オフ状態を維持し続け
る。以上のように、キースイッチへの入力がない場合、
スキャンだけでなく発振回路400も停止させ、消費電
流及びスキャンによる高周波ノイズを抑えるとともに、
スキャン停止とダミースキャンを利用してチャタリング
によるCPU600の誤動作を防ぐことが可能となる。
Next, the effect of the dummy can when the noise is mixed when the key switch is off will be described with reference to FIG. Here, all the key switches are in the off state, and the scanner circuit 200 is in the key on detection state. If noise is mixed in SW1, SCAN R
The EQ becomes "H" level, and scanning starts. The scan cycle T10 is a dummy scan, and the CPU
The 600 does not capture scan data. Further, when the normal scan cycle T11 is started, SW1 has already returned to the steady off state. for that reason,
The data scanned from C1 is at “H” level, and after T11 ends, INT becomes “H” level, so that the scan data captured by the CPU 600 is SW.
1 is in the off state. In this way, the CPU DATA (SW1) continues to maintain the off state even if noise is mixed. As mentioned above, when there is no input to the key switch,
Not only the scan, but also the oscillation circuit 400 is stopped to suppress current consumption and high frequency noise due to the scan.
It is possible to prevent malfunction of the CPU 600 due to chattering by using scan stop and dummy scan.

【0035】なお、本発明は、上記実施例に限定されず
種々の変形が可能である。その変形例としては、例えば
次のようなものがある。 (1) 実施例では、4×4=16のキースイッチを持
つキーマトリックス回路を使ったが、さらに多くのキー
スイッチを持った回路にも適用可能である。 (2) 実施例では、スキャン開始後、最初のスキャン
サイクルのみをダミースキャンとしたが、キースイッチ
の性能(チャタリングの長さ)によってダミースキャン
時間を増やすことも可能である。 (3) 本実施例は、セグメント数の多いキーボードを
有する製品、特に低消費電流、低発熱、小型化の期待さ
れる車載用電子製品、AV製品、携帯用通信機器などへ
の幅広い応用が考えられる。
The present invention is not limited to the above embodiment, and various modifications can be made. The following are examples of such modifications. (1) In the embodiment, a key matrix circuit having 4 × 4 = 16 key switches is used, but it is also applicable to a circuit having more key switches. (2) In the embodiment, the dummy scan is performed only in the first scan cycle after the start of the scan, but the dummy scan time can be increased depending on the performance of the key switch (chattering length). (3) The present embodiment is considered to have a wide range of applications to products having a keyboard with a large number of segments, particularly in-vehicle electronic products, AV products, portable communication devices, etc., which are expected to have low current consumption, low heat generation and miniaturization. To be

【0036】[0036]

【発明の効果】以上詳細に説明したように、第1,3,
4の発明によれば、キースイッチがすべてオフされた時
には、発振回路の発振動作を停止するので消費電流が低
減することができる。第2、3、5の発明によれば、ス
キャン開始後、特定のスキャンサイクル以内では、割り
込み信号をCPUに出力しないので、チャタリングによ
る誤動作を回避することができる。
As described in detail above, the first, third,
According to the invention of 4, the oscillating operation of the oscillating circuit is stopped when all the key switches are turned off, so that the current consumption can be reduced. According to the second, third and fifth inventions, since the interrupt signal is not output to the CPU within a specific scan cycle after the start of scanning, malfunction due to chattering can be avoided.

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

【図1】本発明の実施例のキー入力装置を示す構成図で
ある。
FIG. 1 is a configuration diagram showing a key input device according to an embodiment of the present invention.

【図2】図1のスキャナー回路の機能ブロック図であ
る。
FIG. 2 is a functional block diagram of the scanner circuit of FIG.

【図3】図2のスキャナー回路の詳細図である。FIG. 3 is a detailed diagram of the scanner circuit of FIG.

【図4】図2のタイムチャートである。FIG. 4 is a time chart of FIG.

【図5】図2の回路の利点を示すタイムチャートであ
る。
FIG. 5 is a time chart showing advantages of the circuit of FIG.

【図6】図2の回路の利点を示すタイムチャートであ
る。
FIG. 6 is a time chart showing advantages of the circuit of FIG.

【図7】ダミースキャンを利用しない場合のタイムチャ
ートである。
FIG. 7 is a time chart when the dummy scan is not used.

【図8】ノイズの図2の回路への影響を示すタイムチャ
ートである。
FIG. 8 is a time chart showing the influence of noise on the circuit of FIG.

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

100 キーマトリックス回
路 200 スキャナー回路 210 入力部 220 キーオン検出部 230 入力ラッチ回路 240 スキャン・発振動作
/停止回路 250 1/4分周回路 260 スキャナ信号発生1
/4分周回路 270 スキャンタイミング
信号発生回路 280 出力回路 290 キーオールオフ検出
回路 300 INT信号発生回路 400 発振回路 500 CPUインターフェ
ース 600 CPU
100 Key matrix circuit 200 Scanner circuit 210 Input section 220 Key-on detection section 230 Input latch circuit 240 Scan / oscillation operation / stop circuit 250 1/4 frequency divider circuit 260 Scanner signal generation 1
/ 4 frequency divider circuit 270 Scan timing signal generation circuit 280 Output circuit 290 Key all-off detection circuit 300 INT signal generation circuit 400 Oscillation circuit 500 CPU interface 600 CPU

───────────────────────────────────────────────────── フロントページの続き (72)発明者 柏田 順治 東京都港区虎ノ門1丁目7番12号 沖電気 工業株式会社内 (72)発明者 藤井 輝幸 東京都港区虎ノ門1丁目7番12号 沖電気 工業株式会社内 (72)発明者 清水 信行 東京都港区虎ノ門1丁目7番12号 沖電気 工業株式会社内 ─────────────────────────────────────────────────── ─── Continued Front Page (72) Inventor Junji Kashiwa 1-7-12 Toranomon, Minato-ku, Tokyo Oki Electric Industry Co., Ltd. (72) Teruyuki Fujii 1-12 Toranomon, Minato-ku, Tokyo Oki Electric Industry Co., Ltd. (72) Inventor Nobuyuki Shimizu 1-7-12 Toranomon, Minato-ku, Tokyo Oki Electric Industry Co., Ltd.

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 複数のキースイッチをマトリックス状に
配設し、X軸、Y軸の一方をスキャンタイミング信号ラ
インとし、他方をキー状態検出信号ラインとするキーマ
トリックス回路と、 動作タイミング信号を発生させる発振回路と、 前記スキャンタイミング信号ラインにスキャンタイミン
グ信号を出力し、前記キー状態検出信号ラインより前記
キースイッチのオン/オフ状態を検出し、前記発振回路
の制御を行うスキャナー回路とを、 備えたキー入力装置のキー入力方法において、 前記スキャナー回路は、 オン状態の前記キースイッチの入力がなければ、前記発
振回路の発振動作を停止する発振停止処理と、前記スキ
ャンタイミング信号ラインに常に前記スキャンタイミン
グ信号を出力して、前記キースイッチのオン状態を検出
するキーオン状態検出処理とを実行し、 オン状態の前記キースイッチの入力があれば、前記発振
回路の発振動作をさせる発振動作処理と、前記スキャン
タイミング信号ラインに順に前記スキャンタイミング信
号を出力して、前記各キースイッチのオン/オフ状態を
検出するスキャン処理とを実行する、 ことを特徴とするキー入力方法。
1. A key matrix circuit in which a plurality of key switches are arranged in a matrix, one of the X axis and the Y axis is a scan timing signal line, and the other is a key state detection signal line, and an operation timing signal is generated. And a scanner circuit that outputs a scan timing signal to the scan timing signal line, detects the on / off state of the key switch from the key state detection signal line, and controls the oscillation circuit. In the key input method of the key input device, the scanner circuit includes an oscillation stop process for stopping the oscillation operation of the oscillation circuit if there is no input from the key switch in an ON state, and the scan timing signal line is always scanned with the scan signal. A key that outputs a timing signal to detect the ON state of the key switch If the key switch in the ON state is input, an oscillation operation process for oscillating the oscillation circuit, and sequentially outputting the scan timing signal to the scan timing signal line, A key input method, comprising: performing a scan process for detecting an on / off state of each of the key switches.
【請求項2】 複数のキースイッチをマトリックス状に
配設し、X軸、Y軸の一方をスキャンタイミング信号ラ
インとし、他方をキー状態検出信号ラインとするキーマ
トリックス回路と、 動作タイミング信号を発生させる発振回路と、 前記スキャンタイミング信号ラインにスキャンタイミン
グ信号を出力し、前記キー状態検出信号ラインより前記
キースイッチのオン/オフ状態を検出し、前記スキャン
タイミング信号の一定周期のスキャンサイクル終了後、
前記キースイッチのオン/オフ状態を示すスキャンデー
タを取り込む中央処理装置へ割り込み信号を出力するス
キャナー回路とを、 備えたキー入力装置のキー入力方法において、 前記スキャナー回路は、 オン状態の前記キースイッチの入力がなければ、すべて
の前記スキャンタイミング信号ラインに常に前記スキャ
ンタイミング信号を出力して、前記キースイッチのオン
状態を検出するキーオン状態検出処理を実行し、 オン状態の前記キースイッチの入力があれば、前記スキ
ャンタイミング信号ラインに順に前記スキャンタイミン
グ信号を出力して、前記各キースイッチのオン/オフ状
態を検出するスキャンを開始し、スキャン開始後、特定
の数のスキャンサイクルが終了するまでは、前記特定の
数の各スキャンサイクルが実行される度に、前記中央処
理装置へ前記割り込み信号を出力せず、前記特定の数の
スキャンサイクル終了後は、スキャンサイクルが実行さ
れる度に前記中央処理装置へ前記割り込み信号を出力す
る割り込み信号出力処理を実行する、 ようにしたことを特徴とするキー入力方法。
2. A key matrix circuit in which a plurality of key switches are arranged in a matrix, one of the X axis and the Y axis is a scan timing signal line, and the other is a key state detection signal line, and an operation timing signal is generated. An oscillation circuit for outputting a scan timing signal to the scan timing signal line, detecting the on / off state of the key switch from the key state detection signal line, and after the scan cycle of the constant cycle of the scan timing signal ends,
A key input method for a key input device, comprising: a scanner circuit that outputs an interrupt signal to a central processing unit that captures scan data indicating the on / off state of the key switch; If there is no input of, the scan timing signal is always output to all the scan timing signal lines, the key-on state detection processing for detecting the on-state of the key switch is executed, and the input of the key switch in the on-state is If so, the scan timing signal is sequentially output to the scan timing signal line to start the scan for detecting the on / off state of each of the key switches, and after the start of the scan, until a specific number of scan cycles are completed. For each specified number of scan cycles , Does not output the interrupt signal to the central processing unit, and executes an interrupt signal output process that outputs the interrupt signal to the central processing unit each time a scan cycle is executed after the end of the specific number of scan cycles The key input method is characterized in that
【請求項3】 複数のキースイッチをマトリックス状に
配設し、X軸、Y軸の一方をスキャンタイミング信号ラ
インとし、他方をキー状態検出信号ラインとするキーマ
トリックス回路と、 動作タイミング信号を発生させる発振回路と、 前記スキャンタイミング信号ラインにスキャンタイミン
グ信号を出力し、前記キー状態検出信号ラインより前記
キースイッチのオン/オフ状態を検出し、前記発振回路
の制御を行い、前記スキャンタイミング信号の一定周期
のスキャンサイクル終了後、前記キースイッチのオン/
オフ状態を示すスキャンデータを取り込む中央処理装置
へ割り込み信号を出力するスキャナー回路とを、 備えたキー入力装置のキー入力方法において、 前記スキャナー回路は、 オン状態の前記キースイッチの入力がなければ、前記発
振回路の発振動作を停止する発振停止処理と、すべての
前記スキャンタイミング信号ラインに常に前記スキャン
タイミング信号を出力して、前記キースイッチのオン状
態を検出するキーオン状態検出処理とを実行し、 オン状態の前記キースイッチの入力があれば、前記発振
回路の発振動作をさせる発振動作処理と、前記スキャン
タイミング信号ラインに順に前記スキャンタイミング信
号を出力して、前記各キースイッチのオン/オフ状態を
検出するスキャンを開始し、スキャン開始後、特定の数
のスキャンサイクルが終了するまでは、前記特定の数の
各スキャンサイクルが実行される度に、前記中央処理装
置へ前記割り込み信号を出力せず、前記特定の数のスキ
ャンサイクル終了後は、スキャンサイクルが実行される
度に前記中央処理装置へ前記割り込み信号を出力する割
り込み信号出力処理とを実行する、 ようにしたことを特徴とするキー入力方法。
3. A key matrix circuit in which a plurality of key switches are arranged in a matrix, one of the X axis and the Y axis is a scan timing signal line, and the other is a key state detection signal line, and an operation timing signal is generated. And an oscillation circuit that outputs a scan timing signal to the scan timing signal line, detects the on / off state of the key switch from the key state detection signal line, controls the oscillation circuit, and outputs the scan timing signal After the scan cycle of a certain period is completed, the key switch is turned on /
In a key input method of a key input device, comprising a scanner circuit that outputs an interrupt signal to a central processing unit that captures scan data indicating an off state, the scanner circuit, if there is no input of the key switch in the on state, An oscillation stop process for stopping the oscillation operation of the oscillator circuit, and a key-on state detection process for always outputting the scan timing signal to all the scan timing signal lines to detect an on-state of the key switch, If there is an input to the key switch in the ON state, an oscillation operation process for oscillating the oscillation circuit and the scan timing signal are sequentially output to the scan timing signal line to turn ON / OFF the respective key switches. To start the scan, and after starting the scan, a certain number of scan Until the end of the cycle, the interrupt signal is not output to the central processing unit each time the specific number of scan cycles is executed, and the scan cycle is executed after the specific number of scan cycles is completed. And an interrupt signal output process for outputting the interrupt signal to the central processing unit each time the key input method is performed.
【請求項4】 複数のキースイッチをマトリックス状に
配設し、X軸、Y軸の一方をスキャンタイミング信号ラ
インとし、他方をキー状態検出信号ラインとするキーマ
トリックス回路と、 動作タイミング信号を発生させる発振回路と、 前記スキャンタイミング信号ラインにスキャンタイミン
グ信号を出力し、前記キー状態検出信号ラインより前記
キースイッチのオン/オフ状態を検出し、前記発振回路
の制御を行うスキャナー回路とを、 備えたキー入力装置において、 前記スキャナー回路は、 オン状態の前記キースイッチの入力を検出するキーオン
検出部と、 スキャン中に前記すべてのキースイッチがオフされたこ
とを検出するキーオールオフ検出回路と、 前記キーオールオフ検出部により、前記すべてのキース
イッチがオフされたことが検出された場合、前記発振回
路の発振動作を停止し、前記キーオン検出部により、オ
ン状態の前記キースイッチの入力が検出された場合、前
記発振回路の発振動作をさせるスキャン・発振動作/停
止回路と、 前記キーオールオフ検出部により、前記すべてのキース
イッチがオフされたことが検出された場合、すべての前
記スキャンタイミング信号ラインに常に前記スキャンタ
イミング信号を出力し、前記キーオン検出部により、オ
ン状態の前記キースイッチの入力が検出された場合、前
記スキャンタイミング信号ラインに順に前記スキャンタ
イミング信号を出力するスキャンタイミング信号発生回
路とを、 有することを特徴とするキー入力装置。
4. A key matrix circuit in which a plurality of key switches are arranged in a matrix, one of the X axis and the Y axis is a scan timing signal line, and the other is a key state detection signal line, and an operation timing signal is generated. And a scanner circuit that outputs a scan timing signal to the scan timing signal line, detects the on / off state of the key switch from the key state detection signal line, and controls the oscillation circuit. In the key input device, the scanner circuit includes a key-on detection unit that detects an input of the key switch in an on state, a key all-off detection circuit that detects that all the key switches are turned off during scanning, All the key switches have been turned off by the key all-off detector. A scan / oscillation operation / stop circuit that stops the oscillation operation of the oscillation circuit when detected, and causes the oscillation operation of the oscillation circuit when the input of the key switch in the ON state is detected by the key-on detection unit. When the key all-off detection unit detects that all the key switches have been turned off, the scan timing signal is always output to all the scan timing signal lines, and the key-on detection unit turns on. And a scan timing signal generation circuit that sequentially outputs the scan timing signal to the scan timing signal line when the input of the key switch in the state is detected.
【請求項5】 複数のキースイッチをマトリックス状に
配設し、X軸、Y軸の一方をスキャンタイミング信号ラ
インとし、他方をキー状態検出信号ラインとするキーマ
トリックス回路と、 動作タイミング信号を発生させる発振回路と、 前記スキャンタイミング信号ラインにスキャンタイミン
グ信号を出力し、前記キー状態検出信号ラインより前記
キースイッチのオン/オフ状態を検出し、前記スキャン
タイミング信号の一定周期のスキャンサイクル終了後、
前記キースイッチのオン/オフ状態を示すスキャンデー
タを取り込む中央処理装置へ割り込み信号を出力するス
キャナー回路とを、 備えたキー入力装置において、 前記スキャナー回路は、 オン状態の前記キースイッチの入力を検出するキーオン
検出回路と、 スキャン中にすべての前記キースイッチがオフされたこ
とを検出するキーオールオフ検出回路と、 スキャンサイクル終了信号を出力するスキャンサイクル
信号発生回路と、 前記キーオールオフ検出回路の出力及び前記スキャンサ
イクル終了信号に基づいて、スキャン開始後、特定の数
のスキャンサイクルが終了するまでは、前記特定の数の
各スキャンサイクルが実行される度に、前記中央処理装
置へ前記割り込み信号を出力せず、前記特定の数のスキ
ャンサイクル終了後は、スキャンサイクルが実行される
度に前記中央処理装置へ前記割り込み信号を出力する割
り込み信号発生回路と、 前記キーオールオフ検出部により、前記すべてのキース
イッチがオフされたことが検出された場合、すべての前
記スキャンタイミング信号ラインに常に前記スキャンタ
イミング信号を出力し、前記キーオン検出回路により、
オン状態の前記キースイッチの入力が検出された場合、
前記スキャンタイミング信号ラインに順に前記スキャン
タイミング信号を出力するスキャンタイミング信号発生
回路とを、 有することを特徴とするキー入力装置。
5. A key matrix circuit in which a plurality of key switches are arranged in a matrix, one of the X axis and the Y axis is a scan timing signal line, and the other is a key state detection signal line, and an operation timing signal is generated. An oscillation circuit for outputting a scan timing signal to the scan timing signal line, detecting the on / off state of the key switch from the key state detection signal line, and after the scan cycle of the constant cycle of the scan timing signal ends,
And a scanner circuit that outputs an interrupt signal to a central processing unit that captures scan data indicating an on / off state of the key switch, wherein the scanner circuit detects an input of the key switch in an on state. A key-on detection circuit, a key-all off detection circuit that detects that all the key switches have been turned off during scanning, a scan cycle signal generation circuit that outputs a scan cycle end signal, and a key-all off detection circuit Based on the output and the scan cycle end signal, the interrupt signal is sent to the central processing unit after each scan of the specific number of scan cycles until the specific number of scan cycles is completed after the start of scanning. Is output, and after the specified number of scan cycles, the scan When an interrupt signal generation circuit that outputs the interrupt signal to the central processing unit each time a cycle is executed and the key all-off detection unit detects that all the key switches have been turned off, Always output the scan timing signal to the scan timing signal line, by the key-on detection circuit,
When the input of the key switch in the ON state is detected,
And a scan timing signal generation circuit that sequentially outputs the scan timing signal to the scan timing signal line.
JP02493295A 1995-02-14 1995-02-14 Key input method and key input device Expired - Fee Related JP3258846B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP02493295A JP3258846B2 (en) 1995-02-14 1995-02-14 Key input method and key input device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP02493295A JP3258846B2 (en) 1995-02-14 1995-02-14 Key input method and key input device

Publications (2)

Publication Number Publication Date
JPH08221172A true JPH08221172A (en) 1996-08-30
JP3258846B2 JP3258846B2 (en) 2002-02-18

Family

ID=12151868

Family Applications (1)

Application Number Title Priority Date Filing Date
JP02493295A Expired - Fee Related JP3258846B2 (en) 1995-02-14 1995-02-14 Key input method and key input device

Country Status (1)

Country Link
JP (1) JP3258846B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011146926A (en) * 2010-01-14 2011-07-28 Casio Computer Co Ltd Key scan circuit and data processing apparatus
JP2015159045A (en) * 2014-02-24 2015-09-03 株式会社ノーリツ switch input device
KR20160057744A (en) * 2014-11-14 2016-05-24 (주)테크레인 Apparatus for driving light emitting diode with key scan function

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011146926A (en) * 2010-01-14 2011-07-28 Casio Computer Co Ltd Key scan circuit and data processing apparatus
JP2015159045A (en) * 2014-02-24 2015-09-03 株式会社ノーリツ switch input device
KR20160057744A (en) * 2014-11-14 2016-05-24 (주)테크레인 Apparatus for driving light emitting diode with key scan function

Also Published As

Publication number Publication date
JP3258846B2 (en) 2002-02-18

Similar Documents

Publication Publication Date Title
US5572719A (en) Clock control system for microprocessors including a delay sensing circuit
US5155380A (en) Clock switching circuit and method for preventing glitch during switching
US5315181A (en) Circuit for synchronous, glitch-free clock switching
EP0556597A1 (en) An integrated circuit clock signal generator
US5625311A (en) System clock generating circuit having a power saving mode capable of maintaining a satisfactory processing speed
JPH1195859A (en) Integrated-circuit incorporated oscillation circuit
JP2000357947A (en) Clock control circuit
US5781765A (en) System for data synchronization between two devices using four time domains
US7293185B2 (en) Clock control circuit and clock control method that switchingly supplies a high-speed clock and a low-speed clock
JP3258846B2 (en) Key input method and key input device
JP3523362B2 (en) Clock circuit and processor using the same
EP0462622B1 (en) Microprocessor capable of ensuring flexible recovery time for I/O device
CN112187233A (en) Reset device, method, clock system and electronic equipment
JP2964704B2 (en) Clock stop circuit
US5642060A (en) Clock generator
JP3185768B2 (en) Frequency comparator and clock extraction circuit using the same
JP2669360B2 (en) Clock generator
JPH0843501A (en) Mode setting circuit
JP3685419B2 (en) Testability circuit
JPH0884070A (en) Asynchronous counter circuit
JPH06216724A (en) Comparator device and its clock supply controller
JP3215583B2 (en) Semiconductor integrated circuit
JP2000278115A (en) Logic circuit
JPH04369064A (en) Method and device for controlling interruption processing
JP2001184298A (en) Circuit and method for reporting asynchronous interruption

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20011120

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081207

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081207

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091207

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091207

Year of fee payment: 8

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313115

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091207

Year of fee payment: 8

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101207

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101207

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111207

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121207

Year of fee payment: 11

LAPS Cancellation because of no payment of annual fees