JPH05134792A - Key input processing method - Google Patents

Key input processing method

Info

Publication number
JPH05134792A
JPH05134792A JP3295695A JP29569591A JPH05134792A JP H05134792 A JPH05134792 A JP H05134792A JP 3295695 A JP3295695 A JP 3295695A JP 29569591 A JP29569591 A JP 29569591A JP H05134792 A JPH05134792 A JP H05134792A
Authority
JP
Japan
Prior art keywords
key
keyboard
state
pressed
transmission
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
JP3295695A
Other languages
Japanese (ja)
Other versions
JP3126445B2 (en
JPH05134792A5 (en
Inventor
Yoichi Sakamoto
陽一 坂本
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP03295695A priority Critical patent/JP3126445B2/en
Publication of JPH05134792A publication Critical patent/JPH05134792A/en
Publication of JPH05134792A5 publication Critical patent/JPH05134792A5/ja
Application granted granted Critical
Publication of JP3126445B2 publication Critical patent/JP3126445B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Input From Keyboards Or The Like (AREA)

Abstract

(57)【要約】 【目的】 CPU側によるキーリピートにおける、キー
押下終了が検出できなかった場合のエラー対策。 【構成】 キーボードを備えた情報処理装置において、
キーボードがキーボード上の全てのキーが無押下状態で
あることを検出した時、当該状態を示す情報を装置本体
に送出する。 【効果】 CPUがキー押下終了が検出できなかった場
合にも、前記情報を受信することで、キー押下終了を知
ることができ、不要なキーのリピートが防止できる。
(57) [Abstract] [Purpose] For the key repeat by the CPU side, an error countermeasure when the end of key press cannot be detected. [Configuration] In an information processing device equipped with a keyboard,
When the keyboard detects that all the keys on the keyboard are in the non-pressed state, the information indicating the state is sent to the apparatus main body. [Effect] Even when the CPU cannot detect the end of the key press, by receiving the information, the end of the key press can be known, and unnecessary key repeats can be prevented.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、キーの押下開始および
押下終了検出時にキーコードを送信するキーボードに関
する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a keyboard which transmits a key code when a key depression start and a key depression end are detected.

【0002】[0002]

【従来の技術】従来、キーボードは、キーを押下し続け
ると所定のリピート時間経過毎にキーコードを、パーソ
ナルコンピュータやワードプロセッサ等のCPUに送信
していた。
2. Description of the Related Art Conventionally, a keyboard transmits a key code to a CPU such as a personal computer or a word processor each time a predetermined repeat time elapses when a key is continuously pressed.

【0003】[0003]

【発明が解決しようとしている課題】しかしながら、上
記従来例では、リピート時間をキーボードが管理するた
め、リピート時間を変更するためにはキーボードにリピ
ート時間設定用のハードウエアを設けるか、CPUから
キーボードにリピート時間の指定を行うための受信回路
を設ける必要があり、コストが上昇するという欠点があ
った。
However, in the above-mentioned conventional example, since the keyboard manages the repeat time, in order to change the repeat time, the keyboard is provided with hardware for setting the repeat time, or the CPU is changed from the CPU to the keyboard. Since it is necessary to provide a receiving circuit for designating the repeat time, there is a drawback that the cost increases.

【0004】この問題を解決するため、キーボードはリ
ピートを行わず、CPUがリピートを行う方法が考えら
れるが、この場合、キー押下終了検出のためのコード
が、ノイズ等の原因により正しく受信できなかった場
合、CPUはキー押下終了を知ることができず、無限に
キーをリピートしてしまうという問題がある。
In order to solve this problem, it is conceivable that the CPU does not repeat the keyboard but repeats it. However, in this case, the code for detecting the key press end cannot be received correctly due to noise or the like. In this case, the CPU cannot know the end of pressing the key and repeats the key indefinitely.

【0005】[0005]

【課題を解決するための手段】上記課題を解決するため
に、本発明では、キーボードを備えた情報処理装置にお
いて、キーボードがキーボード上の全てのキーが無押下
状態であることを検出した時、当該状態を示す情報を装
置本体に送出する。
In order to solve the above problems, according to the present invention, in an information processing apparatus having a keyboard, when the keyboard detects that all the keys on the keyboard are not pressed, Information indicating the state is sent to the apparatus body.

【0006】[0006]

【作用】キーボードがキーボード上の全てのキーが無押
下状態であることを検出した時、当該状態を示す情報を
装置本体に送出することにより、CPUがキー押下終了
が検出できなかった場合にも、前記情報を受信すること
で、キー押下終了を知ることができ、不要なキーのリピ
ートが防止できる。
When the keyboard detects that all the keys on the keyboard are in the non-pressed state, the CPU sends the information indicating the state to the main body of the apparatus so that the CPU cannot detect the end of the key pressing. By receiving the information, it is possible to know the end of key pressing, and it is possible to prevent unnecessary key repeats.

【0007】[0007]

【実施例】以下、図面を参照して本発明の実施例を詳細
に説明する。
Embodiments of the present invention will now be described in detail with reference to the drawings.

【0008】図1は本発明の実施例の基本構成を示す。
Aはキーであり、キーボードの操作者が押下する。Bは
キー押下検出手段であり、キーAの押下開始および押下
終了を検出してキーコードを出力するとともに、全ての
キーが押下されていない場合にはその旨を示す信号を出
力する。Cはキー無押下検出手段であり、キー押下検出
手段が全てのキーが押下されていないことを示す信号を
出力した場合にはキー無押下コードを出力する。Dは送
信手段であり、キー押下検出手段Bが出力したキーコー
ド、およびキー無押下検出手段Cが出力したキー無押下
コードを送信する。
FIG. 1 shows the basic construction of an embodiment of the present invention.
A is a key, which is pressed by the keyboard operator. Reference numeral B denotes a key press detecting means which detects the start and end of pressing of the key A and outputs a key code, and when all the keys are not pressed, outputs a signal to that effect. C is a no-key-depression detecting means, which outputs a no-key-depression code when the key-depression detecting means outputs a signal indicating that all the keys are not depressed. Reference numeral D denotes a transmission means, which transmits the key code output by the key press detection means B and the key non-press code output by the key non-press detection means C.

【0009】図2は本発明の1実施例のキーボードの全
体の構成を示す。同図において、1はキーマトリクスで
あり、図3に示される如く、16行8列で構成される。
2はデコーダであり、キーマトリクス1の行のうちの一
つを選択する。3は1チップCPUであり、内部に入力
ポート4、出力ポート5、RAM6、ROM7、CPU
コア8、シリアルポート9、タイマユニット12とを備
える。
FIG. 2 shows the overall construction of the keyboard of one embodiment of the present invention. In the figure, reference numeral 1 denotes a key matrix, which is composed of 16 rows and 8 columns as shown in FIG.
A decoder 2 selects one of the rows of the key matrix 1. Reference numeral 3 is a one-chip CPU, which internally has an input port 4, an output port 5, a RAM 6, a ROM 7, and a CPU.
A core 8, a serial port 9, and a timer unit 12 are provided.

【0010】5は出力ポートであり、4ビットの行選択
信号をデコーダ2で出力する。6は入力ポートであり、
デコーダ2によって選択されたキーマトリクス1の1つ
の行の、キー押下情報を入力する。6はRAMであり、
キーボードの処理に必要な情報を記憶する。7はROM
であり、図5〜図8に示す制御手順を記憶する。8はC
PUコアであり、本キーボードの制御を行う。
An output port 5 outputs a 4-bit row selection signal to the decoder 2. 6 is an input port,
The key press information of one row of the key matrix 1 selected by the decoder 2 is input. 6 is a RAM,
Stores information necessary for keyboard processing. 7 is a ROM
And stores the control procedure shown in FIGS. 8 is C
It is a PU core and controls this keyboard.

【0011】9はシリアルポートであり、TXD信号1
1を経て、調歩同期式シリアル転送にてキーコードを送
信する。RDY信号10がオフの場合はCPUの受信準
備が整っていないため、送信は行わない。送信可能でか
つ送信データが設定されていない場合には、CPUコア
8に割込信号を出力するように構成されている。
Reference numeral 9 denotes a serial port, which is a TXD signal 1
After 1, the key code is transmitted by the asynchronous serial transfer. When the RDY signal 10 is off, the CPU is not ready for reception, and therefore transmission is not performed. When transmission is possible and transmission data is not set, an interrupt signal is output to the CPU core 8.

【0012】10はCPUが出力するRDY信号であ
り、CPUの受信準備が整っていることを伝える。11
は本キーボードが出力するTXD信号であり、CPUに
対してキーコードを伝える。
Reference numeral 10 denotes an RDY signal output from the CPU, which informs that the CPU is ready for reception. 11
Is a TXD signal output from this keyboard and transmits a key code to the CPU.

【0013】12はタイマであり、本キーボードの制御
に必要なタイミングをとるために使用される。
Reference numeral 12 denotes a timer, which is used to set a timing necessary for controlling the keyboard.

【0014】図3はキーマトリクス1の詳細な説明図で
ある。出力ポート5から出力された信号をデコーダ2が
デコードし、16の出力信号のうち一つだけが低電位、
残りの出力信号は全て高インピーダンス状態となる。低
電位となった行のキー接点3が押下されていれば、入力
ポート4の対応するビットには低電位が入力される。キ
ー接点13が押下されていなければ、抵抗15によって
プルアップされているので、入力ポート4に対応するビ
ットには高電位が入力される。したがって、入力ポート
4に入力されたデータを反転することにより、選択され
た行のキーが押下されたビットは1、押下されていない
ビットは0のデータが得られる。
FIG. 3 is a detailed explanatory diagram of the key matrix 1. The decoder 2 decodes the signal output from the output port 5, and only one of the 16 output signals has a low potential,
The remaining output signals are all in a high impedance state. If the key contact 3 of the row having the low potential is pressed, the low potential is input to the corresponding bit of the input port 4. If the key contact 13 is not pressed, it is pulled up by the resistor 15, so that a high potential is input to the bit corresponding to the input port 4. Therefore, by inverting the data input to the input port 4, the bit of the selected row whose key is pressed is 1 and the bit of which the key is not pressed is 0.

【0015】図4はRAM6の詳細な説明図である。O
NKEY16は押下されているキーの数を記憶する。S
TIME17は全てのキーが押下されていないときに送
信するコードを送信するまでの時間を10mS単位で記
憶するソフトウエアタイマである。
FIG. 4 is a detailed explanatory diagram of the RAM 6. O
NKEY 16 stores the number of pressed keys. S
The TIME 17 is a software timer that stores the time until the code to be transmitted is transmitted in units of 10 mS when all the keys are not pressed.

【0016】BUF18は送信データを記憶するバッフ
ァで、BUF(0)〜BUF(15)からなる16バイ
トの配列である。BUF18はファーストインファース
トアウト(FIFO)のリングメモリとして使用され、
データ数はCTR19に、格納位置はI20に、取出し
位置はJ21にそれぞれ記憶される。
The BUF 18 is a buffer for storing transmission data, and is a 16-byte array of BUF (0) to BUF (15). The BUF18 is used as a first-in first-out (FIFO) ring memory,
The number of data is stored in CTR 19, the storage position is stored in I20, and the extraction position is stored in J21.

【0017】LL22およびCL23は各々LL(0)
〜LL(15)、CL(0)〜CL(15)からなる1
6バイトの配列で、1ビットが1つのキーの状態に対応
する。LL22は以前のキー押下状態を記憶し、CL2
3は現在のキー押下状態を記憶する。
LL22 and CL23 are each LL (0)
1 consisting of LL (15) and CL (0) to CL (15)
In a 6-byte array, one bit corresponds to the state of one key. LL22 remembers the previous key press state, CL2
3 stores the current key depression state.

【0018】L24、B25、X26は図8に示すキー
読取処理の過程でワークとして使用される。L24は行
番号を、B25はビット番号を、X26はキー押下状態
の変化をそれぞれ記憶する。
L24, B25, and X26 are used as works during the key reading process shown in FIG. L24 stores a line number, B25 stores a bit number, and X26 stores a change in key depression state.

【0019】これらのRAM領域の初期値は全て0であ
る。
The initial values of these RAM areas are all 0.

【0020】図5は本キーボードの処理の全体を示すフ
ローチャートである。
FIG. 5 is a flowchart showing the overall processing of this keyboard.

【0021】電源投入後、ステップS1においてタイマ
12を10mSに設定後、ステップS2にてキー読取処
理を行う。この処理の詳細は図8に示す。次にステップ
S3に進み、ステップS2にて設定された押下キー数O
NKEY16の内容を調べる。0でなければ、押下され
ているキーがあるので、ステップS12にてSTIME
17をクリアする。0であれば、押下されているキーが
ないのでステップS4にてSTIME17の内容を調べ
る。STIME17は、最初は0なのでステップS9に
てSTIME17に10、即ち100mSが設定され
る。2回目以降は0でなく、ステップS5に進みSTI
ME17から1を引く。次にステップS6にてその結果
を判定し、STIME17が0であれば100mS経過
したので、コード送信を行う。
After the power is turned on, the timer 12 is set to 10 mS in step S1, and the key reading process is performed in step S2. Details of this processing are shown in FIG. Next, in step S3, the number of pressed keys set in step S2 is 0.
Examine the contents of NKEY16. If it is not 0, there is a pressed key, so in step S12 STIME
Clear 17 If it is 0, there is no pressed key, so the contents of STIME 17 are checked in step S4. Since STIME17 is initially 0, STIME17 is set to 10, that is, 100 mS in step S9. After the second time, it is not 0, and the process proceeds to step S5 and STI
Subtract 1 from ME17. Next, in step S6, the result is determined, and if STIME 17 is 0, 100 mS has elapsed, so the code is transmitted.

【0022】まずステップS7にて、送信データ数CT
R19をチェックする。これが16でなければ、送信バ
ッファBUF18に空きがあるのでステップS8にて、
全てのキーが押下されていないことを示す特殊なコード
FFHを送信し、ステップS9にてSTIME17に1
0、即ち100mSを設定する。この状態はステップS
9に最初に10を設定したときの状態と同じであるた
め、全てのキーが押下されていない間繰り返され、結果
として100mS毎にFFHが送信される。
First, at step S7, the number of transmitted data CT
Check R19. If this is not 16, there is a free space in the transmission buffer BUF18, so in step S8,
A special code FFH indicating that all the keys have not been pressed is transmitted, and 1 is sent to STIME17 in step S9.
0, that is, 100 mS is set. This state is step S
Since it is the same as the state when 10 is initially set to 9, it is repeated while all keys are not pressed, and as a result, FFH is transmitted every 100 mS.

【0023】ステップS7において、CTR19が16
だった場合、送信バッファBUF18に空きがないた
め、送信することができない。この場合はステップS1
1にてSTIME17に1が加えられる。この状態はス
テップS5にてSTIME17から1を引く前の状態と
同じであるため、次回に再び同じ処理が行われ、送信バ
ッファBUF18に空きができていればFFHが送信さ
れる。
At step S7, the CTR 19 becomes 16
In that case, there is no space in the transmission buffer BUF18, and therefore transmission cannot be performed. In this case, step S1
At 1, 1 is added to STIME 17. Since this state is the same as the state before subtracting 1 from STIME 17 in step S5, the same processing is performed again next time, and if there is a free space in the transmission buffer BUF18, FFH is transmitted.

【0024】いずれの場合も最終的にステップS10に
進み、タイマ12のタイムアウト発生、即ちタイマ設定
後10mS経過するまで待ち、ステップS1に戻る。し
たがって10mS毎にこれらの処理が繰り返される。
In any case, the process finally proceeds to step S10, waits until the timer 12 times out, that is, 10 mS has elapsed after the timer setting, and then returns to step S1. Therefore, these processes are repeated every 10 mS.

【0025】図6は、図5ステップS9、および図8ス
テップS43の送信処理の詳細を示すフローチャートで
ある。送信処理では、送信データを送信バッファに格納
するだけで、実際のシリアル送信は図7に示す送信割込
処理が行う。
FIG. 6 is a flow chart showing details of the transmission processing in step S9 of FIG. 5 and step S43 of FIG. In the transmission processing, the transmission data is simply stored in the transmission buffer, and the actual serial transmission is performed by the transmission interrupt processing shown in FIG.

【0026】まずステップS13にて送信バッファBU
F18の、I20が示す位置に格納する。次にステップ
S14にてI20に1を加える。その結果が16になっ
た場合はステップS15からステップS16に進み、B
UF18の先頭を示すようにI20に0を設定する。い
ずれの場合もステップS17に進み、送信データ数CT
R19に1を加え、ステップS18にてシリアル送信を
許可した後、処理を終了する。
First, in step S13, the transmission buffer BU
It is stored in the position indicated by I20 in F18. Next, in step S14, 1 is added to I20. If the result is 16, the process proceeds from step S15 to step S16, where B
I20 is set to 0 to indicate the beginning of the UF18. In either case, the process proceeds to step S17, where the number of transmitted data CT
After adding 1 to R19 and permitting serial transmission in step S18, the process ends.

【0027】図7は、図5、図6、図8に示す処理と非
同期に動作する送信割込処理を示すフローチャートであ
る。図6ステップS18にて送信が許可されると、送信
データがシリアルポート9に設定されていないため、送
信割込が発生する。
FIG. 7 is a flow chart showing a transmission interrupt process which operates asynchronously with the processes shown in FIGS. 5, 6 and 8. When the transmission is permitted in step S18 of FIG. 6, a transmission interrupt occurs because the transmission data is not set in the serial port 9.

【0028】まずステップS19にて送信データ数CT
R19をチェックする。0でなければ送信データが存在
するので、ステップS20にて、送信バッファBUF2
0の、J21が示す位置から送信データを取り出し、シ
リアルポート9に設定することによりシリアル送信を開
始する。次にステップS21にてJ21に1を加える。
その結果が16になった場合はステップS22からステ
ップS23に進み、BUF18の先頭を示すようにJ2
1に0を設定する。いずれの場合もステップS24に進
み、迷信データ数CTR19から1を引いた後、処理を
終了する。
First, at step S19, the number of transmitted data CT
Check R19. If it is not 0, there is transmission data, so in step S20, the transmission buffer BUF2
The transmission data is taken out from the position indicated by J21 of 0, and is set in the serial port 9 to start the serial transmission. Next, at step S21, 1 is added to J21.
If the result is 16, the process proceeds from step S22 to step S23, where J2 is set at the beginning of BUF18.
Set 0 to 1. In either case, the process proceeds to step S24, and after subtracting 1 from the number of superstition data CTR19, the process is ended.

【0029】シリアル送信終了時、再び送信割込が発生
する。このとき、迷信データが存在すれば上述の処理が
行われるが、存在しない場合はステップS19からステ
ップS25に進み、シリアル送信を禁止した後に処理を
終了する。
At the end of serial transmission, a transmission interrupt occurs again. At this time, the above process is performed if the superstition data exists, but if it does not exist, the process proceeds from step S19 to step S25, the serial transmission is prohibited, and then the process ends.

【0030】図8は図5のステップS2のキー読取処理
の詳細を示すフローチャートである。まず、ステップS
26にて行番号L24に0を設定する。次に、ステップ
S27にてL24の内容を出力ポート5に出力すること
により行を選択する。次に、ステップS28にて入力ポ
ート4からキーデータを入力し、論理状態を合わせるた
めに反転した後に、CL23の、L24が示す位置に格
納する。次にステップS29にてL24に1を加える。
以上の処理を16回繰り返し、全ての行の入力が終了す
るとステップS30からステップS31に進み、L24
に0を再度設定する。
FIG. 8 is a flow chart showing details of the key reading process in step S2 of FIG. First, step S
At 26, the line number L24 is set to 0. Then, in step S27, the row is selected by outputting the contents of L24 to the output port 5. Next, in step S28, key data is input from the input port 4, inverted to match the logical state, and then stored in the position indicated by L24 in CL23. Next, in step S29, 1 is added to L24.
The above process is repeated 16 times, and when the input of all lines is completed, the process proceeds from step S30 to step S31, and L24
0 is set again.

【0031】次に、ステップS32にて、LL22とC
L23の、各々L24が示す行の排他論理和を計算し、
X26に格納する。LL22には以前のキー押下状態が
格納されており、CL23には現在のキー押下状態が格
納されているので、それらの排他論理和X26にはキー
押下状態の変化が格納される。これが0であれば、キー
押下状態の変化がないので、ステップS33からステッ
プS34に進む。X26が0でなければステップS33
からステップS36に進み、ビット番号B25を0に設
定する。次にステップS37にて、CTR19をチェッ
クする。CTR19が16でなければ、送信バッファB
UF18には空きがあるので、ステップS38に進む。
X26の、B25が示すビットがオフならば、そのビッ
トに対応するキーの状態は変化していないので、ステッ
プS44に進む。オンならば、ステップS39にて、行
番号L24とビット番号B25を送信するキーコードに
変換する。ここで、キーコードは0〜7EHの範囲であ
る。CL23の、L24が示す行の、B25が示すビッ
トがオンであれば、キーが新たに押下された場合なの
で、ステップS40からステップS41に進み、LL2
3の、L24が示す行の、B25が示すビットをセット
することにより、以前のキー押下状態を更新し、現在の
キー押下状態と一致させる。次にステップS42にて、
押下キー数ONKEY16に1を加える。
Next, in step S32, LL22 and C
The exclusive OR of the rows of L23 and L24 is calculated,
Store in X26. Since the previous key press state is stored in LL22 and the current key press state is stored in CL23, the change of the key press state is stored in their exclusive OR X26. If this is 0, there is no change in the key depression state, so the routine proceeds from step S33 to step S34. If X26 is not 0, step S33
To S36, the bit number B25 is set to 0. Next, in step S37, the CTR 19 is checked. If CTR 19 is not 16, send buffer B
Since there is a space in the UF 18, the process proceeds to step S38.
If the bit indicated by B25 in X26 is off, the state of the key corresponding to that bit has not changed, so the flow advances to step S44. If it is on, the line number L24 and the bit number B25 are converted into a key code for transmission in step S39. Here, the key code is in the range of 0 to 7 EH. If the bit indicated by B25 in the line indicated by L24 in CL23 is on, it means that the key has been newly pressed. Therefore, the process proceeds from step S40 to step S41.
By setting the bit indicated by B25 in the row indicated by L24 in 3, the previous key depression state is updated to match the current key depression state. Next, in step S42,
Add 1 to the number of pressed keys ONKEY16.

【0032】CL23の、L24が示す行の、B25で
示されるビットがオフであれば、キーの押下が解除され
た場合なので、ステップS40からステップS46へ進
み、LL23の、L24が示す行の、B25が示すビッ
トをリセットすることにより、以前のキー押下状態を更
新し、現在のキー押下状態と一致させる。次にステップ
S47にて、押下キー数ONKEY16から1を引く。
次に、ステップS48にて、キーオフを示すために、ス
テップS39にて得られたキーコードのビット7をセッ
トする。
If the bit indicated by B25 in the line indicated by L24 in CL23 is off, it means that the pressing of the key has been released. Therefore, the process proceeds from step S40 to step S46, and in the line indicated by L24 in LL23, By resetting the bit indicated by B25, the previous key press state is updated to match the current key press state. Next, in step S47, 1 is subtracted from the number of pressed keys ONKEY16.
Next, in step S48, bit 7 of the key code obtained in step S39 is set to indicate key-off.

【0033】いずれの場合もステップS43に進み、キ
ーコードの送信を行い、ステップS44にてB25に1
を加える。次にステップS45に進み、B25が8でな
ければ全てのビットの処理が終了していないので、ステ
ップS37に戻り、上述の処理を繰り返す。全てのビッ
トの処理が終了するとステップS34に進む。
In any case, the process proceeds to step S43, the key code is transmitted, and B25 is set to 1 in step S44.
Add. Next, in step S45, if B25 is not 8, the processing of all the bits has not been completed, so the processing returns to step S37 and the above-described processing is repeated. When the processing of all bits is completed, the process proceeds to step S34.

【0034】ステップS34にて、L24に1を加え
る。次にステップS35に進み、L24が16でなけれ
ば全ての行の処理が終了していないので、ステップS3
2に戻り、上述の処理を繰り返す。全ての行の処理が終
了するとキー読取処理を終了する。
At step S34, 1 is added to L24. Next, the processing proceeds to step S35, and if L24 is not 16, the processing of all the rows is not completed.
Returning to step 2, the above processing is repeated. When the processing of all rows is completed, the key reading processing is completed.

【0035】ステップS37にて、CTR19が16で
あった場合、送信バッファBUF18には空きがなく、
キーコードを送信することができないので、キー読取処
理を終了する。この場合、以前のキー押下状態LL22
が更新されないため、10mS後に再度キー読取処理が
行われるまでキーコードの送信は延期される。
If the CTR 19 is 16 in step S37, there is no free space in the transmission buffer BUF18,
Since the key code cannot be transmitted, the key reading process ends. In this case, the previous key press state LL22
Is not updated, the transmission of the key code is postponed until the key reading process is performed again after 10 mS.

【0036】(他の実施例)なお、上述の実施例では、
キー押下検出処理の過程において、押下キー数ONKE
Y16を増減し、ONKEY16が0であることをもっ
て全てのキーが押下されていないことを検出している
が、これに代えて、下記の如き手段により検出してもよ
い。
(Other Embodiments) In the above embodiment,
The number of pressed keys ONKE
Although Y16 is increased / decreased and ONKEY16 is 0, it is detected that all the keys are not pressed. However, instead of this, it may be detected by the following means.

【0037】(1)前回のキー押下状態LL22、現在
のキー押下状態CL23、または入力ポート4から入力
されたキーデータのいずれかを参照して全てのキーが押
下されていないことを検出する。
(1) It is detected by referring to any one of the previous key pressed state LL22, the current key pressed state CL23, and the key data input from the input port 4 that all the keys have not been pressed.

【0038】(2)キー押下検出処理の過程においては
全てのキーが押下されていないことの検出に関する処理
は行わず、キー無押下検出処理の過程において、前回の
キー押下状態LL22、または現在のキー押下状態CL
23のいずれかを参照して全てのキーが押下されていな
いことを検出する。
(2) In the process of the key press detection process, the process related to the detection that all the keys are not pressed is not performed. In the process of the key non-press detection process, the previous key press state LL22 or the current key press state Key pressed state CL
It is detected by referring to any of 23 that all the keys are not pressed.

【0039】[0039]

【発明の効果】以上説明したように、キー押下終了検出
のコードがノイズ等の原因により正しく受信できなかっ
た場合でも、全てのキーが押下されていないことを示す
コードが送信されるので、CPUはキーのリピートを停
止することができ、無限にキーがリピートするという重
大な障害を避けることができる。
As described above, even if the code for detecting the end of key depression is not correctly received due to noise or the like, the code indicating that all the keys are not depressed is transmitted. Can stop key repeats, avoiding the serious obstacle of infinite key repeats.

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

【図1】本実施例の基本構成を示すブロック図である。FIG. 1 is a block diagram showing the basic configuration of the present embodiment.

【図2】本実施例の全体の回路構成を示すブロック図で
ある。
FIG. 2 is a block diagram showing the overall circuit configuration of this embodiment.

【図3】キーマトリクス1の詳細な説明図である。FIG. 3 is a detailed explanatory diagram of a key matrix 1.

【図4】RAM6の詳細な説明図である。FIG. 4 is a detailed explanatory diagram of a RAM 6;

【図5】本実施例の全体の処理を示すフローチャートで
ある。
FIG. 5 is a flowchart showing the overall processing of this embodiment.

【図6】送信処理の詳細を示すフローチャートである。FIG. 6 is a flowchart showing details of transmission processing.

【図7】送信割込処理の詳細を示すフローチャートであ
る。
FIG. 7 is a flowchart showing details of a transmission interrupt process.

【図8】キー読取処理の詳細を示すフローチャートであ
る。
FIG. 8 is a flowchart showing details of a key reading process.

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

1 キーマトリクス 2 デコーダ 3 1チップマイクロプロセッサ 4 入力ポート 5 出力ポート 6 書込可能メモリ(RAM) 7 読取専用メモリ(ROM) 8 CPUコア 9 シリアルポート 10 レディ信号(RDY) 11 送信信号(TXD) 12 タイマ 13 キー接点 14 抵抗器 16 押下キー数(ONKEY) 17 ソフトウェアタイマ(STIME) 18 送信バッファ(BUF) 19 送信データ数(CTR) 20 送信バッファ格納位置(I) 21 送信バッファ取出し位置(J) 22 以前のキー押下状態(LL) 23 現在のキー押下状態(CL) 24 行番号(L) 25 ビット番号(B) 26 キー押下状態の変化(X) 1 Key Matrix 2 Decoder 3 1 Chip Microprocessor 4 Input Port 5 Output Port 6 Writable Memory (RAM) 7 Read Only Memory (ROM) 8 CPU Core 9 Serial Port 10 Ready Signal (RDY) 11 Transmission Signal (TXD) 12 Timer 13 Key contact 14 Resistor 16 Number of pressed keys (ONKEY) 17 Software timer (STIME) 18 Transmission buffer (BUF) 19 Number of transmission data (CTR) 20 Transmission buffer storage position (I) 21 Transmission buffer extraction position (J) 22 Previous key pressed state (LL) 23 Current key pressed state (CL) 24 Line number (L) 25 Bit number (B) 26 Change of key pressed state (X)

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 キーボードを備えた情報処理装置におい
て、キーボードがキーボード上の全てのキーが無押下状
態であることを検出した時、当該状態を示す情報を装置
本体に送出することを特徴とするキー入力処理方法。
1. An information processing apparatus having a keyboard, wherein when the keyboard detects that all the keys on the keyboard are in a non-pressed state, the information indicating the state is sent to the apparatus main body. Key input processing method.
JP03295695A 1991-11-12 1991-11-12 keyboard Expired - Fee Related JP3126445B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP03295695A JP3126445B2 (en) 1991-11-12 1991-11-12 keyboard

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP03295695A JP3126445B2 (en) 1991-11-12 1991-11-12 keyboard

Publications (3)

Publication Number Publication Date
JPH05134792A true JPH05134792A (en) 1993-06-01
JPH05134792A5 JPH05134792A5 (en) 1999-09-24
JP3126445B2 JP3126445B2 (en) 2001-01-22

Family

ID=17823973

Family Applications (1)

Application Number Title Priority Date Filing Date
JP03295695A Expired - Fee Related JP3126445B2 (en) 1991-11-12 1991-11-12 keyboard

Country Status (1)

Country Link
JP (1) JP3126445B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6509845B1 (en) 1999-03-08 2003-01-21 Sharp Kabushiki Kaisha Wireless input apparatus

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6814728B2 (en) 2001-02-26 2004-11-09 Pentax Corporation Endoscope having an operation wire

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6509845B1 (en) 1999-03-08 2003-01-21 Sharp Kabushiki Kaisha Wireless input apparatus

Also Published As

Publication number Publication date
JP3126445B2 (en) 2001-01-22

Similar Documents

Publication Publication Date Title
US6108012A (en) Image display device for displaying images responsive to number of times of selection of image data by user
US4031515A (en) Apparatus for transmitting changeable length records having variable length words with interspersed record and word positioning codes
US20030152229A1 (en) Graphics code system
RU96118111A (en) INFORMATION EXCHANGE SYSTEM WITH PORTABLE DATA PROCESSING UNITS
US4396995A (en) Adapter for interfacing between two buses
US5220323A (en) Keyboard apparatus having ghost key sensing function
JPS5822782B2 (en) Pattern similarity calculation device
JP3126445B2 (en) keyboard
US4804278A (en) Key input apparatus provided with a key input buffer
US4460974A (en) Electronic computer with access to keyboard status information
US4447889A (en) Method for controlling display of output of a programmable device
US4458325A (en) Calculator capable of calculating with additional externally instructed units
GB1601956A (en) Multiprocessor data processing systems
US5051923A (en) Knowledge inferential processing apparatus
JPH0618023B2 (en) Type control board input control system
JPS59140561A (en) Electronics
JPS5922318B2 (en) multiple control storage
JP3097721B2 (en) Terminal printer
JP2755238B2 (en) Input device
JP2778109B2 (en) Electronics
JP2024065094A5 (en)
JP2766248B2 (en) Key input device and key repeat method in key input device
JPH0425573B2 (en)
SU690472A1 (en) Selector channel
JPH0732409B2 (en) Video text equipment

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: 20001017

LAPS Cancellation because of no payment of annual fees