JPH09288584A - State detection circuit - Google Patents

State detection circuit

Info

Publication number
JPH09288584A
JPH09288584A JP10034596A JP10034596A JPH09288584A JP H09288584 A JPH09288584 A JP H09288584A JP 10034596 A JP10034596 A JP 10034596A JP 10034596 A JP10034596 A JP 10034596A JP H09288584 A JPH09288584 A JP H09288584A
Authority
JP
Japan
Prior art keywords
circuit
state
detected
cpu
interrupt
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
JP10034596A
Other languages
Japanese (ja)
Inventor
Sadaaki Tanaka
貞秋 田中
Yasuhiro Murata
泰裕 村田
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.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP10034596A priority Critical patent/JPH09288584A/en
Publication of JPH09288584A publication Critical patent/JPH09288584A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To always and precisely recognize the state of a circuit to be detected by giving interruption and reading the state of the circuit to be detected with CPU when the state of the circuit to be detected, which CPU recognizes, differs from the output signal of the circuit to be detected. SOLUTION: A circuit state detection device contains an address decoder 16 inputting the output signal of the circuit to be detected 10, CPU 18, a state comparator 24 and a latch circuit 26. The state comparator 24 is exclusive OR and it compares the outputs signal of the circuit to be detected 10 with the output signal of the latch circuit 26. When both differ, an interruption instruction signal INT is supplied to CPU 18. When the state of the circuit to be detected 10, which CPU 18 recognized, differs from the actual state of the circuit to be detected 10, interruption is given without fail, and the state of the circuit to be detected 10 is read. The circuit state is read by permitting CPU 18 to read the input part 16A of the address decoder 16.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明はCPU(中央処理装
置)によって回路の状態を検出するための状態検出装置
に関し、より詳細には、CPUに割り込みをかけて被検
出回路の状態を検出するための状態検出装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a state detecting device for detecting a state of a circuit by a CPU (central processing unit), and more specifically for interrupting the CPU to detect the state of a detected circuit. State detection device.

【0002】[0002]

【従来の技術】CPUを用いた制御系では、CPUによ
って複数の回路の状態を読み取り、その結果に基づいて
各機器を制御するように構成されたものがある。この場
合、各機器の制御は、各回路の状態を確実に読み取るこ
とから開始される。
2. Description of the Related Art In some control systems using a CPU, the CPU reads the states of a plurality of circuits and controls each device based on the results. In this case, control of each device is started by surely reading the state of each circuit.

【0003】例えば、CPUによってなされる制御が、
「Xというスイッチ(回路)の状態を読み取り、それが
ONである場合にYという仕事を行う。」であるとす
る。この場合、CPUが「Xの状態を読み取る。」こと
から開始され、その結果によって「Yという仕事をする
/しない。」が決定される。従って、CPUを用いる制
御系では、回路状態を確実に読み取る、即ち、検出する
ことが基本的であり且つ重要である。
For example, the control performed by the CPU is
"Read the state of the switch (circuit) X and perform the work Y when it is ON." In this case, the CPU starts with "reading the state of X.", and the result determines "whether or not to work Y". Therefore, in a control system using a CPU, it is fundamental and important to surely read, that is, detect the circuit state.

【0004】従来、CPUによって回路の状態を検出す
る場合、次のような2つの方法が用いられていた。 (1)CPUによって周期的に回路の状態を観測する。
(図3参照) (2)回路の状態が変化した時に、CPUへ割り込みを
かけて、CPUに回路の状態を読み込ませる。(図4及
び図5参照)
Conventionally, when the circuit state is detected by the CPU, the following two methods have been used. (1) The CPU periodically observes the state of the circuit.
(See FIG. 3) (2) When the state of the circuit changes, the CPU is interrupted to read the state of the circuit. (See FIGS. 4 and 5)

【0005】図3を参照して、従来の第1の方法を説明
する。この例によると、回路状態検出装置は、被検出回
路10の出力信号を入力するアドレスデコーダ16とC
PU18とを含む。被検出回路10は電源端子11に接
続された抵抗器12とスイッチ装置13とを含む。
The first conventional method will be described with reference to FIG. According to this example, the circuit state detecting device includes an address decoder 16 and a C which receive the output signal of the detected circuit 10.
PU18 and. The detected circuit 10 includes a resistor 12 connected to a power supply terminal 11 and a switch device 13.

【0006】被検出回路10の出力信号は、スイッチ装
置13がONのときに“L”レベルとなり、OFFのと
きに“H”レベルとなる。アドレスデコーダ16は入力
部16Aを含み、この入力部16Aは被検出回路10の
出力端に接続されている。入力部16Aは任意のアドレ
スに割り付けられている。
The output signal of the detected circuit 10 becomes "L" level when the switch device 13 is ON, and becomes "H" level when the switch device 13 is OFF. The address decoder 16 includes an input section 16A, and the input section 16A is connected to the output terminal of the detected circuit 10. The input unit 16A is assigned to an arbitrary address.

【0007】CPU18は、割り込み、アドレスバス、
データバス、読み込み及び書き込み等の機能を有する一
般的なCPUであってよい。
The CPU 18 uses an interrupt, an address bus,
It may be a general CPU having functions such as a data bus, reading and writing.

【0008】この方法では、CPU18は、ソフトウェ
アにて設定された読み込み周期毎にアドレスデコーダ1
6の入力部16Aを読み込むように構成されている。
In this method, the CPU 18 causes the address decoder 1 to read every read cycle set by software.
6 input sections 16A are configured to be read.

【0009】図4を参照して、従来の第2の方法を説明
する。この例によると、回路状態検出装置は、被検出回
路10の出力信号を入力するアドレスデコーダ16とC
PU18と状態変化検出器20と割り込み回路22とを
含む。この第2の方法は、図2に示した第1の方法と比
べて、状態変化検出器20と割り込み回路22とが付加
的に設けられており、それ以外の構成は同様である。
The second conventional method will be described with reference to FIG. According to this example, the circuit state detecting device includes an address decoder 16 and a C which receive the output signal of the detected circuit 10.
It includes a PU 18, a state change detector 20, and an interrupt circuit 22. The second method is different from the first method shown in FIG. 2 in that a state change detector 20 and an interrupt circuit 22 are additionally provided, and the other configurations are the same.

【0010】状態変化検出器20は被検出回路10の出
力端に接続されており、被検出回路10の出力信号SW
のレベルが変化したときに、1パルスを発生する。割り
込み回路22はD型フリップフロップであってよく、状
態変化検出器20から出力されたパルス信号をCK端子
より入力し、Q端子よりCPU18に割り込み命令信号
INTを出力する。割り込み回路22はアドレスデコー
ダ16の出力部16Bより出力されるリセット信号RP
を入力する。
The state change detector 20 is connected to the output end of the circuit to be detected 10 and outputs the output signal SW of the circuit to be detected 10.
One pulse is generated when the level of is changed. The interrupt circuit 22 may be a D-type flip-flop, which inputs the pulse signal output from the state change detector 20 from the CK terminal and outputs the interrupt command signal INT to the CPU 18 from the Q terminal. The interrupt circuit 22 receives the reset signal RP output from the output unit 16B of the address decoder 16.
Enter

【0011】図5を参照して説明する。図5は図4に示
した従来の第2の方法におけるタイムチャートである。
図5Aは被検出回路10の出力信号SW、図5Bは状態
変化検出器20の出力信号CP、図5Cはアドレスデコ
ーダ16の出力信号即ち、リセット信号RP、図5Dは
割り込み回路22のQ端子の出力信号INTの波形を示
す。図5Aと図5Bに示すように、被検出回路10の出
力信号SWのレベルが変化する毎に、状態変化検出器2
0はパルスCPを発生する。図示のようにこれらのパル
スに順に参照符号CP1、CP2、CP3、CP4、C
P5を付す。
Description will be made with reference to FIG. FIG. 5 is a time chart in the second conventional method shown in FIG.
5A shows the output signal SW of the detected circuit 10, FIG. 5B shows the output signal CP of the state change detector 20, FIG. 5C shows the output signal of the address decoder 16, that is, the reset signal RP, and FIG. 5D shows the Q terminal of the interrupt circuit 22. The waveform of the output signal INT is shown. As shown in FIGS. 5A and 5B, every time the level of the output signal SW of the detected circuit 10 changes, the state change detector 2
0 produces a pulse CP. As shown in the figure, these pulses are sequentially referred to by reference symbols CP1, CP2, CP3, CP4, C.
Add P5.

【0012】図5Dに示すように、割り込み回路22の
出力信号、即ち、割り込み信号INTは、状態変化検出
器20から出力されたパルス信号CPを入力すると
“H”レベルとなり、アドレスデコーダ16から出力さ
れたリセット信号RPを入力すると“L”レベルにな
る。
As shown in FIG. 5D, the output signal of the interrupt circuit 22, that is, the interrupt signal INT, becomes "H" level when the pulse signal CP output from the state change detector 20 is input, and is output from the address decoder 16. When the reset signal RP is input, it becomes "L" level.

【0013】本例では、CPU18は、割り込み回路2
2からの割り込み信号INTが“L”レベルから“H”
レベルになると、割り込みを発生させて、被検出回路1
0の回路状態を読み取る。回路状態の読み取りは、アド
レスデコーダ16の入力部16AをCPU18が読み取
ることによって行われる。それが終了すると、図5Cに
示すように、アドレスデコーダ16は次の割り込みに備
えてリセット信号RPを生成する。
In this example, the CPU 18 uses the interrupt circuit 2
Interrupt signal INT from 2 goes from "L" level to "H"
When the level is reached, an interrupt is generated and the detected circuit 1
Read the circuit state of 0. The circuit state is read by the CPU 18 reading the input unit 16A of the address decoder 16. After that, the address decoder 16 generates the reset signal RP in preparation for the next interrupt, as shown in FIG. 5C.

【0014】例えば、時点T1 にて割り込みがかけられ
時点T2 にて読み取りが終了し、リセット信号RPを生
成する。次に時点T3 にて割り込みがかけられ時点T4
にて読み取りが終了し、リセット信号RPを生成する。
更に、時点T5 にて割り込みがかけられ時点T6 にて読
み取りが終了し、リセット信号RPを生成する。
For example, an interrupt is issued at time T 1, the reading is completed at time T 2 , and a reset signal RP is generated. Next, at time T 3, an interrupt is issued and time T 4
The reading is completed at and the reset signal RP is generated.
Furthermore, an interrupt is applied at time T 5 , the reading is completed at time T 6 , and a reset signal RP is generated.

【0015】図5Bと図5Dを比較すると明らかなよう
に、割り込み回路22からの割り込み信号INTが
“L”レベルのときに、状態変化検出器20がパルス
(CP1、CP2、CP3)を発生すると割り込み回路
22からの割り込み信号INTは“L”レベルから
“H”レベルになり、割り込み及び読み込みがなされる
が、割り込み回路22からの割り込み信号INTが
“H”レベルのときに、状態変化検出器20がパルス
(CP4、CP5)を発生しても、割り込信号INTは
変化しない。従って割り込み及び読み込みがなされな
い。
As is clear from a comparison between FIGS. 5B and 5D, when the state change detector 20 generates a pulse (CP1, CP2, CP3) when the interrupt signal INT from the interrupt circuit 22 is at "L" level. The interrupt signal INT from the interrupt circuit 22 changes from the “L” level to the “H” level and interrupts and reads, but when the interrupt signal INT from the interrupt circuit 22 is at the “H” level, the state change detector Even if 20 generates a pulse (CP4, CP5), the interrupt signal INT does not change. Therefore, no interrupt or read is done.

【0016】[0016]

【発明が解決しようとする課題】第1の方法では、CP
U18は所定の周期毎に被検出回路10の状態を読み込
む。この方式は、ハードウェアの構成が比較的簡単であ
る利点を有するが、被検出回路10の状態と無関係に常
時、読み込むために、無駄時間が多く、CPU18のパ
フォーマンス劣化を招く欠点がある。
In the first method, the CP
U18 reads the state of the detected circuit 10 at every predetermined cycle. This method has an advantage that the hardware configuration is relatively simple, but has a drawback that the CPU 18 always reads without regard to the state of the circuit to be detected 10, so that the dead time is long and the performance of the CPU 18 is deteriorated.

【0017】第2の方法では、状態変化検出器20がパ
ルスを発生し、割り込み回路22からの割り込み信号が
“L”レベルから“H”レベルになると、割り込みが行
われ、被検出回路10の状態を読み取る。従って、割り
込み回路22からの割り込み信号が“H”レベルにある
ときに、状態変化検出器20がパルスを発生しても、割
り込みが行われることがなく、被検出回路10の状態が
読み取られない。
In the second method, when the state change detector 20 generates a pulse and the interrupt signal from the interrupt circuit 22 changes from the "L" level to the "H" level, an interrupt is generated and the detected circuit 10 is detected. Read the status. Therefore, even if the state change detector 20 generates a pulse when the interrupt signal from the interrupt circuit 22 is at the "H" level, no interrupt occurs and the state of the detected circuit 10 cannot be read. .

【0018】割り込み回路22からの割り込み信号が
“H”レベルにある時間は、変化検出器20がパルスC
Pを発生させてからアドレスデコーダ16がリセット信
号RPを発生するまでの時間である。この時間は次のよ
うな理由のため一定しない。
While the interrupt signal from the interrupt circuit 22 is at the "H" level, the change detector 20 outputs the pulse C.
This is the time from the generation of P to the generation of the reset signal RP by the address decoder 16. This time is not constant for the following reasons.

【0019】(1)割り込み等(仕事)には優先順位が
あるから、実際に割り込みが行われるまでに時間がかか
る。 (2)割り込み動作に移行するためのレジスタ退避時間
が必要である。 (3)DRAMのリフレッシュに時間がかかる。
(1) Since interrupts and the like (work) have priorities, it takes time until the interrupt is actually performed. (2) A register save time is required to shift to the interrupt operation. (3) It takes time to refresh the DRAM.

【0020】即ち、割り込み信号INTが“L”レベル
から“H”レベルになっても実際に回路の状態を読み込
むまで時間がかかり、リセット信号RPを発生させるま
での時間が一定しない。従来の第2の例は、被検出回路
10の状態が変化したときのみ、被検出回路10の状態
を読み込むように構成されているため、CPU18のソ
フトウェアのパフォーマンス劣化が起きない利点を有す
るが、上述のように、被検出回路10の状態を正確に読
み取ることができない欠点がある。
That is, even if the interrupt signal INT changes from "L" level to "H" level, it takes time to actually read the state of the circuit, and the time until the reset signal RP is generated is not constant. The second conventional example is configured to read the state of the detected circuit 10 only when the state of the detected circuit 10 changes, and thus has the advantage that the software performance of the CPU 18 does not deteriorate. As described above, there is a drawback that the state of the detected circuit 10 cannot be read accurately.

【0021】本発明は斯かる点に鑑み、被検出回路の状
態が変化したときのみ、被検出回路の状態を読み込むよ
うに構成された状態検出回路において、常に且つ正確に
被検出回路の状態を認識することができるための状態検
出回路を提供することを目的とする。
In view of the above point, the present invention provides a state detection circuit configured to read the state of the detected circuit only when the state of the detected circuit changes. An object is to provide a state detection circuit that can be recognized.

【0022】[0022]

【課題を解決するための手段】本発明によると、状態検
出回路は、被検出回路の状態を読み込むCPUと、上記
被検出回路の出力信号と上記CPUによって認識されて
いる上記被検出回路の状態とを比較する状態比較器とを
有し、該状態比較器は上記CPUが認識している上記被
検出回路の状態と上記被検出回路の出力信号が異なる場
合には割り込みをかけて上記CPUによって上記被検出
回路の状態を読み込むように構成されている。
According to the present invention, a state detection circuit includes a CPU for reading the state of a detected circuit, an output signal of the detected circuit and a state of the detected circuit recognized by the CPU. And a state comparator that compares the state of the circuit to be detected by the CPU with an output signal of the circuit to be detected which is different from the state of the circuit to be detected recognized by the CPU. It is configured to read the state of the circuit to be detected.

【0023】本発明によると、状態検出回路において、
被検出回路の状態はアドレスデコーダを経由して上記C
PUによって読み込まれる。上記状態比較器は上記被検
出回路の出力信号と上記CPUが認識している上記被検
出回路の状態を比較するエクスクルーシブ・オア回路で
ある。上記状態比較器は上記被検出回路の出力信号と上
記被検出回路の状態を指示する信号をラッチしているラ
ッチ回路の出力信号とを比較する。上記ラッチ回路は上
記CPUが認識している上記被検出回路の状態をD端子
より入力するD型フリップフロップ回路である。
According to the present invention, in the state detection circuit,
The state of the detected circuit is passed through the address decoder to the above C
Read by PU. The state comparator is an exclusive OR circuit that compares the output signal of the detected circuit with the state of the detected circuit recognized by the CPU. The state comparator compares the output signal of the detected circuit with the output signal of a latch circuit that latches a signal indicating the state of the detected circuit. The latch circuit is a D-type flip-flop circuit which inputs the state of the detected circuit recognized by the CPU from a D terminal.

【0024】[0024]

【発明の実施の形態】図1を参照して本発明による回路
状態検出装置の例を説明する。本例によると、回路状態
検出装置は、被検出回路10の出力信号を入力するアド
レスデコーダ16とCPU18と状態比較器24とラッ
チ回路26とを含む。本例の装置は、図3に示した従来
の第1の例と比べて、状態比較器24とラッチ回路26
とが付加的に設けられており、図4に示した従来の第2
の例と比べて、状態変化検出器20と割り込み回路22
の代わりに状態比較器24とラッチ回路26とが設けら
れており、それ以外の構成は同様である。
DESCRIPTION OF THE PREFERRED EMBODIMENTS An example of a circuit state detecting device according to the present invention will be described with reference to FIG. According to this example, the circuit state detecting device includes an address decoder 16 for inputting the output signal of the detected circuit 10, a CPU 18, a state comparator 24 and a latch circuit 26. The device of this example has a state comparator 24 and a latch circuit 26 which are different from those of the first example of the related art shown in FIG.
And are additionally provided, and the second conventional type shown in FIG.
Compared with the above example, the state change detector 20 and the interrupt circuit 22
Instead of the above, a state comparator 24 and a latch circuit 26 are provided, and other configurations are the same.

【0025】ラッチ回路26はD形フリップフロップで
あってよく、CPU18が認識している被検出回路10
の状態をラッチする。CK端子よりCPU18が認識し
ている被検出回路10の状態を読み取る命令信号が入力
される。D端子よりアドレスデコーダ16を経由してC
PU18が認識している被検出回路10の状態を指示す
る信号DATAが入力される。Q端子よりラッチ回路2
6にラッチされている被検出回路10の状態を指示する
信号が出力される。
The latch circuit 26 may be a D-type flip-flop, and the detected circuit 10 recognized by the CPU 18 is detected.
Latch the state of. A command signal for reading the state of the detected circuit 10 recognized by the CPU 18 is input from the CK terminal. C from the D terminal via the address decoder 16
A signal DATA indicating the state of the detected circuit 10 recognized by the PU 18 is input. Latch circuit 2 from the Q terminal
A signal indicating the state of the detected circuit 10 latched by 6 is output.

【0026】状態比較器24はエクスクルーシブORで
あり、被検出回路10の出力信号とラッチ回路26の出
力信号を比較する。両者が異なる場合にCPU18に割
り込み命令信号INTを供給する。従って、CPU18
が認識している被検出回路10が実際の被検出回路10
の状態と異なる場合には必ず割り込みがかけられ、被検
出回路10の状態が読み込まれる。回路状態の読み取り
は、アドレスデコーダ16の入力部16AをCPU18
が読み取ることによって行われる。
The state comparator 24 is an exclusive OR, and compares the output signal of the detected circuit 10 with the output signal of the latch circuit 26. When the two are different, the CPU 18 is supplied with the interrupt command signal INT. Therefore, the CPU 18
The detected circuit 10 recognized by the
When the state is different from the state of 1, the state of the detected circuit 10 is read in without fail. To read the circuit state, the input unit 16A of the address decoder 16 is set to the CPU 18
Is done by reading.

【0027】図2を参照して説明する。図2Aは被検出
回路10の出力信号SW、図2BはCPU18が認識し
ている被検出回路10の状態を示す信号SW’である。
例えば、時点T1 にて被検出回路10の状態が変化し、
信号SWがLレベルからHレベルに変化すると割り込み
がかけられ被検出回路10の状態が読み込まれ、読み込
みが終了した時点T2 ではCPU18が認識している被
検出回路10の状態を示す信号SW’もHレベルとな
る。
Description will be made with reference to FIG. 2A shows an output signal SW of the detected circuit 10, and FIG. 2B shows a signal SW ′ indicating the state of the detected circuit 10 recognized by the CPU 18.
For example, the state of the detected circuit 10 changes at time T 1 ,
When the signal SW changes from the L level to the H level, an interrupt is issued, the state of the detected circuit 10 is read, and at the time T 2 when the reading is completed, the signal SW ′ indicating the state of the detected circuit 10 recognized by the CPU 18 is read. Also becomes H level.

【0028】同様に、時点T3 、T5 、T7 、T9
も、信号SWが変化し、時点T4 、T 6 、T8 、T10
CPU18が認識している被検出回路10の状態を示す
信号SW’が変化する。信号SWが変化した時点T1
3 、T5 、T7 、T9 から信号SW’が変化した時点
2 、T4 、T6 、T8 、T10までの時間は図5を参照
して説明したように割り込みがかけられてから実際に読
み取りが終了するまでの時間である。割り込み及び読み
込みの終了時点T2 、T4 、T6 、T8 、T10では、2
つの信号SW及びSW’は必ず一致している。
Similarly, at time TThree , TFive , T7 , T9 so
Also, the signal SW changes andFour, T 6, T8, TTenso
Shows the state of the detected circuit 10 recognized by the CPU 18.
The signal SW 'changes. Time T when signal SW changes1,
TThree , TFive , T7 , T9 When the signal SW 'changes from
TTwo, TFour, T6, T8, TTenRefer to Fig. 5 for time to
As explained, the actual reading is performed after the interrupt is applied.
It is the time until the collection is completed. Interrupt and read
End time TTwo, TFour, T6, T8, TTenThen 2
The two signals SW and SW 'always match.

【0029】例えば時点T1 から時点T2 までの間に、
被検出回路10の状態が変化した場合には、その時点に
て状態比較器24の2つの入力信号SW及びSW’は一
致する。従って割り込み及び読み込みは行われず、CP
U18が認識している被検出回路10の状態は変化しな
い。
For example, from time T 1 to time T 2 ,
When the state of the circuit to be detected 10 changes, the two input signals SW and SW ′ of the state comparator 24 at that time match. Therefore, interruption and reading are not performed, and CP
The state of the detected circuit 10 recognized by U18 does not change.

【0030】本例によると、被検出回路10の状態とC
PU18が認識している被検出回路10の状態が異なる
場合には必ず割り込みがかけられ、被検出回路10の状
態が読み取られるから、実際の被検出回路10の状態と
CPU18が認識している被検出回路10の状態は常に
一致している。
According to this example, the state of the detected circuit 10 and C
When the state of the detected circuit 10 recognized by the PU 18 is different, an interrupt is always issued and the state of the detected circuit 10 is read, so that the CPU 18 recognizes the actual state of the detected circuit 10. The states of the detection circuit 10 always match.

【0031】例えば、CPU18の起動時T0 の初期設
定にて、CPU18が被検出回路10の状態として適当
な値を保持していても、ラッチ回路26に出力され、状
態比較器24によって被検出回路10の出力信号SWと
ラッチ回路26の出力信号SW’が比較される。両者が
異なれば、割り込みがかけられ被検出回路10の状態が
読み取られ、両者が同一となると、ラッチ回路26はそ
の信号を保持する。
For example, even if the CPU 18 holds an appropriate value as the state of the detected circuit 10 at the initial setting of T 0 when the CPU 18 is started, it is output to the latch circuit 26 and detected by the state comparator 24. The output signal SW of the circuit 10 and the output signal SW ′ of the latch circuit 26 are compared. If the two are different, an interrupt is issued and the state of the detected circuit 10 is read, and if the two are the same, the latch circuit 26 holds the signal.

【0032】以上本発明の実施の形態について詳細に説
明したが、本発明はこれらの例に限定されることなく特
許請求の範囲に記載された発明の範囲にて様々な変更等
が可能であることは当業者にとって理解されよう。
Although the embodiments of the present invention have been described in detail above, the present invention is not limited to these examples, and various modifications can be made within the scope of the invention described in the claims. It will be understood by those skilled in the art.

【0033】上述の例では被検出回路10としてスイッ
チ装置13を含む回路が説明されているが、これは単な
る例であって、本発明に適用される被検出回路は複数の
状態に変化しそれを指示する信号を出力するものであれ
ばどのような構成の回路であってもよい。
In the above example, a circuit including the switch device 13 is described as the detected circuit 10, but this is merely an example, and the detected circuit applied to the present invention changes into a plurality of states. Any circuit may be used as long as it outputs a signal for instructing.

【0034】[0034]

【発明の効果】本発明によると、ハードウェア構成が簡
単であり、回路状態の読み取りが確実に行える。また割
り込み方式なのでCPUのパフォーマンス劣化がない利
点を有する。
According to the present invention, the hardware configuration is simple and the circuit state can be read reliably. Further, since it is an interrupt method, it has an advantage that the performance of the CPU does not deteriorate.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明による検出回路の例を示す図である。FIG. 1 is a diagram showing an example of a detection circuit according to the present invention.

【図2】本発明による検出回路のタイムチャートを示す
図である。
FIG. 2 is a diagram showing a time chart of a detection circuit according to the present invention.

【図3】従来の検出回路の第1の例を示す図である。FIG. 3 is a diagram showing a first example of a conventional detection circuit.

【図4】従来の検出回路の第2の例を示す図である。FIG. 4 is a diagram showing a second example of a conventional detection circuit.

【図5】従来の検出回路の第2の例のタイムチャートを
示す図である。
FIG. 5 is a diagram showing a time chart of a second example of the conventional detection circuit.

【符号の説明】[Explanation of symbols]

10 被検出回路、11 電源端子、12 抵抗器、1
3 スイッチ装置、16アドレスデコーダ、18 CP
U、20 状態変化検出器、22 割り込み回路、24
状態比較器、26 ラッチ回路
10 detected circuit, 11 power supply terminal, 12 resistor, 1
3 switch device, 16 address decoder, 18 CP
U, 20 state change detector, 22 interrupt circuit, 24
State comparator, 26 latch circuit

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 被検出回路の状態を読み込むCPUと、
上記被検出回路の出力信号と上記CPUによって認識さ
れている上記被検出回路の状態とを比較する状態比較器
とを有し、該状態比較器は上記CPUが認識している上
記被検出回路の状態と上記被検出回路の出力信号が異な
る場合には割り込みをかけて上記CPUによって上記被
検出回路の状態を読み込むように構成されている状態検
出回路。
1. A CPU for reading the state of a detected circuit,
A state comparator for comparing the output signal of the circuit to be detected with the state of the circuit to be detected recognized by the CPU, wherein the state comparator compares the state of the circuit to be detected recognized by the CPU. A state detection circuit configured to read the state of the detected circuit by the CPU by interrupting when the state and the output signal of the detected circuit are different.
【請求項2】 請求項1記載の状態検出回路において、
上記被検出回路の状態はアドレスデコーダを経由して上
記CPUによって読み込まれるように構成されているこ
とを特徴とする状態検出回路。
2. The state detection circuit according to claim 1, wherein
The state detection circuit is characterized in that the state of the detected circuit is read by the CPU via an address decoder.
【請求項3】 請求項1又は2記載の状態検出回路にお
いて、上記状態比較器は上記被検出回路の出力信号と上
記CPUが認識している上記被検出回路の状態を比較す
るエクスクルーシブ・オア回路であることを特徴とする
状態検出回路。
3. The exclusive OR circuit according to claim 1, wherein the state comparator compares the output signal of the detected circuit with the state of the detected circuit recognized by the CPU. A state detection circuit characterized by:
【請求項4】 請求項1、2又は3記載の状態検出回路
において、上記状態比較器は上記被検出回路の出力信号
と上記被検出回路の状態を指示する信号をラッチしてい
るラッチ回路の出力信号とを比較するように構成されて
いることを特徴とする状態検出回路。
4. The state detection circuit according to claim 1, wherein the state comparator is a latch circuit that latches an output signal of the detected circuit and a signal indicating the state of the detected circuit. A state detection circuit configured to compare with an output signal.
【請求項5】 請求項4記載の状態検出回路において、
上記ラッチ回路は上記CPUが認識している上記被検出
回路の状態をD端子より入力するD型フリップフロップ
回路であることを特徴とする状態検出回路。
5. The state detection circuit according to claim 4,
A state detection circuit, wherein the latch circuit is a D-type flip-flop circuit for inputting a state of the detected circuit recognized by the CPU from a D terminal.
JP10034596A 1996-04-22 1996-04-22 State detection circuit Pending JPH09288584A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10034596A JPH09288584A (en) 1996-04-22 1996-04-22 State detection circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10034596A JPH09288584A (en) 1996-04-22 1996-04-22 State detection circuit

Publications (1)

Publication Number Publication Date
JPH09288584A true JPH09288584A (en) 1997-11-04

Family

ID=14271534

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10034596A Pending JPH09288584A (en) 1996-04-22 1996-04-22 State detection circuit

Country Status (1)

Country Link
JP (1) JPH09288584A (en)

Similar Documents

Publication Publication Date Title
US5271015A (en) Self-diagnostic system for semiconductor memory
JPH09288584A (en) State detection circuit
US6202185B1 (en) Methods and apparatus for facilitating scan testing of circuitry
JP2737645B2 (en) Program debug device
JPS619735A (en) Resetting system of cpu
JPH0990522A (en) Lamp light quantity controller
KR100978713B1 (en) Cause distinguish apparatus and method of system reset
JP2000180210A (en) Encoder pulse generating device
JP2979918B2 (en) Interrupt detection circuit
JPH06175888A (en) Abnormal access detection circuit
KR100207481B1 (en) Detecting time adjustment equipment to detect data during desire period
JP2734382B2 (en) In-circuit emulator and debugging method thereof
JPH07152460A (en) Voltage detection reset circuit
JPH03139738A (en) Information processor
JPS63198110A (en) System for controlling working speed of electronic equipment
JPH0823792B2 (en) Power control device
JP2000347950A (en) Serial interface
JPH0744399A (en) Interruption control circuit
JPH10288648A (en) Logic circuit test method and device
JPH0776934B2 (en) Microcomputer-based abnormality detection device
JPH0612291A (en) Controller for information processor
JPH02143351A (en) Parity inspection circuit
JPH04133141A (en) Memory control method
JPH02236709A (en) Timing signal generating device and method and device for detecting its error
JPH0555882A (en) Trigger signal judging circuit