JPH10254599A - Input reader - Google Patents

Input reader

Info

Publication number
JPH10254599A
JPH10254599A JP9059381A JP5938197A JPH10254599A JP H10254599 A JPH10254599 A JP H10254599A JP 9059381 A JP9059381 A JP 9059381A JP 5938197 A JP5938197 A JP 5938197A JP H10254599 A JPH10254599 A JP H10254599A
Authority
JP
Japan
Prior art keywords
scanning
input
output
key
pattern
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP9059381A
Other languages
Japanese (ja)
Inventor
Shuji Kaya
周治 加悦
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.)
Sharp Corp
Original Assignee
Sharp Corp
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 Sharp Corp filed Critical Sharp Corp
Priority to JP9059381A priority Critical patent/JPH10254599A/en
Publication of JPH10254599A publication Critical patent/JPH10254599A/en
Pending legal-status Critical Current

Links

Landscapes

  • Input From Keyboards Or The Like (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an input reader capable of specifying a scanning line connected to a key operated by a user on a key matrix in a short time with the small number of times of outputting scanning signals. SOLUTION: The plural scanning lines L connected to the key matrix 4 are divided into two groups, the scanning signals are simultaneously outputted to the scanning lines L belonging to one of the groups and the presence/absence of key input are detected on the side of an input line I. In the case of not detecting the key input relating to one of the groups, the scanning signals are simultaneously outputted to the scanning lines L belonging to the other one of the two groups and the presence/absence of the key input are detected. The scanning lines L belonging to the group for which the key input is detected of the two groups are divided into the two groups further, the scanning signals are simultaneously outputted to the scanning lines L belonging to one of the groups and the presence/absence of the key input are detected.

Description

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

【0001】[0001]

【発明の属する技術分野】この発明は入力読込装置に関
する。より詳しくは、行列状に配列された複数のキーを
有する入力手段(この明細書を通して「キーマトリク
ス」という。)を備え、ユーザーが上記キーを操作して
入力した信号を読み込む装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an input reading device. More specifically, the present invention relates to a device provided with input means having a plurality of keys arranged in a matrix (hereinafter referred to as a “key matrix”), and for reading a signal input by a user operating the keys.

【0002】なお、「キー」とは、ユーザーの操作に応
じてオンまたはオフの2値を出力し得るスイッチを意味
している。
[0002] A "key" means a switch capable of outputting two values, ON and OFF, according to a user operation.

【0003】[0003]

【従来の技術】電卓(電子式卓上計算機)に代表される
ような電子機器では、ユーザーが入力を行うための手段
として、行列状に配列された複数のキーを有し、各列に
並ぶキーに列ごとに1本の走査ラインが接続され、各行
に並ぶキーに行ごとに1本の入力ラインが接続されたキ
ーマトリクスを備えることが多い。
2. Description of the Related Art An electronic device such as a calculator (electronic desk calculator) has a plurality of keys arranged in a matrix as a means for a user to input data. Each row is often provided with a key matrix in which one scanning line is connected for each column, and keys arranged in each row are connected to one input line for each row.

【0004】従来、この種のキーマトリクスに対する走
査方式としては、予め全走査ラインに走査信号を出力し
ておき、何らかのキー入力があった時点で走査ラインに
1本づつ順番に走査信号を出力して、ユーザーによって
押されているキー(これを便宜上「操作キー」と呼
ぶ。)につながる走査ラインを特定する方式や、表示信
号等に同期して最初から走査ラインに1本づつ順番に走
査信号を出力し、何らかのキー入力があった時点で操作
キーにつながる走査ラインを特定する方式が知られてい
る(特開昭50−152638号公報、特開昭52−1
28019号公報、特開昭54−109324号公報な
ど)。
Conventionally, as a scanning method for a key matrix of this type, a scanning signal is output to all scanning lines in advance, and the scanning signals are sequentially output to the scanning lines one by one when a key input is made. A method for specifying a scanning line connected to a key pressed by the user (this is called an “operation key” for convenience), a scanning signal for each scanning line sequentially from the beginning in synchronization with a display signal or the like. Is output, and a scanning line connected to an operation key is specified when a key is input (Japanese Patent Laid-Open Nos. 50-152638 and 52-1).
28019, JP-A-54-109324, etc.).

【0005】[0005]

【発明が解決しようとする課題】しかしながら、従来の
方式はいずれも、走査ラインに1本づつ順番に走査信号
を出力しているため、最初に走査される走査ラインと最
後に走査される走査ラインとでは走査タイミングに差が
でき、走査ラインの本数が増えるほどこの差は大きくな
る。このため、操作キーが最後に走査する走査ラインに
つながっている場合は、ユーザーがキーを押した時間が
短いとき読み込みができなくなる可能性がある。
However, in each of the conventional systems, the scanning signals are output one by one to the scanning lines, so that the first scanning line and the last scanning line are output. There is a difference in the scanning timing between and, and this difference increases as the number of scanning lines increases. For this reason, when the operation key is connected to the last scanning line to be scanned, reading may not be possible if the user presses the key for a short time.

【0006】ここで、最後に走査する走査ラインでも読
み込みが行えるように走査信号の間隔を短くする手段が
考えられるが、その場合、或る走査信号を出力する時点
で前の走査信号に起因する波形のなまりが残って、読込
エラーが起こる危険性がある。
Here, means for shortening the interval between scanning signals so that reading can be performed even on the last scanning line is considered. In this case, when a certain scanning signal is output, it is caused by the previous scanning signal. There is a danger that a read error may occur due to waveform distortion.

【0007】そこで、この発明の目的は、操作キーにつ
ながる走査ライン(これを便宜上「標的走査ライン」と
呼ぶ。)を少ない走査信号出力回数で短時間に特定でき
る入力読込装置を提供することにある。
SUMMARY OF THE INVENTION An object of the present invention is to provide an input reading device capable of specifying a scan line (referred to as a "target scan line" for convenience) connected to an operation key in a short time with a small number of scan signal outputs. is there.

【0008】[0008]

【課題を解決するための手段】上記目的を達成するた
め、請求項1に記載の入力読込装置は、行列状に配列さ
れた複数のキーを有し、各列に並ぶキーに列ごとに1本
の走査ラインが接続され、各行に並ぶキーに行ごとに1
本の入力ラインが接続されたキーマトリクスを備え、ユ
ーザーが上記キーを操作して入力した2値信号を、上記
走査ラインに走査信号を出力して上記入力ライン側で検
出する入力読込装置であって、上記キーマトリクスにつ
ながる複数の走査ラインを2群に分けて、その一方の群
に属する走査ラインに同時に走査信号を出力してキー入
力の有無を検出し、上記一方の群に関してキー入力が検
出されない場合は上記2群のうちの他方の群に属する走
査ラインに同時に走査信号を出力してキー入力の有無を
検出し、上記2群のうちキー入力が検出された方の群に
属する走査ラインをさらに2群に分けて、その一方の群
に属する走査ラインに同時に走査信号を出力してキー入
力の有無を検出することを特徴とする。
According to a first aspect of the present invention, there is provided an input / reading apparatus having a plurality of keys arranged in a matrix, wherein one key is arranged in each column. Scan lines are connected, and one key per row
An input reading device, comprising: a key matrix to which the input lines are connected, wherein a binary signal input by a user operating the keys is output to the scanning line by scanning signals and detected on the input line side. The plurality of scanning lines connected to the key matrix are divided into two groups, and scanning signals are simultaneously output to the scanning lines belonging to one of the groups to detect the presence or absence of a key input. If the key input is not detected, a scanning signal is simultaneously output to the scanning lines belonging to the other of the two groups to detect the presence or absence of a key input, and the scanning belonging to the group of the two groups in which the key input is detected is performed. The line is further divided into two groups, and a scanning signal is simultaneously output to the scanning lines belonging to one of the groups to detect the presence or absence of a key input.

【0009】なお、この明細書を通して、キーマトリク
スの列と行は、必ずしも縦方向と横方向に延びるものに
限られず、任意の一方向とそれに交差する方向に延びる
ものを意味している。
Note that throughout this specification, the columns and rows of the key matrix are not necessarily limited to those extending in the vertical direction and the horizontal direction, but mean those extending in any one direction and the direction intersecting it.

【0010】この請求項1の入力読込装置は、最初にキ
ーマトリクスにつながる全走査ラインに走査信号を同時
に出力して上記入力ライン側でキー入力の有無を検出す
る。このときユーザーがキー入力を行っていれば必ずキ
ー入力が検出される。キー入力が検出されれば、全走査
ラインを2群に分けて、その一方の群に属する走査ライ
ンに同時に走査信号を出力してキー入力の有無を検出す
る。上記一方の群に関してキー入力が検出されない場合
は上記2群のうちの他方の群に属する走査ラインに同時
に走査信号を出力してキー入力の有無を検出する。最初
のキー入力がノイズによるものでない限り、上記一方の
群、他方の群のいずれかに関してキー入力が検出され
る。そこで、上記2群のうちキー入力が検出された方の
群に属する走査ラインをさらに2群に分けて、その一方
の群に属する走査ラインに同時に走査信号を出力してキ
ー入力の有無を検出する。以上の一連の処理を繰り返す
ことによって、全走査ラインのうち標的走査ラインが含
まれる範囲を狭めてゆく。最後に1本の走査ラインが残
ればそれが標的走査ラインである。
In the input reading device according to the first aspect, first, a scanning signal is simultaneously output to all the scanning lines connected to the key matrix, and the presence or absence of a key input is detected on the input line side. At this time, the key input is always detected if the user has performed the key input. When a key input is detected, all the scanning lines are divided into two groups, and a scanning signal is simultaneously output to the scanning lines belonging to one of the groups to detect the presence or absence of the key input. If no key input is detected for one of the groups, a scanning signal is simultaneously output to the scanning lines belonging to the other of the two groups to detect the presence or absence of a key input. As long as the first key input is not caused by noise, the key input is detected for one of the groups and the other group. Therefore, the scanning lines belonging to the group in which the key input is detected among the two groups are further divided into two groups, and the scanning signals are simultaneously output to the scanning lines belonging to one of the groups to detect the presence or absence of the key input. I do. By repeating the above series of processes, the range including the target scan line among all the scan lines is narrowed. Finally, if one scan line remains, it is the target scan line.

【0011】このようにした場合、読み込みに要する走
査信号出力回数が平均化されて、走査信号出力回数の最
大値が従来に比して少なくなる。また、これに伴って、
読込時間(ユーザーによるキー入力があってから標的走
査ラインを特定するまでの時間)が平均化されて、読込
時間の最大値が従来に比して短くなる。
In such a case, the number of times of scanning signal output required for reading is averaged, and the maximum value of the number of times of scanning signal output becomes smaller than in the prior art. Along with this,
The reading time (the time from the key input by the user until the target scan line is specified) is averaged, and the maximum value of the reading time is shorter than before.

【0012】例えば全走査ライン数が32本である場合
は、従来技術では走査信号出力回数が最大33回になる
のに対し、請求項1によれば走査信号出力回数が最大1
1回となる。全走査ライン数が64本である場合は、従
来技術では走査信号出力回数が最大65回になるのに対
し、請求項1によれば走査信号出力回数が最大13回と
なる。なお、請求項1において走査信号出力回数の最大
値が従来に比して少なくなるのは、全走査ライン数が8
本以上のときである。
For example, when the total number of scanning lines is 32, the number of times of output of the scanning signal is 33 in the prior art, whereas the number of times of output of the scanning signal is 1 in the prior art.
One time. When the total number of scanning lines is 64, the number of times of output of the scanning signal becomes 65 at the maximum in the related art, whereas the number of times of output of the scanning signal becomes 13 at the maximum according to the first aspect. It should be noted that the maximum value of the number of times of output of the scanning signal in claim 1 is smaller than that in the related art because the total number of scanning lines is 8
It's more than a book.

【0013】なお、請求項1の入力読込装置は次の請求
項2の入力読込装置に比して確実でノイズに強い。
The input reading device according to the first aspect is more reliable and resistant to noise than the input reading device according to the second aspect.

【0014】請求項2に記載の入力読込装置は、行列状
に配列された複数のキーを有し、各列に並ぶキーに列ご
とに1本の走査ラインが接続され、各行に並ぶキーに行
ごとに1本の入力ラインが接続されたキーマトリクスを
備え、ユーザーが上記キーマトリクスのキーを操作して
入力した2値信号を、上記走査ラインに走査信号を出力
して上記入力ライン側で検出する入力読込装置であっ
て、上記キーマトリクスにつながる複数の走査ラインを
2群に分けて、その一方の群に属する走査ラインに同時
に走査信号を出力してキー入力の有無を検出し、上記一
方の群に関してキー入力が検出された場合は上記一方の
群、上記一方の群に関してキー入力が検出されない場合
は上記他方の群をそれぞれ選択し、選択した方の群をさ
らに2群に分けて、その一方の群に属する走査ラインに
同時に走査信号を出力してキー入力の有無を検出するこ
とを特徴とする。
According to a second aspect of the present invention, there is provided an input reading device having a plurality of keys arranged in a matrix, one scan line for each column connected to the keys arranged in each column, and a plurality of keys arranged in each row. A key matrix in which one input line is connected to each row is provided. A binary signal input by a user by operating a key of the key matrix is output to the scanning line, and a scanning signal is output to the input line side. An input reading device for detecting, wherein a plurality of scanning lines connected to the key matrix are divided into two groups, and a scanning signal is simultaneously output to the scanning lines belonging to one of the groups to detect the presence or absence of a key input. When a key input is detected for one group, the one group is selected, and when a key input is not detected for the one group, the other group is selected. The selected group is further divided into two groups. , While outputs simultaneously scan signals to the scan lines belonging to the group of the and detecting the presence or absence of the key input.

【0015】この請求項2の入力読込装置は、最初にキ
ーマトリクスにつながる全走査ラインに走査信号を同時
に出力して上記入力ライン側でキー入力の有無を検出す
る。このときユーザーがキー入力を行っていれば必ずキ
ー入力が検出される。キー入力が検出されれば、全走査
ラインを2群に分けて、その一方の群に属する走査ライ
ンに同時に走査信号を出力してキー入力の有無を検出す
る。上記一方の群に関してキー入力が検出された場合は
上記一方の群、上記一方の群に関してキー入力が検出さ
れない場合は上記他方の群をそれぞれ選択する。これ
は、最初のキー入力がノイズによるものでない限り、上
記一方の群に関してキー入力が検出されるか、または、
上記一方の群に関してキー入力が検出されない場合は上
記他方の群に関してキー入力が検出されるはずだからで
ある。次に、選択した方の群に属する走査ラインをさら
に2群に分けて、その一方の群に属する走査ラインに同
時に走査信号を出力してキー入力の有無を検出する。以
上の一連の処理を繰り返すことによって、全走査ライン
のうち標的走査ラインが含まれる範囲を狭めてゆく。最
後に1本の走査ラインが残ればそれが標的走査ラインで
ある。
In the input reading device according to the second aspect, first, a scanning signal is simultaneously output to all the scanning lines connected to the key matrix, and the presence or absence of a key input is detected on the input line side. At this time, the key input is always detected if the user has performed the key input. When a key input is detected, all the scanning lines are divided into two groups, and a scanning signal is simultaneously output to the scanning lines belonging to one of the groups to detect the presence or absence of the key input. When a key input is detected for the one group, the one group is selected, and when a key input is not detected for the one group, the other group is selected. This means that a keystroke is detected for the one group unless the first keystroke is due to noise, or
If no key input is detected for one of the groups, a key input should be detected for the other group. Next, the scanning lines belonging to the selected group are further divided into two groups, and a scanning signal is simultaneously output to the scanning lines belonging to one of the groups to detect the presence or absence of a key input. By repeating the above series of processes, the range including the target scan line among all the scan lines is narrowed. Finally, if one scan line remains, it is the target scan line.

【0016】このようにした場合、読み込みに要する走
査信号出力回数が平均化されて、走査信号出力回数の最
大値が従来に比して少なくなる。また、これに伴って、
読込時間が平均化されて、読込時間の最大値が従来に比
して短くなる。
In this case, the number of times of scanning signal output required for reading is averaged, and the maximum value of the number of times of scanning signal output becomes smaller than in the conventional case. Along with this,
The read time is averaged, and the maximum value of the read time is shorter than before.

【0017】例えば全走査ライン数が32本である場合
は、従来技術では走査信号出力回数が最大33回になる
のに対し、請求項1によれば走査信号出力回数が最大7
回となる。全走査ライン数が64本である場合は、従来
技術では走査信号出力回数が最大65回になるのに対
し、請求項1によれば走査信号出力回数が最大8回とな
る。なお、請求項1において走査信号出力回数の最大値
が従来に比して少なくなるのは、全走査ライン数が6本
以上のときである。
For example, when the total number of scanning lines is 32, the number of times of output of the scanning signal is 33 at the maximum in the prior art, whereas the number of times of output of the scanning signal is 7 at the maximum according to claim 1
Times. In the case where the total number of scanning lines is 64, the number of times of output of the scanning signal is up to 65 in the prior art, whereas the number of times of output of the scanning signal is up to 8 according to the first aspect. In the first aspect, the maximum value of the number of times of output of the scanning signal is smaller than that of the conventional case when the total number of scanning lines is 6 or more.

【0018】なお、請求項2の入力読込装置は請求項1
の入力読込装置に比して走査信号出力回数がさらに少な
くなる。
It is to be noted that the input reading device of the second aspect is the first aspect.
The number of times of output of the scanning signal is further reduced as compared with the input reading device.

【0019】請求項3に記載の入力読込装置は、請求項
1または2に記載の入力読込装置において、全走査ライ
ン数に相当する数のビットからなり、各ビットの値に応
じて走査ラインを2群に分けることを表すビットパター
ンを一定数だけ保持する第1記憶部と、全走査ライン数
に相当する数のビットからなり、全走査ラインのうち同
時に走査信号を出力すべき走査ラインを表す走査パター
ンを記憶できる第2記憶部と、上記第2記憶部に記憶さ
れた今回の走査パターンと上記第1記憶部に保持された
今回の走査信号出力回数に応じたビットパターンとの間
で、対応するビット毎に論理積をとって、得られたパタ
ーンを次回の走査パターンとして上記第2記憶部に記憶
させる制御部を備えたことを特徴とする。
According to a third aspect of the present invention, in the input reading apparatus according to the first or second aspect, the input reading apparatus comprises a number of bits corresponding to the total number of scanning lines, and scans the scanning lines according to the value of each bit. A first storage unit that holds a fixed number of bit patterns indicating division into two groups, and a number of bits corresponding to the total number of scanning lines, and represents a scanning line to which a scanning signal is to be output simultaneously among all the scanning lines. A second storage unit capable of storing a scan pattern, and a current scan pattern stored in the second storage unit and a bit pattern corresponding to the current scan signal output count stored in the first storage unit, A control unit is provided for obtaining a logical product for each corresponding bit and storing the obtained pattern as the next scanning pattern in the second storage unit.

【0020】この請求項3の入力読込装置によれば、今
回の走査パターンに基づいて次回の走査パターンが比較
的簡単に作成される。複雑な演算を要せず、処理時間も
比較的短くて済む。
According to the input reading device of the third aspect, the next scanning pattern is relatively easily created based on the current scanning pattern. No complicated calculation is required, and the processing time is relatively short.

【0021】請求項4に記載の入力読込装置は、請求項
3に記載の入力読込装置において、上記全走査ライン間
に優先順位が設けられ、上記各ビットパターン内で、優
先順位が相対的に高い走査ラインに対応するビットに、
上記2群のうち上記一方の群を指す値が相対的に高い確
率で付与されていることを特徴とする。
According to a fourth aspect of the present invention, in the input reading apparatus according to the third aspect, a priority is provided between all of the scanning lines, and a priority is relatively set in each of the bit patterns. Bits corresponding to high scan lines
A value indicating the one of the two groups is given with a relatively high probability.

【0022】この請求項4の入力読込装置では、優先順
位が相対的に高い走査ラインは、上記2群のうち上記一
方の群、すなわち先に走査信号が出力される方の群に属
する確率が相対的に高くなる。したがって、優先順位が
相対的に高い走査ラインは、相対的に少ない走査信号出
力回数で特定される。これは、特に請求項1のように、
走査ラインを2群に分けてその両方の群にそれぞれ走査
信号を出力するような場合に有効となる。
In the input reading device according to the fourth aspect, the scanning line having a relatively high priority has a probability of belonging to the one of the two groups, that is, the group to which the scanning signal is output first. Relatively high. Therefore, a scan line having a relatively high priority is specified by a relatively small number of scan signal outputs. This is particularly true for claim 1.
This is effective when the scanning lines are divided into two groups and the scanning signals are output to both groups.

【0023】請求項5に記載の入力読込装置は、請求項
3に記載の入力読込装置において、上記全走査ライン間
に優先順位が設けられ、上記走査信号出力回数に応じた
全ビットパターンにわたって、特定の優先順位の走査ラ
インに対応するビットに、上記特定の優先順位を2進数
で表したときの各桁の値が下の桁から順に付与されてい
ることを特徴とする。
According to a fifth aspect of the present invention, in the input reading apparatus according to the third aspect, a priority is provided between all the scanning lines, and the priority is provided over all the bit patterns corresponding to the number of times of the scanning signal output. A bit corresponding to a scan line having a specific priority is provided with a value of each digit when the specific priority is expressed by a binary number in order from the lower digit.

【0024】この請求項5の入力読込装置では、優先順
位が相対的に高い走査ラインは、上記2群のうち上記一
方の群、すなわち先に走査信号が出力される方の群に属
する確率が相対的に高くなる。この結果、優先順位が相
対的に高い走査ラインに対して走査信号が相対的に多数
回出力される。したがって、読み込みが確実に行われ
る。これは、特に請求項2のように、走査ラインを2群
に分けてその一方の群のみに走査信号を出力するような
場合に有効となる。
In the input reading device according to the fifth aspect, the scanning line having a relatively high priority has a probability that it belongs to the one of the two groups, that is, the group to which the scanning signal is output first. Relatively high. As a result, a scanning signal is output relatively many times for a scanning line having a relatively higher priority. Therefore, reading is performed reliably. This is particularly effective when the scanning lines are divided into two groups and the scanning signal is output only to one of the two groups.

【0025】請求項6に記載の入力読込装置は、請求項
3に記載の入力読込装置において、最後に標的走査ライ
ンを特定したときの走査パターンを記憶できる第3記憶
部を備え、上記制御部は、上記第1記憶部に保持された
走査信号出力回数に応じたビットパターンが上記第3記
憶部に記憶された走査パターンを包含するか否かを判断
して、この判断結果に応じて、上記ビットパターンをそ
のまま又は各ビットの値を反転させた状態でビットパタ
ーンとして採用することを特徴とする。
According to a sixth aspect of the present invention, in the input reading device according to the third aspect, the input reading device further includes a third storage unit capable of storing a scanning pattern when a target scan line is specified last. Determines whether a bit pattern corresponding to the number of times of scanning signal output held in the first storage unit includes the scanning pattern stored in the third storage unit, and according to the determination result, It is characterized in that the bit pattern is adopted as a bit pattern as it is or in a state where the value of each bit is inverted.

【0026】電子機器の中には、キーが連続して押され
る頻度の低いものや、キーが連続して押される頻度の高
いものがある。そこで、この請求項6の入力読込装置で
は、最後に標的走査ラインを特定したときの走査パター
ンを記憶できる第3記憶部を備える。そして、上記第1
記憶部に保持された走査信号出力回数に応じたビットパ
ターンが上記第3記憶部に記憶された走査パターンを包
含するか否かを判断して、この判断結果に応じて、上記
ビットパターンをそのまま又は各ビットの値を反転させ
た状態でビットパターンとして採用する。例えば、キー
が連続して押される頻度が低い場合は、上記第1記憶部
に保持された今回の走査信号出力回数に応じたビットパ
ターンが上記第3記憶部に記憶された走査パターンを包
含するとき、上記ビットパターンを反転させた状態で今
回のビットパターンとして採用する。一方、上記第1記
憶部に保持された走査信号出力回数に応じたビットパタ
ーンが上記第3記憶部に記憶された走査パターンを包含
しないとき、上記ビットパターンをそのまま今回のビッ
トパターンとして採用する。これにより、標的走査ライ
ンを特定できる確率が高まる。これに対して、キーが連
続して押される頻度が低い場合は、上記第1記憶部に保
持された今回の走査信号出力回数に応じたビットパター
ンが上記第3記憶部に記憶された走査パターンを包含す
るとき、上記ビットパターンをそのまま今回のビットパ
ターンとして採用する。一方、上記第1記憶部に保持さ
れた今回の走査信号出力回数に応じたビットパターンが
上記第3記憶部に記憶された走査パターンを包含しない
とき、上記ビットパターンを反転させた状態で今回のビ
ットパターンとして採用する。これにより、標的走査ラ
インを特定できる確率が高まる。この結果、請求項1の
ように、走査ラインを2群に分けてその両方の群にそれ
ぞれ走査信号を出力するような場合は、より少ない走査
信号出力回数で標的走査ラインを特定することができ
る。また、請求項2のように、走査ラインを2群に分け
てその一方の群のみに走査信号を出力するような場合
は、より確実に標的走査ラインを特定することができ
る。
Some electronic devices have a low frequency of successive key presses, and some have a high frequency of continuous key presses. Therefore, the input reading device according to the sixth aspect includes the third storage unit that can store the scan pattern when the target scan line was specified last. And the first
It is determined whether or not the bit pattern corresponding to the number of times of the scanning signal output held in the storage unit includes the scanning pattern stored in the third storage unit. Alternatively, a bit pattern is adopted with the value of each bit inverted. For example, when the frequency at which the keys are continuously pressed is low, a bit pattern corresponding to the number of times of the current scanning signal output held in the first storage unit includes the scanning pattern stored in the third storage unit. At this time, the bit pattern is adopted as a current bit pattern in an inverted state. On the other hand, when the bit pattern corresponding to the number of times of the scanning signal output held in the first storage unit does not include the scanning pattern stored in the third storage unit, the bit pattern is directly used as the current bit pattern. This increases the probability that the target scan line can be specified. On the other hand, if the frequency with which the keys are continuously pressed is low, the bit pattern corresponding to the number of times of the current scan signal output held in the first storage unit is stored in the scan pattern stored in the third storage unit. Is included, the above-mentioned bit pattern is adopted as it is as the current bit pattern. On the other hand, when the bit pattern corresponding to the current scan signal output count held in the first storage unit does not include the scan pattern stored in the third storage unit, the bit pattern is inverted in the current state. Adopted as a bit pattern. This increases the probability that the target scan line can be specified. As a result, when the scan lines are divided into two groups and the scan signals are output to both groups, the target scan line can be specified with a smaller number of scan signal output times. . In the case where the scanning lines are divided into two groups and the scanning signal is output only to one of the two groups, the target scanning line can be specified more reliably.

【0027】請求項7に記載の入力読込装置は、請求項
3に記載の入力読込装置において、上記全走査ラインは
複数の位相群に分けられて、上記位相群には定常表示状
態において互いに異なる位相で走査信号が出力され、上
記全走査ラインは、上記各位相群から各1本の走査ライ
ンを選択してなる組に分けられ、上記各ビットパターン
内で、同じ組に属する走査ラインに対応するビットに同
じ値が付与されていることを特徴とする。
According to a seventh aspect of the present invention, in the input reading apparatus according to the third aspect, all the scanning lines are divided into a plurality of phase groups, and the phase groups are different from each other in a steady display state. A scanning signal is output in phase, and all the scanning lines are divided into sets each of which selects one scanning line from each of the phase groups, and correspond to scanning lines belonging to the same set in each bit pattern. It is characterized in that the same value is given to the bit to be executed.

【0028】電子機器によっては、全走査ラインが複数
の位相群に分けられ、ユーザーによるキー入力がない定
常表示状態では、各位相群に互いに異なる位相で走査信
号が出力される場合がある。このような場合に、この請
求項7の入力読込装置によれば、定常表示状態において
ユーザーによるキー入力があったことが円滑に検出され
る。つまり、特殊な処理を付け加える必要がなく、無駄
な走査信号出力を行う必要がない。
In some electronic devices, all scanning lines are divided into a plurality of phase groups, and in a steady display state in which no key input is made by a user, a scanning signal may be output to each phase group at a different phase. In such a case, according to the input reading device of the seventh aspect, it is smoothly detected that the user has made a key input in the steady display state. That is, there is no need to add special processing and no need to output useless scanning signals.

【0029】[0029]

【発明の実施の形態】以下、この発明の入力読込装置の
実施の形態を詳細に説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, an embodiment of the input reading device of the present invention will be described in detail.

【0030】(1) 装置の構成 図1は、この発明の一実施形態の入力読込装置の概略ブ
ロック構成を示している。この入力読込装置は、制御部
1と、キー走査ポート2と、キー入力ポート3と、キー
マトリクス4と、第1記憶部としてのROM(リード・
オンリ・メモリ)5と、RAM(ランダム・アクセス・
メモリ)10を備えている。
(1) Device Configuration FIG. 1 shows a schematic block configuration of an input reading device according to an embodiment of the present invention. This input reading device includes a control unit 1, a key scanning port 2, a key input port 3, a key matrix 4, and a ROM (read / write) as a first storage unit.
Only memory 5 and RAM (random access memory)
Memory) 10.

【0031】制御部1は、この入力読込装置による処理
の全体を制御する。この制御部1は、この例ではNOT
(論理否定)、AND(論理積)を行う演算処理部を含
むCPU(中央演算処理装置)と、これを制御するため
のプログラムとから成る。なお、論理回路によっても構
成され得る。
The control section 1 controls the entire processing by the input reading device. In this example, the control unit 1 performs a NOT
(Logical negation), a CPU (central processing unit) including an arithmetic processing unit for performing AND (logical product), and a program for controlling the CPU. In addition, it can also be comprised by a logic circuit.

【0032】キーマトリクス4は、この例では4行8列
に配列された複数のキーKを有している。各キーKは1
接点の常時開スイッチであり、ユーザーによって押され
ているときのみオンする。このキーマトリクス4の1つ
の列に並ぶキーKは、キー走査ポート2の1つのポート
から延びる1本の走査ラインLに接続されている。ま
た、キーマトリクス4の1つの行に並ぶキーKは、キー
入力ポート3の1つのポートへ延びる1本の入力ライン
Iに接続されている。
The key matrix 4 has a plurality of keys K arranged in 4 rows and 8 columns in this example. Each key K is 1
It is a normally open switch for contacts, and is turned on only when pressed by the user. The keys K arranged in one column of the key matrix 4 are connected to one scanning line L extending from one of the key scanning ports 2. The keys K arranged in one row of the key matrix 4 are connected to one input line I extending to one port of the key input port 3.

【0033】キー走査ポート2は8ビットの出力バッフ
ァであり、制御部1によって書き込まれた走査パターン
(8桁のビット値)を保持し、その走査パターンに応じ
て走査ラインLへ走査信号を出力する。ビット値「1」
が走査信号(この例では正の矩形パルス)を出力すべき
ことを表し、ビット値「0」が走査信号を出力しないこ
とを表す。
The key scanning port 2 is an 8-bit output buffer that holds a scanning pattern (8-digit bit value) written by the control unit 1 and outputs a scanning signal to a scanning line L according to the scanning pattern. I do. Bit value "1"
Indicates that a scanning signal (a positive rectangular pulse in this example) should be output, and a bit value “0” indicates that the scanning signal is not output.

【0034】キー入力ポート3は4ビットの入力バッフ
ァであり、キーマトリクス4から操作キーに応じた4桁
のビット値を受けて保持する。このキー入力ポート3の
ビット値を制御部1によって読み出すことにより、キー
入力の有無が検出される。
The key input port 3 is a 4-bit input buffer, and receives and holds a 4-digit bit value corresponding to an operation key from the key matrix 4. By reading the bit value of the key input port 3 by the control unit 1, the presence or absence of a key input is detected.

【0035】ROM5は予め機器の設計段階で作成され
たビットパターン表を保持(記憶)している。図5に例
示するように、ビットパターン表は、全走査ライン数に
応じて各8桁のビットパターンb1,b2,b3からな
っている。
The ROM 5 holds (stores) a bit pattern table created in advance in the design stage of the device. As illustrated in FIG. 5, the bit pattern table includes bit patterns b1, b2, and b3 of eight digits each according to the total number of scanning lines.

【0036】RAM10のワークエリアには、後述する
キー読込処理(図2,3)における繰り返し回数(ルー
プ回数)を記憶するためのレジスタ6と、今回の走査パ
ターンを記憶するための第2記憶部としてのレジスタ7
と、前回の走査パターンを記憶するためのレジスタ8
と、最後に標的走査ラインを特定したときの走査パター
ンを記憶するための第3記憶部としてのレジスタ9が設
定されている。なお、レジスタ6〜9は、制御部1のC
PU内に設定しても良い。また、レジスタ7には基本的
にキー走査ポート2と同じ値が保持されるので、出力信
号のタイミングに問題がないなら、レジスタ7を省略し
てキー走査ポート2の値をそのまま制御に使用しても良
い。
The work area of the RAM 10 has a register 6 for storing the number of repetitions (the number of loops) in a key reading process (FIGS. 2 and 3) described later, and a second storage section for storing the current scanning pattern. Register 7 as
And a register 8 for storing the previous scanning pattern.
And a register 9 as a third storage unit for storing the scan pattern when the target scan line was specified last. Note that the registers 6 to 9 store the C
It may be set in the PU. Since the register 7 basically holds the same value as that of the key scanning port 2, if there is no problem with the timing of the output signal, the register 7 is omitted and the value of the key scanning port 2 is used as it is for control. May be.

【0037】現実にはユーザーによって同時に2つ以上
のキーが押されることもあるが、以下のキー読込処理で
は、同時に2つ以上のキーが操作されているときは有効
なキー入力として認めないか、または操作されたキーの
うちの1個のみを有効とすることを前提とする。
In reality, two or more keys may be pressed at the same time by the user. In the following key reading process, if two or more keys are operated at the same time, is it not recognized as a valid key input? , Or only one of the operated keys is assumed to be valid.

【0038】(2) キー読込処理の第1の例 キー読込処理の第1の例を図2に示すフローを用いて説
明する。
(2) First Example of Key Reading Process A first example of the key reading process will be described with reference to the flow shown in FIG.

【0039】 まず、定常表示状態中に、キー入力の
有無を確認するために周期的に全キーストローブ出力を
行う。あるいは全キーストローブ出力のままキー入力に
よる割り込みが起こるのを待つ。いずれにしても、キー
走査ポート2を全走査ラインに走査信号が出力された状
態「11111111」にする(S1)。同時に、キー
走査ポート2の値「11111111」を走査パターン
としてレジスタ7に保存する。
First, during the steady display state, all key strobes are periodically output in order to confirm the presence or absence of a key input. Alternatively, it waits for an interrupt due to key input to occur with all key strobe outputs. In any case, the key scanning port 2 is set to the state "111111111" in which the scanning signal is output to all the scanning lines (S1). At the same time, the value “11111111” of the key scanning port 2 is stored in the register 7 as a scanning pattern.

【0040】 キー入力ポート3の値に基づいてキー
入力の有無を検出する(S2)。キー入力が無ければ定
常表示状態へ復帰する。一方、キー入力が有れば、レジ
スタ6の内容(ループ回数)を初期化した後、次のステ
ップS3へ進む。
The presence or absence of a key input is detected based on the value of the key input port 3 (S 2). If there is no key input, the display returns to the normal display state. On the other hand, if there is a key input, the contents (the number of loops) of the register 6 are initialized, and the process proceeds to the next step S3.

【0041】 ステップS3では、標的走査ラインを
含む走査ライン群を2群に分けて、その一方の走査ライ
ン群を新たな走査信号を出力すべき範囲とする。
In step S3, the scan line group including the target scan line is divided into two groups, and one of the scan line groups is set as a range in which a new scan signal is to be output.

【0042】具体的には、図4に示すように、まずレジ
スタ7に保持されている前回の走査パターンをレジスタ
8に保存(退避)する(S21)。
Specifically, as shown in FIG. 4, first, the previous scanning pattern held in the register 7 is saved (evacuated) to the register 8 (S21).

【0043】次に、ROM5のビットパターン表(図5
参照)から、レジスタ6に保持されているループ回数
(後述するようにインクリメントされる)に応じたビッ
トパターンを選択する(S22)。ここで、ループ回数
が1回目であるときはビットパターンb1を選択する。
ループ回数が2回目であるときはビットパターンb2を
選択する。また、ループ回数が3回目であるときはビッ
トパターンb3を選択する。
Next, the bit pattern table of the ROM 5 (FIG. 5)
), A bit pattern corresponding to the number of loops (incremented as described later) held in the register 6 is selected (S22). Here, when the number of loops is the first time, the bit pattern b1 is selected.
When the number of loops is the second time, the bit pattern b2 is selected. If the number of loops is the third, the bit pattern b3 is selected.

【0044】そして、レジスタ7に保持されている今回
の走査パターンとROM5のビットパターン表から選択
したビットパターンとの間で、対応するビット毎にAN
Dをとって、得られた8桁の値を新たな走査パターンと
してレジスタ7に保存する(S23)。これにより、比
較的簡単に新たな走査パターンを作成することができ
る。
Then, between the current scan pattern held in the register 7 and the bit pattern selected from the bit pattern table of the ROM 5,
Taking D, the obtained 8-digit value is stored in the register 7 as a new scanning pattern (S23). Thus, a new scanning pattern can be created relatively easily.

【0045】この後、図2のステップS4へ進む。Thereafter, the operation proceeds to step S4 in FIG.

【0046】 ステップS4では、レジスタ7に保持
されている走査パターンに応じて走査信号をキー走査ポ
ート2へ出力する。
In step S 4, a scan signal is output to key scan port 2 according to the scan pattern held in register 7.

【0047】 次に、キー入力ポート3の値に基づい
てキー入力の有無を検出する(S5)。キー入力が有れ
ば、今回走査信号を出力した範囲に標的走査ラインが含
まれていると判断してステップS9へ進む。一方、キー
入力が無ければ、前回走査信号を出力した範囲には標的
走査ラインが含まれていたが、今回走査信号を出力した
範囲には標的走査ラインが含まれていないと判断してス
テップS6へ進む。
Next, the presence or absence of a key input is detected based on the value of the key input port 3 (S5). If there is a key input, it is determined that the target scan line is included in the range where the current scan signal was output, and the process proceeds to step S9. On the other hand, if there is no key input, it is determined that the target scan line was included in the range where the previous scan signal was output, but the target scan line was not included in the range where the current scan signal was output. Proceed to.

【0048】 ステップS6では、ステップS3で2
群に分けた走査ライン群のうち他方の走査ライン群を次
回の走査信号を出力べき範囲とする。具体的には、レジ
スタ7に保持されている今回の走査パターンについてN
OTをとって得られたパターンとレジスタ8に保持され
ている前回の走査パターンとの間で、対応するビット毎
にANDをとれば良い。得られた8桁の値を新たな走査
パターンとしてレジスタ7に保存する。
In step S6, 2 in step S3
The other scanning line group among the scanning line groups divided into groups is set as a range in which the next scanning signal is to be output. Specifically, for the current scan pattern held in the register 7, N
An AND may be obtained for each corresponding bit between the pattern obtained by taking the OT and the previous scan pattern held in the register 8. The obtained eight-digit value is stored in the register 7 as a new scanning pattern.

【0049】 次に、レジスタ7に保持されている走
査パターンに応じて走査信号をキー走査ポート2へ出力
する(S7)。
Next, a scanning signal is output to the key scanning port 2 in accordance with the scanning pattern held in the register 7 (S 7).

【0050】 次に、キー入力ポート3の値に基づい
てキー入力の有無を検出する(S8)。キー入力が有れ
ば、今回走査信号を出力した範囲に標的走査ラインが含
まれていると判断してステップS9へ進む。キー入力が
無ければ、ステップS2で検出したキー入力はノイズで
あったと判断して定常表示状態へ復帰する。
Next, the presence or absence of a key input is detected based on the value of the key input port 3 (S 8). If there is a key input, it is determined that the target scan line is included in the range where the current scan signal was output, and the process proceeds to step S9. If there is no key input, it is determined that the key input detected in step S2 is noise, and the display returns to the steady display state.

【0051】 レジスタ7に保持されているパターン
が1本の走査ラインのみの出力を表す状態にまで処理が
進めば、標的走査ラインを特定できたと判断して、この
キー読込処理を終了する(S9)。そうでないなら再度
分割を行うためにステップS3へ戻る。
When the processing proceeds to a state where the pattern held in the register 7 represents the output of only one scan line, it is determined that the target scan line has been specified, and this key reading processing is terminated (S 9). ). If not, the process returns to step S3 to perform division again.

【0052】ステップS3からS9まで処理を行ってス
テップS3へ戻るという、このループが繰り返される回
数は、走査ラインの全数とステップS3でのグループ分
けの仕方とによって定まる。つまり、この入力読込装置
の設計段階で定まる。そこで、ステップS2でレジスタ
6に保持されているループ回数を初期化する処理を行
い、ループを繰り返す毎にレジスタ6に保持されている
ループ回数をインクリメント(1を加える)し、ループ
回数が所定の回数(この例では3回)に達したときルー
プを脱することとする。これにより標的走査ラインを特
定するための処理時間を短縮することができる。
The number of times this loop is repeated, in which the processing is performed from steps S3 to S9 and returns to step S3, is determined by the total number of scanning lines and the method of grouping in step S3. That is, it is determined at the design stage of this input reading device. Therefore, in step S2, a process of initializing the number of loops held in the register 6 is performed, and each time the loop is repeated, the number of loops held in the register 6 is incremented (1 is added), and the number of loops becomes a predetermined number. When the number of times (three times in this example) has been reached, the loop is exited. Thus, the processing time for specifying the target scan line can be reduced.

【0053】キー読込処理が正常に終了した場合は、続
いてそのキー入力に対応する表示処理を実行する。定常
表示状態に戻った後は、定期的に全キーストローブ出力
を行い(S1)、ユーザーによるキー入力があるかどう
かを検出する(S2)。
When the key reading process is normally completed, a display process corresponding to the key input is executed. After returning to the normal display state, all key strobes are periodically output (S1), and it is detected whether or not there is a key input by the user (S2).

【0054】図6はビットパターン表の別の例を示して
いる。このビットパターン表は、8本の走査ラインの間
に(したがって、それに対応するビットの間に)優先順
位を設け、それに応じて作成したものである。優先順位
は8個の数字0〜7で表し、数字が大きいほど優先順位
が高くなるものとしている。この例では、左側から順に
優先順位を7,6,4,0,1,2,3,5に設定して
いる。最も低い優先順位0の走査ラインに対応するビッ
トを、ビットパターンb11,b12,b13の全てに
ついて値0に設定している。また、優先順位1,2,3
の走査ラインに対応するビットを1ビットパターンにつ
いてのみ値1に設定し、残り2ビットパターンについて
値0に設定している。優先順位4,5,6の走査ライン
に対応するビットを2ビットパターンについて値1に設
定し、残りの1ビットパターンについて値0に設定して
いる。最も高い優先順位7の走査ラインに対応するビッ
トを、ビットパターンb11,b12,b13の全てに
ついて値1に設定している。このビットパターン表では
ビットパターンの使用順には特に制限はないが、以下で
はビットパターンb11,b12,b13の順に使用さ
れるものとする。
FIG. 6 shows another example of the bit pattern table. This bit pattern table is created by setting priorities between the eight scan lines (and, therefore, between the corresponding bits), and accordingly. The priority is represented by eight numbers 0 to 7, and the higher the number, the higher the priority. In this example, the priorities are set to 7, 6, 4, 0, 1, 2, 3, 5 in order from the left. The bit corresponding to the scan line with the lowest priority 0 is set to the value 0 for all of the bit patterns b11, b12, and b13. In addition, priority 1, 2, 3
Are set to a value of 1 for only one bit pattern, and set to a value of 0 for the remaining two bit patterns. Bits corresponding to the scanning lines of priorities 4, 5, and 6 are set to a value of 1 for a 2-bit pattern, and set to a value of 0 for the remaining 1-bit pattern. The bit corresponding to the scanning line having the highest priority 7 is set to the value 1 for all of the bit patterns b11, b12, and b13. In this bit pattern table, the use order of the bit patterns is not particularly limited, but hereinafter, the bit patterns are assumed to be used in the order of b11, b12, and b13.

【0055】なお、このビットパターン表の作成の仕方
をn個のビットパターンがある場合に一般化すると、最
も低い優先順位0の走査ラインに対応するビットをビッ
トパターンの全てについて値0に設定する。また、次に
優先順位の低いn本の走査ラインに対応するビットを1
ビットパターンについてのみ値1(値1となる位置は重
複しないようにする)に設定し、残りの(n−1)ビッ
トパターンについて値0に設定する。次に優先順位の低
いn(n−1)/2本の走査ラインに対応するビットを
2ビットパターンについて値1に設定し、残りの(n−
2)ビットパターンについて値0に設定する。このよう
にして設定してゆき、最も高い優先順位7の走査ライン
に対応するビットを、ビットパターンの全てについて値
1に設定する。
If the way of creating this bit pattern table is generalized to the case where there are n bit patterns, the bit corresponding to the scan line with the lowest priority 0 is set to the value 0 for all the bit patterns. . Further, the bit corresponding to the n scan lines having the next lowest priority is set to 1
The value is set to 1 only for the bit pattern (the position where the value is 1 is not duplicated), and set to 0 for the remaining (n-1) bit patterns. Next, bits corresponding to n (n-1) / 2 scan lines having the lowest priority are set to a value of 1 for a 2-bit pattern, and the remaining (n-
2) Set the value to 0 for the bit pattern. The bits corresponding to the scanning line having the highest priority 7 are set to the value 1 for all the bit patterns.

【0056】図7は、図2のフローに従うキー読込処理
においてROM5が図6に示したビットパターン表を持
つ場合に、優先順位7の走査ラインにつながるキーが押
されたときの走査パターンの遷移を示している。
FIG. 7 shows the transition of the scanning pattern when the key connected to the scanning line of priority 7 is pressed when the ROM 5 has the bit pattern table shown in FIG. 6 in the key reading process according to the flow of FIG. Is shown.

【0057】まず、図2のステップS1で全キーストロ
ーブ出力を行ったとき、走査パターンは図7(A)の状
態「11111111」となる。優先順位7の走査ライ
ンに走査信号が出力されているので、図2のステップS
2でキー入力有りと判断されて、ステップS3へ進む。
First, when all key strobes are output in step S1 of FIG. 2, the scanning pattern becomes the state "11111111" in FIG. 7A. Since the scanning signal is output to the scanning line of the priority order 7, step S in FIG.
At 2, it is determined that a key input has been made, and the process proceeds to step S3.

【0058】次に、ステップS3で、レジスタ7に保持
されている走査パターン「11111111」と図6の
ビットパターンb11「10101001」との間で、
対応するビット毎にANDをとって、図7(B)に示す
ように、得られた8桁の値「10101001」を新た
な走査パターンとしてレジスタ7に保存する。
Next, in step S3, the scan pattern "11111111" held in the register 7 and the bit pattern b11 "10101001" in FIG.
An AND operation is performed for each corresponding bit, and the obtained eight-digit value “10101001” is stored in the register 7 as a new scanning pattern, as shown in FIG. 7B.

【0059】図2のステップS4によって、優先順位
1,4,5,7の走査ラインに走査信号が出力される。
優先順位7の走査ラインに走査信号が出力されているの
で、ステップS5でキー入力有りと判断されて、ステッ
プS9に進む。今回レジスタ7に保持されているパター
ンは4本の走査ラインへの出力を表しているので、ステ
ップS9では1本の走査ラインのみの出力ではないと判
断され、ステップS3に戻る。
At step S4 in FIG. 2, a scanning signal is output to the scanning lines of the priorities 1, 4, 5, and 7.
Since the scanning signal has been output to the scanning line of the priority order 7, it is determined in step S5 that there is a key input, and the process proceeds to step S9. Since the pattern held in the register 7 this time indicates output to four scan lines, it is determined in step S9 that the output is not only one scan line, and the process returns to step S3.

【0060】次に、ステップS3で、レジスタ7に保持
されている走査パターン「10101001」と図6の
ビットパターンb12「11100100」との間で、
対応するビット毎にANDをとって、図7(C)に示す
ように、得られた8桁の値「10100000」を新た
な走査パターンとしてレジスタ7に保存する。
Next, in step S3, the scan pattern "10101001" held in the register 7 and the bit pattern b12 "11100100" in FIG.
An AND is calculated for each corresponding bit, and the obtained eight-digit value “10100000” is stored in the register 7 as a new scanning pattern as shown in FIG. 7C.

【0061】図2のステップS4によって、優先順位
4,7の走査ラインに出力が行われる。優先順位7の走
査ラインに走査信号が出力されているので、ステップS
5でキー入力有りと判断されて、ステップS9に進む。
今回レジスタ7に保持されているパターンは2本の走査
ラインへの出力を表しているので、ステップS9では1
本の走査ラインのみの出力ではないと判断され、ステッ
プS3に戻る。
At step S4 in FIG. 2, the output is performed on the scanning lines of the priorities 4 and 7. Since the scanning signal is output to the scanning line of the priority order 7, step S
It is determined in step 5 that a key input has been made, and the flow advances to step S9.
Since the pattern held in the register 7 this time indicates output to two scanning lines, 1 is set in step S9.
It is determined that the output is not the scan line only, and the process returns to step S3.

【0062】次に、ステップS3で、レジスタ7に保持
されている走査パターン「10100000」と図6の
ビットパターンb13「11000011」との間で、
対応するビット毎にANDをとって、図7(D)に示す
ように、得られた8桁の値「10000000」を新た
な走査パターンとしてレジスタ7に保存する。
Next, in step S3, the scan pattern "10100000" held in the register 7 and the bit pattern b13 "11000011" in FIG.
An AND operation is performed for each corresponding bit, and the obtained eight-digit value “10000000” is stored in the register 7 as a new scanning pattern as shown in FIG.

【0063】図2のステップS4によって、優先順位7
の走査ラインに出力が行われる。優先順位7の走査ライ
ンに走査信号が出力されているので、ステップS5でキ
ー入力有りと判断されて、ステップS9に進む。今回レ
ジスタ7に保持されているパターンは1本の走査ライン
への出力を表しているので、ステップS9では1本の走
査ラインのみの出力であると判断され、一連の処理ルー
プS3〜S9から脱する。これにより、優先順位7の走
査ラインにつながるキーが押されていると確定して、キ
ー読込処理を終了する。
By the step S4 in FIG.
Is output to the scan line of the second line. Since the scanning signal has been output to the scanning line of the priority order 7, it is determined in step S5 that there is a key input, and the process proceeds to step S9. Since the pattern held in the register 7 this time represents output to one scan line, it is determined in step S9 that the output is only one scan line, and the process exits from the series of processing loops S3 to S9. I do. Thereby, it is determined that the key connected to the scanning line of the priority order 7 has been pressed, and the key reading process ends.

【0064】このように、最も優先順位の高い走査ライ
ンにつながるキーが押されたとき、走査信号の出力回数
を最小の4回で済ませることができる。
As described above, when the key connected to the scanning line having the highest priority is pressed, the number of times of outputting the scanning signal can be reduced to a minimum of four times.

【0065】図8は、図2のフローに従うキー読込処理
においてROM5が図6に示したビットパターン表を持
つ場合に、優先順位0の走査ラインにつながるキーが押
されたときの走査パターンの遷移を示している。
FIG. 8 shows the transition of the scanning pattern when the key connected to the scanning line of priority 0 is pressed when the ROM 5 has the bit pattern table shown in FIG. 6 in the key reading process according to the flow of FIG. Is shown.

【0066】まず、図2のステップS1で全キーストロ
ーブ出力を行ったとき、走査パターンは図8(A)の状
態「11111111」となる。優先順位0の走査ライ
ンに走査信号が出力されているので、図2のステップS
2でキー入力有りと判断されて、ステップS3へ進む。
First, when all key strobes are output in step S1 of FIG. 2, the scanning pattern becomes the state "11111111" in FIG. 8A. Since the scanning signal is output to the scanning line of the priority 0, step S in FIG.
At 2, it is determined that a key input has been made, and the process proceeds to step S3.

【0067】次に、ステップS3で、レジスタ7に保持
されている走査パターン「11111111」と図6の
ビットパターンb11「10101001」との間で、
対応するビット毎にANDをとって、図8(B)に示す
ように、得られた8桁の値「10101001」を新た
な走査パターンとしてレジスタ7に保存する。
Next, in step S3, the scan pattern "11111111" held in the register 7 and the bit pattern b11 "10101001" in FIG.
An AND operation is performed for each corresponding bit, and the obtained eight-digit value “10101001” is stored in the register 7 as a new scanning pattern, as shown in FIG.

【0068】図2のステップS4によって、優先順位
1,4,5,7の走査ラインに走査信号が出力される。
優先順位0の走査ラインに走査信号が出力されていない
ので、ステップS5でキー入力無しと判断されて、ステ
ップS6に進む。
At step S4 in FIG. 2, a scanning signal is output to the scanning lines of the priorities 1, 4, 5, and 7.
Since no scanning signal is output to the scanning line of priority 0, it is determined in step S5 that there is no key input, and the flow advances to step S6.

【0069】次に、ステップS6で、レジスタ7に保持
されている走査パターンについてNOTをとって得られ
たパターン「01010110」とレジスタ8に保持さ
れている前回の走査パターン「11111111」との
間で、対応するビット毎にANDをとって、図8(C)
に示すように、得られた8桁の値「01010110」
を新たな走査パターンとしてレジスタ7に保存する。
Next, in step S 6, the pattern “010101110” obtained by NOTing the scan pattern held in the register 7 and the previous scan pattern “11111111” held in the register 8 are set. , By taking an AND for each corresponding bit, FIG.
As shown in the figure, the obtained eight-digit value “010101110”
Is stored in the register 7 as a new scanning pattern.

【0070】図2のステップS7によって、優先順位
0,2,3,6の走査ラインに走査信号が出力される。
優先順位0の走査ラインに走査信号が出力されているの
で、ステップS8でキー入力有りと判断されて、ステッ
プS9に進む。今回レジスタ7に保持されているパター
ンは4本の走査ラインへの出力を表しているので、ステ
ップS9では1本の走査ラインのみの出力ではないと判
断され、ステップS3に戻る。
By the step S7 in FIG. 2, a scanning signal is output to the scanning lines of the priority order 0, 2, 3, and 6.
Since the scanning signal has been output to the scanning line of priority 0, it is determined in step S8 that a key input has been made, and the process proceeds to step S9. Since the pattern held in the register 7 this time indicates output to four scan lines, it is determined in step S9 that the output is not only one scan line, and the process returns to step S3.

【0071】次に、ステップS3で、レジスタ7に保持
されている走査パターン「01010110」と図6の
ビットパターンb12「11100100」との間で、
対応するビット毎にANDをとって、図8(D)に示す
ように、得られた8桁の値「01000100」を新た
な走査パターンとしてレジスタ7に保存する。
Next, in step S3, the scan pattern "010101110" held in the register 7 and the bit pattern b12 "11100100" in FIG.
An AND operation is performed for each corresponding bit, and the obtained 8-digit value “01000100” is stored in the register 7 as a new scanning pattern, as shown in FIG.

【0072】図2のステップS4によって、優先順位
2,6の走査ラインに出力が行われる。優先順位0の走
査ラインに走査信号が出力されていないので、ステップ
S5でキー入力無しと判断されて、ステップS6に進
む。
In step S4 in FIG. 2, the output is performed on the scanning lines of the priority order 2 and 6. Since no scanning signal is output to the scanning line of priority 0, it is determined in step S5 that there is no key input, and the flow advances to step S6.

【0073】次に、ステップS6で、レジスタ7に保持
されている走査パターンについてNOTをとって得られ
たパターン「10111011」とレジスタ8に保持さ
れている前回の走査パターン「01010110」との
間で、対応するビット毎にANDをとって、図8(E)
に示すように、得られた8桁の値「00010010」
を新たな走査パターンとしてレジスタ7に保存する。
Next, in step S 6, the pattern “10111011” obtained by NOTing the scan pattern held in the register 7 and the previous scan pattern “01010110” held in the register 8 are set. 8 (E) by taking an AND for each corresponding bit.
As shown in the figure, the obtained 8-digit value "00010010"
Is stored in the register 7 as a new scanning pattern.

【0074】図2のステップS7によって、優先順位
0,3の走査ラインに走査信号が出力される。優先順位
0の走査ラインに走査信号が出力されているので、ステ
ップS8でキー入力有りと判断されて、ステップS9に
進む。今回レジスタ7に保持されているパターンは2本
の走査ラインへの出力を表しているので、ステップS9
では1本の走査ラインのみの出力ではないと判断され、
ステップS3に戻る。
By the step S7 in FIG. 2, a scanning signal is output to the scanning lines of the priorities 0 and 3. Since the scanning signal has been output to the scanning line of priority 0, it is determined in step S8 that a key input has been made, and the process proceeds to step S9. Since the pattern held this time in the register 7 represents the output to two scanning lines, step S9
It is determined that the output is not only one scan line,
It returns to step S3.

【0075】次に、ステップS3で、レジスタ7に保持
されている走査パターン「00010010」と図6の
ビットパターンb13「11000011」との間で、
対応するビット毎にANDをとって、図8(F)に示す
ように、得られた8桁の値「00000010」を新た
な走査パターンとしてレジスタ7に保存する。
Next, in step S3, the scan pattern "00010010" held in the register 7 and the bit pattern b13 "11000011" in FIG.
An AND operation is performed for each corresponding bit, and the obtained eight-digit value “00000010” is stored in the register 7 as a new scanning pattern as shown in FIG.

【0076】図2のステップS4によって、優先順位3
の走査ラインに出力が行われる。優先順位0の走査ライ
ンに走査信号が出力されていないので、ステップS5で
キー入力無しと判断されて、ステップS6に進む。
The priority order 3 is determined by step S4 in FIG.
Is output to the scan line of the second line. Since no scanning signal is output to the scanning line of priority 0, it is determined in step S5 that there is no key input, and the flow advances to step S6.

【0077】次に、ステップS6で、レジスタ7に保持
されている走査パターンについてNOTをとって得られ
たパターン「11111101」とレジスタ8に保持さ
れている前回の走査パターン「00010010」との
間で、対応するビット毎にANDをとって、図8(G)
に示すように、得られた8桁の値「00010000」
を新たな走査パターンとしてレジスタ7に保存する。
Next, in step S 6, the pattern “11111101” obtained by NOTing the scan pattern held in the register 7 is compared with the previous scan pattern “00010010” held in the register 8. , And AND for each corresponding bit, FIG.
As shown in the figure, the obtained 8-digit value "00010000"
Is stored in the register 7 as a new scanning pattern.

【0078】図2のステップS7によって、優先順位0
の走査ラインに走査信号が出力される。優先順位0の走
査ラインに走査信号が出力されているので、ステップS
8でキー入力有りと判断されて、ステップS9に進む。
今回レジスタ7に保持されているパターンは1本の走査
ラインへの出力を表しているので、ステップS9では1
本の走査ラインのみの出力であると判断され、一連の処
理ループS3〜S9から脱する。これにより、優先順位
0の走査ラインにつながるキーが押されていると確定し
て、キー読込処理を終了する。
In step S7 of FIG.
The scanning signal is output to the scanning line of. Since the scanning signal has been output to the scanning line of priority 0, step S
At 8 it is determined that there is a key input, and the process proceeds to step S9.
Since the pattern held in the register 7 this time represents output to one scanning line, 1 is set in step S9.
It is determined that the output is only the scan lines of the book, and the processing exits from the series of processing loops S3 to S9. As a result, it is determined that the key connected to the scanning line of the priority order 0 has been pressed, and the key reading process ends.

【0079】このように、最も優先順位の低い走査ライ
ンにつながるキーが押されたとき、走査信号の出力回数
は最大の7回となる。しかし、この場合でも、従来のよ
うに1本づつ走査する場合の最大出力回数9回に比して
少ない出力回数で済ませることができる。したがって、
短時間でキー読込処理を終了することができる。
As described above, when the key connected to the scanning line with the lowest priority is pressed, the number of times of output of the scanning signal is seven at the maximum. However, even in this case, the number of output times can be smaller than the maximum output number of nine times when scanning is performed one by one as in the related art. Therefore,
The key reading process can be completed in a short time.

【0080】(2) キー読込処理の第2の例 次に、キー読込処理の第2の例を図3のフローを用いて
説明する。
(2) Second Example of Key Reading Process Next, a second example of the key reading process will be described with reference to the flow of FIG.

【0081】 まず、図2のステップS1と同様に全
キーストローブ出力を行う(S11)。
First, all key strobes are output as in step S1 of FIG. 2 (S11).

【0082】 次に、図2のステップS2と同様にキ
ー入力の有無を検出する(S12)。
Next, the presence or absence of a key input is detected as in step S2 of FIG. 2 (S12).

【0083】 次に、図2のステップS3と同様に標
的走査ラインが含まれている走査ライン群を2群に分け
て、その一方の走査ライン群を次回の走査信号を出力す
べき範囲とする(S13)。
Next, similarly to step S3 in FIG. 2, the scan line group including the target scan line is divided into two groups, and one of the scan line groups is set as a range for outputting the next scan signal. (S13).

【0084】 次に、図2のステップS4と同様に、
レジスタ7に保持されている走査パターンに応じて走査
信号をキー走査ポート2へ出力する(S14)。
Next, as in step S 4 of FIG. 2,
A scan signal is output to the key scan port 2 according to the scan pattern held in the register 7 (S14).

【0085】 図2のステップS5と同様にキー入力
の有無を検出する(S15)。キー入力が有ればステッ
プS17へ進む。一方、キー入力が無ければステップS
16へ進む。
As in step S5 of FIG. 2, the presence or absence of a key input is detected (S15). If there is a key input, the process proceeds to step S17. On the other hand, if there is no key input, step S
Proceed to 16.

【0086】 図2のステップS6と同様に、ステッ
プS13で2群に分けた走査ライン群のうち他方の群
を、次回の走査信号を出力べき範囲とする(S16)。
この範囲を表すパターンを作成してレジスタ7に保存す
る。
As in step S6 of FIG. 2, the other of the two scanning line groups in step S13 is set as a range in which the next scanning signal should be output (S16).
A pattern representing this range is created and stored in the register 7.

【0087】なお、図2の例とは異なり、この範囲に実
際に走査信号を出力してキー入力の有無を確認するとい
う処理(S8)は行わず、この範囲に標的走査ラインが
含まれていると推定して以後の処理に使用する。
Unlike the example of FIG. 2, the process (S8) of actually outputting a scanning signal in this range to confirm the presence or absence of a key input is not performed, and the target scanning line is included in this range. And use it for the subsequent processing.

【0088】 図2のステップS9と同様に、レジス
タ7に保持されているパターンが1つの走査ラインのみ
の出力を表す状態にまで処理が進めば、標的走査ライン
を特定できたと判断する(S17)。そうでないなら再
度分割を行うためにステップS13へ戻る。なお、図2
のステップS9と同様に、ループ回数によってこの分岐
を制御するのが望ましい。
As in step S9 of FIG. 2, if the processing proceeds to a state where the pattern held in the register 7 indicates the output of only one scan line, it is determined that the target scan line has been specified (S17). . If not, the process returns to step S13 to perform the division again. Note that FIG.
It is desirable to control this branch by the number of loops, as in step S9.

【0089】 キー入力の有無を確認するために、レ
ジスタ7に保持されている範囲の走査信号をキー走査ポ
ート2へ出力する(S18)。
In order to confirm the presence or absence of a key input, a scan signal in a range held in the register 7 is output to the key scan port 2 (S18).

【0090】このステップS18の処理を行う理由は、
ステップS17による判断の直前にステップS16を通
ってきたときは、レジスタ7に保持されている範囲の走
査ラインについてキー入力が実際に検出された訳では無
く、ノイズによって誤判定している可能性があるからで
ある。ステップS16を通らず、ステップS15からス
テップS17へ進んだときは同じことを2回確認するこ
とになるが、ステップS13からS17までの処理グル
ープにおいて標的走査ラインを特定する処理の簡便さを
優先させているためである。
The reason for performing the processing in step S18 is as follows.
When passing through step S16 immediately before the determination in step S17, the key input is not actually detected for the scan lines in the range held in the register 7, and there is a possibility that a false determination is made due to noise. Because there is. When the process proceeds from step S15 to step S17 without passing through step S16, the same is confirmed twice, but priority is given to the simplicity of the process of specifying the target scan line in the process groups from step S13 to S17. Because it is.

【0091】 そして、キー入力ポート3の値に基づ
いてキー入力の有無を検出する(S19)。キー入力が
有れば、今回走査信号を出力した走査ラインに操作キー
がつながっていると判断してキー読込処理を終了する。
キー入力が無ければ、ステップS12,S15で検出し
たキー入力はノイズであったと判断して定常表示状態へ
復帰する。
Then, the presence or absence of a key input is detected based on the value of the key input port 3 (S19). If there is a key input, it is determined that the operation key is connected to the scanning line from which the current scanning signal has been output, and the key reading process ends.
If there is no key input, it is determined that the key input detected in steps S12 and S15 is noise, and the display returns to the steady display state.

【0092】このようにした場合、ループ1回当たりキ
ー入力の有無を2回検出する方式(図2)に比して、ル
ープ回数を少なくすることができ、キー読込処理を全体
として短時間で終了することができる。
In this case, the number of loops can be reduced as compared with the method of detecting the presence or absence of a key input twice per loop (FIG. 2), and the key reading process can be performed in a short time as a whole. Can be terminated.

【0093】図9はビットパターン表の別の例を示して
いる。図6と同様に、左側から順に走査ラインの優先順
位を7,6,4,0,1,2,3,5に設定している。
このビットパターン表では、全ビットパターンb21,
b22,b23にわたって、特定の優先順位の走査ライ
ンに対応するビットに、その優先順位を2進数で表した
ときの各桁の値が下の桁から順に付与されている。例え
ば優先順位6の走査ラインに対応するビットには、優先
順位6を2進数で表したときの「110」の値が、全ビ
ットパターンb21,b22,b23にわたって下の桁
から順に付与されている。このビットパターン表は、走
査信号出力回数に応じてビットパターンb21,b2
2,b23の順に使用される。
FIG. 9 shows another example of the bit pattern table. As in FIG. 6, the priority of the scanning lines is set to 7, 6, 4, 0, 1, 2, 3, and 5 in order from the left.
In this bit pattern table, all bit patterns b21,
Over b22 and b23, the value of each digit when the priority is represented by a binary number is sequentially assigned to the bit corresponding to the scanning line of the specific priority from the lower digit. For example, to the bit corresponding to the scanning line of the priority order 6, the value of “110” when the priority order 6 is represented by a binary number is assigned to all the bit patterns b21, b22, and b23 in order from the lower digit. . This bit pattern table stores bit patterns b21 and b2 in accordance with the number of times of scanning signal output.
2, b23.

【0094】図10は、図3のフローに従うキー読込処
理においてROM5が図9に示したビットパターン表を
持つ場合に、優先順位7の走査ラインにつながるキーが
押されたときの走査パターンの遷移を示している。
FIG. 10 shows the transition of the scanning pattern when the key connected to the scanning line of priority 7 is pressed when the ROM 5 has the bit pattern table shown in FIG. 9 in the key reading process according to the flow of FIG. Is shown.

【0095】まず、図3のステップS11で全キースト
ローブ出力を行ったとき、走査パターンは図10(A)
の状態「11111111」となる。優先順位7の走査
ラインに走査信号が出力されているので、図3のステッ
プS12でキー入力有りと判断されて、ステップS13
へ進む。
First, when all key strobe outputs are performed in step S11 of FIG. 3, the scanning pattern is as shown in FIG.
State "11111111". Since the scanning signal is output to the scanning line of the priority order 7, it is determined in step S12 in FIG.
Proceed to.

【0096】次に、ステップS13で、レジスタ7に保
持されている走査パターン「11111111」と図9
のビットパターンb21「10001011」との間
で、対応するビット毎にANDをとって、図10(B)
に示すように、得られた8桁の値「10001011」
を新たな走査パターンとしてレジスタ7に保存する。
Next, in step S13, the scanning pattern “11111111” held in the register 7 is
10B, an AND operation is performed for each corresponding bit between the bit pattern b21 “10001011” of FIG.
As shown in the figure, the obtained 8-digit value “10001011”
Is stored in the register 7 as a new scanning pattern.

【0097】図3のステップS14によって、優先順位
1,3,5,7の走査ラインに走査信号が出力される。
優先順位7の走査ラインに走査信号が出力されているの
で、ステップS15でキー入力有りと判断されて、ステ
ップS17に進む。今回レジスタ7に保持されているパ
ターンは4本の走査ラインへの出力を表しているので、
ステップS17では1本の走査ラインのみの出力ではな
いと判断され、ステップS13に戻る。
By the step S14 in FIG. 3, a scanning signal is outputted to the scanning lines of the priorities 1, 3, 5, and 7.
Since the scanning signal has been output to the scanning line of the priority order 7, it is determined in step S15 that there is a key input, and the process proceeds to step S17. Since the pattern held in the register 7 this time represents output to four scanning lines,
In step S17, it is determined that the output is not one scan line, and the process returns to step S13.

【0098】次に、ステップS13で、レジスタ7に保
持されている走査パターン「10001011」と図9
のビットパターンb22「11000110」との間
で、対応するビット毎にANDをとって、図10(C)
に示すように、得られた8桁の値「10000010」
を新たな走査パターンとしてレジスタ7に保存する。
Next, in step S13, the scan pattern "10001011" held in the register 7 is
Between the corresponding bit pattern b22 “11000110” and the corresponding bit, and FIG.
As shown in the figure, the obtained eight-digit value "10000010"
Is stored in the register 7 as a new scanning pattern.

【0099】図3のステップS14によって、優先順位
3,7の走査ラインに出力が行われる。優先順位7の走
査ラインに走査信号が出力されているので、ステップS
15でキー入力有りと判断されて、ステップS17に進
む。今回レジスタ7に保持されているパターンは2本の
走査ラインへの出力を表しているので、ステップS17
では1本の走査ラインのみの出力ではないと判断され、
ステップS13に戻る。
In step S14 in FIG. 3, the output is performed on the scanning lines of the priorities 3 and 7. Since the scanning signal is output to the scanning line of the priority order 7, step S
At 15 it is determined that there is a key input, and the flow advances to step S17. Since the pattern held in the register 7 this time represents the output to two scanning lines, step S17
It is determined that the output is not only one scan line,
It returns to step S13.

【0100】次に、ステップS13で、レジスタ7に保
持されている走査パターン「10000010」と図9
のビットパターンb33「11100001」との間
で、対応するビット毎にANDをとって、図10(D)
に示すように、得られた8桁の値「10000000」
を新たな走査パターンとしてレジスタ7に保存する。
Next, in step S13, the scan pattern "10000010" held in the register 7 is read as shown in FIG.
Between the corresponding bit pattern b33 “11100001” and the corresponding bit, and FIG.
As shown in the figure, the obtained 8-digit value "10000000"
Is stored in the register 7 as a new scanning pattern.

【0101】図3のステップS14によって、優先順位
7の走査ラインに出力が行われる。優先順位7の走査ラ
インに走査信号が出力されているので、ステップS15
でキー入力有りと判断されて、ステップS17に進む。
今回レジスタ7に保持されているパターンは1本の走査
ラインへの出力を表しているので、ステップS17では
1本の走査ラインのみの出力であると判断され、一連の
処理ループS13〜S17から脱する。最後に、ステッ
プS18で再度同じ走査パターン「10000000」
の走査信号を出力して、ステップS19でキー入力があ
ることを確認する。これにより、優先順位7の走査ライ
ンにつながるキーが押されていると確定して、キー読込
処理を終了する。
By the step S14 in FIG. 3, the output is performed to the scanning line of the priority order 7. Since the scanning signal has been output to the scanning line of the priority order 7, step S15
It is determined that there is a key input, and the process proceeds to step S17.
Since the pattern held in the register 7 this time represents the output to one scan line, it is determined in step S17 that the output is only one scan line, and the process exits from the series of processing loops S13 to S17. I do. Finally, in step S18, the same scanning pattern "10000000" is again used.
Is output, and it is confirmed in step S19 that there is a key input. Thereby, it is determined that the key connected to the scanning line of the priority order 7 has been pressed, and the key reading process ends.

【0102】このように、最も優先順位の高いキーが押
されたとき、キーストローブ出力の度毎に必ずそのキー
に対して走査信号を出力するので、読み込みが確実にな
る。
As described above, when a key having the highest priority is pressed, a scanning signal is always output to the key every time a key strobe is output, so that reading is ensured.

【0103】図11は、図3のフローに従うキー読込処
理においてROM5が図9に示したビットパターン表を
持つ場合に、優先順位0の走査ラインにつながるキーが
押されたときの走査パターンの遷移を示している。
FIG. 11 shows the transition of the scanning pattern when the key connected to the scanning line of priority 0 is pressed when the ROM 5 has the bit pattern table shown in FIG. 9 in the key reading process according to the flow of FIG. Is shown.

【0104】まず、図3のステップS11で全キースト
ローブ出力を行ったとき、走査パターンは図11(A)
の状態「11111111」となる。優先順位0の走査
ラインに走査信号が出力されているので、図3のステッ
プS12でキー入力有りと判断されて、ステップS13
へ進む。
First, when all key strobes are output in step S11 in FIG. 3, the scanning pattern is as shown in FIG.
State "11111111". Since the scanning signal is output to the scanning line of priority 0, it is determined in step S12 of FIG.
Proceed to.

【0105】次に、ステップS13で、レジスタ7に保
持されている走査パターン「11111111」と図9
のビットパターンb21「10001011」との間
で、対応するビット毎にANDをとって、図11(B)
に示すように、得られた8桁の値「10001011」
を新たな走査パターンとしてレジスタ7に保存する。
Next, in step S13, the scan pattern “11111111” held in the register 7 is
11B is ANDed with the corresponding bit pattern b21 “10001011” for each corresponding bit.
As shown in the figure, the obtained 8-digit value “10001011”
Is stored in the register 7 as a new scanning pattern.

【0106】図3のステップS14によって、優先順位
1,3,5,7の走査ラインに走査信号が出力される。
優先順位0の走査ラインに走査信号が出力されていない
ので、ステップS15でキー入力無しと判断されて、ス
テップS16に進む。
At step S14 in FIG. 3, a scanning signal is output to the scanning lines of the priorities 1, 3, 5, and 7.
Since no scanning signal is output to the scanning line of priority 0, it is determined in step S15 that there is no key input, and the flow advances to step S16.

【0107】次に、ステップS16で、レジスタ7に保
持されている走査パターンについてNOTをとって得ら
れたパターン「01110100」とレジスタ8に保持
されている前回の走査パターン「11111111」と
の間で、対応するビット毎にANDをとって、得られた
8桁の値「01110100」を新たな走査パターン
(但し、これに応じた走査信号は出力されない)として
レジスタ7に保存する。今回レジスタ7に保持されてい
るパターンは4本の走査ラインへの出力を表しているの
で、ステップS17では1本の走査ラインのみの出力で
はないと判断され、ステップS13に戻る。
Next, in step S16, the pattern "01110100" obtained by NOTing the scan pattern held in the register 7 and the previous scan pattern "11111111" held in the register 8 are set. An AND is obtained for each corresponding bit, and the obtained 8-digit value “01110100” is stored in the register 7 as a new scanning pattern (however, no corresponding scanning signal is output). Since the pattern held this time in the register 7 indicates output to four scan lines, it is determined in step S17 that the output is not one scan line, and the process returns to step S13.

【0108】次に、ステップS13で、レジスタ7に保
持されている走査パターン「01110100」と図9
のビットパターンb22「11000110」との間
で、対応するビット毎にANDをとって、図11(C)
に示すように、得られた8桁の値「01000100」
を新たな走査パターンとしてレジスタ7に保存する。
Next, in step S13, the scan pattern “01110100” held in the register 7 is
Between the corresponding bit pattern b22 “11000110” and the corresponding bit, and FIG.
As shown in the figure, the obtained 8-digit value “01000100”
Is stored in the register 7 as a new scanning pattern.

【0109】図3のステップS14によって、優先順位
2,6の走査ラインに出力が行われる。優先順位0の走
査ラインに走査信号が出力されていないので、ステップ
S15でキー入力無しと判断されて、ステップS16に
進む。
At step S14 in FIG. 3, the data is output to the scanning lines of the priority order 2 and 6. Since no scanning signal is output to the scanning line of priority 0, it is determined in step S15 that there is no key input, and the flow advances to step S16.

【0110】次に、ステップS16で、レジスタ7に保
持されている走査パターンについてNOTをとって得ら
れたパターン「10111011」とレジスタ8に保持
されている前回の走査パターン「01110100」と
の間で、対応するビット毎にANDをとって、得られた
8桁の値「00110000」を新たな走査パターン
(但し、これに応じた走査信号は出力されない)として
レジスタ7に保存する。今回レジスタ7に保持されてい
るパターンは2本の走査ラインへの出力を表しているの
で、ステップS17では1本の走査ラインのみの出力で
はないと判断され、ステップS13に戻る。
Next, in step S16, the pattern "10111011" obtained by NOTing the scan pattern held in the register 7 is compared with the previous scan pattern "01110100" held in the register 8. An AND is obtained for each corresponding bit, and the obtained eight-digit value “00110000” is stored in the register 7 as a new scanning pattern (however, no corresponding scanning signal is output). Since the pattern held in the register 7 this time represents output to two scanning lines, it is determined in step S17 that the output is not only one scanning line, and the process returns to step S13.

【0111】次に、ステップS13で、レジスタ7に保
持されている走査パターン「00110000」と図9
のビットパターンb33「11100001」との間
で、対応するビット毎にANDをとって、図11(D)
に示すように、得られた8桁の値「00100000」
を新たな走査パターンとしてレジスタ7に保存する。
Next, in step S13, the scan pattern “00110000” held in the register 7 is
Between the corresponding bit pattern b33 “11100001” and the corresponding bit, and FIG.
As shown in the figure, the obtained 8-digit value “00100000”
Is stored in the register 7 as a new scanning pattern.

【0112】図3のステップS14によって、優先順位
4の走査ラインに出力が行われる。優先順位0の走査ラ
インに走査信号が出力されていないので、ステップS1
5でキー入力無しと判断されて、ステップS16に進
む。
At step S14 in FIG. 3, the output is performed on the scanning line of the priority order 4. Since no scanning signal is output to the scanning line of priority 0, step S1
It is determined in step 5 that there is no key input, and the flow advances to step S16.

【0113】次に、ステップS16で、レジスタ7に保
持されている走査パターンについてNOTをとって得ら
れたパターン「11011111」とレジスタ8に保持
されている前回の走査パターン「00110000」と
の間で、対応するビット毎にANDをとって、得られた
8桁の値「00010000」を新たな走査パターンと
してレジスタ7に保存する。今回レジスタ7に保持され
ているパターンは1本の走査ラインへの出力を表してい
るので、ステップS17では1本の走査ラインのみの出
力であると判断され、一連の処理ループS13〜S17
から脱する。最後に、ステップS18でレジスタ7に保
持されている走査パターン「00010000」に応じ
た走査信号を出力して、ステップS19でキー入力があ
ることを確認する。これにより、優先順位0の走査ライ
ンにつながるキーが押されていると確定して、キー読込
処理を終了する。
Next, in step S16, the pattern "11011111" obtained by NOTing the scan pattern held in the register 7 is compared with the previous scan pattern "00110000" held in the register 8. The AND is obtained for each corresponding bit, and the obtained 8-digit value “00010000” is stored in the register 7 as a new scanning pattern. Since the pattern held in the register 7 this time represents output to one scan line, it is determined in step S17 that the output is only one scan line, and a series of processing loops S13 to S17
Get out of Finally, in step S18, a scan signal corresponding to the scan pattern "00010000" held in the register 7 is output, and in step S19, it is confirmed that there is a key input. As a result, it is determined that the key connected to the scanning line of the priority order 0 has been pressed, and the key reading process ends.

【0114】このように、このキー読込処理では、標的
走査ラインの優先順位に関わらず走査信号出力回数が同
じになる。したがって、入力読込時間の増加を防止する
ことができる。ただし、優先順位の最も低い走査ライン
が標的走査ラインである場合は、その標的走査ラインに
対する走査信号出力回数は2回であり、最も少なくな
る。
As described above, in this key reading process, the number of scan signal output times becomes the same regardless of the priority of the target scan line. Therefore, it is possible to prevent the input reading time from increasing. However, when the scan line with the lowest priority is the target scan line, the number of scan signal outputs for that target scan line is two, which is the lowest.

【0115】(3) キーが連続して押される頻度が高
いか又は低い機器への適用 キーが連続して押される頻度の低い機器では、図2のス
テップS3、図3のステップS13の処理(走査ライン
のグループ分け)を次のようにして行っても良い。
(3) Applicability to Devices Where Keys Are Pressed Continuously Highly or Infrequently For devices where keys are continuously pressed infrequently, the processing of step S3 in FIG. 2 and step S13 in FIG. (Scan line grouping) may be performed as follows.

【0116】前回のキー読込処理が終了した時点でレジ
スタ7が保持している走査パターン、すなわち最後に標
的走査ラインを特定したときの走査パターンを予めレジ
スタ9に保存しておくものとする。
It is assumed that the scan pattern held by the register 7 at the time when the previous key reading process is completed, that is, the scan pattern when the target scan line is specified last is stored in the register 9 in advance.

【0117】まず、図4のステップS21と同様に、レ
ジスタ7に保持されている前回の走査パターンをレジス
タ8に保存する。
First, as in step S21 of FIG. 4, the previous scanning pattern held in the register 7 is stored in the register 8.

【0118】次に、図12のステップS31に示すよう
に、ROM5のビットパターン表から、レジスタ6に保
持されているループ回数に応じたビットパターンを選択
して、レジスタ7に保存する(S31)。
Next, as shown in step S31 of FIG. 12, a bit pattern corresponding to the number of loops held in the register 6 is selected from the bit pattern table of the ROM 5 and stored in the register 7 (S31). .

【0119】レジスタ7に今回保存されたビットパター
ンとレジスタ9に保持されている走査パターンとの間
で、対応するビット毎にANDをとって、得られた8桁
の値が完全に0、つまり「00000000」であるか
否かを判断する(S32)。上記8桁の値が「0000
0000」であれば、今回走査信号を出力すべき範囲に
前回の標的走査ラインが含まれていないので、そのまま
図4のステップS23へ進む。キーが連続して押される
頻度の低い場合を想定しているので、この方が標的走査
ラインを特定できる確率が高いからである。
An AND operation is performed for each corresponding bit between the bit pattern stored this time in the register 7 and the scan pattern stored in the register 9, and the obtained eight-digit value is completely 0, ie, It is determined whether it is "00000000" (S32). The 8-digit value is "0000"
If it is “0000”, since the previous target scan line is not included in the range where the current scan signal is to be output, the process directly proceeds to step S23 in FIG. This is because it is assumed that the frequency at which the keys are continuously pressed is low, so that the probability that the target scan line can be specified is higher.

【0120】一方、ステップS32で上記8桁の値が
「00000000」でなければ、今回走査信号を出力
すべき範囲に前回の標的走査ラインが含まれている。そ
こで、次のステップS33へ進んで、レジスタ7に保持
されているビットパターンに対してビット毎にNOTを
とって、得られた反転ビットパターンをレジスタ7に保
存する。キーが連続して押される頻度の低い場合を想定
しているので、この方が標的走査ラインを特定できる確
率が高いからである。この後、図4のステップS23へ
進む。
On the other hand, if the 8-digit value is not "00000000" in step S32, the range in which the current scan signal is to be output includes the previous target scan line. Then, the process proceeds to the next step S33, in which the bit pattern held in the register 7 is NOTed for each bit, and the obtained inverted bit pattern is stored in the register 7. This is because it is assumed that the frequency at which the keys are continuously pressed is low, so that the probability that the target scan line can be specified is higher. Thereafter, the process proceeds to step S23 in FIG.

【0121】反対に、キーが連続して押される頻度の高
い機器では、ステップS32における判断を逆にする。
すなわち、ステップS32で上記8桁の値が「0000
0000」でなければ、そのまま図4のステップS23
へ進む。一方、上記8桁の値が「00000000」で
あれば、次のステップS33へ進んで、レジスタ7に今
回保存されたビットパターンに対してビット毎にNOT
をとって、得られた反転ビットパターンをレジスタ7に
保存する。
On the other hand, in a device where the key is frequently pressed continuously, the determination in step S32 is reversed.
That is, in step S32, the 8-digit value is “0000”.
0000 ", then step S23 in FIG.
Proceed to. On the other hand, if the 8-digit value is “00000000”, the process proceeds to the next step S33, and the bit pattern stored this time in the register 7 is NOT
And the obtained inverted bit pattern is stored in the register 7.

【0122】なお、レジスタ9以外の他のレジスタ6,
7,8の内容は1回のキー読込処理が終われば他の目的
に使用しても良いが、レジスタ9の内容は次にキー読込
処理が行われるまで保存しておく必要がある。
Note that registers other than the register 9,
The contents of 7 and 8 may be used for another purpose after one key reading process, but the contents of the register 9 must be stored until the next key reading process is performed.

【0123】(4) 定常表示状態で複数相の走査信号
が出力される機器への適用 図13に示すように、電子機器によっては、定常表示状
態で例えば3相の走査信号(正の矩形パルス)を用いる
場合がある。全走査ライン群は3つの位相群に分けら
れ、各位相群には定常表示状態において互いに異なる位
相α,βまたはγの走査信号が出力される。なお、3相
は説明の為の便宜的なものである。このような位相群を
設けるのは、表示信号出力端子とキー走査端子とが共用
されている場合、表示信号の位相に合わせて走査を行う
ことにより、表示に悪影響を与えるのを防止できるから
である。したがって、表示信号の相によって走査信号の
相も変わる。
(4) Application to a device that outputs a scanning signal of a plurality of phases in a steady display state As shown in FIG. 13, depending on an electronic device, for example, a scanning signal of three phases (a positive rectangular pulse) may be output in a steady display state. ) May be used. The entire scanning line group is divided into three phase groups, and scanning signals of different phases α, β or γ are output to each phase group in the steady display state. The three phases are for convenience of explanation. The reason for providing such a phase group is that, when the display signal output terminal and the key scanning terminal are shared, by performing scanning in accordance with the phase of the display signal, it is possible to prevent the display from being adversely affected. is there. Therefore, the phase of the scanning signal also changes according to the phase of the display signal.

【0124】この例では、全走査ラインの本数を24本
とし、また、ROM5に保持されたビットパターン表
も、図14に示すように24桁のビットパターンb3
1,b32,b33(この順に使用される)からなるも
のとする。
In this example, the number of all the scanning lines is 24, and the bit pattern table held in the ROM 5 also has a 24-digit bit pattern b3 as shown in FIG.
1, b32 and b33 (used in this order).

【0125】このような場合、図14の上段に示すよう
に、全走査ライン24本を、上記各位相群から各1本の
走査ラインを選択してなる8つの組(1組は3本の走査
ラインを含む)に分けて、同じ組に属する走査ラインに
同じ優先順位を与えるのが望ましい。
In such a case, as shown in the upper part of FIG. 14, 24 scanning lines are divided into eight sets (one set of three scanning lines) formed by selecting one scanning line from each of the phase groups. It is desirable to give the same priority to the scan lines belonging to the same set.

【0126】例えば優先順位3で位相βの走査ラインに
つながるキーが押された場合、走査信号は図15に示す
ように遷移する。
For example, when the key connected to the scan line of the phase β in the priority order 3 is pressed, the scan signal transitions as shown in FIG.

【0127】図15(A)に示すように、定常表示状態
において位相αの全走査ラインに走査信号をストローブ
出力する。このとき、標的走査ライン(優先順位3で位
相βの走査ライン)に走査信号が出力されていないの
で、キー入力無しと判断される。そこで、定常表示状態
における走査信号出力を継続する。
As shown in FIG. 15A, the scanning signal is strobed to all the scanning lines of the phase α in the steady display state. At this time, since no scan signal is output on the target scan line (the scan line having the priority β and the phase β), it is determined that there is no key input. Therefore, the scanning signal output in the steady display state is continued.

【0128】図15(B)に示すように、位相βの全走
査ラインにキーストローブ出力する。標的走査ラインに
走査信号が出力されているので、キー入力有りと判断す
る。そこで、次のように図3のキー読込処理を開始す
る。
As shown in FIG. 15B, a key strobe is output to all the scanning lines of the phase β. Since the scanning signal has been output to the target scanning line, it is determined that there is a key input. Therefore, the key reading process of FIG. 3 is started as follows.

【0129】まず、図15(B)の走査パターンと図1
4中のビットパターンb31との間で、対応するビット
毎にANDをとって、図15(C)に示すように、得ら
れた走査パターンに応じて走査信号を出力する。
First, the scanning pattern shown in FIG.
Then, an AND operation is performed for each corresponding bit with the bit pattern b31 in No. 4 to output a scanning signal according to the obtained scanning pattern as shown in FIG.

【0130】標的走査ラインに走査信号が出力されてい
るので、キー入力有りと判断される。そこで、図15
(C)の走査パターンと図14のビットパターンb32
との間で、対応するビット毎にANDをとって、図15
(D)に示すように、得られた走査パターンに応じて走
査信号を出力する。
Since a scan signal has been output to the target scan line, it is determined that a key input has been made. Therefore, FIG.
14C and the bit pattern b32 in FIG.
And AND for each corresponding bit between
As shown in (D), a scanning signal is output according to the obtained scanning pattern.

【0131】標的走査ラインに走査信号が出力されてい
るので、キー入力有りと判断される。そこで、図15
(D)の走査パターンと図14のビットパターンb33
との間で、対応するビット毎にANDをとって、図15
(E)に示すように、得られた走査パターンに応じて走
査信号を出力する。
Since a scan signal has been output to the target scan line, it is determined that a key input has been made. Therefore, FIG.
The scanning pattern of (D) and the bit pattern b33 of FIG.
And AND for each corresponding bit between
As shown in (E), a scanning signal is output according to the obtained scanning pattern.

【0132】標的走査ラインに走査信号が出力されてい
ないので、キー入力無しと判断する。そこで、図15
(E)の走査パターンについてNOTをとって得られた
走査パターンと図15(D)の走査パターンとの間で、
対応するビット毎にANDをとる。このANDをとって
得られた走査パターンに応じて、図15(F)に示すよ
うに、走査信号を出力する。1本の走査ラインにのみ走
査信号が出力され、しかもキー入力有りと判断されるの
で、これが標的走査ラインであると判断してキー読込処
理を終了する。この後、定常表示状態に戻る。
Since no scan signal has been output to the target scan line, it is determined that there is no key input. Therefore, FIG.
Between the scan pattern obtained by NOTing the scan pattern of (E) and the scan pattern of FIG.
AND is performed for each corresponding bit. A scanning signal is output as shown in FIG. 15F in accordance with the scanning pattern obtained by taking the AND. Since the scanning signal is output to only one scanning line and it is determined that there is a key input, it is determined that this is the target scanning line, and the key reading process ends. Thereafter, the display returns to the normal display state.

【0133】このようにして、定常表示状態においてユ
ーザーによるキー入力があったことを最初に円滑に検出
することができる。特殊な処理を付け加える必要がな
く、無駄な走査信号出力が生じることがない。
In this way, it is possible to first smoothly detect that the user has made a key input in the steady display state. There is no need to add special processing, and no useless scan signal output occurs.

【0134】[0134]

【発明の効果】以上より明らかなように、請求項1に記
載の入力読込装置は、行列状に配列された複数のキーを
有し、各列に並ぶキーに列ごとに1本の走査ラインが接
続され、各行に並ぶキーに行ごとに1本の入力ラインが
接続されたキーマトリクスを備え、ユーザーが上記キー
を操作して入力した2値信号を、上記走査ラインに走査
信号を出力して上記入力ライン側で検出する入力読込装
置であって、上記キーマトリクスにつながる複数の走査
ラインを2群に分けて、その一方の群に属する走査ライ
ンに同時に走査信号を出力してキー入力の有無を検出
し、上記一方の群に関してキー入力が検出されない場合
は上記2群のうちの他方の群に属する走査ラインに同時
に走査信号を出力してキー入力の有無を検出し、上記2
群のうちキー入力が検出された方の群に属する走査ライ
ンをさらに2群に分けて、その一方の群に属する走査ラ
インに同時に走査信号を出力してキー入力の有無を検出
するので、以上の一連の処理を繰り返すことによって、
全走査ラインのうち標的走査ラインが含まれる範囲を狭
めてゆき、標的走査ラインを特定することができる。こ
のようにした場合、読み込みに要する走査信号出力回数
を平均化でき、走査信号出力回数の最大値を従来に比し
て少なくすることができる。また、これに伴って、読込
時間を平均化でき、読込時間の最大値を従来に比して短
くすることができる。
As is apparent from the above description, the input reading device according to the first aspect has a plurality of keys arranged in a matrix, and the keys arranged in each column have one scanning line per column. A key matrix in which one input line is connected to each row of keys arranged in each row, and a binary signal input by a user operating the keys is output to the scanning line. A plurality of scanning lines connected to the key matrix are divided into two groups, and a scanning signal is simultaneously output to the scanning lines belonging to one of the groups, and a key input is performed. If no key input is detected for one of the groups, a scanning signal is simultaneously output to the scanning lines belonging to the other group of the two groups to detect the presence or absence of the key input.
The scanning lines belonging to the group in which the key input is detected among the groups are further divided into two groups, and the scanning signals are simultaneously output to the scanning lines belonging to one of the groups to detect the presence or absence of the key input. By repeating a series of processing of
The target scan line can be specified by narrowing the range including the target scan line among all the scan lines. In this case, the number of times of scanning signal output required for reading can be averaged, and the maximum value of the number of times of scanning signal output can be reduced as compared with the related art. Accordingly, the reading time can be averaged, and the maximum value of the reading time can be shortened as compared with the related art.

【0135】請求項2に記載の入力読込装置は、キーマ
トリクスにつながる複数の走査ラインを2群に分けて、
その一方の群に属する走査ラインに同時に走査信号を出
力してキー入力の有無を検出し、上記一方の群に関して
キー入力が検出された場合は上記一方の群、上記一方の
群に関してキー入力が検出されない場合は上記他方の群
をそれぞれ選択し、選択した方の群をさらに2群に分け
て、その一方の群に属する走査ラインに同時に走査信号
を出力してキー入力の有無を検出するので、以上の一連
の処理を繰り返すことによって、全走査ラインのうち標
的走査ラインが含まれる範囲を狭めてゆき、標的走査ラ
インを特定することができる。このようにした場合、読
み込みに要する走査信号出力回数を平均化でき、走査信
号出力回数の最大値を従来に比して少なくすることがで
きる。また、これに伴って、読込時間を平均化でき、読
込時間の最大値を従来に比して短くすることができる。
The input reading device according to claim 2 divides a plurality of scanning lines connected to the key matrix into two groups,
A scanning signal is simultaneously output to the scanning lines belonging to one of the groups to detect the presence or absence of a key input. If a key input is detected for the one group, the key input is performed for the one group and the one group. If not detected, the other group is selected, the selected group is further divided into two groups, and a scanning signal is simultaneously output to the scanning lines belonging to one of the groups to detect the presence or absence of a key input. By repeating the above-described series of processing, the range including the target scan line among all the scan lines can be narrowed, and the target scan line can be specified. In this case, the number of times of scanning signal output required for reading can be averaged, and the maximum value of the number of times of scanning signal output can be reduced as compared with the related art. Accordingly, the reading time can be averaged, and the maximum value of the reading time can be shortened as compared with the related art.

【0136】請求項3に記載の入力読込装置は、請求項
1または2に記載の入力読込装置において、全走査ライ
ン数に相当する数のビットからなり、各ビットの値に応
じて走査ラインを2群に分けることを表すビットパター
ンを、走査信号出力回数に応じた一定数だけ保持する第
1記憶部と、全走査ライン数に相当する数のビットから
なり、全走査ラインのうち同時に走査信号を出力すべき
走査ラインを表す走査パターンを記憶できる第2記憶部
と、上記第2記憶部に記憶された今回の走査パターンと
上記第1記憶部に保持された今回の走査信号出力回数に
応じたビットパターンとの間で、対応するビット毎に論
理積をとって、得られたパターンを次回の走査パターン
として上記第2記憶部に記憶させる制御部を備えている
ので、今回の走査パターンに基づいて次回の走査パター
ンを比較的簡単に作成することができる。複雑な演算を
要せず、処理時間も比較的短くて済む。
According to a third aspect of the present invention, in the input reading device according to the first or second aspect, the input reading device comprises a number of bits corresponding to the total number of scanning lines, and scans the scanning lines in accordance with the value of each bit. A first storage unit for holding a bit pattern representing a division into two groups by a fixed number corresponding to the number of times of scanning signal output, and a number of bits corresponding to the total number of scanning lines, wherein the scanning signal A second storage unit capable of storing a scan pattern representing a scan line to be output, a current scan pattern stored in the second storage unit, and a current scan signal output count stored in the first storage unit. And a control unit for calculating the logical product of the corresponding bit pattern for each corresponding bit and storing the obtained pattern as the next scan pattern in the second storage unit. It is possible to create a next scan pattern relatively easily on the basis of the turn. No complicated calculation is required, and the processing time is relatively short.

【0137】請求項4に記載の入力読込装置は、請求項
3に記載の入力読込装置において、上記全走査ライン間
に優先順位が設けられ、上記各ビットパターン内で、優
先順位が相対的に高い走査ラインに対応するビットに、
上記2群のうち上記一方の群を指す値が相対的に高い確
率で付与されているので、優先順位が相対的に高い走査
ラインを、相対的に少ない走査信号出力回数で特定する
ことができる。
According to a fourth aspect of the present invention, in the input reading apparatus according to the third aspect, a priority is provided between all of the scanning lines, and a priority is relatively set in each of the bit patterns. Bits corresponding to high scan lines
Since the value indicating one of the two groups is assigned with a relatively high probability, a scanning line having a relatively high priority can be specified with a relatively small number of scanning signal outputs. .

【0138】請求項5に記載の入力読込装置は、請求項
3に記載の入力読込装置において、上記全走査ライン間
に優先順位が設けられ、上記走査信号出力回数に応じた
全ビットパターンにわたって、特定の優先順位の走査ラ
インに対応するビットに、上記特定の優先順位を2進数
で表したときの各桁の値が下の桁から順に付与されてい
るので、優先順位が相対的に高い走査ラインに対して走
査信号を相対的に多数回出力して、読み込みを確実に行
うことができる。
According to a fifth aspect of the present invention, in the input reading apparatus according to the third aspect, priority is provided between all of the scanning lines, and the priority is provided over all bit patterns corresponding to the number of times of outputting the scanning signal. Since the value of each digit when the specific priority is represented by a binary number is assigned to the bit corresponding to the scanning line having the specific priority in order from the lower digit, the scanning having a relatively higher priority is performed. The scanning signal can be output to the line relatively many times, and the reading can be reliably performed.

【0139】請求項6に記載の入力読込装置は、請求項
3に記載の入力読込装置において、最後に標的走査ライ
ンを特定したときの走査パターンを記憶できる第3記憶
部を備え、上記制御部は、上記第1記憶部に保持された
走査信号出力回数に応じたビットパターンが上記第3記
憶部に記憶された走査パターンを包含するか否かを判断
して、この判断結果に応じて、上記ビットパターンをそ
のまま又は各ビットの値を反転させた状態でビットパタ
ーンとして採用するので、キーが連続して押される頻度
に応じて標的走査ラインを特定できる確率を高めること
ができる。この結果、請求項1のように、走査ラインを
2群に分けてその両方の群にそれぞれ走査信号を出力す
るような場合は、より少ない走査信号出力回数で標的走
査ラインを特定することができる。また、請求項2のよ
うに、走査ラインを2群に分けてその一方の群のみに走
査信号を出力するような場合は、より確実に標的走査ラ
インを特定することができる。
An input reading device according to a sixth aspect of the present invention is the input reading device according to the third aspect, further comprising a third storage unit capable of storing a scan pattern when a target scan line is specified last, and the control unit. Determines whether a bit pattern corresponding to the number of times of scanning signal output held in the first storage unit includes the scanning pattern stored in the third storage unit, and according to the determination result, Since the bit pattern is employed as it is or as a bit pattern in which the value of each bit is inverted, it is possible to increase the probability that the target scan line can be specified according to the frequency with which keys are continuously pressed. As a result, when the scan lines are divided into two groups and the scan signals are output to both groups, the target scan line can be specified with a smaller number of scan signal output times. . In the case where the scanning lines are divided into two groups and the scanning signal is output only to one of the two groups, the target scanning line can be specified more reliably.

【0140】請求項7に記載の入力読込装置は、請求項
3に記載の入力読込装置において、上記全走査ラインは
複数の位相群に分けられて、上記位相群には定常表示状
態において互いに異なる位相で走査信号が出力され、上
記全走査ラインは、上記各位相群から各1本の走査ライ
ンを選択してなる組に分けられ、上記各ビットパターン
内で、同じ組に属する走査ラインに対応するビットに同
じ値が付与されているので、定常表示状態においてユー
ザーによるキー入力があったことを、無駄な走査信号出
力を行うことなく円滑に検出することができる。
According to a seventh aspect of the present invention, in the input reading apparatus according to the third aspect, all the scanning lines are divided into a plurality of phase groups, and the phase groups are different from each other in a steady display state. A scanning signal is output in phase, and all the scanning lines are divided into sets each of which selects one scanning line from each of the phase groups, and correspond to scanning lines belonging to the same set in each bit pattern. Since the same value is assigned to each bit to be executed, it is possible to smoothly detect that the user has made a key input in the steady display state without outputting useless scanning signals.

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

【図1】 この発明の一実施形態の入力読込装置の概略
構成を示すブロック図である。
FIG. 1 is a block diagram showing a schematic configuration of an input reading device according to an embodiment of the present invention.

【図2】 上記入力読込装置によるキー読込処理の第1
の例を示すフローチャートである。
FIG. 2 shows a first example of a key reading process performed by the input reading device.
6 is a flowchart showing an example of the above.

【図3】 上記入力読込装置によるキー読込処理の第2
の例を示すフローチャートである。
FIG. 3 shows a second key reading process performed by the input reading device.
6 is a flowchart showing an example of the above.

【図4】 走査ラインのグループ分けの具体的な手順を
示すフローチャートである。
FIG. 4 is a flowchart showing a specific procedure for grouping scan lines.

【図5】 ビットパターン表の一つの例を示す図であ
る。
FIG. 5 is a diagram showing one example of a bit pattern table.

【図6】 走査ラインに優先順位を設けた場合のビット
パターン表の例を示す図である。
FIG. 6 is a diagram illustrating an example of a bit pattern table in a case where priorities are assigned to scanning lines.

【図7】 図2のキー読込処理において図6のビットパ
ターン表を用いる場合に、優先順位7の走査ラインにつ
ながるキーが押されたときの走査パターンの遷移を示す
図である。
FIG. 7 is a diagram showing a transition of a scanning pattern when a key connected to a scanning line of priority 7 is pressed when the bit pattern table of FIG. 6 is used in the key reading process of FIG. 2;

【図8】 図2のキー読込処理において図6のビットパ
ターン表を用いる場合に、優先順位0の走査ラインにつ
ながるキーが押されたときの走査パターンの遷移を示す
図である。
8 is a diagram showing a transition of a scanning pattern when a key connected to a scanning line of priority 0 is pressed when the bit pattern table of FIG. 6 is used in the key reading process of FIG.

【図9】 走査ラインに優先順位を設けた場合のビット
パターン表の別の例を示す図である。
FIG. 9 is a diagram showing another example of a bit pattern table in the case where priorities are assigned to scanning lines.

【図10】 図3のキー読込処理において図9のビット
パターン表を用いる場合に、優先順位7の走査ラインに
つながるキーが押されたときの走査パターンの遷移を示
す図である。
FIG. 10 is a diagram showing a transition of a scanning pattern when a key connected to a scanning line of priority 7 is pressed when the bit pattern table of FIG. 9 is used in the key reading process of FIG. 3;

【図11】 図3のキー読込処理において図9のビット
パターン表を用いる場合に、優先順位0の走査ラインに
つながるキーが押されたときの走査パターンの遷移を示
す図である。
11 is a diagram showing a transition of a scanning pattern when a key connected to a scanning line of priority 0 is pressed when the bit pattern table of FIG. 9 is used in the key reading process of FIG. 3;

【図12】 キーが連続して押される頻度が高いか又は
低い場合に適したビットパターンの選択方法を説明する
フローチャートである。
FIG. 12 is a flowchart illustrating a bit pattern selection method suitable for a case where the frequency of continuous key presses is high or low.

【図13】 定常表示状態で出力される3相の走査信号
を示す図である。
FIG. 13 is a diagram showing three-phase scanning signals output in a steady display state.

【図14】 定常表示状態で3相の走査信号が出力され
る場合に適したビットパターン表の例を示す図である。
FIG. 14 is a diagram illustrating an example of a bit pattern table suitable for a case where three-phase scanning signals are output in a steady display state.

【図15】 定常表示状態で3相の走査信号が出力され
る場合に、図14のビットパターン表を用いてキー読込
処理を行ったときの走査パターンの遷移を示す図であ
る。
FIG. 15 is a diagram showing transition of a scanning pattern when a key reading process is performed using the bit pattern table of FIG. 14 when a three-phase scanning signal is output in a steady display state.

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

1 制御部 2 キー走査ポート 3 キー入力ポート 4 キーマトリクス 5 ROM 6〜9 レジスタ 10 RAM L 走査ライン I 入力ライン DESCRIPTION OF SYMBOLS 1 Control part 2 Key scanning port 3 Key input port 4 Key matrix 5 ROM 6-9 register 10 RAM L Scan line I Input line

Claims (7)

【特許請求の範囲】[Claims] 【請求項1】 行列状に配列された複数のキーを有し、
各列に並ぶキーに列ごとに1本の走査ラインが接続さ
れ、各行に並ぶキーに行ごとに1本の入力ラインが接続
されたキーマトリクスを備え、ユーザーが上記キーを操
作して入力した2値信号を、上記走査ラインに走査信号
を出力して上記入力ライン側で検出する入力読込装置で
あって、 上記キーマトリクスにつながる複数の走査ラインを2群
に分けて、その一方の群に属する走査ラインに同時に走
査信号を出力してキー入力の有無を検出し、 上記一方の群に関してキー入力が検出されない場合は上
記2群のうちの他方の群に属する走査ラインに同時に走
査信号を出力してキー入力の有無を検出し、 上記2群のうちキー入力が検出された方の群に属する走
査ラインをさらに2群に分けて、その一方の群に属する
走査ラインに同時に走査信号を出力してキー入力の有無
を検出することを特徴とする入力読込装置。
A plurality of keys arranged in a matrix,
A key matrix in which keys arranged in each column are connected to one scanning line for each column, keys arranged in each row are connected to one input line for each row, and the user operates the keys to perform input An input reading device for outputting a scan signal to the scan line and detecting the binary signal on the input line side, wherein a plurality of scan lines connected to the key matrix are divided into two groups, and one of the groups is divided into two groups. At the same time, a scanning signal is output to the scanning lines belonging thereto to detect the presence / absence of a key input. Then, the presence or absence of a key input is detected, and the scanning lines belonging to the group in which the key input is detected among the two groups are further divided into two groups, and the scanning signals are simultaneously applied to the scanning lines belonging to one of the groups. Force to input reading apparatus characterized by detecting the presence or absence of the key input.
【請求項2】 行列状に配列された複数のキーを有し、
各列に並ぶキーに列ごとに1本の走査ラインが接続さ
れ、各行に並ぶキーに行ごとに1本の入力ラインが接続
されたキーマトリクスを備え、ユーザーが上記キーマト
リクスのキーを操作して入力した2値信号を、上記走査
ラインに走査信号を出力して上記入力ライン側で検出す
る入力読込装置であって、 上記キーマトリクスにつながる複数の走査ラインを2群
に分けて、その一方の群に属する走査ラインに同時に走
査信号を出力してキー入力の有無を検出し、 上記一方の群に関してキー入力が検出された場合は上記
一方の群、上記一方の群に関してキー入力が検出されな
い場合は上記他方の群をそれぞれ選択し、選択した方の
群をさらに2群に分けて、その一方の群に属する走査ラ
インに同時に走査信号を出力してキー入力の有無を検出
することを特徴とする入力読込装置。
2. It has a plurality of keys arranged in a matrix,
A key matrix in which one row of scanning lines is connected to each row of keys and one input line of each row is connected to each row of keys, and the user operates the keys of the above key matrix An input reading device that outputs a scanning signal to the scanning line and detects the input binary signal on the input line side, wherein a plurality of scanning lines connected to the key matrix are divided into two groups, A scanning signal is simultaneously output to the scanning lines belonging to the group to detect the presence or absence of a key input. If a key input is detected for the one group, no key input is detected for the one group and the one group. In this case, the other group is selected, the selected group is further divided into two groups, and a scanning signal is simultaneously output to the scanning lines belonging to one of the groups to detect the presence or absence of a key input. Input taking device, characterized in that.
【請求項3】 請求項1または2に記載の入力読込装置
において、 全走査ライン数に相当する数のビットからなり、各ビッ
トの値に応じて走査ラインを2群に分けることを表すビ
ットパターンを一定数だけ保持する第1記憶部と、 全走査ライン数に相当する数のビットからなり、全走査
ラインのうち同時に走査信号を出力すべき走査ラインを
表す走査パターンを記憶できる第2記憶部と、上記第2
記憶部に記憶された今回の走査パターンと上記第1記憶
部に保持された今回の走査信号出力回数に応じたビット
パターンとの間で、対応するビット毎に論理積をとっ
て、得られたパターンを次回の走査パターンとして上記
第2記憶部に記憶させる制御部を備えたことを特徴とす
る入力読込装置。
3. The input reading device according to claim 1, comprising a number of bits corresponding to the total number of scanning lines, and representing a division of the scanning lines into two groups according to the value of each bit. And a second storage unit comprising a number of bits corresponding to the total number of scanning lines and capable of storing a scanning pattern representing scanning lines to which a scanning signal is to be output simultaneously among all the scanning lines. And the second
The logical product is obtained for each corresponding bit between the current scan pattern stored in the storage unit and the bit pattern corresponding to the current scan signal output count stored in the first storage unit. An input reading device comprising a control unit for storing a pattern in the second storage unit as a next scanning pattern.
【請求項4】 請求項3に記載の入力読込装置におい
て、 上記全走査ライン間に優先順位が設けられ、 上記各ビットパターン内で、優先順位が相対的に高い走
査ラインに対応するビットに、上記2群のうち上記一方
の群を指す値が相対的に高い確率で付与されていること
を特徴とする入力読込装置。
4. The input reading device according to claim 3, wherein a priority is provided between all of the scanning lines, and a bit corresponding to a scanning line having a relatively higher priority in each of the bit patterns. An input reading device, wherein a value indicating one of the two groups is given with a relatively high probability.
【請求項5】 請求項3に記載の入力読込装置におい
て、 上記全走査ライン間に優先順位が設けられ、 上記走査信号出力回数に応じた全ビットパターンにわた
って、特定の優先順位の走査ラインに対応するビット
に、上記特定の優先順位を2進数で表したときの各桁の
値が下の桁から順に付与されていることを特徴とする入
力読込装置。
5. The input reading device according to claim 3, wherein a priority is provided between all of the scan lines, and a scan line of a specific priority is provided over all bit patterns corresponding to the number of times of output of the scan signal. An input reading device, wherein the value of each digit when the specific priority is expressed by a binary number is assigned to the bit to be executed in order from the lower digit.
【請求項6】 請求項3に記載の入力読込装置におい
て、 最後に標的走査ラインを特定したときの走査パターンを
記憶できる第3記憶部を備え、 上記制御部は、上記第1記憶部に保持された走査信号出
力回数に応じたビットパターンが上記第3記憶部に記憶
された走査パターンを包含するか否かを判断して、この
判断結果に応じて、上記ビットパターンをそのまま又は
各ビットの値を反転させた状態でビットパターンとして
採用することを特徴とする入力読込装置。
6. The input reading device according to claim 3, further comprising a third storage unit capable of storing a scan pattern when a target scan line is specified last, wherein the control unit stores the scan pattern in the first storage unit. It is determined whether or not the bit pattern corresponding to the number of times of the output of the scanning signal includes the scanning pattern stored in the third storage unit. According to the determination result, the bit pattern is used as it is or for each bit. An input reading device characterized in that a value is inverted and employed as a bit pattern.
【請求項7】 請求項3に記載の入力読込装置におい
て、 上記全走査ラインは複数の位相群に分けられて、上記位
相群には定常表示状態において互いに異なる位相で走査
信号が出力され、 上記全走査ラインは、上記各位相群から各1本の走査ラ
インを選択してなる組に分けられ、 上記各ビットパターン内で、同じ組に属する走査ライン
に対応するビットに同じ値が付与されていることを特徴
とする入力読込装置。
7. The input reading device according to claim 3, wherein all the scanning lines are divided into a plurality of phase groups, and a scanning signal is output to the phase groups in different phases in a steady display state. All scan lines are divided into sets each of which selects one scan line from each of the phase groups. In each of the bit patterns, the same value is assigned to bits corresponding to scan lines belonging to the same set. An input reading device comprising:
JP9059381A 1997-03-13 1997-03-13 Input reader Pending JPH10254599A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9059381A JPH10254599A (en) 1997-03-13 1997-03-13 Input reader

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9059381A JPH10254599A (en) 1997-03-13 1997-03-13 Input reader

Publications (1)

Publication Number Publication Date
JPH10254599A true JPH10254599A (en) 1998-09-25

Family

ID=13111656

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9059381A Pending JPH10254599A (en) 1997-03-13 1997-03-13 Input reader

Country Status (1)

Country Link
JP (1) JPH10254599A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012141704A (en) * 2010-12-28 2012-07-26 Brother Ind Ltd Key input device, image processor and key scan method
JP2021100154A (en) * 2019-12-20 2021-07-01 カシオ計算機株式会社 Input device and program
CN116449970A (en) * 2023-06-09 2023-07-18 合肥联宝信息技术有限公司 Keyboard scanning method, device, equipment and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012141704A (en) * 2010-12-28 2012-07-26 Brother Ind Ltd Key input device, image processor and key scan method
JP2021100154A (en) * 2019-12-20 2021-07-01 カシオ計算機株式会社 Input device and program
CN116449970A (en) * 2023-06-09 2023-07-18 合肥联宝信息技术有限公司 Keyboard scanning method, device, equipment and storage medium
CN116449970B (en) * 2023-06-09 2023-10-17 合肥联宝信息技术有限公司 Keyboard scanning method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
US4485455A (en) Single-chip semiconductor unit and key input for variable function programmed system
US5091848A (en) Vector processor for merging vector elements in ascending order merging operation or descending order merging operation
US5726923A (en) Minimum/maximum data detector
EP0345807A2 (en) Line memory for speed conversion
US5220323A (en) Keyboard apparatus having ghost key sensing function
JPH10254599A (en) Input reader
US5201058A (en) Control system for transferring vector data without waiting for transfer end of the previous vector data
US6504876B1 (en) Pulse signal generating apparatus and pulse signal generating method
US3958225A (en) Apparatus and method for controlling a communications terminal
JP2850082B2 (en) Min-max arithmetic circuit for fuzzy inference
JPH07239774A (en) Method and device for division
JPH02162422A (en) Preference branch circuit
US5559532A (en) Method and apparatus for parallel pixel hardware cursor
JP3008710B2 (en) Min-max arithmetic circuit for fuzzy inference
EP0542318A2 (en) Digital processor and method for controlling the same
JPH0962505A (en) Address variable register
JP2538095B2 (en) Synchronous protection circuit
KR0142792B1 (en) Data interpolation circuit
JPH09128241A (en) Method and apparatus for arrangement with reference to belonging function value of language input value of fuzzy logic processor
JPS6243215A (en) Synchronization detecting circuit containing majority deciding function
JPH0993325A (en) Portable telephone system and method for detecting its key button
JPH1083381A (en) Signal processor
CN117909266A (en) Data selection method, device, circuit and equipment
JPH07141254A (en) Memory controller
JP2998647B2 (en) Data sequential select method