JPH06149592A - Interruption processing system for microcomputer - Google Patents

Interruption processing system for microcomputer

Info

Publication number
JPH06149592A
JPH06149592A JP29490092A JP29490092A JPH06149592A JP H06149592 A JPH06149592 A JP H06149592A JP 29490092 A JP29490092 A JP 29490092A JP 29490092 A JP29490092 A JP 29490092A JP H06149592 A JPH06149592 A JP H06149592A
Authority
JP
Japan
Prior art keywords
interrupt
wait
interruption processing
time
interruption
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
JP29490092A
Other languages
Japanese (ja)
Inventor
Mitsuru Yoshida
満 吉田
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.)
Sharp Corp
Original Assignee
Sharp 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 Sharp Corp filed Critical Sharp Corp
Priority to JP29490092A priority Critical patent/JPH06149592A/en
Publication of JPH06149592A publication Critical patent/JPH06149592A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To efficiently prepare a program by reserving the wait time determined by a timer till next interruption processing execution after the end of interruption processing and executing a main program in the wait period of time. CONSTITUTION:When all conditions of an interruption request flag 1, an interruption permission flag 2, and a wait timer end flag 3 are satisfied, an interruption processing circuit 5 is operated to reset a wait timer 4 and the wait timer end flag 3. Thereafter even through an interruption factor occurs to set the interrupt request flag 1 the interruption processing is not executed untill such time as the wait timer end flag 3 is set. When one interruption processing is terminated, the wait timer starts operation, and the next interruption processing is started after overflow. Consequently, the interrupt wait time is provided, and the main program is executed during the period of time.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、制御用に用いられるマ
イクロコンピュータの割り込み処理方式において、1つ
の割り込み処理の終了から次の割り込み処理の実行まで
にタイマーで決められたウェイト時間を持たせることが
でき、その間にメインルーチンの処理を行う手段を持つ
割り込み処理方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention, in an interrupt processing system of a microcomputer used for control, has a wait time determined by a timer from the end of one interrupt processing to the execution of the next interrupt processing. The present invention relates to an interrupt processing method having means for performing main routine processing during that time.

【0002】[0002]

【従来の技術】従来、割り込み機能を有するマイクロコ
ンピュータで割り込み要因が発生した時に、割り込み処
理を許可したり禁止することは、ソフトウェアでフラグ
を制御することにより行われていた。
2. Description of the Related Art Conventionally, when an interrupt factor occurs in a microcomputer having an interrupt function, enabling or disabling interrupt processing has been performed by controlling a flag by software.

【0003】その場合、割り込み許可状態において頻繁
に割り込み要因が発生した場合は、割り込み処理が連続
的に行われ、メイン処理がほとんど実行出来なくなるこ
とがある。その為、割り込みの実行時間を短縮したり、
例えば割り込み要因を任意に選択することにより割り込
み要因の数を減らして他の要因をメインプログラムで処
理する方式(特開昭60−37038)等といったソフ
ト、ハード両面からの工夫がなされてきた。
In this case, if an interrupt factor frequently occurs in the interrupt enabled state, the interrupt process may be continuously performed, and the main process may hardly be executed. Therefore, shorten the execution time of interrupts,
For example, a method of reducing the number of interrupt factors by arbitrarily selecting the interrupt factors and processing other factors by the main program (Japanese Patent Laid-Open No. Sho 60-37038) has been devised from the viewpoint of both software and hardware.

【0004】[0004]

【発明が解決しようとする課題】本発明は、従来の割り
込み機能の利点を生かしながら、頻繁に割り込みが発生
する場合にも、その実行開始を遅らせることによって、
その間にメイン処理も実行させようとするものであり、
割り込み処理を含むプログラムの開発を容易化しようと
するものである。
SUMMARY OF THE INVENTION The present invention takes advantage of the conventional interrupt function and delays the start of execution even when interrupts occur frequently.
In the meantime, it also tries to execute the main process,
It is intended to facilitate the development of programs including interrupt processing.

【0005】[0005]

【課題を解決するための手段】本発明は上記の課題に鑑
みてなされたものであり、割り込み処理を終了した時か
らタイマーを動作させ、そのタイマーによって設定され
たウェイト時間内は次の割り込み要因が発生しても割り
込み処理の実行を待機させることにより課題を解決す
る。
SUMMARY OF THE INVENTION The present invention has been made in view of the above problems. A timer is operated from the time interrupt processing is completed, and the next interrupt factor is set within the wait time set by the timer. Even if occurs, the problem is solved by making the execution of interrupt processing wait.

【0006】[0006]

【作用】本発明によれば、割り込み処理が終了した後、
次の割り込み処理の実行までにタイマーで決められたウ
ェイト時間が確保され、その時間内はメインプログラム
が実行されるので効率的なプログラム作成が可能とな
る。
According to the present invention, after the interrupt processing is completed,
The wait time determined by the timer is secured until the next interrupt process is executed, and the main program is executed within that time, so that efficient program creation is possible.

【0007】[0007]

【実施例】以下、本発明の実施例を図面に基づいて説明
する。
Embodiments of the present invention will be described below with reference to the drawings.

【0008】図1は本発明によるマイクロコンピュータ
の割り込み制御部の例を示すブロック図である。1は割
り込み要求フラグで、割り込み要因が発生した時にセッ
トされる。2は割り込み許可フラグで、その割り込みを
許可するか否かをプログラムで設定するものである。本
図面では簡単のため1組のフラグを示しているが、通常
マイクロコンピュータには数種類の割り込み機能があ
り、それに応じて数組のフラグが存在している。ただ
し、本発明はその組み数には依存しない。3はウェイト
タイマーの終了フラグであり、ウェイトタイマー4がカ
ウントアップしてオーバーフローした時にセットされ
る。
FIG. 1 is a block diagram showing an example of an interrupt control unit of a microcomputer according to the present invention. An interrupt request flag 1 is set when an interrupt factor occurs. Reference numeral 2 denotes an interrupt permission flag, which is set by a program as to whether or not the interrupt is permitted. Although one set of flags is shown in the drawing for simplification, a microcomputer normally has several kinds of interrupt functions, and accordingly several sets of flags exist. However, the present invention does not depend on the number of sets. Reference numeral 3 denotes a wait timer end flag, which is set when the wait timer 4 counts up and overflows.

【0009】割り込み要求フラグ1、割り込み許可フラ
グ2、ウェイトタイマー終了フラグ3のすべての条件が
満足された時に、割り込み処理回路5が働き、割り込み
処理は実行される。次に割り込み処理が終了した時に、
タイマーリセット回路6が働き、ウェイトタイマー4と
ウェイトタイマー終了フラグ3をリセットする。
When all the conditions of the interrupt request flag 1, the interrupt enable flag 2 and the wait timer end flag 3 are satisfied, the interrupt processing circuit 5 operates and the interrupt processing is executed. The next time interrupt processing is completed,
The timer reset circuit 6 operates to reset the wait timer 4 and the wait timer end flag 3.

【0010】その後、再び割り込み要因が発生して割り
込み要求フラグ1がセットされても、ウェイトタイマー
終了フラグ3がセットされるまでは、その割り込み処理
は実行されない。
After that, even if an interrupt factor occurs again and the interrupt request flag 1 is set, the interrupt process is not executed until the wait timer end flag 3 is set.

【0011】以上により、図2の(2)に示すように、
1つの割り込み処理が終了した場合には、ウェイトタイ
マーが動作を開始し、オーバーフロー後に次の割り込み
処理が開始される。従って、割り込み処理と次の割り込
み処理の間には少なくともウェイトタイマーで決められ
た割り込み待機時間が設けられ、その間にメインプログ
ラムを実行することが可能となる。なお、図2の(1)
は従来の割り込みタイミングである。
From the above, as shown in (2) of FIG.
When one interrupt process is completed, the wait timer starts to operate, and after the overflow, the next interrupt process is started. Therefore, at least an interrupt waiting time determined by the wait timer is provided between the interrupt processing and the next interrupt processing, and the main program can be executed during that time. In addition, (1) of FIG.
Is the conventional interrupt timing.

【0012】[0012]

【発明の効果】以上説明したように、本発明によれば、
割り込み処理が終了した後、次の割り込み処理の実行ま
でに、タイマーで決められたウェイト時間が確保され、
その時間内はメインプログラムが実行されるので、効率
的なプログラム作成が可能となり、特に、頻繁に割り込
み要因が発生するシステムを処理する場合に、ソフトウ
ェア設計の行い易いマイクロコンピュータを提供するこ
とが可能となる。
As described above, according to the present invention,
After the interrupt processing is completed, the wait time determined by the timer is secured until the next interrupt processing is executed.
Since the main program is executed during that time, it is possible to create an efficient program, and it is possible to provide a microcomputer that facilitates software design, especially when processing a system in which interrupt factors frequently occur. Becomes

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

【図1】本発明のブロック図である。FIG. 1 is a block diagram of the present invention.

【図2】従来の割り込みタイミングと本発明の割り込み
のタイミングとの比較を示す図である。
FIG. 2 is a diagram showing a comparison between the conventional interrupt timing and the interrupt timing of the present invention.

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

1 割り込み要求フラグ 2 割り込み許可フラグ 3 ウェイトタイマ終了フラグ 4 ウェイトタイマ 5 割り込み処理回路 6 タイマーリセット回路 1 interrupt request flag 2 interrupt enable flag 3 wait timer end flag 4 wait timer 5 interrupt processing circuit 6 timer reset circuit

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 マイクロコンピュータで割り込み処理を
終了した時、タイマーを動作させ、そのタイマーによっ
て設定されたウェイト時間内は次の割り込み要因が発生
しても割り込み処理の実行を待機させることを特徴とす
る、マイクロコンピュータの割り込み処理方式。
1. A microcomputer is characterized in that when interrupt processing is completed, a timer is operated, and during the wait time set by the timer, execution of interrupt processing is made to wait even if the next interrupt factor occurs. The interrupt processing method of the microcomputer.
JP29490092A 1992-11-04 1992-11-04 Interruption processing system for microcomputer Pending JPH06149592A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP29490092A JPH06149592A (en) 1992-11-04 1992-11-04 Interruption processing system for microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP29490092A JPH06149592A (en) 1992-11-04 1992-11-04 Interruption processing system for microcomputer

Publications (1)

Publication Number Publication Date
JPH06149592A true JPH06149592A (en) 1994-05-27

Family

ID=17813709

Family Applications (1)

Application Number Title Priority Date Filing Date
JP29490092A Pending JPH06149592A (en) 1992-11-04 1992-11-04 Interruption processing system for microcomputer

Country Status (1)

Country Link
JP (1) JPH06149592A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007074320A (en) * 2005-09-07 2007-03-22 Matsushita Electric Ind Co Ltd Network equipment apparatus

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007074320A (en) * 2005-09-07 2007-03-22 Matsushita Electric Ind Co Ltd Network equipment apparatus

Similar Documents

Publication Publication Date Title
JPH0454255B2 (en)
JP2009282987A (en) Method of interrupt scheduling
JPH06149592A (en) Interruption processing system for microcomputer
JP2001092676A (en) Task management system in integrated program
JPH05113887A (en) Computer system
JPH0877039A (en) Test method
JPH0683637A (en) Interruption processing system for microcomputer
JPS6336023B2 (en)
JPH0683652A (en) Microcomputer system
JPH04302353A (en) Timer interrupting system for symmetrical multi processor computer
JPS5960645A (en) System for processing instruction execution of processor
JPS5916054A (en) Microprocessor
JPH03164940A (en) Computer having plural interruption periods
JPH05204665A (en) Method for automatically starting succeeding job
JPH0462093B2 (en)
JPH0612394A (en) Process schedule system
JPS6214235A (en) Information processor
JPH07262022A (en) Interruption processing system
JP2000155694A (en) Task manager
JPH03121541A (en) Task control system for operating system
JPS6063662A (en) Multiprocessor system
JPH04184633A (en) Re-execution processing mechanism
JPH02211545A (en) Job execution control system
JPH07210490A (en) Input/output control system
JPH06110708A (en) Job temporary interruption system