JPH0453063Y2 - - Google Patents
Info
- Publication number
- JPH0453063Y2 JPH0453063Y2 JP10069988U JP10069988U JPH0453063Y2 JP H0453063 Y2 JPH0453063 Y2 JP H0453063Y2 JP 10069988 U JP10069988 U JP 10069988U JP 10069988 U JP10069988 U JP 10069988U JP H0453063 Y2 JPH0453063 Y2 JP H0453063Y2
- Authority
- JP
- Japan
- Prior art keywords
- switch
- closed
- open
- transistor
- light emitting
- 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
Links
- 239000011159 matrix material Substances 0.000 description 4
- 238000010586 diagram Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 1
Landscapes
- Keying Circuit Devices (AREA)
- Electronic Switches (AREA)
Description
【考案の詳細な説明】
[考案の目的]
(産業上の利用分野)
本考案は複数の表示器を並列接続したトランジ
スタにスイツチを接続し、マイクロコンピユータ
によりダイナミツク走査して前記スイツチの開閉
を判別するスイツチの開閉判別装置に関する。[Detailed description of the invention] [Purpose of the invention] (Field of industrial application) This invention connects a switch to a transistor in which multiple indicators are connected in parallel, and dynamically scans the switch with a microcomputer to determine whether the switch is open or closed. The present invention relates to an open/close determination device for a switch.
(従来の技術)
第2図は一般のスイツチの開閉判別装置を示し
ており、1はマイクロコンピユータである。X1
〜X4は行線、Y1,Y2は列線であり、これらの交
点にはマトリクス状にスイツチSWが配置してス
イツチマトリクスを構成している。そして、これ
らの行線X1〜X4の一側はマイクロコンピユータ
1の入力ポートK0〜K3に接続し、他側は各々プ
ルアツプ抵抗Rを介して電源Eに接続し、列線
Y1,Y2は各々トランジスタTr1,Tr2のコレクタ
に接続し、これらトランジスタTr1,Tr2のベー
スは抵抗Rを介してマイクロコンピユータ1の出
力ポートF0,F1に接続している。また、トラン
ジスタTr1,Tr2のコレクタには複数の発光ダイ
オードLが並列接続し、発光ダイオードLは各々
抵抗Rを介してマイクロコンピユータ1の出力ポ
ートS0〜S4に接続している。そして、マイクロコ
ンピユータ1は随時表示データを更新し出力ポー
トS0〜S4及びF0,F1をダイナミツク駆動させ必
要な発光ダイオードLをオンさせるとともに、ス
イツチSWの開閉を判別するためダイナミツク走
査して入力ポートK0〜K3の入力電圧を読み込ん
でいる。そして、例えば列線Y1と行線X1の交点
のスイツチSWの開閉を判別するには、列線Y1に
接続しているトランジスタTr1がオンしていると
きに、入力ポートK0の入力電圧を読み込み、こ
の入力電圧が“H”であればスイツチSWが開、
“L”であればスイツチSWが閉であるとして判
別している。ここで、“H”と“L”との判別は
マイクロコンピユータ1がC−MOSから構成さ
れる場合、入力電圧が4〜5Vのとき“H”,0〜
1Vのとき“L”とし、1〜4Vの間は“H”と
“L”が不定となつている。そして、従来のマイ
クロコンピユータ1はこのスイツチSWのダイナ
ミツク走査と前記発光ダイオードLのダイナミツ
ク駆動とのタイミングを同期させていた。(Prior Art) FIG. 2 shows a general switch open/close determination device, in which 1 is a microcomputer. X1
-X 4 is a row line, Y 1 and Y 2 are column lines, and switches SW are arranged in a matrix at the intersections of these lines to form a switch matrix. One side of these row lines X 1 to X 4 is connected to the input ports K 0 to K 3 of the microcomputer 1, and the other side is connected to the power supply E through each pull-up resistor R, and the column lines
Y 1 and Y 2 are connected to the collectors of transistors Tr 1 and Tr 2 , respectively, and the bases of these transistors Tr 1 and Tr 2 are connected to output ports F 0 and F 1 of the microcomputer 1 via a resistor R. . Further, a plurality of light emitting diodes L are connected in parallel to the collectors of the transistors Tr 1 and Tr 2 , and the light emitting diodes L are each connected to output ports S 0 to S 4 of the microcomputer 1 via a resistor R. The microcomputer 1 updates the display data as needed, dynamically drives the output ports S0 to S4 and F0 , F1 , turns on the necessary light emitting diodes L, and performs dynamic scanning to determine whether the switch SW is open or closed. The input voltages of input ports K0 to K3 are read. For example, to determine whether the switch SW at the intersection of column line Y 1 and row line X 1 is open or closed, when transistor Tr 1 connected to column line Y 1 is on, input port K Read the input voltage, and if this input voltage is “H”, the switch SW opens.
If it is "L", it is determined that the switch SW is closed. Here, the distinction between "H" and "L" is that when the microcomputer 1 is composed of C-MOS, when the input voltage is 4 to 5 V, it is "H", and when the input voltage is 4 to 5 V, it is "H" and 0 to 5 V.
When the voltage is 1V, it is "L", and between 1V and 4V, "H" and "L" are undefined. The conventional microcomputer 1 synchronizes the timing of the dynamic scanning of the switch SW and the dynamic driving of the light emitting diode L.
(考案が解決しようとする課題)
前記従来技術においては、ダイナミツク走査と
ダイナミツク駆動とが同じタイミングで行われ、
スイツチSWと発光ダイオードLとが同じトラン
ジスタに接続されているため、例えば、一方のト
ランジスタTr1がオンのとき、このトランジスタ
Tr1に接続しオンしている発光ダイオードLの数
が多くなればなる程、トランジスタTr1のコレク
タ電流が増加し、コレクタ・エミツタ間の飽和電
圧VCE(SAT)は大きくなる。このため、オンしてい
る発光ダイオードLの数が増え飽和電圧が1Vを
越えると、そのトランジスタTr1に接続するスイ
ツチSWを閉じてもその入力ポートの入力電圧は
1V以上であるため“L”として判別されない可
能性が生じ、正確にスイツチSWの開閉が判別さ
れない問題があつた。(Problem to be solved by the invention) In the above-mentioned conventional technology, dynamic scanning and dynamic driving are performed at the same timing,
Since the switch SW and the light emitting diode L are connected to the same transistor, for example, when one transistor Tr 1 is on, this transistor
As the number of light emitting diodes L connected to Tr 1 and turned on increases, the collector current of the transistor Tr 1 increases, and the saturation voltage V CE (SAT) between the collector and emitter increases. Therefore, when the number of light emitting diodes L that are turned on increases and the saturation voltage exceeds 1V, the input voltage at the input port will not change even if the switch SW connected to that transistor Tr 1 is closed.
Since it was 1V or more, there was a possibility that it would not be determined as "L", and there was a problem that it would not be possible to accurately determine whether the switch SW was open or closed.
そこで、本考案は前記問題に基づいて成された
ものであり、オンしている表示器の影響を受けず
に、正確にスイツチの開閉を判別することができ
るスイツチの開閉判別装置を提供することを目的
とするものである。 Therefore, the present invention has been made based on the above-mentioned problem, and an object of the present invention is to provide a switch open/close determination device that can accurately determine whether a switch is open or closed without being influenced by the display that is on. The purpose is to
[考案の構成]
(課題を解決するための手段)
本考案は、スイツチSWをダイナミツク走査す
るとき、表示器Lをオフさせる手段をマイクロコ
ンピユータ1に設けたものである。[Structure of the invention] (Means for solving the problem) In the present invention, the microcomputer 1 is provided with means for turning off the display L when the switch SW is dynamically scanned.
(作用)
スイツチSWが接続するトランジスタTrのコレ
クタには閉じたスイツチSWによる電流しか流れ
ないため、スイツチSWの正確な開閉判別が行わ
れる。(Function) Since only the current caused by the closed switch SW flows through the collector of the transistor Tr connected to the switch SW, accurate open/close determination of the switch SW is performed.
(実施例)
以下、図面に基づいて本考案の一実施例を詳述
する。尚、本考案のブロツク図は第2図の一般的
なブロツク図と同一であり、異なる点はマイクロ
コンピユータ1がスイツチSWの開閉を判別する
とき、出力ポートS0〜S4を“L”にして全発光ダ
イオードLをオフする手段を備え、スイツチSW
のダイナミツク走査と発光ダイオードLのダイナ
ミツク駆動のタイミングをずらせたことである。(Example) Hereinafter, an example of the present invention will be described in detail based on the drawings. The block diagram of the present invention is the same as the general block diagram shown in Figure 2, and the difference is that when the microcomputer 1 determines whether the switch SW is open or closed, the output ports S0 to S4 are set to "L". switch SW.
This is because the timing of the dynamic scanning of the light emitting diode L and the dynamic driving of the light emitting diode L are shifted.
このような構成において、第1図のフローチヤ
ートに示すようにマイクロコンピユータ1は先
ず、ステツプ1にて出力ポートS0〜S4を“L”に
し発光ダイオードLをすべてオフさせる。そし
て、ステツプ2にてスイツチSWの開閉を判別す
るため、先ず出力ポートF0に“H”を出力しト
ランジスタTr1をオンさせ、入力ポートK0〜K3
の入力電圧を検出する。この場合、トランジスタ
Tr1に流れるコレクタ電流は発光ダイオードLが
オフしているため、閉じているスイツチSWに流
れる電流の総和のみとなる。スイツチSWに流れ
る電流は一般に発光ダイオードLに流れる電流の
1/10〜1/100程度であるから数多くのスイツチ
SWが閉じてもトランジスタTr1のコレクタ・エ
ミツタ間の飽和電圧は1Vより十分低い値となる。
従つて、閉じているスイツチSWに対しては確実
に対応する入力ポートK0〜K3が“L”になり、
列線Y1に接続するスイツチSWの開閉を正確に判
別できる。次いで、出力ポートF1に“H”を出
力しトランジスタTr2をオンさせ、同様に入力ポ
ートK0〜K3の入力電圧を検出することにより、
列線Y2に接続するスイツチSWの開閉を正確に判
別できる。 In such a configuration, as shown in the flowchart of FIG. 1, the microcomputer 1 first turns the output ports S0 to S4 to "L" in step 1 to turn off all the light emitting diodes L. Then, in step 2, in order to determine whether the switch SW is open or closed, "H" is first output to the output port F0 to turn on the transistor Tr1 , and the input ports K0 to K3 are turned on.
Detects the input voltage of In this case, the transistor
Since the light emitting diode L is off, the collector current flowing through Tr 1 is only the sum of the currents flowing through the closed switch SW. The current flowing through the switch SW is generally about 1/10 to 1/100 of the current flowing through the light emitting diode L, so many switches
Even when SW is closed, the saturation voltage between the collector and emitter of transistor Tr 1 remains sufficiently lower than 1V.
Therefore, for the switch SW that is closed, the corresponding input ports K 0 to K 3 will surely become "L",
It is possible to accurately determine whether the switch SW connected to column line Y1 is open or closed. Next, by outputting "H" to the output port F1 to turn on the transistor Tr2 , and similarly detecting the input voltages of the input ports K0 to K3 ,
It is possible to accurately determine whether the switch SW connected to column line Y2 is open or closed.
そして、スイツチSWの判別の後、ステツプ3
に示すように表示データを更新し必要な発光ダイ
オードLをオンさせるよう出力ポートS0〜S4及び
F0,F1に信号を出力する。この場合、オンする
発光ダイオードLの数が多くなり、トランジスタ
Tr1,Tr2のコレクタ・エミツタ間の飽和電圧が
1Vを越えてもスイツチSWの開閉判別後であるた
め支障はない。 Then, after determining the switch SW, step 3
As shown in the figure, the output ports S 0 to S 4 and
Output signals to F 0 and F 1 . In this case, the number of light emitting diodes L that are turned on increases, and the transistor
The saturation voltage between the collector and emitter of Tr 1 and Tr 2 is
Even if it exceeds 1V, there is no problem because it is after the switch SW has been determined to be open or closed.
このようにして、発光ダイオードLをオフさせ
ている間に、各スイツチSWの状態を読み込むた
め、走査しているトランジスタTrのコレクタ電
流が閉じているスイツチSWによる分だけとな
り、コレクタ・エミツタ間の飽和電圧が十分低く
なり、スイツチSWの開閉判別を正確に行うこと
ができる。 In this way, while the light emitting diode L is turned off, the state of each switch SW is read, so the collector current of the scanning transistor Tr is only the amount due to the closed switch SW, and the current between the collector and emitter is The saturation voltage becomes sufficiently low and it is possible to accurately determine whether the switch SW is open or closed.
以上、本考案の一実施例について詳述したが、
本考案の要旨の範囲内で適宜変形できる。例え
ば、トランジスタTr1,Tr2としてNPN型の代わ
りにPNP型を用いれば、スイツチSWの開閉を判
別する“H”と“L”の論理が逆となり、また各
行線X1〜X4をプルアツプ抵抗Rで電源Eに接続
する代わりにプルダウン抵抗で接地することにな
る。また、表示器としては発光ダイオード以外の
ものも使用できる。さらに、スイツチとして4行
2列のスイツチマトリツクスを示したが、これら
の数及び表示器の数は任意であり、スイツチマト
リクス以外のスイツチにも適用できる。 Above, one embodiment of the present invention has been described in detail.
It can be modified as appropriate within the scope of the gist of the present invention. For example, if PNP type transistors are used instead of NPN type transistors Tr 1 and Tr 2 , the logic of "H" and "L" that determine whether the switch SW is open or closed will be reversed, and each row line X 1 to X 4 will be pulled up. Instead of connecting to the power supply E with a resistor R, it is grounded with a pull-down resistor. Further, as the display device, devices other than light emitting diodes can be used. Furthermore, although a switch matrix with 4 rows and 2 columns is shown as a switch, the number of these and the number of indicators are arbitrary, and the present invention can be applied to switches other than the switch matrix.
[考案の効果]
以上詳述したように本考案によれば、スイツチ
をダイナミツク走査するとき表示器をオフさせた
ことにより、オンしている表示器の影響を受けず
に、正確にスイツチの開閉を判別することができ
るスイツチの開閉判別装置を提供することができ
る。[Effects of the invention] As detailed above, according to the invention, by turning off the display when dynamically scanning the switch, the switch can be opened and closed accurately without being affected by the display that is on. It is possible to provide a switch open/close determination device that can determine whether a switch is open or closed.
第1図は本考案の一実施例を示すフローチヤー
ト、第2図は一般的なスイツチの開閉判別装置を
示すブロツク図である。
1……マイクロコンピユータ、SW……スイツ
チ、L……発光ダイオード(表示器)、Tr1,Tr2
……トランジスタ。
FIG. 1 is a flowchart showing one embodiment of the present invention, and FIG. 2 is a block diagram showing a general switch open/close determination device. 1...Microcomputer, SW...Switch, L...Light emitting diode (indicator), Tr 1 , Tr 2
...transistor.
Claims (1)
イツチを接続し、マイクロコンピユータによりダ
イナミツク走査して前記スイツチの開閉を判別す
るスイツチの開閉判別装置において、前記マイク
ロコンピユータは、前記スイツチをダイナミツク
走査するとき前記表示器をオフさせる手段を備え
たことを特徴とするスイツチの開閉判別装置。 In a switch open/close determination device, a switch is connected to a transistor in which a plurality of indicators are connected in parallel, and a microcomputer dynamically scans the switch to determine whether the switch is open or closed. A device for determining whether a switch is open or closed, characterized by comprising means for turning off the switch.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP10069988U JPH0453063Y2 (en) | 1988-07-28 | 1988-07-28 |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP10069988U JPH0453063Y2 (en) | 1988-07-28 | 1988-07-28 |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH0221929U JPH0221929U (en) | 1990-02-14 |
| JPH0453063Y2 true JPH0453063Y2 (en) | 1992-12-14 |
Family
ID=31329009
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP10069988U Expired JPH0453063Y2 (en) | 1988-07-28 | 1988-07-28 |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH0453063Y2 (en) |
-
1988
- 1988-07-28 JP JP10069988U patent/JPH0453063Y2/ja not_active Expired
Also Published As
| Publication number | Publication date |
|---|---|
| JPH0221929U (en) | 1990-02-14 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US4322820A (en) | Semiconductor integrated circuit device | |
| JPH025049B2 (en) | ||
| JPS5856286B2 (en) | output buffer circuit | |
| US4127899A (en) | Self-quenching memory cell | |
| JPH0453063Y2 (en) | ||
| JPS582437B2 (en) | Three-state output circuit | |
| EP0031009B1 (en) | Multiple access memory cell and its use in a memory array | |
| JPH0579967B2 (en) | ||
| EP0069227A2 (en) | Integrated semiconductor memory and method for accessing and reading | |
| US5481211A (en) | Automatic polarity switching output circuit | |
| CA1282493C (en) | Variable clamped memory cell | |
| EP0023408B1 (en) | Semiconductor memory device including integrated injection logic memory cells | |
| US5231345A (en) | Semiconductor integrated circuit device having a test circuit | |
| JP2548737B2 (en) | Driver circuit | |
| US4785422A (en) | Simultaneous read/write RAM | |
| JP2580932Y2 (en) | Power failure detection circuit | |
| JP3894891B2 (en) | High-speed output circuit with high output current and low power consumption | |
| JPH0740231Y2 (en) | Media detection device | |
| JPS61294686A (en) | Memory circuit | |
| SU613404A1 (en) | Storage | |
| JPS6231527B2 (en) | ||
| JPH01106398A (en) | Semiconductor memory device | |
| JPH0218494B2 (en) | ||
| KR850001869B1 (en) | Decoder Circuit | |
| JPS60136322A (en) | Semiconductor integrated circuit device |