JP3091382B2 - Keyboard input reading method - Google Patents
Keyboard input reading methodInfo
- Publication number
- JP3091382B2 JP3091382B2 JP06333605A JP33360594A JP3091382B2 JP 3091382 B2 JP3091382 B2 JP 3091382B2 JP 06333605 A JP06333605 A JP 06333605A JP 33360594 A JP33360594 A JP 33360594A JP 3091382 B2 JP3091382 B2 JP 3091382B2
- Authority
- JP
- Japan
- Prior art keywords
- address
- keyboard
- output
- machine cycle
- keyboard input
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Landscapes
- Input From Keyboards Or The Like (AREA)
Description
【0001】[0001]
【産業上の利用分野】本発明は、キーボード入力データ
を中央演算処理装置(CPU)が読み取る場合のキーボ
ード入力読み取り方法の改良に関するものである。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an improvement in a method for reading keyboard input when a central processing unit (CPU) reads keyboard input data.
【0002】[0002]
【従来の技術】図1は、CPU1によりキーボード2の
キースイッチ(接点)によるデータを読み取る従来の装
置を示す図である。今、キーボード2のB点の接点がオ
ンにされたとすると、CPU1は読み取り命令によりマ
ルチプレクサ3の出力Y0 を選択し、即ちその出力レベ
ルを0にさせる。これにより、キーボード2からデータ
バスを経てCPU1の入力D0 に0が出力される。この
時のアドレスバス信号、マルチプレクサ信号、データバ
ス信号の関係は、図2に示される通りとなる。なお、図
2でのアドレスバス信号は16進1桁(4ビット)のみ
を示しているが、CPU1からは16進4桁(16ビッ
ト)のアドレスバス信号が出力されており、そのアドレ
スバス信号の最下位桁のみがマルチプレクサ3では使用
される。2. Description of the Related Art FIG. 1 shows a conventional apparatus for reading data by a key switch (contact) of a keyboard 2 by a CPU 1. Now, assuming that the contact at point B of the keyboard 2 is turned on, the CPU 1 selects the output Y 0 of the multiplexer 3 according to the read command, that is, sets the output level to 0. Accordingly, 0 to the input D 0 of CPU1 via the data bus from the keyboard 2 is output. At this time, the relationship among the address bus signal, the multiplexer signal, and the data bus signal is as shown in FIG. Although the address bus signal in FIG. 2 shows only one digit of hexadecimal (4 bits), the CPU 1 outputs an address bus signal of 4 digits of hexadecimal (16 bits). Are used by the multiplexer 3.
【0003】読み取り命令は、図3に示されるように、
3バイト命令で4マシンサイクルで実行される。CPU
1は、第1マシンサイクルでは読み取り命令が書き込ま
れているメモリの先頭格納アドレス(図3(b)の例で
はアドレスXXX0)を出力すると共に、この先頭格納
アドレスの内容を読み出す。第2マシンサイクルでは指
定されたアドレスの上位2桁が書き込まれているメモリ
の格納アドレス(図3(b)の例ではアドレスXXX
1)をアドレスバスに出力すると共に、この格納アドレ
スの内容を読み出す。第3マシンサイクルでは指定され
たアドレスの下位2桁が書き込まれているメモリの格納
アドドレス(図3(b)の例ではアドレスXXX2)を
アドレスバスに出力すると共に、この格納アドレスの内
容を読み出す。第4マシンサイクルでは指定されたアド
レス(16進4桁)をアドレスバスに出力する。指定さ
れたアドレスに応じて、マルチプレクサ3は出力Y0 を
0にし、キーボード2からデータバスを経てCPU1の
入力D0 に0が出力される。よって、CPU1はデータ
バス信号[1110]を読み取る。[0003] The read command is, as shown in FIG.
It is executed in four machine cycles with a three-byte instruction. CPU
In the first machine cycle, 1 outputs the head storage address (address XXX0 in the example of FIG. 3B) of the memory in which the read command is written, and reads the contents of the head storage address. In the second machine cycle, the storage address of the memory in which the upper two digits of the specified address are written (address XXX in the example of FIG. 3B).
1) is output to the address bus, and the contents of the storage address are read. In the third machine cycle, the storage address (address XXX2 in the example of FIG. 3B) of the memory in which the lower two digits of the specified address are written is output to the address bus, and the contents of the storage address are read. In the fourth machine cycle, the designated address (four hex digits) is output to the address bus. According to the designated address, the multiplexer 3 sets the output Y 0 to 0, and outputs 0 to the input D 0 of the CPU 1 from the keyboard 2 via the data bus. Therefore, the CPU 1 reads the data bus signal [1110].
【0004】[0004]
【発明が解決しようとする課題】上記のように、マルチ
プレクサ3の出力Y0 が0になるのは、第4マシンサイ
クルの間だけである。一方、キーボード2の接点に容量
分が存在する場合には、図4に示されるように、出力Y
0 が0になってから、入力D0 が所定レベル、即ち0に
安定するまでに、B点の接点の容量分のために遅れが生
じ、この遅れが第4マシンサイクルの期間より長くなる
と、CPU1は正しいデータを読み取ることができない
場合が生じることになる。As described above [0005], the output Y 0 of the multiplexer 3 is zero is only during the fourth machine cycle. On the other hand, if there is a capacitance at the contact point of the keyboard 2, as shown in FIG.
When 0 becomes 0 and the input D 0 stabilizes at a predetermined level, that is, 0, a delay occurs due to the capacity of the contact at the point B. If this delay is longer than the period of the fourth machine cycle, In some cases, the CPU 1 cannot read correct data.
【0005】本発明の目的は、キーボードの接点に容量
分が存在する場合でも、キーボード入力のデータを確実
に読み取ることができるキーボード入力読み取り方法を
提供することである。SUMMARY OF THE INVENTION An object of the present invention is to provide a keyboard input reading method capable of reliably reading keyboard input data even when there is a capacity at a keyboard contact.
【0006】[0006]
【課題を解決するための手段】上記目的を達成するため
に、本発明は、キーボードのうちの指定されたアドレス
の読み取り命令を3バイト命令でメモリの格納アドレス
に書き込み、前記指定されたアドレスにおけるキーボー
ド入力データを読み取るのに際して、第1乃至第3マシ
ンサイクルの期間に前記読み取り命令が書き込まれた格
納アドレスをアドレスバスにそれぞれ出力し、第4マシ
ンサイクルで前記指定されたアドレスをアドレスバスに
出力するようにした中央演算処理装置によるキーボード
入力読み取り方法において、前記指定されたアドレスに
相当する格納アドレスの2番地前から、前記指定された
アドレスの読み取り命令を書き込むことを特徴とするも
のである。In order to achieve the above object, according to the present invention, a read instruction for a specified address of a keyboard is written to a storage address of a memory by a three-byte instruction, When reading the keyboard input data, the storage address where the read command is written is output to the address bus during the first to third machine cycles, and the specified address is output to the address bus in the fourth machine cycle. In the keyboard input reading method by the central processing unit, the read command of the specified address is written from two addresses before the storage address corresponding to the specified address.
【0007】[0007]
【作用】本発明においては、第3マシンサイクル実行時
に、アドレスバスには、キーボードのうちの指定された
アドレスに相当するメモリの格納アドレスをアドレスバ
ス信号として出力するようにしている。これにより、第
3マシンサイクル実行時からキーボードのうちの指定さ
れたアドレスが選択され、キーボードの指定されたアド
レス(接点)の電位を所定レベルに安定させるための時
間が2倍に拡張される。According to the present invention, at the time of execution of the third machine cycle, the storage address of the memory corresponding to the specified address of the keyboard is output to the address bus as an address bus signal. As a result, the specified address of the keyboard is selected from the execution of the third machine cycle, and the time for stabilizing the potential of the specified address (contact) of the keyboard at a predetermined level is doubled.
【0008】[0008]
【実施例】本発明の方法は図1に示される装置に使用さ
れるものである。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS The method of the present invention is used in the apparatus shown in FIG.
【0009】図5はマルチプレクサ3の出力Y0 を指定
する場合の本発明を示すものである。キーボード2のう
ちの指定されたアドレス($0000=Y0 )の読み取
り命令LDAA$0000はマシンコードではB600
00となる。これがCPU1内のメモリの3番地分の格
納アドレス(これらのアドレスはXXXE,XXXF,
XXX0)に分けて書き込まれる。FIG. 5 shows the present invention when the output Y 0 of the multiplexer 3 is designated. The read command LDAA $ 0000 of the specified address ($ 0000 = Y 0 ) of the keyboard 2 is B600 in the machine code.
00. These are the storage addresses of three addresses of the memory in the CPU 1 (these addresses are XXXE, XXXF,
XXX0).
【0010】前記指定されたアドレス$0000におけ
るキーボード入力データを読み取るのに際して、CPU
1は、第1マシンサイクルでは格納アドレスXXXEを
アドレスバスに出力すると共に、格納アドレスXXXE
の内容「B6」を読み出す。第2マシンサイクルでは格
納アドレスXXXFをアドレスバスに出力すると共に、
格納アドレスXXXFの内容「00」を読み出す。第3
マシンサイクルでは格納アドレスXXX0をアドレスバ
スに出力すると共に、格納アドレスXXX0の内容「0
0」を読み出す。このアドレスバス信号XXX0の最下
位桁の「0」をマルチプレクサ3が受けることにより、
マルチプレクサ3は出力Y0 を0にする。したがって、
第3マシンサイクルの時点から、CPU1の入力D0 の
電位が接地電位に向かって減少しはじめる。そして、第
4マシンサイクルではアドレスバスに指定されたアドレ
ス$0000を出力する。指定されたアドレス$000
0に応じて、マルチプレクサ3は出力Y0 を第3マシン
サイクルに引き続いて0にし、キーボード2からデータ
バスを経てCPU1の入力D0 に0が出力される。よっ
て、CPU1はデータバス信号[1110]を読み取
る。When reading keyboard input data at the specified address $ 0000, the CPU
1 outputs the storage address XXXE to the address bus in the first machine cycle, and stores the storage address XXXE
Is read out. In the second machine cycle, the storage address XXXF is output to the address bus,
The content "00" of the storage address XXXF is read. Third
In the machine cycle, the storage address XXX0 is output to the address bus and the contents of the storage address XXX0 are set to "0".
Read "0". The multiplexer 3 receives the least significant digit "0" of the address bus signal XXX0,
The multiplexer 3 sets the output Y 0 to 0. Therefore,
From the time of the third machine cycle, the potential of the input D 0 of CPU1 begins to decrease toward a ground potential. Then, in the fourth machine cycle, the designated address $ 0000 is output to the address bus. Specified address $ 000
In response to 0, the multiplexer 3 changes the output Y 0 to 0 following the third machine cycle, and 0 is output from the keyboard 2 to the input D 0 of the CPU 1 via the data bus. Therefore, the CPU 1 reads the data bus signal [1110].
【0011】以上述べたように、第3及び第4マシンサ
イクルの期間において、マルチプレクサ3の出力Y0 が
0の状態になるので、キーボードの指定されたアドレス
(接点)の電位を0に安定させるための時間が2倍に拡
張され、キーボード2の接点に容量分が存在する場合で
も、正確な読み取りが可能となる。As described above, during the third and fourth machine cycles, the output Y 0 of the multiplexer 3 becomes 0, so that the potential of the specified address (contact point) of the keyboard is stabilized at 0. As a result, even if there is a capacity at the contacts of the keyboard 2, accurate reading is possible.
【0012】図6は、マルチプレクサ3の出力Y1 を指
定する場合の本発明を示すものである。キーボード2の
うちの指定されたアドレス($0001=Y1 )の読み
取り命令LDAA$0001(=B60001)は、3
番地分の格納アドレス(これらのアドレスはXXXF,
XXX0,XXX1)に分けて書き込まれる。これによ
り、読み取りに際して、第3マシンサイクルでアドレス
バス信号がXXX1となるから、その最下位桁の「1」
に応じてマルチプレクサ3の出力Y1 が0になり、キー
ボードの指定されたアドレス(接点)の電位を0に安定
させるための時間が2倍に拡張される。[0012] Figure 6 shows the present invention, to specify the output Y 1 of the multiplexer 3. Read command LDAA $ 0001 at the specified address of the keyboard 2 ($ 0001 = Y 1) (= B60001) is 3
Addresses (these addresses are XXXF,
XXX0, XXX1). As a result, at the time of reading, the address bus signal becomes XXX1 in the third machine cycle.
Output Y 1 of the multiplexer 3 becomes 0, the time for stabilizing the potential of the specified address of the keyboard (contact) to 0 is expanded twice in accordance with the.
【0013】[0013]
【発明の効果】以上説明したように、本発明によれば、
指定されたアドレスに相当する格納アドレスの2番地前
から、前記指定されたアドレスの読み取り命令を書き込
むようにし、以て、第3マシンサイクル実行時からキー
ボードのうちの指定されたアドレスが選択され、キーボ
ードの指定されたアドレスの電位を所定レベルに安定さ
せるための時間が2倍に拡張されるようにしたから、キ
ーボードの接点に容量分が存在する場合でも、キーボー
ド入力のデータを確実に読み取ることができる。As described above, according to the present invention,
A read instruction of the specified address is written from two addresses before the storage address corresponding to the specified address, so that the specified address of the keyboard is selected from the time of execution of the third machine cycle, The time required to stabilize the potential of the specified address on the keyboard at a predetermined level has been extended twice, so that even if there is a capacity at the keyboard contacts, it is possible to reliably read the keyboard input data. Can be.
【図面の簡単な説明】[Brief description of the drawings]
【図1】CPUによりキーボードのキースイッチ(接
点)によるデータを読み取る従来の装置を示す図であ
る。FIG. 1 is a diagram showing a conventional apparatus for reading data by a key switch (contact) of a keyboard by a CPU.
【図2】図1の装置におけるアドレスバス信号、マルチ
プレクサ信号、データバス信号の関係を示す図である。FIG. 2 is a diagram showing a relationship among an address bus signal, a multiplexer signal, and a data bus signal in the device of FIG.
【図3】図1の装置における読み取り命令を実行する従
来のマシンサイクルを示す図である。FIG. 3 is a diagram illustrating a conventional machine cycle for executing a read command in the apparatus of FIG. 1;
【図4】キーボードの接点に存在する容量分による電位
降下の遅れを示す図である。FIG. 4 is a diagram showing a delay in potential drop due to a capacitance existing at a contact point of a keyboard.
【図5】図1の装置における読み取り命令を実行する、
本発明によるマシンサイクルの一例を示す図である。FIG. 5 executes a read command in the device of FIG. 1;
FIG. 4 is a diagram illustrating an example of a machine cycle according to the present invention.
【図6】図1の装置における読み取り命令を実行する、
本発明によるマシンサイクルの他の例を示す図である。FIG. 6 executes a read command in the device of FIG. 1;
FIG. 4 is a diagram showing another example of the machine cycle according to the present invention.
1 CPU 2 キーボード 3 マルチプレクサ 1 CPU 2 Keyboard 3 Multiplexer
───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.7,DB名) G06F 3/023 ──────────────────────────────────────────────────続 き Continued on front page (58) Field surveyed (Int.Cl. 7 , DB name) G06F 3/023
Claims (1)
の読み取り命令を3バイト命令でメモリの格納アドレス
に書き込み、前記指定されたアドレスにおけるキーボー
ド入力データを読み取るのに際して、第1乃至第3マシ
ンサイクルの期間に前記読み取り命令が書き込まれた格
納アドレスをアドレスバスにそれぞれ出力し、第4マシ
ンサイクルで前記指定されたアドレスをアドレスバスに
出力するようにした中央演算処理装置によるキーボード
入力読み取り方法において、前記指定されたアドレスに
相当する格納アドレスの2番地前から、前記指定された
アドレスの読み取り命令を書き込むことを特徴とするキ
ーボード入力読み取り方法。1. A read instruction for a specified address of a keyboard is written to a storage address of a memory by a 3-byte instruction, and when reading keyboard input data at the specified address, the first to third machine cycles are performed. A keyboard input reading method by a central processing unit, wherein the storage address in which the read command is written is output to an address bus during a period, and the designated address is output to the address bus in a fourth machine cycle. A keyboard input reading method, wherein a read command of the specified address is written from two addresses before a storage address corresponding to the specified address.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP06333605A JP3091382B2 (en) | 1994-12-16 | 1994-12-16 | Keyboard input reading method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP06333605A JP3091382B2 (en) | 1994-12-16 | 1994-12-16 | Keyboard input reading method |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH08171444A JPH08171444A (en) | 1996-07-02 |
JP3091382B2 true JP3091382B2 (en) | 2000-09-25 |
Family
ID=18267922
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP06333605A Expired - Fee Related JP3091382B2 (en) | 1994-12-16 | 1994-12-16 | Keyboard input reading method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3091382B2 (en) |
-
1994
- 1994-12-16 JP JP06333605A patent/JP3091382B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JPH08171444A (en) | 1996-07-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JPH02235156A (en) | Information processor | |
JP2501874B2 (en) | IC card | |
JPS60160096A (en) | Memory rewriting demanding circuit | |
US5339402A (en) | System for connecting an IC memory card to a central processing unit of a computer | |
JP3202700B2 (en) | Signal processing device | |
JP3091382B2 (en) | Keyboard input reading method | |
KR950010828B1 (en) | Programing supporting method in programinable timer | |
JPH03219342A (en) | Programmable address conversion system | |
JPS62120543A (en) | Switching system for memory bank | |
JPS60178570A (en) | Data receiver | |
JPH082756Y2 (en) | Image processing device | |
JP2570407B2 (en) | Programmable controller | |
JPS59114657A (en) | Memory interface circuit of microcomputer | |
JPS63201852A (en) | Access control system for cache memory | |
JPH05210440A (en) | Key input method for key input device | |
JPH01207850A (en) | Storage control system | |
JPS59223804A (en) | Programmable controller | |
JPS6229814B2 (en) | ||
JPS5839343A (en) | Initial starting device for plural systems | |
JPH03129536A (en) | Brake address detecting device | |
JPS644220B2 (en) | ||
JPS6227423B2 (en) | ||
JPS62256138A (en) | Data processor | |
JPH01214948A (en) | Access controller for random access memory | |
JPS61133449A (en) | Access method to external memory in computer |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080721 Year of fee payment: 8 |
|
LAPS | Cancellation because of no payment of annual fees |