JPS61164324A - Signal discriminating method - Google Patents

Signal discriminating method

Info

Publication number
JPS61164324A
JPS61164324A JP60005522A JP552285A JPS61164324A JP S61164324 A JPS61164324 A JP S61164324A JP 60005522 A JP60005522 A JP 60005522A JP 552285 A JP552285 A JP 552285A JP S61164324 A JPS61164324 A JP S61164324A
Authority
JP
Japan
Prior art keywords
signal
potential level
input terminal
level
period
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.)
Granted
Application number
JP60005522A
Other languages
Japanese (ja)
Other versions
JPH0812988B2 (en
Inventor
Toru Kobayashi
通 小林
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.)
Tokyo Sanyo Electric Co Ltd
Sanyo Electric Co Ltd
Original Assignee
Tokyo Sanyo Electric Co Ltd
Sanyo Electric Co Ltd
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 Tokyo Sanyo Electric Co Ltd, Sanyo Electric Co Ltd filed Critical Tokyo Sanyo Electric Co Ltd
Priority to JP60005522A priority Critical patent/JPH0812988B2/en
Publication of JPS61164324A publication Critical patent/JPS61164324A/en
Publication of JPH0812988B2 publication Critical patent/JPH0812988B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Measurement Of Current Or Voltage (AREA)
  • Manipulation Of Pulses (AREA)
  • Logic Circuits (AREA)

Abstract

PURPOSE:To discriminate three kinds of signals by discriminating the state that a signal keeps the 1st potential level during a prescribed time, the 2nd potential level is kept or the signal changed between the 1st potential level and the end potential level. CONSTITUTION:An input level detecting means 3 to detect a power voltage VDD level and a common level is connected to an input terminal 1. The input level detection means 3 is controlled by a timer means 4 to generate a prescribed period T0 and a signal fed to the input terminal 1 sets an f1 of a memory flag 5 while the signal is kept to logical 1 during the period of T0. When the signal is kept to logical '0', an F2 of the memory flag 5 is set, and when a signal changing between logical '0' and '1' is detected for a prescribed period T0, and F3 of the memory flag 5 is set. As the memory flag 5, a storage device such as an RAM or register incorporated in a microcomputer 2 is utilized.

Description

【発明の詳細な説明】 (イ) 産業上の利用分野 本発明は、入力端子等の信号線に印加された信号を判別
する信号判別方法に関し、特に、マイクロコンピュータ
がその入力端子に印加される信号を判別するための方法
に関する。
[Detailed Description of the Invention] (a) Industrial Application Field The present invention relates to a signal discrimination method for discriminating signals applied to a signal line such as an input terminal, and particularly relates to a signal discrimination method for discriminating signals applied to a signal line such as an input terminal of a microcomputer. The present invention relates to a method for determining signals.

(ロ)従来の技術 一般K、マイクロコンビエータは、その入力端子に印加
される信号が0″であるか1″であるか02通りを判別
している。従って、マイクロコンピュータの1個の入力
端子で3通りの状態を判別しようとすることは不可能で
あり、この場合には2本の入力端子を用いて両者の入力
状態により判定しなければならない。従って、入力端子
基の利用数が増し、他の入力情報の取り込みに制限が生
じてしまう。
(b) Prior Art Generally speaking, a micro combiator determines whether a signal applied to its input terminal is 0'' or 1'' in 02 ways. Therefore, it is impossible to discriminate between three states using one input terminal of a microcomputer, and in this case, two input terminals must be used to make a decision based on the input states of both. Therefore, the number of input terminal groups to be used increases, and there is a restriction on taking in other input information.

そこで、従来は、特開昭55−147039号公報に示
される如く、一つの入力端子に互いに異なるスレンショ
ルド電圧を有するインバータを接続し、そのインバータ
の出力の組み合わせによって、入力端子に印加された3
種類の信号レベルを検出する回路が用いられている。
Therefore, conventionally, as shown in Japanese Unexamined Patent Publication No. 147039/1982, inverters having different threshold voltages are connected to one input terminal, and by combining the outputs of the inverters, the voltage applied to the input terminal is
A circuit is used to detect different signal levels.

(ハ)発明が解決しようとする問題点 しかしながら、前述したような3種類の信号レベルを検
出する回路をマイクロコンビエータの入力端子に内蔵さ
せるためには、入出力回路、即ち、I10ボート部分の
回路素子が増大し、その素子が占める面積が広がり、%
KI10ポートの数が多くなる場合にはチップサイズま
でが太き(なる不都合が生じる。また、すでに設計製造
されたマイクロコンピュータを設計変更するには多大の
費用が必要である。
(c) Problems to be Solved by the Invention However, in order to incorporate the circuit for detecting the three types of signal levels as described above into the input terminal of the micro combiator, it is necessary to As the number of circuit elements increases, the area occupied by the element increases, and the
When the number of KI10 ports increases, the chip size also increases (an inconvenience occurs).Additionally, a large amount of cost is required to change the design of a microcomputer that has already been designed and manufactured.

に)問題点を解決するための手段 本発明は上述した点に鑑みて為されたものであり、入力
端子に印加された信号が第1の電位レベルあるいは第2
の電位レベルであるかを電位レベル検出手段によって検
出し、該検出の結果、タイマー手段等で作成される所定
時間の間に、前記信号が第1の電位レベルを保持してい
る場合、第2の電位レベルを保持している場合、あるい
は、第1の電位レベルと第2の電位レベルの間で変化す
る場合を判別することにより3種類の信号を判別するも
のである。
B) Means for Solving the Problems The present invention has been made in view of the above-mentioned points, and the present invention has been made in view of the above-mentioned points.
A potential level detecting means detects whether the signal is at the first potential level, and as a result of the detection, if the signal maintains the first potential level during a predetermined time created by a timer means or the like, the second potential level is detected. Three types of signals are discriminated by determining whether the potential level is maintained at the first potential level or the potential level changes between the first potential level and the second potential level.

(ホ)作用 本発明によれば、マイクロコンピュータ等の入力端子に
第1の電位レベル、第2の電位レベル、あるいは、周期
Tのパルス信号の3通りの信号を印加することにより、
周期1以上の所定期間内に信号の′α位レベルが第1の
電位、第2の電位であるか、更に、変化する信号である
かが判定され、afl類の状態をマイクロコンピュータ
等に入力できるものである。
(E) Effect According to the present invention, by applying three types of signals, the first potential level, the second potential level, or a pulse signal with a period T to the input terminal of a microcomputer, etc.
Within a predetermined period of period 1 or more, it is determined whether the 'α level of the signal is the first potential, the second potential, or whether it is a changing signal, and the status of the AFLs is input to a microcomputer, etc. It is possible.

(へ)実施例 第1図は本発明の実施例を示すブロック図である。入力
端子(1)は、例えば、破線で示されるマイクロコンビ
エータ(2)に設けられた多数の入力端子の一つであり
、3種類の信号を判別する機能を有している。この入力
端子(1)には、第1゛の電位レベル、即ち、電源電圧
v0゜レベル(論理″1”)と第2の電位レベル、即ち
、接地レベル(論理″0”)を検出するだめの入力レベ
ル検出手段(3)が接続される。また、入力レベル検出
手段(3)は、所定期間Toを作成するためのタイマー
手段(4)によって制御され、所定期間T。の期間中、
入力端子(fJに印加された信号が1″の状態のままの
ときメモリフラッグ(5)のFlをセットし、入力端子
(1)に印加された信号が0”の状態のままのときはメ
モリフラッグ(5)のF、をセットし、また、所定期間
T。
(f) Embodiment FIG. 1 is a block diagram showing an embodiment of the present invention. The input terminal (1) is, for example, one of many input terminals provided in the micro combinator (2) indicated by the broken line, and has a function of discriminating three types of signals. This input terminal (1) has a terminal for detecting the first potential level, that is, the power supply voltage v0° level (logic "1"), and the second potential level, that is, the ground level (logic "0"). input level detection means (3) is connected. Further, the input level detection means (3) is controlled by a timer means (4) for creating a predetermined period To. During the period of
When the signal applied to the input terminal (fJ remains in the state of 1", the memory flag (5) Fl is set, and when the signal applied to the input terminal (1) remains in the state of 0", the memory flag (5) is set. Set flag (5) F, and wait for a predetermined period T.

の間に0”と′1”の間を変化する信号を検出したとき
にはメモリフラッグ(5)のF、をセントする。メモリ
フラッグ(5)は、例えば、マイクロコンピュータ(2
)に内蔵されるRAM、あるいは、レジスタ等の記憶装
置が利用され、メモリフラッグ(5)の状態に基いて、
予め定められた動作が為される。
When a signal changing between 0'' and '1'' is detected during this period, F of the memory flag (5) is set. The memory flag (5) is, for example, a microcomputer (2).
) is used, or a storage device such as a register is used, and based on the state of the memory flag (5),
A predetermined action is performed.

また、第1図に示された実施例は、入力端子(1)1個
で2個のスイッチ(6)(力の操作を検出する場合を示
し、入力端子(1)と接地間にスイッチ(7)が接続さ
れ、また、入力端子(1)には抵抗(8)の一端が接続
され、他端と電源電圧vD8の間にはスイッチ(6)が
接続される。更に、抵抗(8)とスイッチ(6)の接続
点には抵抗(9)とダイオードα〔が接続され、ダイオ
ードQlの他端には、タイマー手段(4)で作成される
期間To より短かい周期Tを有する交流信号が印加さ
れる。この交流信号は第2図(a)(b)に示されるよ
うな矩形波、あるいは、商用電源のような正弦波でもよ
い。第1図の実施例の場合には矩形波が印加される。
In addition, the embodiment shown in FIG. 1 shows a case where one input terminal (1) detects two switches (6) (force operation), and the switch (6) is connected between the input terminal (1) and the ground. 7) is connected, one end of a resistor (8) is connected to the input terminal (1), and a switch (6) is connected between the other end and the power supply voltage vD8. A resistor (9) and a diode α are connected to the connection point between and the switch (6), and the other end of the diode Ql receives an AC signal having a period T shorter than the period To created by the timer means (4). is applied. This AC signal may be a rectangular wave as shown in FIGS. 2(a) and (b), or a sine wave such as a commercial power supply. In the case of the embodiment shown in FIG. 1, a rectangular wave is applied. is applied.

そこで、第1図の実施例に於いて、スイッチ(6)が閉
成されると第2図(c)の如く入力端子(1)には′1
°゛の信号が印加され、スイッチ(7)が閉成されると
第2図fdlの如く入力端子(1)にはO″の信号が印
加される。また、スイッチ(6)(7)が共に開成状態
であるときには、第2図(elの如くダイオード(1G
と抵抗(8)を介して周期Tの信号が入力端子(1)に
印加される。このとき、マイクロコンビエータ(2)は
、入力レベル検出手段(3)によりタイマー手段(4)
で作成される期間Tnの間”1”が検出され、メモリフ
ラッグ(5)のFlがセットされたとき、スイッチ(6
)が閉成されていると認識し、また、T00期間″′0
”が検出されメモリフラッグ(5)のF、がセットされ
たときにはスイッチ(7)が閉成されていると認識する
。更に、Toの期間内に入力端子(1)に印加された信
号が0″とtil+の間で変化したことが検出されメモ
リフラッグ(5)のF!がセットされたときには、マイ
クロコンピュータ(2)はスイッチ(6)(力が共に閉
成されてないことを認識する。
Therefore, in the embodiment shown in FIG. 1, when the switch (6) is closed, the input terminal (1) is '1' as shown in FIG. 2(c).
When the switch (7) is closed, the signal O'' is applied to the input terminal (1) as shown in Fig. 2 fdl. When both are in the open state, the diode (1G
A signal with a period T is applied to the input terminal (1) via the resistor (8). At this time, the micro combinator (2) detects the timer means (4) by the input level detection means (3).
When "1" is detected during the period Tn created by , and Fl of the memory flag (5) is set, the switch (6
) is recognized as closed, and the T00 period ″′0
” is detected and the memory flag (5) F is set, it is recognized that the switch (7) is closed.Furthermore, the signal applied to the input terminal (1) within the period To becomes 0. ” and til+ is detected, and the F! of memory flag (5) is detected. is set, the microcomputer (2) recognizes that the switch (6) (forces are not closed together).

第3図は、第1図に示されたマイクロコンピュータ(2
)の信号判別動作を行なわせるためのプログラムの動作
フロー図である。第3図に於いて、先ずRAMに設けら
れた変化フラグをリセットし、マイクロコンピュータ(
2)に内蔵されたタイマーに期間Toを設定し動作を開
始させた後、入力端子(1)に印加された信号の電位レ
ベルの論理値、0”あるいは1”を取り込み、RAMあ
るいはレジスタ等のメモリに記載する。そして、この時
取り込まれたデータと前回に取り込まれてすでに記憶さ
れているデータとが不一致であるか否か判定し、変化が
あった場合にはRAM等の異なる領域に設けられた変化
フラグをセットし、変化がない場合には変化7乏グのセ
ットはしない。次に、タイマーがToを計時したか否か
を判定し、Toの期間が経過してなければ、再び入力端
子(1)の取り込みを行い同様の動作をする。タイマー
がToを計時した場合には、RAMに設定された変化フ
ラグの内容を調べ、変化フラグがセットされている場合
には期間T。の間に信号が変化した場合であるからフラ
グF、をセットすると共にフラグF、及びF2をリセッ
トし、変化フラグがセットされていない場合には、記憶
された最新の入力データが1″であるかNO″であるか
判定し、1″の場合にはフラグF、をセットしてフラグ
F、及びF3をリセットし、′0”の場合には7ラグF
tをセットすると共に7ラグF1 及びF、をリセット
する。そして、再びタイマーToを設定して動作を開始
させ同様の動作を繰り返えす。マイクロコンピュータ(
2)は上記した如く判定したフラグF、、F、、F、に
基いて、各々に対応する動作を行う。なお、判別の精度
を向上するためには、上述の動作を3回以上繰り返えし
、その結果により最終判別をする。
Figure 3 shows the microcomputer (2) shown in Figure 1.
) is an operation flow diagram of a program for performing a signal discrimination operation. In Figure 3, first, the change flag provided in the RAM is reset, and the microcomputer (
2) After setting the period To in the built-in timer and starting the operation, the logic value of the potential level of the signal applied to the input terminal (1), 0" or 1", is taken in and stored in the RAM or register, etc. Write in memory. Then, it is determined whether or not there is a mismatch between the data captured at this time and the previously captured data that has already been stored, and if there is a change, a change flag set in a different area such as RAM is flagged. Set, and if there is no change, do not set change 7. Next, it is determined whether the timer has counted To or not, and if the period To has not elapsed, the input terminal (1) is read in again and the same operation is performed. When the timer counts To, the contents of the change flag set in the RAM are checked, and if the change flag is set, the period T is reached. Since the signal has changed during this period, flag F is set and flags F and F2 are reset. If the change flag is not set, the latest input data stored is 1''. If it is 1'', set flag F and reset flag F and F3, and if it is '0'', set 7 lag F.
Set t and reset the 7 lags F1 and F. Then, the timer To is set again, the operation is started, and the same operation is repeated. Microcomputer (
2) performs the corresponding operation based on the flags F, , F, , F, determined as described above. In order to improve the accuracy of the discrimination, the above-described operation is repeated three or more times, and the final discrimination is made based on the results.

また、第1図に示された実施例のようにスイッチ(6)
(71の開閉状態を入力するだけでなく、マイクロコン
ピュータを複数用いた場合に相互のパラレルデータ転送
をも行5ことができる。即ち、n本のパラレル接続され
た信号線に於いて、各信号線は3種類の信号を送出でき
るため、n本の信号線では3″個のデータ転送が可能と
なる。
Also, as in the embodiment shown in FIG.
(In addition to inputting the opening/closing status of 71, when multiple microcomputers are used, mutual parallel data transfer can also be performed. In other words, in n parallel connected signal lines, each signal Since the lines can send three types of signals, it is possible to transfer 3'' data using n signal lines.

(ト)発明の効果 上述の如く本発明によれば、論理“1′″及び′0”を
入力する入力端子を用いて3種類の信号状態を判別可能
となり、入力端子の利用効率が向上すると共に、入力端
子に余分な入力回路を投げる必要がないため、マイクロ
コンピータ等のチップサイズを大きくする必要もない利
点を有している。
(G) Effects of the Invention As described above, according to the present invention, three types of signal states can be determined using the input terminal that inputs logic "1'" and "0", and the efficiency of use of the input terminal is improved. In addition, since there is no need to provide an extra input circuit to the input terminal, there is no need to increase the chip size of a microcomputer or the like.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明の実施例を示すブロック図、第2図は動
作を説明する波形図、第3図は動作を示す7α−図であ
る。 (1)・・・入力端子、 (2)・・・マイクロコンビ
エータ、(3)・・・入力レベル検出手段、 (4)・
・・タイマー手段、(5)・・・メモリフラグ、 (6
)(7)・・・スイッチ、 (81(91−・−抵抗、
 dcj・・・ダイオード。 出願人 三洋電機株式会社 外1名 代理人 弁理士  佐 野 靜 夫 第1図 第2図
FIG. 1 is a block diagram showing an embodiment of the present invention, FIG. 2 is a waveform diagram explaining the operation, and FIG. 3 is a 7α diagram showing the operation. (1)...Input terminal, (2)...Micro combinator, (3)...Input level detection means, (4)...
・・Timer means, (5) ・・Memory flag, (6
)(7)...switch, (81(91-...-resistance,
dcj...diode. Applicant: SANYO Electric Co., Ltd. (1 person) and 1 other representative: Patent attorney: Yasuo Sano Figure 1 Figure 2

Claims (1)

【特許請求の範囲】[Claims] 1、入力端子に印加された信号が第1の電位レベルある
いは第2の電位レベルにあるかを電位レベル検出手段に
よつて検出し、タイマー手段で得られる所定期間の間に
、前記信号線の信号が前記第1の電位レベルのままであ
る場合、前記第2の電位レベルのままである場合、ある
いは、前記第1の電位レベルと第2の電位レベルの間で
変化する場合を判別することを特徴とする信号判別方法
1. The potential level detection means detects whether the signal applied to the input terminal is at the first potential level or the second potential level, and the signal line is determining whether the signal remains at the first potential level, the second potential level, or changes between the first potential level and the second potential level; A signal discrimination method characterized by:
JP60005522A 1985-01-16 1985-01-16 Signal discrimination method Expired - Lifetime JPH0812988B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60005522A JPH0812988B2 (en) 1985-01-16 1985-01-16 Signal discrimination method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60005522A JPH0812988B2 (en) 1985-01-16 1985-01-16 Signal discrimination method

Publications (2)

Publication Number Publication Date
JPS61164324A true JPS61164324A (en) 1986-07-25
JPH0812988B2 JPH0812988B2 (en) 1996-02-07

Family

ID=11613517

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60005522A Expired - Lifetime JPH0812988B2 (en) 1985-01-16 1985-01-16 Signal discrimination method

Country Status (1)

Country Link
JP (1) JPH0812988B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02112049A (en) * 1988-10-21 1990-04-24 Nec Corp Transmission circuit

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5318946U (en) * 1976-07-28 1978-02-17

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5318946U (en) * 1976-07-28 1978-02-17

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02112049A (en) * 1988-10-21 1990-04-24 Nec Corp Transmission circuit

Also Published As

Publication number Publication date
JPH0812988B2 (en) 1996-02-07

Similar Documents

Publication Publication Date Title
CN101828216B (en) Touch panel detection circuitry and method of operation
KR930008839A (en) Ferroelectric program cell for configurable logic
JPS61164324A (en) Signal discriminating method
NL8901647A (en) FLOW TOLERANT DIFFERENCE MEMORY CELL AND DETECTION.
KR100232219B1 (en) Low voltage sensing circuit
GB1600878A (en) Fet ros circuits
CN113874738B (en) Leakage detection device, leakage detection method, and electric vehicle
JPS60121588A (en) Digital code detecting circuit
JP3838722B2 (en) Semiconductor device having control circuit with forced operation function
RU2040111C1 (en) Flip-flop device
RU2117978C1 (en) Programmable device for logical control of electric drives and alarm
CN218601782U (en) Power-on reset circuit of display
JPS5953730B2 (en) contact reading circuit
RU2180985C2 (en) Flip-flop unit
RU2065250C1 (en) Device for counting pulses
SU1633490A1 (en) Non-volatile pulse counter
US5305255A (en) Non-destructive readout ferroelectric memory cell
US6833731B1 (en) Electronic circuit for a method for storing information, said circuit comprising ferroelectric flip-flops
RU2101826C1 (en) Single-phase ground-fault warning device for ac mains
SU841088A2 (en) Bistable element
SU1564603A1 (en) Device for processing indistinct information
SU491944A1 (en) Display device
SU955015A1 (en) Discrete message source polling device
RU2250554C1 (en) Flip-flop device
SU1649549A1 (en) Test generator output block