JPH02153485A - Microcomputer - Google Patents

Microcomputer

Info

Publication number
JPH02153485A
JPH02153485A JP63308198A JP30819888A JPH02153485A JP H02153485 A JPH02153485 A JP H02153485A JP 63308198 A JP63308198 A JP 63308198A JP 30819888 A JP30819888 A JP 30819888A JP H02153485 A JPH02153485 A JP H02153485A
Authority
JP
Japan
Prior art keywords
request signal
circuit
input signals
analog input
inn
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
JP63308198A
Other languages
Japanese (ja)
Inventor
Shigeki Hosogoe
細越 茂基
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP63308198A priority Critical patent/JPH02153485A/en
Publication of JPH02153485A publication Critical patent/JPH02153485A/en
Pending legal-status Critical Current

Links

Landscapes

  • Microcomputers (AREA)

Abstract

PURPOSE:To contrive the improvement of the processing speed of a program by generating an interruption request signal only when plural input signals satisfy a condition which is set in advance. CONSTITUTION:The value of a result of comparison of analog input signals IN1 - INN which are latched in a latch circuit 2, and a value which is set in advance in a register circuit 3 are compared by a comparator 4, and only when a condition that these values coincide with each other is satisfied, an interruption request signal IRQ is generated. Accordingly, only when the analog input signals IN1 - INN satisfy a prescribed condition, the interruption request signal IRQ is generated. In such a manner, comparing with the case in which the interruption request signal is generated, whenever the analog input signals IN1 - INN are compared and latched as before, the processing speed of a program can be increased remarkably.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はマイクロコンピュータに関し、特にアナログ信
号を入力して割込要求信号を発生させるマイクロコンピ
ュータに関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a microcomputer, and more particularly to a microcomputer that receives an analog signal and generates an interrupt request signal.

〔従来の技術〕[Conventional technology]

従来、この種のマイクロコンピュータは、第2図に示す
ように、複数のアナログ入力信号IN。
Conventionally, this type of microcomputer receives a plurality of analog input signals IN, as shown in FIG.

〜INNをそれぞれ基準電圧VRI〜VRNと比較する
複数のコンパレータ11〜INを備えたコンパレータ回
路1と、このコンパレータ回路1の比較結果をラッチす
るラッチ回路2と、アナログ入力信号IN、〜INNが
比較、ラッチされるごとに割込要求信号IRQを割込制
御回路5に対して発生するタイミング制御回路6Bとを
有する構成となっていた。
A comparator circuit 1 comprising a plurality of comparators 11 to IN that compares ~INN with reference voltages VRI to VRN, respectively, a latch circuit 2 that latches the comparison results of this comparator circuit 1, and analog input signals IN and ~INN are compared. , and a timing control circuit 6B that generates an interrupt request signal IRQ to the interrupt control circuit 5 every time it is latched.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

上述した従来のマイクロコンピュータは、アナログ入力
信号IN、〜INNが比較、ラッチされるごとに割込要
求信号IRQを発生する構成となっているので、アナロ
グ入力信号INl〜IN。
The conventional microcomputer described above is configured to generate an interrupt request signal IRQ every time the analog input signals IN, -INN are compared and latched.

に変化がない場合や割込処理が不要なアナログ入力信号
IN、〜INNに対しても、比較、ラッチされるごとに
割込が発生してしまい、プログラム全体の処理速度が低
下するという欠点があった。
Even when there is no change in , or for analog input signals IN and ~INN that do not require interrupt processing, an interrupt is generated every time they are compared or latched, which has the disadvantage that the processing speed of the entire program decreases. there were.

本発明の目的は、プログラムの処理速度を向上させるこ
とができるマイクロコンピュータを提供することにある
An object of the present invention is to provide a microcomputer that can improve program processing speed.

〔課題を解決するための手段〕[Means to solve the problem]

本発明のマイクロコンピュータは、複数の入力信号をそ
れぞれ所定の基準値と比較する複数のコンパレータを備
えたコンパレータ回路と、このコンパレータ回路の比較
結果をラッチするラッチ回路と、このラッチ回路にラッ
チされた比較結果が予め設定された条件を満足するとき
割込要求信号を発生する比較回路とを有している。
The microcomputer of the present invention includes a comparator circuit including a plurality of comparators that compare a plurality of input signals with predetermined reference values, a latch circuit that latches the comparison results of the comparator circuit, and a and a comparison circuit that generates an interrupt request signal when the comparison result satisfies a preset condition.

〔実施例〕〔Example〕

次に、本発明の実施例について図面を参照して説明する
Next, embodiments of the present invention will be described with reference to the drawings.

第1図は本発明の第1の実施例を示すブロック図である
FIG. 1 is a block diagram showing a first embodiment of the present invention.

この実施例は、複数のアナログ入力信号IN。This embodiment uses a plurality of analog input signals IN.

〜INNをそれぞれ基準電圧VRI〜VRNと比較する
複数のコンパレータ11〜INを備えたコンパレータ回
路1と、このコンパレータ回路1の比較結果をラッチす
るラッチ回路2と、予め特定の値を設定しておくレジス
タ回路3と、このレジスタ回路3に設定されている値と
ラッチ回路2にラッチされている比較結果の値とが一致
したとき割込制御回路5に対し、割込要求信号IRQを
発生する比較回路4と、コンパレータ回路1のアナログ
入力信号INI〜INNの比較やラッチ回路2のラッチ
のタイミング等を制御するタイミング制御回路6とを有
する構成となっている。
A comparator circuit 1 includes a plurality of comparators 11 to IN that compare ~INN with reference voltages VRI to VRN, respectively, a latch circuit 2 that latches the comparison results of the comparator circuit 1, and a specific value is set in advance. A comparison circuit that generates an interrupt request signal IRQ to the interrupt control circuit 5 when the value set in the register circuit 3 and the value of the comparison result latched in the latch circuit 2 match. The configuration includes a circuit 4 and a timing control circuit 6 that controls the comparison of analog input signals INI to INN of the comparator circuit 1 and the latch timing of the latch circuit 2.

この実施例においては、ラッチ回路2にラッチされてい
るアナログ入力信号IN、〜INNの比較結果の値と、
レジスタ回路3に予め設定された値とが比較回路4によ
り比較され、これらの値が一致するという条件を満足し
たときのみ割込要求信号IRQを発生する。
In this embodiment, the value of the comparison result of the analog input signals IN, ~INN latched in the latch circuit 2,
A comparison circuit 4 compares a value set in advance in the register circuit 3, and generates an interrupt request signal IRQ only when the condition that these values match is satisfied.

従ってアナログ入力信号IN1〜IN、が所定の条件を
満足したときにのみ割込要求信号IRQを発生するので
、従来のようにアナログ入力信号INI〜INNの比較
、ラッチごとに割込要求信号IRQが発生する場合と比
較し、大幅にプログラムの処理速度を上げることができ
る。
Therefore, the interrupt request signal IRQ is generated only when the analog input signals IN1 to IN satisfy a predetermined condition. Compared to the case where this occurs, the processing speed of the program can be significantly increased.

第2図は本発明の第2の実施例を示す回路図である。FIG. 2 is a circuit diagram showing a second embodiment of the present invention.

コンパレータ回路IAのコンパレータ11,12はそれ
ぞれ、アナログ入力信号INl、IN2が対応する基準
電圧VR1,V、□より大きいときに値1111+、小
さいときに値“0°′の比較結果を出力する。
The comparators 11 and 12 of the comparator circuit IA each output a comparison result of a value 1111+ when the analog input signals INl and IN2 are larger than the corresponding reference voltages VR1, V, and □, and a value of "0°" when they are smaller.

ラッチ回路2Aはこの比較結果をラッチする。The latch circuit 2A latches this comparison result.

比較回路4Aは、インバータIf、I2及びANDゲー
トG1.G2を備え、ラッチ回路2Aにラッチされてい
る比較結果が“10”のとき第1の割込要求信号I R
Q 1を発生し、比較結果が“01′°のとき第2の割
込要求信号IRQ2を発生し、比較結果が00′”、1
1”のときは割込要求信号を発生しない。
Comparison circuit 4A includes inverters If, I2 and AND gates G1. G2, and when the comparison result latched in the latch circuit 2A is "10", the first interrupt request signal I R
Q 1 is generated, and when the comparison result is "01'°, the second interrupt request signal IRQ2 is generated and the comparison result is 00'", 1
1", no interrupt request signal is generated.

すなわちこの実施例は、アナログ入力信号工Nlが基準
電圧V R1より大きくアナログ入力信号IN2は基準
電圧VR2以下であるときのみ第1の割込要求信号IR
Q、を発生し、アナログ入力信号IN2が基準電圧■R
2より大きくアナログ入力信号IN、は基準電圧■81
以下であるときのみ第2の割込要求信号IRQ2を発生
するようになっている。
That is, in this embodiment, the first interrupt request signal IR is output only when the analog input signal Nl is greater than the reference voltage VR1 and the analog input signal IN2 is less than or equal to the reference voltage VR2.
Q, and the analog input signal IN2 is the reference voltage ■R
Analog input signal IN greater than 2 is reference voltage ■81
The second interrupt request signal IRQ2 is generated only when the following conditions are met.

第1の実施例においては、比較条件をレジスタ回路3に
より設定したが、第2の実施例のように、比較条件を比
較回路4Aの回路構成により設定することもできる。
In the first embodiment, the comparison conditions are set by the register circuit 3, but as in the second embodiment, the comparison conditions can also be set by the circuit configuration of the comparison circuit 4A.

〔発明の効果〕〔Effect of the invention〕

以上説明したように本発明は、複数の入力信号が予め設
定された条件を満足したときのみ割込要求信号を発生す
る構成とすることにより、入力信号の条件が整った必要
なときのみ割込要求信号を発生することができるので、
従来のように比較。
As explained above, the present invention is configured to generate an interrupt request signal only when a plurality of input signals satisfy preset conditions. Since the request signal can be generated,
Compare as usual.

ラッチのたびに割込要求信号を発生する場合に比較し、
プログラムの処理速度を大幅に向上させることができる
効果がある。
Compared to the case where an interrupt request signal is generated every time it is latched,
This has the effect of significantly increasing the processing speed of the program.

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

第1図は本発明の第1の実施例を示すブロック図、第2
図は本発明の第2の実施例を示す回路図、第3図は従来
のマイクロコンピュータの一例を示すブロック図でであ
る。 1、LA・・・コンパレータ回路、11〜IN・・・コ
ンパレータ、2,2A・・・ラッチ回路、3・・・レジ
スタ回路、4,4A・・・比較回路、5,5A・・・割
込制御回路、6.6A 、6B・・・タイミング制御回
路。
FIG. 1 is a block diagram showing a first embodiment of the present invention;
The figure is a circuit diagram showing a second embodiment of the present invention, and FIG. 3 is a block diagram showing an example of a conventional microcomputer. 1, LA... Comparator circuit, 11~IN... Comparator, 2, 2A... Latch circuit, 3... Register circuit, 4, 4A... Comparison circuit, 5, 5A... Interrupt Control circuit, 6.6A, 6B...timing control circuit.

Claims (1)

【特許請求の範囲】[Claims] 複数の入力信号をそれぞれ所定の基準値と比較する複数
のコンパレータを備えたコンパレータ回路と、このコン
パレータ回路の比較結果をラッチするラッチ回路と、こ
のラッチ回路にラッチされた比較結果が予め設定された
条件を満足するとき割込要求信号を発生する比較回路と
を有することを特徴とするマイクロコンピュータ。
A comparator circuit including a plurality of comparators that compare each of the plurality of input signals with a predetermined reference value, a latch circuit that latches the comparison results of the comparator circuit, and a preset comparison result latched in the latch circuit. A microcomputer comprising: a comparison circuit that generates an interrupt request signal when a condition is satisfied.
JP63308198A 1988-12-05 1988-12-05 Microcomputer Pending JPH02153485A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63308198A JPH02153485A (en) 1988-12-05 1988-12-05 Microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63308198A JPH02153485A (en) 1988-12-05 1988-12-05 Microcomputer

Publications (1)

Publication Number Publication Date
JPH02153485A true JPH02153485A (en) 1990-06-13

Family

ID=17978098

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63308198A Pending JPH02153485A (en) 1988-12-05 1988-12-05 Microcomputer

Country Status (1)

Country Link
JP (1) JPH02153485A (en)

Similar Documents

Publication Publication Date Title
JPH0628020B2 (en) Key input device
US5929799A (en) Out-of-range detector for pipeline ADC
JPH02153485A (en) Microcomputer
JPWO2004086628A1 (en) Encoder circuit and A / D conversion circuit
US3955177A (en) Magnitude comparison circuit
SU1762409A2 (en) Parallel analog-to-digital converter
JPH0728738Y2 (en) Pulse width modulation signal generation circuit
JPS6213123A (en) Digital logic circuit
JPH0290234A (en) Interruption control circuit for microcomputer
JPH02104024A (en) Successive comparing analog/digital converter
JP2848094B2 (en) D / A converter
JP2775101B2 (en) Deviation direction discrimination circuit in positioning system using incremental encoder
JP2581991B2 (en) Microcomputer input circuit
JPH0287221A (en) Microcomputer
RU1791815C (en) Device for comparison of two fuzzy values
JPH0227401A (en) Offsetting control circuit
SU1157522A1 (en) Comparing device
KR100787078B1 (en) Encoder circuit and a/d converter circuit
JPH0319429A (en) A/d converter
JPH06311036A (en) A/d converter
JPH0218599Y2 (en)
SU1018234A1 (en) Analog/digital converter
RU1791814C (en) Device for comparison of odd values
JPH02114720A (en) A/d converter circuit
JPH04255116A (en) Analog/digital conversion circuit