JPH06309082A - Key scan circuit - Google Patents
Key scan circuitInfo
- Publication number
- JPH06309082A JPH06309082A JP5115424A JP11542493A JPH06309082A JP H06309082 A JPH06309082 A JP H06309082A JP 5115424 A JP5115424 A JP 5115424A JP 11542493 A JP11542493 A JP 11542493A JP H06309082 A JPH06309082 A JP H06309082A
- Authority
- JP
- Japan
- Prior art keywords
- output
- key
- scan circuit
- input
- key scan
- 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
Links
- 239000000872 buffer Substances 0.000 claims abstract description 32
- 239000011159 matrix material Substances 0.000 claims abstract description 7
- 238000001514 detection method Methods 0.000 claims description 4
- 230000002265 prevention Effects 0.000 abstract description 7
- 238000010586 diagram Methods 0.000 description 5
- 238000003825 pressing Methods 0.000 description 5
- 239000013256 coordination polymer Substances 0.000 description 1
- 230000000994 depressogenic effect Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000000034 method Methods 0.000 description 1
Landscapes
- Input From Keyboards Or The Like (AREA)
- Electronic Switches (AREA)
Abstract
Description
【0001】[0001]
【産業上の利用分野】本発明は、例えばボタン電話機等
に使用されているキーの押下を検出するキースキャン回
路に関し、特にマトリクス方式を用いた押下キーを認識
するキースキャン回路に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a key scan circuit for detecting the depression of a key used in, for example, a button telephone, and more particularly to a key scan circuit for recognizing a depressed key using a matrix method.
【0002】[0002]
【従来の技術】従来のキースキャン回路を図6に基づい
て、動作を図7に基づいて説明する。先ず図6におい
て、OUT01〜OUT04はスキャンにより順次送出
されてくる出力データの出力ポートであり、L1〜L4
はこの出力ポートOUT01〜OUT04に接続されて
いる出力線である。IN01〜IN04はキーの押下を
検出するための検出データを入力する入力ポートであ
り、R1〜R4はこの入力ポートIN01〜IN04に
接続されている入力線である。これらの出力線L1〜L
4と入力線R1〜R4はマトリクス状に配線されてい
る。これらの出力線L1〜L4と入力線R1〜R4の交
点にはキーの押下げにより閉路となるキーS1〜S9,
S*,S0,S#が接続されている。なお、出力ポート
OUT01〜OUT04,入力ポートIN01〜IN0
4はCPU部1に内蔵されている。2は逆流防止用ダイ
オードである。2. Description of the Related Art A conventional key scan circuit will be described with reference to FIG. 6 and its operation with reference to FIG. First, in FIG. 6, OUT01 to OUT04 are output ports for output data sequentially output by scanning, and L1 to L4
Is an output line connected to the output ports OUT01 to OUT04. IN01 to IN04 are input ports for inputting detection data for detecting a key press, and R1 to R4 are input lines connected to the input ports IN01 to IN04. These output lines L1 to L
4 and the input lines R1 to R4 are wired in a matrix. At the intersections of these output lines L1 to L4 and input lines R1 to R4, keys S1 to S9, which are closed by pressing the keys,
S *, S0 and S # are connected. Output ports OUT01 to OUT04 and input ports IN01 to IN0
Reference numeral 4 is built in the CPU unit 1. Reference numeral 2 is a backflow prevention diode.
【0003】図7は上記キースキャン回路におけるタイ
ミングチャートである。図において、キーS2とキーS
5の二重押下により、同時に押された(1),(2)の
期間は出力線L1とL2は互いに短絡状態となる。この
(1)の期間は出力ポートOUT01の出力線L1はハ
イレベルのVDDであり、出力ポートOUT02の出力線
L2はローレベルのGNDである。また、(2)の期間
は出力ポートOUT02の出力線L2はハイレベルのV
DDであり、出力ポートOUT01の出力線L1はローレ
ベルのGNDである。従って(1)の期間では出力ポー
トOUT02に大電流が流れ込む恐れがあり、(2)の
期間では出力ポートOUT01に大電流が流れ込む恐れ
がある。このように、キーを二重押した場合には、CP
U部1の出力ポートが互いに短絡され、出力が衝突す
る。この時、短絡した出力ポートの一方がハイレベルで
もう一方がローレベルであるとローレべルの出力ポート
に大電流が流れ込む恐れがある。また、出力ポートOU
T01とOUT02は入力ポートIN03とも短絡され
た状態にあるので、出力ポートどうしが短絡することで
IN03の電位が不安定となり、キーの誤認識の原因と
なり得る。このため通常出力ポートOUT01〜OUT
04と出力線L1〜L4との間に逆流防止用ダイオード
2が挿入されている。FIG. 7 is a timing chart of the key scan circuit. In the figure, key S2 and key S
Due to the double pressing of 5, the output lines L1 and L2 are short-circuited to each other during the periods (1) and (2), which are simultaneously pressed. During the period (1), the output line L1 of the output port OUT01 is at high level V DD , and the output line L2 of the output port OUT02 is at low level GND. Also, during the period of (2), the output line L2 of the output port OUT02 is at the high level V
A DD, the output line L1 of the output port OUT01 is GND low. Therefore, a large current may flow into the output port OUT02 during the period (1), and a large current may flow into the output port OUT01 during the period (2). In this way, if you press the key twice, CP
The output ports of the U section 1 are short-circuited to each other and the outputs collide. At this time, if one of the shorted output ports is at a high level and the other is at a low level, a large current may flow into the low level output port. Also, the output port OU
Since T01 and OUT02 are also short-circuited with the input port IN03, the potential of IN03 becomes unstable when the output ports are short-circuited, which may cause the key to be erroneously recognized. Therefore, the normal output ports OUT01 to OUT
A backflow prevention diode 2 is inserted between 04 and the output lines L1 to L4.
【0004】[0004]
【発明が解決しようとする課題】しかし、従来のキース
キャン回路では逆流防止用ダイオード2を出力ポートO
UT01〜OUT04との出力線L1〜L4と間に設け
ているので、キー回路の配線が複雑になり、作業性が悪
くて生産効率の障害となっている。However, in the conventional key scan circuit, the backflow prevention diode 2 is connected to the output port O.
Since it is provided between the output lines L1 to L4 of the UT01 to OUT04 and the wiring of the key circuit is complicated, the workability is poor and the production efficiency is hindered.
【0005】本発明はこのような点に鑑みてなされたも
のであり、逆流防止用ダイオード使用しないキースキャ
ン回路を提供することを目的とする。また、3ステート
出力バッファ回路を用いることでキーの誤認識を無くす
ことができる。The present invention has been made in view of the above circumstances, and an object thereof is to provide a key scan circuit that does not use a backflow prevention diode. Further, by using the 3-state output buffer circuit, erroneous recognition of the key can be eliminated.
【0006】[0006]
【課題を解決するための手段】上記課題を解決するため
に本発明のキースキャン回路は、スキャンにより順次送
られてくる出力データを送出する出力ポートからの出力
線と、キーの押下を検出するための検出データを入力す
る入力ポートへの入力線とをマトリクス状に配線し、そ
の交点にキーを接続したキースキャン回路において、前
記各入力ポートにはプルダウン抵抗を付加し、前記各出
力ポートにはP−chオープンドレイン出力を用いたこ
とに特徴を有している。In order to solve the above problems, a key scan circuit of the present invention detects an output line from an output port for sending output data sequentially sent by scanning, and a key press. In the key scan circuit in which the input lines to the input ports for inputting the detection data are wired in a matrix, and the keys are connected to the intersections, pull-down resistors are added to each of the input ports and Is characterized by using P-ch open drain output.
【0007】また、本発明のキースキャン回路は、スキ
ャンにより順次送られてくる出力データを送出する出力
ポートからの出力線と、キーの押下を検出するための検
出データを入力する入力ポートへの入力線とをマトリク
ス状に配線し、その交点にキーを接続したキースキャン
回路において、前記各出力バッファは、ハイレベルの出
力データが出力される時はONの状態であり、ハイレベ
ルの出力データが出力されない時はOFFの状態であ
り、スキャンにより順次送られてくる出力データに合わ
せて順次切換えられることに特徴を有している。Further, the key scan circuit of the present invention connects the output line from the output port for sending the output data sequentially sent by the scan and the input port for inputting the detection data for detecting the pressing of the key. In a key scan circuit in which input lines are wired in a matrix and keys are connected to the intersections, each output buffer is in an ON state when high level output data is output, and the high level output data is output. Is output when it is not output, and is characterized in that it is sequentially switched according to the output data sequentially sent by scanning.
【0008】[0008]
【作用】スキャンにより順次送られてくる出力データを
各出力ポートから対応する各バッファに送出する。ハイ
レベルの出力データが出力される時の対応するバッファ
はONの状態であり、バッファからハイレベルの出力が
出力線に出力される。ハイレベルの出力データが出力さ
れない時の対応するバッファはOFFの状態であり、出
力線は出力回路から切り放されたハイインピーダンスと
なる。従って、キーを二重押しした場合でも大電流が出
力ポートに流れ込むことなくキースキャンでき、かつバ
ッファ回路をCPU部に内蔵することによってキー回路
の構成を簡潔にすることができる。The output data sequentially sent by scanning is sent from each output port to each corresponding buffer. When the high level output data is output, the corresponding buffer is in the ON state, and the high level output is output from the buffer to the output line. When high-level output data is not output, the corresponding buffer is in the OFF state, and the output line has the high impedance disconnected from the output circuit. Therefore, even if the key is pressed twice, the key scan can be performed without a large current flowing into the output port, and the configuration of the key circuit can be simplified by incorporating the buffer circuit in the CPU section.
【0009】[0009]
【実施例】以下、本発明の一実施例を図1〜図5に基づ
いて説明する。前述の図6及び図7と同一符号を付した
ものはそれぞれ同一の要素を示しており、説明を省略す
る。図1は本発明によるキースキャン回路を示してい
る。従来例の図6と異なる点は逆流防止用ダイオード2
の代わりにバッファBF1〜BF4を設けたこと、及び
各入力ポートには数十KΩのプルダウン抵抗(P.D.
R.)を付加したことである。各バッファBF1〜BF
4のON/OFFによりキーS1〜S9,S0,S*,
S#の何れの2つのキーが同時に押下されても出力ポー
トOUT01〜OUT04に大電流が流れ込むことがな
い。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to FIGS. The components denoted by the same reference numerals as those in FIG. 6 and FIG. FIG. 1 shows a key scan circuit according to the present invention. The difference from the conventional example shown in FIG.
Buffers BF1 to BF4 are provided instead of the above, and pull-down resistors (P.D.
R. ) Is added. Each buffer BF1 to BF
By turning ON / OFF of 4, the keys S1 to S9, S0, S *,
Even if any two keys of S # are pressed at the same time, a large current does not flow into the output ports OUT01 to OUT04.
【0010】図2は上記キースキャン回路におけるタイ
ミングチャートである。図において、キーS2とキーS
5の二重押下により、同時に押された(1),(2)の
期間は出力線L1とL2は互いに短絡状態となる。この
(1)の期間は出力ポートOUT01の出力線L1はハ
イレベルのVDDであり、出力ポートOUT02の出力線
L2はバッファBF2により切り放されてハイインピー
ダンスである。また、(2)の期間は出力ポートOUT
02の出力線L2はハイレベルのVDDであり、出力ポー
トOUT01の出力線L1はバッファBF1により切り
放されてハイインピーダンスである。従って(1)の期
間でも(2)の期間でも各出力ポートOUT01,OU
T02に大電流が流れ込む恐れがない。このように、各
出力ポートOUT01〜OUT04の何れか1つがハイ
レベルの時の出力バッファをON状態とし、他の3出力
の出力バッファをOFF状態とし、それぞれの出力ごと
に順次スキャンし、入力ポートIN01〜IN04の信
号の論理によってキー入力を検知する。FIG. 2 is a timing chart of the key scan circuit. In the figure, key S2 and key S
Due to the double pressing of 5, the output lines L1 and L2 are short-circuited to each other during the periods (1) and (2), which are simultaneously pressed. During this period (1), the output line L1 of the output port OUT01 is at high level V DD , and the output line L2 of the output port OUT02 is cut off by the buffer BF2 and has high impedance. Also, during the period of (2), the output port OUT
The output line L2 of 02 is high level V DD , and the output line L1 of the output port OUT01 is cut off by the buffer BF1 and has high impedance. Therefore, in each of the periods (1) and (2), each output port OUT01, OU
There is no fear that a large current will flow into T02. As described above, when any one of the output ports OUT01 to OUT04 is at the high level, the output buffer is turned on, the output buffers of the other three outputs are turned off, and scanning is sequentially performed for each output. A key input is detected by the logic of signals IN01 to IN04.
【0011】図3は本発明のキースキャン回路に使用さ
れるバッファ回路の一例である。図に示すように、この
バッファ回路は、インバータ、NAND、NOR、P−
chのFET、N−chのFET等から成っている。数
十KΩのプルダウン抵抗(P.D.R.)は各入力ポー
ト側に付随している。OUP01 disableはO
UT01とは別にCPUから出される出力線である。そ
こで、バッファがONすることにより、OUTPUT
L1にデータが出力される。FIG. 3 shows an example of a buffer circuit used in the key scan circuit of the present invention. As shown in the figure, this buffer circuit includes inverters, NANDs, NORs, P-
It is composed of an FET of ch, an FET of N-ch and the like. A pull-down resistor (PDR) of several tens of KΩ is attached to each input port side. OUP01 disable is O
This is an output line output from the CPU separately from UT01. Therefore, when the buffer is turned on, the OUTPUT
The data is output to L1.
【0012】図4は本発明のキースキャン回路に使用さ
れるバッファ回路の一例である。図に示すように、この
バッファ回路は、インバータ、NAND、P−chのF
ET等から成っている。数十KΩのプルダウン抵抗
(P.D.R.)は各入力ポート側に付随している。O
UP01 disableはOUT01とは別にCPU
から出される出力線である。そこで、バッファがONす
ることにより、OUTPUT L1にデータが出力され
る。FIG. 4 shows an example of a buffer circuit used in the key scan circuit of the present invention. As shown in the figure, this buffer circuit includes an inverter, a NAND, and a P-ch F
Consists of ET etc. A pull-down resistor (PDR) of several tens of KΩ is attached to each input port side. O
UP01 disable is CPU separately from OUT01
It is an output line that is output from. Therefore, when the buffer is turned on, the data is output to the OUTPUT L1.
【0013】図5は本発明のキースキャン回路に使用さ
れるバッファ回路の一例である。図に示すように、この
バッファ回路は、P−chのFET等から成っている。
数十KΩのプルダウン抵抗(P.D.R.)は各入力ポ
ート側に付随している。バッファがONすることによ
り、OUTPUT L1にデータが出力される。上記の
説明は正論理出力の場合だが、負論理出力の場合も同様
に、バッファ回路のP−chオープンドレイン出力をN
−chオープンドレイン出力に替えて、プルダウン抵抗
をプルアップ抵抗に替えることにより適用できる。3ス
テート出力を用いてC−MOS出力をON/OFFでき
るバッファ回路を適用することもできる。FIG. 5 shows an example of a buffer circuit used in the key scan circuit of the present invention. As shown in the figure, this buffer circuit is composed of a P-ch FET and the like.
A pull-down resistor (PDR) of several tens of KΩ is attached to each input port side. When the buffer is turned on, data is output to OUTPUT L1. Although the above description is for positive logic output, similarly for negative logic output, the P-ch open drain output of the buffer circuit is N
It can be applied by replacing the -ch open drain output with a pull-up resistor instead of a pull-up resistor. It is also possible to apply a buffer circuit capable of turning on / off the C-MOS output by using a 3-state output.
【0014】[0014]
【発明の効果】以上説明したように本発明によるキース
キャン回路では、各出力ポートと出力線間に出力バッフ
ァを設け、これらの各出力バッファは、ハイレベルの出
力データが出力される時はONの状態であり、ハイレベ
ルの出力データが出力されない時はOFFの状態であ
り、スキャンにより順次送られてくる出力データに合わ
せて順次切換えられるので、出力ポートに逆流防止用ダ
イオードを使用しないで、キー入力における二重押し時
の出力の衝突を防止し、キー回路の簡素化、生産性の向
上等に大いに寄与できる。As described above, in the key scan circuit according to the present invention, an output buffer is provided between each output port and an output line, and each of these output buffers is turned on when high level output data is output. In this state, when high-level output data is not output, it is in the OFF state, and it can be switched sequentially according to the output data sequentially sent by scanning, so do not use a backflow prevention diode at the output port, The output collision at the time of double pressing of the key input can be prevented, which can greatly contribute to the simplification of the key circuit and the improvement of productivity.
【図1】本発明によるキースキャン回路図である。FIG. 1 is a key scan circuit diagram according to the present invention.
【図2】本発明によるキースキャン回路のタイミングチ
ャート図である。FIG. 2 is a timing chart of a key scan circuit according to the present invention.
【図3】本発明のキースキャン回路に使用されるバッフ
ァの一回路図である。FIG. 3 is a circuit diagram of a buffer used in the key scan circuit of the present invention.
【図4】本発明のキースキャン回路に使用されるバッフ
ァの一回路図である。FIG. 4 is a circuit diagram of a buffer used in the key scan circuit of the present invention.
【図5】本発明のキースキャン回路に使用されるバッフ
ァの一回路図である。FIG. 5 is a circuit diagram of a buffer used in the key scan circuit of the present invention.
【図6】従来例によるキースキャン回路図である。FIG. 6 is a key scan circuit diagram according to a conventional example.
【図7】従来例によるキースキャン回路のタイミングチ
ャート図である。FIG. 7 is a timing chart of a key scan circuit according to a conventional example.
1 CPU部 2 逆流防止用ダイオード 1 CPU section 2 Backflow prevention diode
Claims (2)
ータを送出する出力ポートからの出力線と、キーの押下
を検出するための検出データを入力する入力ポートへの
入力線とをマトリクス状に配線し、その交点にキーを接
続したキースキャン回路において、 前記各入力ポートにはプルダウン抵抗を付加し、 前記各出力ポートにはP−chオープンドレイン出力を
用いたことを特徴とするキースキャン回路。1. An output line from an output port for transmitting output data sequentially sent by scanning and an input line to an input port for inputting detection data for detecting a key press are wired in a matrix. In the key scan circuit in which a key is connected to the intersection, a pull-down resistor is added to each of the input ports and a P-ch open drain output is used for each of the output ports.
あり、 ハイレベルの出力データが出力されない時はOFFの状
態であり、 スキャンにより順次送られてくる出力データに合わせて
順次切換えられることを特徴とする請求項1記載のキー
スキャン回路。2. Each of the output buffers is in an ON state when high-level output data is output, is in an OFF state when high-level output data is not output, and is sequentially sent by scanning. 2. The key scan circuit according to claim 1, wherein the key scan circuit is sequentially switched according to incoming output data.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP5115424A JPH06309082A (en) | 1993-04-19 | 1993-04-19 | Key scan circuit |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP5115424A JPH06309082A (en) | 1993-04-19 | 1993-04-19 | Key scan circuit |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH06309082A true JPH06309082A (en) | 1994-11-04 |
Family
ID=14662233
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP5115424A Pending JPH06309082A (en) | 1993-04-19 | 1993-04-19 | Key scan circuit |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH06309082A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116643159A (en) * | 2023-05-26 | 2023-08-25 | 深蓝汽车科技有限公司 | Key detection circuit and key detection method |
-
1993
- 1993-04-19 JP JP5115424A patent/JPH06309082A/en active Pending
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116643159A (en) * | 2023-05-26 | 2023-08-25 | 深蓝汽车科技有限公司 | Key detection circuit and key detection method |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US4697107A (en) | Four-state I/O control circuit | |
| JPH06309082A (en) | Key scan circuit | |
| US5418472A (en) | Input level detection circuit | |
| US4017830A (en) | Sheet comparing system and comparator adapted for said system | |
| JPH0997839A (en) | Integrated circuit capable of function selection and method of selecting the same | |
| US5818274A (en) | Flip-flop circuit | |
| KR100239692B1 (en) | Output circuit of semiconductor device | |
| JPH0514146A (en) | Input buffer | |
| KR0179930B1 (en) | Output buffer control circuit | |
| CN1492588A (en) | A fail-safe circuit | |
| CN210640867U (en) | An infrared photoelectric switch signal conversion device and system | |
| US4607251A (en) | Matrix switch apparatus including pull-up resistors for sense lines | |
| JP2828787B2 (en) | Key input circuit and telephone integrated circuit having key input circuit | |
| KR0183931B1 (en) | Key scan matrix device | |
| JPH051486B2 (en) | ||
| JPH07130082A (en) | Zero-cross detection circuit | |
| KR100250709B1 (en) | Comparator of digital signals | |
| JP2779443B2 (en) | Semiconductor device | |
| JPH02121797U (en) | ||
| JPH11259217A (en) | Keyboard identification device | |
| SU1037255A1 (en) | Failure-proof multi-function logic module | |
| SU1337840A1 (en) | Device for checking digital circuits for condition | |
| JPH03203409A (en) | Pull-up input circuit and pull-down input circuit | |
| SU1674361A1 (en) | Pulse shaper | |
| JPH0640462B2 (en) | Keyboard input circuit |