JPH0465724A - interrupt processing device - Google Patents
interrupt processing deviceInfo
- Publication number
- JPH0465724A JPH0465724A JP2179159A JP17915990A JPH0465724A JP H0465724 A JPH0465724 A JP H0465724A JP 2179159 A JP2179159 A JP 2179159A JP 17915990 A JP17915990 A JP 17915990A JP H0465724 A JPH0465724 A JP H0465724A
- Authority
- JP
- Japan
- Prior art keywords
- interrupt
- timer interrupt
- program
- processing
- timer
- 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
Links
Abstract
(57)【要約】本公報は電子出願前の出願データであるた
め要約のデータは記録されません。(57) [Summary] This bulletin contains application data before electronic filing, so abstract data is not recorded.
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明は、プログラムの割込処理装置に関し、特にタイ
マ割込プログラムに対応したタイマ割込信号の割込周期
を、プログラムの内容に応じて選択する割込処理装置に
関する。[Detailed Description of the Invention] [Field of Industrial Application] The present invention relates to a program interrupt processing device, and in particular, the present invention relates to a program interrupt processing device, and more particularly, to a program interrupt processing device that adjusts the interrupt period of a timer interrupt signal corresponding to a timer interrupt program according to the content of the program. Concerning the selected interrupt processing device.
〔従来の技術]
現在、CPUにおける処理速度は高速になっているため
、周辺のIloに対する続出処理、書込処理は一般のメ
モリ等に比べて大変遅くなってしまっているものも少な
くない。[Prior Art] Currently, the processing speed of CPUs has become faster, so in many cases, the successive processing and writing processing for peripheral Ilo are much slower than for general memories.
このように遅いものに対する読出処理、書込処理では、
各々続出処理サイクル或いは書込処理サイクルを待ち(
WAIT)状態に設定して情報の確定まで上記サイクル
を延ばしているが、通常のサイクルと比較して、あまり
に遅いものは、それが複数個存在する場合にあっては、
CPUに遊び時間が多くなってしまい非効率的となる。In read processing and write processing for such slow things,
Each waits for successive processing cycles or write processing cycles (
WAIT) state and the above cycle is extended until the information is confirmed, but if there are multiple cycles that are too slow compared to the normal cycle,
The CPU will have a lot of idle time, resulting in inefficiency.
例えば、タッチパネルのようなマトリクスキーにあって
は、続出処理に100μ近(もかかる(通常の100倍
以上)場合があり、それが複数個(数10〜100程度
)ある。For example, in the case of a matrix key such as a touch panel, it may take nearly 100 microns (more than 100 times the usual time) to perform successive processing, and there are a plurality of keys (several tens to hundreds).
上記の如き状況を解消するためにタイマ割込処理を使用
して、Iloの続出処理、書込処理を実行することが考
えられる。タイマ割込処理により読み出したデータはア
クセス時間の早いRAMにテーブルを設けて書き込んで
おく。通常のプログラムでは、RAMテーブルをキーボ
ードだと思って続出処理を実行し、また、タイマ割込処
理のタイマ割込周期はキーの続出サイクルよりも充分に
長くとる。In order to solve the above-mentioned situation, it is conceivable to use timer interrupt processing to execute Ilo successive processing and writing processing. The data read by the timer interrupt processing is written in a table in a RAM that has a quick access time. In a normal program, the RAM table is considered to be a keyboard and successive processing is executed, and the timer interrupt cycle of the timer interrupt processing is set to be sufficiently longer than the key successive cycle.
しかしながら、上記の如きタイマ割込処理を実行すると
、キーの反応を良くするために、さほどキー人力を必要
としないときにあっても、キーを取り込むため、その部
分において■タイマ割込の開始処理、■キー取込処理、
■タイマ割込終了処理を実行しなければならず、キーの
読み込み不要箇所の存在によってCPUの負担が増加し
、全体的な処理速度が低下するという問題点がある。However, when executing the timer interrupt processing as described above, in order to improve the response of the keys, the key is captured even when no human effort is required. , ■Key import processing,
(2) It is necessary to execute timer interrupt termination processing, and the existence of locations where key reading is unnecessary increases the load on the CPU, resulting in a problem that the overall processing speed decreases.
本発明は上記に鑑みてなされたもので、キーの読み込み
不要箇所の存在によるCPUの負担を軽減し、全体的な
処理速度を上昇させることを目的とする。The present invention has been made in view of the above, and aims to reduce the burden on the CPU due to the existence of locations where key reading is not necessary, and to increase the overall processing speed.
本発明は上記目的を達成するために、割込時におけるプ
ログラムのアドレスが書き込まれている割込ベクタテー
ブルと、該割込ベクタテーブルのアドレスに対応する、
複数のブロックに分割されたタイマ割込プログラムを格
納する記憶手段と、該記憶手段に格納されているタイマ
割込プログラム毎に、その内容に応じた割込周期のタイ
マ割込信号を選択的に出力するタイマ割込信号出力手段
とを備えた割込処理装置を提供するものである。In order to achieve the above object, the present invention provides an interrupt vector table in which a program address at the time of an interrupt is written, and an interrupt vector table corresponding to the address of the interrupt vector table.
A storage means for storing a timer interrupt program divided into a plurality of blocks, and a timer interrupt signal having an interrupt period corresponding to the content of each timer interrupt program stored in the storage means is selectively generated. The present invention provides an interrupt processing device including a timer interrupt signal output means for outputting a timer interrupt signal.
本発明による割込処理装置は、CPUの割込へフタテー
ブルに書き込まれているプログラムのアドレスに対応す
るタイマ割込プログラムをタイマ割込処理の必要性や必
要な内容によって複数のブロックに分割して、メモリに
格納する。The interrupt processing device according to the present invention divides the timer interrupt program corresponding to the address of the program written in the CPU interrupt cover table into a plurality of blocks depending on the necessity of timer interrupt processing and necessary contents. and store it in memory.
上記メモリに格納されたタイマ割込プログラムに対応し
た割込周期を選択して割込コントローラに対し、上記選
択されたタイマ割込信号を出力することによりタイマ割
込処理を実行する。A timer interrupt process is executed by selecting an interrupt period corresponding to the timer interrupt program stored in the memory and outputting the selected timer interrupt signal to the interrupt controller.
以下、本発明の一実施例について図面を用いて詳細に説
明する。Hereinafter, one embodiment of the present invention will be described in detail using the drawings.
第1図は本発明による割込処理装置の概略構成を示すブ
ロック図であり、割込処理のとき使用するプログラムに
対応する複数のアドレス(No、1〜Nchn)が書き
込まれているCPU内の割込ベクタテーブル101と、
該割込ベクタテーブル101におけるアドレスに対応し
て複数の割込プログラムを、タイマ割込処理の必要性や
必要な内容に応じてブロックに分けて格納しているメモ
リ102と、データバス104を介してタイマ割込信号
出力部103とを備えている。FIG. 1 is a block diagram showing a schematic configuration of an interrupt processing device according to the present invention. an interrupt vector table 101;
A plurality of interrupt programs corresponding to the addresses in the interrupt vector table 101 are stored via a memory 102 and a data bus 104, which are divided into blocks according to the necessity of timer interrupt processing and necessary contents. and a timer interrupt signal output section 103.
タイマ割込信号出力部103は、入力された内容に応じ
てセレクト信号を出力するラッチ回路105と、水晶振
動器(図示せず)から出力されたクロック信号を分周し
て何通りからの割込クロックを生成する分周器106及
びカウンタ107と、分周器106からの出力及びカウ
ンタ107からの複数の出力を上記ラッチ回路105か
らのセレクト信号により選択的にタイマ割込信号として
割込コントローラ(図示せず)に対し出力するセレクタ
108とから構成されている。The timer interrupt signal output unit 103 includes a latch circuit 105 that outputs a select signal according to input contents, and a clock signal output from a crystal oscillator (not shown), which is frequency-divided and divided into several ways. A frequency divider 106 and a counter 107 that generate an integrated clock, and an interrupt controller that selectively outputs the output from the frequency divider 106 and the plurality of outputs from the counter 107 as a timer interrupt signal using a select signal from the latch circuit 105. (not shown).
第2図Aに示すように第1図に示したメモリ102内の
プログラムはタイマ割込処理の必要性や必要な内容に応
じて幾つかのブロックに分けておき、第2図Bに示すフ
ローチャートを実行する。As shown in FIG. 2A, the program in the memory 102 shown in FIG. 1 is divided into several blocks depending on the necessity and necessary contents of timer interrupt processing. Execute.
メインルーチンにおけるブロックAにおいて、該ブロッ
クAの先頭で必要に応じて割込へフタテーブル(ステッ
プ201)と割込信号(202)の2つを選択し設定す
る。その後、通常のルーチンを実行した(ステップ20
3)後、例えば全体を通して最も多く使用する組み合わ
せをデホオルト(default)として設定しておき
、上記割込ベクタテーブル101をデホオルトに戻しく
ステップ204)、また、上記割込信号をデホオルトに
戻して(ステップ205)一連の動作を終了する。In block A in the main routine, two of the lid table (step 201) and interrupt signal (202) are selected and set for interrupts as necessary at the beginning of block A. The normal routine was then executed (step 20
After 3), for example, the combination that is used most often throughout is set as the default (step 204), and the interrupt vector table 101 is returned to the default (step 204), and the interrupt signal is returned to the default ( Step 205) End the series of operations.
第3図は、メモリ102 (RAM)の構成を示す説明
図であり、第3図Aの如(メモリ102は割込ベクタテ
ーブル群とタイマ割込プログラムとから成り、更に詳細
に図示すると、第3図Bに示す如く上記割込ベクタテー
ブル群は割込ベクタテ−プルl、割込ベクタテーブル2
・・・割込ベクタテーブルnから成り、タイマ割込プロ
グラムは上記割込ベクタテーブル1に呼び出される割込
プログラム、上記割込ベクタテーブル2に呼び出される
割込プログラム・・・上記割込ベクタテーブルnに呼び
出される割込プログラムから成る。FIG. 3 is an explanatory diagram showing the configuration of the memory 102 (RAM), as shown in FIG. 3A (the memory 102 consists of an interrupt vector table group and a timer interrupt program; As shown in Figure 3B, the above interrupt vector table group includes interrupt vector table l and interrupt vector table 2.
... consists of interrupt vector table n, the timer interrupt program is an interrupt program called by the above interrupt vector table 1, an interrupt program called by the above interrupt vector table 2...the above interrupt vector table n It consists of an interrupt program that is called.
以上の構成においてその動作を説明する。The operation of the above configuration will be explained.
タイマ割込信号出力部103において、水晶振動器から
のクロック信号を分周器106により分周し、更にカウ
ンタ107によりセレクタ108において1/L 1/
2.1/4.1/8.1/16のタイマ割込頻度を持つ
各タイマ割込信号を選択できる状態にしておく。In the timer interrupt signal output section 103, the clock signal from the crystal oscillator is divided by the frequency divider 106, and further by the counter 107 and the selector 108 is divided into 1/L 1/
Each timer interrupt signal having a timer interrupt frequency of 2.1/4.1/8.1/16 is made selectable.
この状態において、あるアドレスを持つラッチ回路10
5に対してどの周期を持つ割込クロックをセレクタ10
8において選択するかを書込む。In this state, the latch circuit 10 with a certain address
Selector 10 selects the interrupt clock with which period for 5.
8. Write your selection.
その結果上記ラッチ回路105の出力(セレクト信号)
はセレクタ108に入力され、上記ラッチ回路105に
書き込まれたタイマ割込信号がセレクタ108から割込
コントローラへ出力される。As a result, the output of the latch circuit 105 (select signal)
is input to the selector 108, and the timer interrupt signal written in the latch circuit 105 is output from the selector 108 to the interrupt controller.
また、−第2図に示したブロックの内容(例えば、キー
人力待ち、データ処理中、画面表示中)に基づいてのみ
ランク分けすることも可能であるが、更に、同じ内容で
あっても、タイマ割込以外の割込量もランク分けのため
の要素として考慮に入れることにより、より効果的な割
込処理を実行することができる。Furthermore, although it is possible to rank only based on the contents of the blocks shown in FIG. By taking into account the amount of interrupts other than timer interrupts as a factor for ranking, more effective interrupt processing can be performed.
この2つの要素により、例えば、以下の表1に示すよう
なランク分けが可能となる。These two elements enable ranking, for example, as shown in Table 1 below.
表1
表1に示すようにランク分けが決定した後、そのランク
に応じてタイマ割込の割込クロックを以下のように選択
する。Table 1 After the ranking is determined as shown in Table 1, the interrupt clock for the timer interrupt is selected according to the rank as follows.
ランク1:通常通り(1/1)、タイマ割込を許可する
。Rank 1: Enable timer interrupts as usual (1/1).
ランク2:タイマ割込処理の頻度を1/2に設定する。Rank 2: Set the frequency of timer interrupt processing to 1/2.
ランク3:タイマ割込処理の頻度を1/4に設定する。Rank 3: Set the frequency of timer interrupt processing to 1/4.
ランク4:キーの取込みを停止して、タイマ割込処理の
頻度を1/4に設定する。Rank 4: Stop key capture and set the frequency of timer interrupt processing to 1/4.
上記の如く構成することにより、第4図Aに示すように
時間的な大きさを見ると、従来のタイマ割込ルーチンと
比較して本発明では、必要な処理の他、不必要な処理及
び判断に要する時間を省略でき、迅速なプログラム処理
が実現できる。With the above configuration, when looking at the time size as shown in FIG. 4A, compared to the conventional timer interrupt routine, the present invention eliminates unnecessary processing and The time required for judgment can be omitted and rapid program processing can be realized.
また、第4図Bに示すように時間的な流れを見ると、上
記のランク1(通常通り(1/1)、タイマ割込を許可
する)と、ランク2(タイマ割込処理の頻度を1/2に
設定する)を比較すると、メインルーチンの処理におい
て、ランク2(2倍周期)の方がランク1よりも時間t
だけ多く処理に時間を割くことができる。Also, looking at the time flow as shown in Figure 4B, rank 1 (normal (1/1), timer interrupts are allowed) and rank 2 (timer interrupt processing frequency is In the main routine processing, rank 2 (double cycle) takes less time t than rank 1.
You can spend more time processing.
尚、上記実施例におけるタイマ割込信号出力部は、分周
器、ラッチ回路、カウンタ、セレクタから構成されてい
るが、これに限定されずプログラマブルインターバルタ
イマ等のLSIを使用することもできる。Although the timer interrupt signal output section in the above embodiment is composed of a frequency divider, a latch circuit, a counter, and a selector, it is not limited thereto, and an LSI such as a programmable interval timer can also be used.
以上説明したように本発明の割込処理装置によれば、割
込時におけるプログラムのアドレスが書き込まれている
割込へフタテーブルと、該割込ベクタテーブルのアドレ
スに対応する、複数のブロックに分割されたタイマ割込
プログラムを格納する記憶手段と、該記憶手段に格納さ
れているタイマ割込プログラム毎に、その内容に応じた
割込周期のタイマ割込信号を選択的に出力するタイマ割
込信号出力手段とを備えたため、キーの読み込み不要箇
所の存在によるCPUの負担を軽減し、全体的な処理速
度を上昇させることができる。As explained above, according to the interrupt processing device of the present invention, the interrupt handler table in which the address of the program at the time of an interrupt is written, and the plurality of blocks corresponding to the addresses of the interrupt vector table. A storage means for storing divided timer interrupt programs, and a timer interrupt for selectively outputting a timer interrupt signal with an interrupt period according to the contents of each timer interrupt program stored in the storage means. Since the present invention is equipped with an input signal output means, it is possible to reduce the burden on the CPU due to the existence of locations where key reading is not necessary, and to increase the overall processing speed.
第1図は本発明による割込処理装置の構成を示す説明図
、第2図Aはプログラムをタイマ割込の必要性や必要な
内容に応じて複数のブロックに分割した状態を示す説明
図、第2図Bはプログラムを複数のブロックに分割した
場合において、その中の1ブロツクの動作を示すフロー
チャート、第3図A、Bは第1図に示したメモリの構成
を示す説明図、第4図Aは従来のタイマ割込ルーチンと
比較した本発明の時間的大きさの効果を示す説明図、第
4図Bは通常周期と2倍周期における時間的な流れに関
する効果を示す説明図である。
符号の説明
101−割込ベクタテーブル
102・−メモリ
103−タイマ割込信号出力部
104−データバス 105−・−ラッチ回路106−
−分周器 10’l−カウンタ1os−−−セレクタFIG. 1 is an explanatory diagram showing the configuration of an interrupt processing device according to the present invention, FIG. 2A is an explanatory diagram showing a state in which a program is divided into a plurality of blocks depending on the necessity of timer interrupts and necessary contents, FIG. 2B is a flowchart showing the operation of one block when the program is divided into multiple blocks, FIGS. 3A and B are explanatory diagrams showing the memory configuration shown in FIG. 1, and FIG. FIG. 4A is an explanatory diagram showing the effect of the time size of the present invention in comparison with a conventional timer interrupt routine, and FIG. 4B is an explanatory diagram showing the effect regarding the temporal flow in a normal cycle and a double cycle. . Explanation of symbols 101 - Interrupt vector table 102 - Memory 103 - Timer interrupt signal output section 104 - Data bus 105 - Latch circuit 106 -
-Frequency divider 10'l-Counter 1os---Selector
Claims (1)
る割込ベクタテーブルと、 前記割込ベクタテーブルのアドレスに対応する、複数の
ブロックに分割されたタイマ割込プログラムを格納する
記憶手段と、 前記記憶手段に格納されているタイマ割込プログラム毎
に、その内容に応じた割込周期のタイマ割込信号を選択
的に出力するタイマ割込信号出力手段とを備えたことを
特徴とする割込処理装置。[Scope of Claims] An interrupt vector table in which the address of a program at the time of an interrupt is written, and a memory that stores a timer interrupt program divided into a plurality of blocks corresponding to the addresses of the interrupt vector table. and timer interrupt signal output means for selectively outputting a timer interrupt signal with an interrupt cycle corresponding to the contents of each timer interrupt program stored in the storage means. Interrupt processing device.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2179159A JPH0465724A (en) | 1990-07-05 | 1990-07-05 | interrupt processing device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2179159A JPH0465724A (en) | 1990-07-05 | 1990-07-05 | interrupt processing device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH0465724A true JPH0465724A (en) | 1992-03-02 |
Family
ID=16060978
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2179159A Pending JPH0465724A (en) | 1990-07-05 | 1990-07-05 | interrupt processing device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH0465724A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2014059747A (en) * | 2012-09-18 | 2014-04-03 | Yokogawa Electric Corp | Fault-tolerant system |
-
1990
- 1990-07-05 JP JP2179159A patent/JPH0465724A/en active Pending
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2014059747A (en) * | 2012-09-18 | 2014-04-03 | Yokogawa Electric Corp | Fault-tolerant system |
| US9454442B2 (en) | 2012-09-18 | 2016-09-27 | Yokogawa Electric Corporation | Fault tolerant system and method for performing fault tolerant |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5608881A (en) | Microcomputer system for accessing hierarchical buses | |
| JPS5960658A (en) | Semiconductor storage device provided with logical function | |
| JPH0465724A (en) | interrupt processing device | |
| JP2595992B2 (en) | Electronic musical instrument | |
| KR940011042B1 (en) | Memory unit using banking program | |
| JP2734312B2 (en) | Memory circuit | |
| JPS5999552A (en) | microcomputer | |
| JPH0333934A (en) | Register saving/recovering system | |
| JPH03257608A (en) | Microcomputer | |
| JPS63237143A (en) | Programmable controller | |
| JPH03188545A (en) | Picture memory controller | |
| JPH054262U (en) | Dynamic memory display device | |
| JPS59114657A (en) | Memory interface circuit of microcomputer | |
| JPS6041144A (en) | Method for expanding memory of microcomputer | |
| JPH01124038A (en) | Microprocessor | |
| JP2000066876A (en) | Data circuit | |
| JPH01304490A (en) | display control device | |
| JPS63249208A (en) | sequence controller | |
| JPS63127486A (en) | Semiconductor memory controller | |
| JPH03156604A (en) | Programmable controller | |
| JPH01205257A (en) | Integrated circuit | |
| JPH0264828A (en) | Address trace circuit | |
| JPH02267655A (en) | Serial data readout circuit | |
| JPH02289009A (en) | Information processor and multi-port memory used for said information processor | |
| JPH0245823A (en) | Printing method |