JP3126445B2 - keyboard - Google Patents

keyboard

Info

Publication number
JP3126445B2
JP3126445B2 JP03295695A JP29569591A JP3126445B2 JP 3126445 B2 JP3126445 B2 JP 3126445B2 JP 03295695 A JP03295695 A JP 03295695A JP 29569591 A JP29569591 A JP 29569591A JP 3126445 B2 JP3126445 B2 JP 3126445B2
Authority
JP
Japan
Prior art keywords
key
keys
pressed
transmission
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.)
Expired - Fee Related
Application number
JP03295695A
Other languages
Japanese (ja)
Other versions
JPH05134792A (en
Inventor
陽一 坂本
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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
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)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

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

【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 every time a predetermined repeat time elapses when a key is kept pressed.

【0003】[0003]

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

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

【0005】[0005]

【課題を解決するための手段】上記課題を解決するため
に、本発明では、キーボードに、複数のキーと、該複数
のキーの夫々について、押下の開始及び終了を検出する
検出手段と、装置本体に対して、前記検出手段により押
下の開始または終了が検出されたキーに対応するキーコ
ードを送出するとともに、前記検出手段により前記複数
のキーの全てが無押下状態であることが検出された場合
に、当該状態を示すコードを送出する送出手段とを備え
る。
In order to solve the above-mentioned problems, according to the present invention, a keyboard has a plurality of keys, a detecting means for detecting the start and end of pressing of each of the plurality of keys, and an apparatus. A key code corresponding to a key whose start or end of pressing is detected by the detecting means is transmitted to the main body, and it is detected by the detecting means that all of the plurality of keys are in a non-pressed state. Sending means for sending a code indicating the state.

【0006】[0006]

【作用】キーボードの複数のキーの夫々について、押下
の開始及び終了を検出し、装置本体に対して、押下の開
始または終了が検出されたキーに対応するキーコードを
送出するとともに、前記複数のキーの全てが無押下状態
であることが検出された場合に、当該状態を示すコード
を送出する。
The start and end of pressing are detected for each of a plurality of keys on a keyboard, and a key code corresponding to the key for which the start or end of pressing is detected is transmitted to the apparatus main body. When it is detected that all the keys are in the non-pressed state, a code indicating the state is transmitted.

【0007】[0007]

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

【0008】図1は本発明の実施例の基本構成を示す。
Aはキーであり、キーボードの操作者が押下する。Bは
キー押下検出手段であり、キーAの押下開始および押下
終了を検出してキーコードを出力するとともに、全ての
キーが押下されていない場合にはその旨を示す信号を出
力する。Cはキー無押下検出手段であり、キー押下検出
手段が全てのキーが押下されていないことを示す信号を
出力した場合にはキー無押下コードを出力する。Dは送
信手段であり、キー押下検出手段Bが出力したキーコー
ド、およびキー無押下検出手段Cが出力したキー無押下
コードを送信する。
FIG. 1 shows a basic configuration of an embodiment of the present invention.
A is a key which is pressed by a keyboard operator. Reference numeral B denotes a key press detection unit that detects the start and end of press of the key A, outputs a key code, and outputs a signal indicating that all the keys are not pressed when they are not pressed. C is a key-no-press detecting means. When the key-press detecting means outputs a signal indicating that all keys are not pressed, a key-no-press code is output. D is a transmitting means for transmitting the key code output by the key press detecting means B and the key no press code output by the key no press detecting 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 structure of a keyboard according to 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 denotes a one-chip CPU having an input port 4, an output port 5, a RAM 6, a ROM 7, a CPU
It includes a core 8, a serial port 9, and a timer unit 12.

【0010】5は出力ポートであり、4ビットの行選択
信号をデコーダ2で出力する。6は入力ポートであり、
デコーダ2によって選択されたキーマトリクス1の1つ
の行の、キー押下情報を入力する。6はRAMであり、
キーボードの処理に必要な情報を記憶する。7はROM
であり、図5〜図8に示す制御手順を記憶する。8はC
PUコアであり、本キーボードの制御を行う。
Reference numeral 5 denotes an output port from which the decoder 2 outputs a 4-bit row selection signal. 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 required for keyboard operations. 7 is ROM
And the control procedure shown in FIGS. 5 to 8 is stored. 8 is C
It is a PU core and controls the keyboard.

【0011】9はシリアルポートであり、TXD信号1
1を経て、調歩同期式シリアル転送にてキーコードを送
信する。RDY信号10がオフの場合はCPUの受信準
備が整っていないため、送信は行わない。送信可能でか
つ送信データが設定されていない場合には、CPUコア
8に割込信号を出力するように構成されている。
Reference numeral 9 denotes a serial port, and a TXD signal 1
After step 1, the key code is transmitted by start-stop synchronous serial transfer. If the RDY signal 10 is off, the CPU is not ready to receive, so no transmission is 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 indicates that the CPU is ready for reception. 11
Is a TXD signal output by the keyboard, and transmits a key code to the CPU.

【0013】12はタイマであり、本キーボードの制御
に必要なタイミングをとるために使用される。
Reference numeral 12 denotes a timer, which is used for setting a timing required 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.
All the remaining output signals are 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 depressed, 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, data of a bit of the selected row where a key is pressed is 1 and data of a bit where the key is not pressed is 0 is obtained.

【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 a time until a code to be transmitted when all keys are not pressed is transmitted in units of 10 ms.

【0016】BUF18は送信データを記憶するバッフ
ァで、BUF(0)〜BUF(15)からなる16バイ
トの配列である。BUF18はファーストインファース
トアウト(FIFO)のリングメモリとして使用され、
データ数はCTR19に、格納位置はI20に、取出し
位置はJ21にそれぞれ記憶される。
BUF 18 is a buffer for storing transmission data, and is a 16-byte array consisting of BUF (0) to BUF (15). The BUF 18 is used as a first-in first-out (FIFO) ring memory,
The number of data is stored in CTR19, 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 respectively LL (0)
~ LL (15), 1 consisting of CL (0) ~ CL (15)
In a 6-byte array, one bit corresponds to one key state. LL22 stores the state of the previous key press, CL2
Numeral 3 stores the current key pressed state.

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

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

【0020】図5は本キーボードの処理の全体を示すフ
ローチャートである。
FIG. 5 is a flowchart showing the entire processing of the 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 turning on the power, the timer 12 is set to 10 ms in step S1, and a key reading process is performed in step S2. The details of this process are shown in FIG. Next, the process proceeds to step S3, where the number of pressed keys O set in step S2 is O.
Check the contents of NKEY16. If it is not 0, there is a key that has been pressed.
Clear 17 If it is 0, there is no key pressed, and the contents of the TIME 17 are checked in step S4. Since STIME 17 is initially 0, 10 is set in STIME 17, that is, 100 mS in step S 9. After the second time, the value is not 0, and the process proceeds to step S5 and STI
Subtract 1 from ME17. Next, in step S6, the result is determined. If STIME17 is 0, 100 ms has elapsed, and code transmission is performed.

【0022】まずステップS7にて、送信データ数CT
R19をチェックする。これが16でなければ、送信バ
ッファBUF18に空きがあるのでステップS8にて、
全てのキーが押下されていないことを示す特殊なコード
FFHを送信し、ステップS9にてSTIME17に1
0、即ち100mSを設定する。この状態はステップS
9に最初に10を設定したときの状態と同じであるた
め、全てのキーが押下されていない間繰り返され、結果
として100mS毎にFFHが送信される。
First, at step S7, the transmission data number CT
Check R19. If this is not 16, there is a free space in the transmission buffer BUF18.
A special code FFH indicating that all keys are not pressed is transmitted, and 1 is sent to TIME 17 in step S9.
0, that is, 100 mS is set. This state is step S
Since the state is the same as when 9 is initially set to 9, the operation 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が送信さ
れる。
In step S7, CTR 19 is set to 16
In this case, the transmission cannot be performed because there is no free space in the transmission buffer BUF18. 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 the STIME 17 in step S5, the same processing is performed again next time, and if there is 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 time-out of the timer 12, that is, 10 ms has elapsed after the timer setting, and returns to step S1. Therefore, these processes are repeated every 10 ms.

【0025】図6は、図5ステップS9、および図8ス
テップS43の送信処理の詳細を示すフローチャートで
ある。送信処理では、送信データを送信バッファに格納
するだけで、実際のシリアル送信は図7に示す送信割込
処理が行う。
FIG. 6 is a flowchart showing the details of the transmission process in step S9 in FIG. 5 and step S43 in 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 at the position indicated by I20 in F18. Next, 1 is added to I20 in step S14. If the result is 16, the process proceeds from step S15 to step S16, where B
I20 is set to 0 to indicate the head of the UF18. In any case, the process proceeds to step S17, where the transmission data number 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 flowchart showing a transmission interrupt process which operates asynchronously with the processes shown in FIGS. 5, 6, and 8. When transmission is permitted in step S18 in 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, in step S19, the transmission data number CT
Check R19. If it is not 0, there is transmission data, so in step S20 the transmission buffer BUF2
The transmission data is extracted from the position indicated by J21 of 0 and set to the serial port 9 to start serial transmission. Next, in 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 to indicate the head of BUF18.
Set 1 to 0. In either case, the process proceeds to step S24, where 1 is subtracted from the number of superstitious data CTR19, and then the process ends.

【0029】シリアル送信終了時、再び送信割込が発生
する。このとき、迷信データが存在すれば上述の処理が
行われるが、存在しない場合はステップS19からステ
ップS25に進み、シリアル送信を禁止した後に処理を
終了する。
At the end of serial transmission, a transmission interrupt occurs again. At this time, if the superstitious data exists, the above-described process is performed. If the superstitious data does not exist, the process proceeds from step S19 to step S25, where the serial transmission is prohibited and 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 flowchart showing details of the key reading process in step S2 of FIG. First, step S
At 26, 0 is set to the row number L24. Next, a row is selected by outputting the contents of L24 to the output port 5 in step S27. Next, in step S28, key data is input from the input port 4 and inverted to match the logical state, and then stored at the position indicated by L24 in the CL 23. Next, 1 is added to L24 in step S29.
The above processing is repeated 16 times, and when the input of all the rows is completed, the process proceeds from step S30 to step S31, and L24
Is set to 0 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 indicated by L24 in L23 is calculated,
Store in X26. Since the previous key pressed state is stored in LL22 and the current key pressed state is stored in CL23, the change of the key pressed state is stored in exclusive OR X26 thereof. If this is 0, there is no change in the key pressed state, so the process proceeds from step S33 to step S34. If X26 is not 0, step S33
Then, the process proceeds to step S36, where the bit number B25 is set to 0. Next, in step S37, the CTR 19 is checked. If CTR 19 is not 16, transmission buffer B
Since there is a space in the UF 18, the process proceeds to step S38.
If the bit indicated by B25 of X26 is off, the state of the key corresponding to that bit has not changed, and the process proceeds to step S44. If it is on, in step S39, the line number L24 and the bit number B25 are converted into a key code to be transmitted. Here, the key code ranges from 0 to 7EH. If the bit indicated by B25 in the row indicated by L24 in the CL23 is ON, it means that the key has been newly pressed, so the process proceeds from step S40 to step S41, and LL2
By setting the bit indicated by B25 in the row indicated by L24 in 3, the previous key pressed state is updated to match the current key pressed state. Next, in step S42,
One is added 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 the CL23 is off, the depression of the key has been released, and the process proceeds from step S40 to step S46. By resetting the bit indicated by B25, the previous key pressed state is updated to match the current key pressed 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, where the key code is transmitted, and in step S44, 1 is stored in B25.
Add. Next, proceeding to step S45, if B25 is not 8, the processing of all bits has not been completed, so the processing returns to step S37, and the above 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に戻り、上述の処理を繰り返す。全ての行の処理が終
了するとキー読取処理を終了する。
In step S34, 1 is added to L24. Next, the process proceeds to step S35, and if L24 is not 16, processing of all rows has not been completed, so step S3
2 and the above processing is repeated. When the processing for all the 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 space in the transmission buffer BUF18.
Since the key code cannot be transmitted, the key reading process ends. In this case, the previous key pressed 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,
In the process of key press detection processing, the number of pressed keys ONKE
The value of Y16 is increased or decreased, and it is detected that all the keys are not depressed when ONKEY16 is 0. Alternatively, it may be detected by the following means.

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

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

【0039】[0039]

【発明の効果】以上説明したように、本発明のキーボー
ドは、複数のキーの夫々について、押下の開始及び終了
を検出し、装置本体に対して、押下の開始または終了が
検出されたキーに対応するキーコードを送出するととも
に、前記複数のキーの全てが無押下状態であることが検
出された場合に、当該状態を示すコードを送出するよう
にしたので、キー押下終了を示すコードを受信するまで
キーをリピートする装置本体のCPUが、このコードを
ノイズ等の原因により正しく受信できなかった場合で
も、全てのキーが押下されていないことを示すコードが
送信されるので、装置本体のCPUはこのコードにより
キーのリピートを停止することができ、無限にキーがリ
ピートするという重大な障害を避けることができる。
As described above, the keyboard according to the present invention detects the start and end of pressing of each of a plurality of keys, and notifies the apparatus body of the key whose start or end is detected. A corresponding key code is transmitted, and when it is detected that all of the plurality of keys are in the non-pressed state, a code indicating the state is transmitted. Even if the CPU of the device main unit that repeats the key until the key is not received correctly due to noise or the like, a code indicating that all keys are not pressed is transmitted. This code can stop the key repeat and avoid the serious obstacle of infinite key repeat.

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

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

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

【図3】キーマトリクス1の詳細な説明図である。FIG. 3 is a detailed explanatory diagram of the 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 the embodiment.

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

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

【図8】キー読取処理の詳細を示すフローチャートであ
る。
FIG. 8 is a flowchart illustrating 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) DESCRIPTION OF SYMBOLS 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 in key pressed state (X)

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 複数のキーと、 該複数のキーの夫々について、押下の開始及び終了を検
出する検出手段と、 装置本体に対して、前記検出手段により押下の開始また
は終了が検出されたキーに対応するキーコードを送出す
るとともに、前記検出手段により前記複数のキーの全て
が無押下状態であることが検出された場合に、当該状態
を示すコードを送出する送出手段とを備えたことを特徴
とするキーボード。
1. A plurality of keys, detecting means for detecting the start and end of pressing of each of the plurality of keys, and a key whose start or end is detected by the detecting means for an apparatus main body. And sending means for sending a code indicating the state when the detecting means detects that all of the plurality of keys are in the non-pressed state. Characteristic keyboard.
【請求項2】 前記検出手段が、押下状態にあるキーの
総数を記憶する記憶手段を備え、該記憶手段に記憶され
たキーの総数を、夫々のキーの押下の開始及び終了を検
出すると増減し、当該総数が0であることにより、前記
複数のキーの全てが無押下状態であることを検出するこ
とを特徴とする請求項1に記載のキーボード。
2. The apparatus according to claim 1, wherein said detecting means includes a storing means for storing a total number of keys in a pressed state, and increases or decreases the total number of keys stored in said storing means when the start and end of pressing of each key are detected. 2. The keyboard according to claim 1, wherein when the total number is 0, it is detected that all of the plurality of keys are in a non-pressed state.
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 (2)

Publication Number Publication Date
JPH05134792A JPH05134792A (en) 1993-06-01
JP3126445B2 true 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)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3461458B2 (en) 1999-03-08 2003-10-27 シャープ株式会社 Wireless input device

Also Published As

Publication number Publication date
JPH05134792A (en) 1993-06-01

Similar Documents

Publication Publication Date Title
US6764011B2 (en) Graphics code system
US5220323A (en) Keyboard apparatus having ghost key sensing function
US7155544B2 (en) Portable information device capable of processing input data from external device and method thereof
JP3126445B2 (en) keyboard
US5363203A (en) Still picture transmitting system
JPH0234038A (en) Data compressing device
JP3897981B2 (en) Character input system, electronic device and smart card
JPH04367924A (en) Keyboard controller
JPH06195163A (en) Information processor
JP3173437B2 (en) Display device
JP3321955B2 (en) Keyboard device
EP0326102A2 (en) Method and apparatus for selecting a keyboard on a computer system
JPS59140561A (en) Electronic apparatus
KR100449685B1 (en) Method for transmitting the remote control signals of universal remote controller
JPS6235932A (en) Typamatic key board input control system
JPS5922318B2 (en) multiple control storage
JP2511170B2 (en) Remote control device
KR100207432B1 (en) Error correction method using controller and communication controllor using priority grade error correction method
JP2748718B2 (en) Synchronous terminal equipment control system
JP2778109B2 (en) Electronics
JP2647255B2 (en) Keyboard device
JP2762793B2 (en) Keyboard device
JPH0126579B2 (en)
JP2008172721A (en) Portable terminal, and sensor control method
WO2005106631A1 (en) Character input method and apparatus

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