JPH02176143A - Pulse producing device - Google Patents
Pulse producing deviceInfo
- Publication number
- JPH02176143A JPH02176143A JP33112788A JP33112788A JPH02176143A JP H02176143 A JPH02176143 A JP H02176143A JP 33112788 A JP33112788 A JP 33112788A JP 33112788 A JP33112788 A JP 33112788A JP H02176143 A JPH02176143 A JP H02176143A
- Authority
- JP
- Japan
- Prior art keywords
- processing
- fuel injection
- interrupt
- register
- request
- 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
Links
- 239000007924 injection Substances 0.000 claims abstract description 116
- 238000002347 injection Methods 0.000 claims abstract description 116
- 239000000446 fuel Substances 0.000 claims abstract description 115
- 238000000034 method Methods 0.000 claims abstract description 23
- 230000008569 process Effects 0.000 claims abstract description 21
- 230000002093 peripheral effect Effects 0.000 claims abstract description 16
- 238000010586 diagram Methods 0.000 description 22
- 239000000872 buffer Substances 0.000 description 19
- 230000000694 effects Effects 0.000 description 5
- 230000008859 change Effects 0.000 description 4
- 239000007789 gas Substances 0.000 description 3
- 230000004044 response Effects 0.000 description 3
- 230000033228 biological regulation Effects 0.000 description 2
- 229910052760 oxygen Inorganic materials 0.000 description 2
- 230000001133 acceleration Effects 0.000 description 1
- 230000003213 activating effect Effects 0.000 description 1
- QVGXLLKOCUKJST-UHFFFAOYSA-N atomic oxygen Chemical compound [O] QVGXLLKOCUKJST-UHFFFAOYSA-N 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 239000013256 coordination polymer Substances 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 230000001934 delay Effects 0.000 description 1
- 238000006073 displacement reaction Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 239000001301 oxygen Substances 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 230000000630 rising effect Effects 0.000 description 1
- 239000012899 standard injection Substances 0.000 description 1
Landscapes
- Electrical Control Of Air Or Fuel Supplied To Internal-Combustion Engine (AREA)
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明はパルス発生装置に関し、特に、自動車のエンジ
ン制御における燃料噴射パルスを発生するためのパルス
発生装置に関する。DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a pulse generator, and more particularly to a pulse generator for generating fuel injection pulses for controlling an automobile engine.
昨今、自動車のエンジンmmにマイクロコンピュータが
数多く利用されている。エンジン制御の中で、最も中心
的な制御は燃料噴射制御であり、マイクロコンピュータ
は、吸入空気量やエンジン回転数から基準となる噴射量
を算出し、その基準値に対し、その時々の温度や排気ガ
ス中に含まれる酸素量などの測定値から求められる補正
係数を掛け、最適な燃料噴射量を噴射時間に換算し、出
力ボートを所望の噴射時間だけアクティブにすることで
各気筒に対する燃料噴射を行う。Recently, many microcomputers have been used in automobile engines. The most important control in engine control is fuel injection control, and the microcomputer calculates the standard injection amount from the intake air amount and engine speed, and compares the current temperature and The optimum fuel injection amount is converted into injection time by multiplying it by a correction coefficient obtained from measured values such as the amount of oxygen contained in exhaust gas, and fuel injection is performed for each cylinder by activating the output boat for the desired injection time. I do.
通常、各気筒ごとに回転サイクルの特定の位置、例えば
上死点または吸入開始タイミングを示す信号などを基準
信号とし、それを割込み信号としてマイクロコンピュー
タは受付け1割込み処理プログラムで基準点からの燃料
噴射開始時間の設定をタイマなどのハードウェアを利用
して行う。Normally, a specific position in the rotation cycle for each cylinder, such as a signal indicating top dead center or intake start timing, is used as a reference signal, and using this as an interrupt signal, the microcomputer uses the reception 1 interrupt processing program to inject fuel from the reference point. Use hardware such as a timer to set the start time.
そして、タイマからの割込み信号で起動される割込み処
理プログラムで出力ボートをアクティブレベルにし、そ
の上で燃料噴射終了時間の設定を再度タイマを利用して
行なう0次に、タイマからの割込み信号で起動される割
込み処理プログラムでは、出力ボートをインアクティブ
にし、燃料噴射を終了する。Then, the output port is set to active level by the interrupt processing program that is activated by the interrupt signal from the timer, and then the fuel injection end time is set using the timer again.Next, it is activated by the interrupt signal from the timer. The interrupt processing program executed makes the output boat inactive and ends fuel injection.
第7図(a)および(b)は、4気筒エンジンの場合の
燃料噴射パルス発生パターン(横軸は時間)を示してい
る0図中の4本の出力ボートPo〜P3からは、気筒そ
れぞれに対応した時間帯において燃料噴射パルスが出力
される。パルスの立上りが燃料噴射開始のタイミングを
示し、パルスの立下りが燃料噴射終了のタイミングを示
している。燃料噴射開始のタイミングより前に基準信号
のタイミングがあるが、これは第7図(a)および(b
)には示していない、また、パルスのハイレベル期間は
燃料噴射時間すなわち燃料噴射量を示し、ハイレベル期
間が長いほど燃料噴射量が多くなる。燃料噴射制御にお
けるパルス発生のパターンは、制御方法によって様々な
形態を採るが、本例の場合は、個々の気筒ごとに独立に
制御をする方法で、最もきめの細かい制御が可能である
。Figures 7(a) and (b) show the fuel injection pulse generation pattern (horizontal axis is time) for a four-cylinder engine.From the four output boats Po to P3 in Figure 0, each cylinder is A fuel injection pulse is output in a time period corresponding to . The rising edge of the pulse indicates the timing to start fuel injection, and the falling edge of the pulse indicates the timing to end fuel injection. There is a reference signal timing before the fuel injection start timing, which is shown in Fig. 7(a) and (b).
), and the high-level period of the pulse indicates the fuel injection time, that is, the fuel injection amount, and the longer the high-level period, the greater the fuel injection amount. The pulse generation pattern in fuel injection control takes various forms depending on the control method, but in this example, the most detailed control is possible by controlling each cylinder independently.
第7図(a)は、低速、一定速度走行時における燃料噴
射パルスのパターンで、各気筒に対するパルスの重なり
がない状態であり、第7図(b)は、急加速時における
燃料噴射パルスのパターンで、各気筒に対するパルスの
重なりが発生する状態である。実際のパルスパターンは
、その時々の状態に応じて、これらの二つの例のランダ
ムな組合せとなり、出力ボートからのパルス発生制御は
より複雑となる。Figure 7(a) shows the pattern of fuel injection pulses when traveling at low and constant speeds, with no overlapping pulses for each cylinder, and Figure 7(b) shows the pattern of fuel injection pulses during rapid acceleration. This is a state in which pulses for each cylinder overlap in a pattern. The actual pulse pattern will be a random combination of these two examples depending on the situation at the time, making control of pulse generation from the output port more complicated.
以下、第8図および第9図を参照して、パルス発生装置
の従来例を説明する。Hereinafter, a conventional example of a pulse generator will be described with reference to FIGS. 8 and 9.
第8図は、前記従来例のシステム−ブロック図である0
本従来例は、データバス400およびアドレスバス40
1に対応して、算術論理演算ユニット(以下ALUと記
す>201.テンポラリレジスタ202、高速記憶手段
として作用する汎用レジスタ203、アドレスバッファ
204(IJにおいては、ABとして表現されている)
、マイクロアドレス生成部(以下μアドレス生成部と記
す)205.10グラムカウンタ(以下PCと記す)
206 +プログラムの実行状態を保持する手段(以下
PsWと記す)207、マイクロプログラムROM
(以下μROMと記す)208およびタイミング制f3
11部209を含む中央処理装置(以下CPUと記す)
200と、割込み要求フラグ211を含む割込み要求発
生回路(以下INTCと記す)210と、プログラムメ
モリ212と、データメモリ213と1周辺ハードウェ
ア214と、により構成されている。なお、第8図にお
いては、括弧内に略記されている表示が示されている。FIG. 8 is a system block diagram of the conventional example.
In this conventional example, a data bus 400 and an address bus 40
1, an arithmetic and logic unit (hereinafter referred to as ALU) 201, a temporary register 202, a general-purpose register 203 that acts as a high-speed storage means, and an address buffer 204 (expressed as AB in IJ)
, micro address generation unit (hereinafter referred to as μ address generation unit) 205.10 gram counter (hereinafter referred to as PC)
206 + means for maintaining the program execution state (hereinafter referred to as PsW) 207, microprogram ROM
(hereinafter referred to as μROM) 208 and timing system f3
Central processing unit (hereinafter referred to as CPU) including 11 parts 209
200, an interrupt request generation circuit (hereinafter referred to as INTC) 210 including an interrupt request flag 211, a program memory 212, a data memory 213, and one peripheral hardware 214. Note that in FIG. 8, abbreviations in parentheses are shown.
INTC210は、外部のハードウェアがら幾つかの割
込み信号を受付け、各別込みソースに割当てられた優先
順位を持った割込みソースを一つ選択して、その割込み
ソースに対応した割込み要求フラグ211を設定する9
割込み要求フラグ211は、割込み要求がn個ある時に
はn個設定されているが、第8図においては、1例とし
て、1個だけの割込み要求フラグ211が記載されてい
る。なお。The INTC 210 accepts several interrupt signals from external hardware, selects one interrupt source with the priority assigned to each separate interrupt source, and sets the interrupt request flag 211 corresponding to that interrupt source. do9
When there are n interrupt requests, n interrupt request flags 211 are set, but in FIG. 8, only one interrupt request flag 211 is shown as an example. In addition.
外部のハードウェアからの割込み信号および優先順位判
別部等は図示していない。Interrupt signals from external hardware, a priority order determining section, etc. are not shown.
従来から行なわれている割込み処理は、通常ベクタ割込
みと呼ばれ、メモリ空間中にベクタテーブル空間が予め
設定されて、この空間には、各別込みソースに対応した
割込み処理プログラムのエントリアドレスが格納されて
いる。ベクタ割込みが発生すると、割込みソースに対応
したエントリアドレスへ分岐される。Conventional interrupt processing is usually called vectored interrupt, and a vector table space is set in advance in the memory space, and this space stores the entry address of the interrupt processing program corresponding to each separate interrupt source. has been done. When a vectored interrupt occurs, a branch is made to the entry address corresponding to the interrupt source.
第9図は、従来例における周辺ハードウェア214のブ
ロック図である0周辺ハードウェア214は、データバ
ス400対応して、クロックをベースとしたフリーラン
ニングタイマ215、コンペアレジスタ216.2LL
219,220.および221、キャプチャレジスタ2
17、ボートレジスタ223ならびにバ・1フア224
を含むボート出力回路222、および出力ポートPo〜
P、により構成されている。FIG. 9 is a block diagram of the peripheral hardware 214 in a conventional example. The peripheral hardware 214 corresponds to the data bus 400, and includes a free running timer 215 based on a clock, a compare register 216.2LL, and a clock-based free running timer 215.
219, 220. and 221, capture register 2
17, Boat register 223 and Bar 1 Hua 224
A boat output circuit 222 including
It is composed of P.
本例においては、基準信号による割込み処理プログラム
で、コンペアレジスタ216に燃料噴射開始タイミング
を指定する値が設定され、コンペアレジスタ216の一
致信号が、4気筒総てに対する燃料噴射開始タイミング
を与え、コンペアレジスタ218〜221からの一致信
号が、それぞれ出力ポートPQ〜P3に対応する燃料噴
射終了タイミングを与えるようにtR成されている。In this example, in the interrupt processing program using the reference signal, a value specifying the fuel injection start timing is set in the compare register 216, and the match signal of the compare register 216 gives the fuel injection start timing for all four cylinders, and the compare register 216 is set to a value specifying the fuel injection start timing. The match signals from registers 218-221 are tR-configured to provide fuel injection end timings corresponding to output ports PQ-P3, respectively.
なお、上記各コンペアレジスタからの一致信号は、それ
ぞれ、割込み要求ソース信号としてINTC210に対
して出力されているが、第9図においては、前記一致信
号はINTとして表現されている。Note that the match signals from each of the compare registers are output to the INTC 210 as interrupt request source signals, and in FIG. 9, the match signals are expressed as INT.
以下、INTで表現された信号は、総て同様の意味を持
つものとする。Hereinafter, it is assumed that all signals expressed in INT have the same meaning.
以下において、コンペアレジスタ216には、基準信号
による割込み処理プログラムで、事前に出力ポートP。In the following, the compare register 216 is set to output port P in advance by an interrupt processing program using a reference signal.
に対応する燃料噴射タイミングを指定する値が設定され
ているものとして、コンペアレジスタ216からの一致
信号が発生したところからの動作説明を行なう。Assuming that a value specifying the fuel injection timing corresponding to 2 is set, the operation will be explained from the point where the match signal from the compare register 216 is generated.
第8図において、通常の命令処理では、PC206に格
納されたプログラムアドレスが、アドレスノくッファ2
04に転送され、アドレスバス401をドライブして、
プログラムメモリ212から次に実行すべき命令が7エ
ツチされる。取込まれた命令はデータバス400を経由
し、μアドレス主成部205に転送される。μアドレス
主成部205は、転送されてくる命令コードからμRO
M20gのアドレスを生成する。以降、μROM 20
gに格納されている前記命令に対するμプログラムの指
令に従い、汎用レジスタ203、ALU 201および
テンポラリレジスタ202等を操作することにより、命
令の処理が行なわれる。In FIG. 8, in normal instruction processing, the program address stored in the PC 206 is transferred to the address buffer 2.
04 and drives the address bus 401,
Seven instructions to be executed next are fetched from program memory 212. The fetched instructions are transferred to the μ address main unit 205 via the data bus 400. The μ address main generator 205 converts μRO from the transferred instruction code.
Generate an address for M20g. From then on, μROM 20
The instruction is processed by manipulating the general-purpose register 203, ALU 201, temporary register 202, etc. according to the instructions of the μ program for the instruction stored in g.
INTC210は、CPU 200における処理とは独
立に、周辺ハードウェア214から割込み要求が発生し
ているか否かを絶えずサンプルし、要求が発生していれ
ば要求を一つ選択して、その要求ソースに対応する割込
み要求フラグ211を設定する。The INTC 210 constantly samples whether or not an interrupt request is generated from the peripheral hardware 214, independently of the processing in the CPU 200, and if a request is generated, selects one request and sends it to the request source. Set the corresponding interrupt request flag 211.
コンペアレジスタ216からの一致信号が発生すると、
キャプチャレジスタ217は、その時のフリーランニン
グタイマ215の値を取込む、そして、コンペアレジス
タ216からの一致信号は、INTC210に対して割
込み要求を発生し、INTC210において、その割込
み要求が受付けられて割込み要求フラグ211が設定さ
れると、割込み要求信号403がタイミング制御部20
9に出力される。When a match signal is generated from the compare register 216,
The capture register 217 captures the value of the free running timer 215 at that time, and the match signal from the compare register 216 generates an interrupt request to the INTC 210, which accepts the interrupt request and issues an interrupt request. When the flag 211 is set, the interrupt request signal 403 is sent to the timing control unit 20.
9 is output.
μプログラムの最後の指令は、通常割込みが発生してい
るかいないかを検知するための指令で、この指令が出る
と、タイミング制御部209は1割込み要求信号403
の有無をサンプルする0割込み要求信号403がアクテ
ィブであれば、割込み要求クリア信号402をINTC
210に対して出力し、割込み要求フラグ211をクリ
アする。The last command of the μ program is a command to detect whether or not an interrupt has occurred. When this command is issued, the timing control unit 209 sends a 1-interrupt request signal 403.
If the interrupt request signal 403 is active, the interrupt request clear signal 402 is set to INTC.
210 and clears the interrupt request flag 211.
次に、PC206とPSII 207をスタックポイン
タ(CPU 200中に設定されているレジスタである
が図示していない)が指し示すスタック空間に退避させ
、データメモリ213中の特定のアドレスに設定されて
いるベクタテーブルに格納゛されている割込みソースに
対応する割込み処理プログラムのエントリアドレスを読
出し、データバス400を経由してPC206に設定す
る。PC206に新たに設定された前記プログラムアド
レスから、割込み処理プログラムは実行を開始する。Next, the PC 206 and PSII 207 are saved to the stack space pointed to by the stack pointer (a register set in the CPU 200, but not shown), and the vector set at a specific address in the data memory 213 is saved. The entry address of the interrupt processing program corresponding to the interrupt source stored in the table is read and set in the PC 206 via the data bus 400. The interrupt processing program starts execution from the program address newly set in the PC 206.
割込み処理プログラムでは、まず、ボートレジスタ22
3のビット0を“1”に設定することで、出力ポートP
oからの出力パルスをハイレベルにし、出力ポートP。In the interrupt processing program, first, the boat register 22
By setting bit 0 of 3 to “1”, output port P
The output pulse from o is set to high level, and the output port P.
に対応する気筒における燃料噴射パルス幅に相当するデ
ータを加算して、その結果をコンペアレジスタ218に
転送する。data corresponding to the fuel injection pulse width in the corresponding cylinder are added and the result is transferred to the compare register 218.
割込み処理プログラムを終了する命令の処理では、スタ
ック空間に退避させてあったPC値およびPSII値を
、それぞれPC206オよびPS11207に復帰させ
ることで、割込みが発生した時点における次の命令から
の処理を再開する。In the processing of the instruction that terminates the interrupt processing program, the PC value and PSII value saved in the stack space are restored to the PC 206 and PS 11207, respectively, so that processing from the next instruction at the time when the interrupt occurs is executed. resume.
次に、通常の命令実行中に、燃料噴射終了タイミングを
示すコンペアレジスタ218からの一致信号が発生する
と、前述の説明と同様に、tNTc 210が割込み要
求を受付け、割込み要求信号403がタイミング制御部
209に対して出力される。Next, when a match signal from the compare register 218 indicating the fuel injection end timing is generated during normal instruction execution, the tNTc 210 accepts the interrupt request and the interrupt request signal 403 is sent to the timing controller 209.
μプログラムから、割込みが発生しているかいないかを
検知するための指令が発生すると、タイミング制御部2
09は1割込み要求信号403の有無をサンプルする0
割込み要求信号403がアクティブであれば、割込み要
求クリア信号402をI NTC210に対して出力し
、割込み要求フラグ211をクリアする。When a command is issued from the μ program to detect whether or not an interrupt has occurred, the timing control unit 2
09 samples the presence or absence of 1 interrupt request signal 403 0
If the interrupt request signal 403 is active, the interrupt request clear signal 402 is output to the INTC 210 and the interrupt request flag 211 is cleared.
次に、 PC206およびPS11207をスタック空
間に退避させ、データメモリ213中の特定のアドレス
に設定されているベクタテーブルに格納されている割込
みソースに対応する割込み処理プログラムのエントリア
ドレスに分岐し、割込み処理プログラムは実行を開始す
る。Next, the PC 206 and PS 11207 are saved to the stack space, the interrupt processing program branches to the entry address of the interrupt processing program corresponding to the interrupt source stored in the vector table set at a specific address in the data memory 213, and interrupt processing starts. The program begins running.
割込み処理プログラムは、出力ポートPoに対する燃料
噴射終了処理であるため2ボートレジスタ223のビッ
ト0を“0”に設定することで、出カポ−)Paからの
出力パルスをローレベルにし、対応する気筒に対する燃
料噴射を終了する。Since the interrupt processing program is a fuel injection termination process for the output port Po, by setting bit 0 of the 2-board register 223 to "0", the output pulse from the output port (Pa) is set to a low level, and the corresponding cylinder Terminate fuel injection for.
割込み処理プログラムを終了する命令の処理においては
、スタック空間に退避してあったPC値およびpsw値
を、PC206およびPSW 207に復帰させること
で、割込みが発生した時点における次の命令からの処理
を再開する。同様の処理は、出力ボートP工からP、に
対しても同様に行なう0以上、自動車エンジン制御用の
パルス発生装置の1従来例について説明したが、従来の
一般的なパルス発生装置の基本的な処理機能は、大兄上
述の通りである。In the processing of the instruction that terminates the interrupt processing program, the PC value and psw value saved in the stack space are restored to the PC 206 and PSW 207, thereby allowing processing from the next instruction at the time the interrupt occurs. resume. Similar processing is also performed for the output boats P to P.We have explained one conventional example of a pulse generator for automobile engine control. The processing functions are as described above.
上述した従来のパルス発生装置においては、マイクロコ
ンピュータは、燃料噴射パルス出力のための基準信号を
割込み信号として受付け、割込み処理プログラムによっ
て燃料噴射時間の設定などの制御を行なっている。この
ため、エンジンの回転数が増し、基準信号の発生回数が
増えると、基準信号割込み、燃料噴射開始割込み、燃料
噴射終了割込みなどの割込み要求も多く発生し、その際
のPC値およびPSW値のスタックへの退避処理や、割
込み処理プログラムからメイン処理に戻る時に、スタッ
クの内容をPC206およびPSW 207に復帰させ
る処理が頻繁に発生し、退避および復帰に割かれるCP
U時間が膨大な時間になる。In the above-described conventional pulse generator, the microcomputer receives a reference signal for outputting a fuel injection pulse as an interrupt signal, and controls settings such as fuel injection time using an interrupt processing program. Therefore, as the engine speed increases and the number of times the reference signal is generated increases, many interrupt requests such as reference signal interrupt, fuel injection start interrupt, and fuel injection end interrupt occur, and the PC value and PSW value at that time increase. When saving the contents of the stack to the stack or returning to the main process from the interrupt processing program, the process of restoring the contents of the stack to the PC 206 and PSW 207 frequently occurs, and the CP used for saving and restoring is
U time becomes a huge amount of time.
また、一方、C20は燃料噴射制御の他に点火時期制御
や、アイドル回転制御など種々雑多な仕事をも実行して
おり、エンジンの回転数が上がると、これらのメイン処
理に割かれるCPU時間が少なくなり、場合によっては
、全く対応できない処理が発生することも起こり得る。On the other hand, in addition to fuel injection control, the C20 also performs various miscellaneous tasks such as ignition timing control and idle rotation control, and as the engine speed increases, the CPU time devoted to these main processes decreases. In some cases, processing that cannot be handled at all may occur.
従って、昨今の高速回転、多気筒エンジン搭載の車種に
おけるマイクロコンピュータによるエンジン制御は、非
常に難しいものになってきている。Therefore, it has become extremely difficult to control the engine using a microcomputer in modern vehicle models equipped with high-speed rotation and multi-cylinder engines.
また、最近のエンジン制御においては、排気ガス規制や
燃料費節減などの要求から、精度の高い燃料噴射制御が
必要となっており、燃料噴射開始タイミングおよび燃料
噴射終了タイミングを最小の誤差で制御でき、且つ各気
筒ごとに、それぞれ独立に$1111することが必要に
なりつつある。これらの要求に対して、従来からのソフ
トウェア処理だけで制御する方法では、割込み要因が発
生してから割込み処理プログラムが開始するまでの時間
の遅れや、出力ポートへのデータ書込み時間による遅れ
などが発生して、精度の高い制御が期待できない、精度
の高い制御を行なうためには、一連の処理サイクルより
も数段に分解能が高く、且つ制御の許容誤差範囲内の信
号をベースとした専用ハードウェアを装備し、ハードウ
ェアによる直接制御を行なわなければならない、具体的
には、クロック数をカウントアツプするタイマ、ある事
象が発生した時にタイマの値を記憶するためのキャプチ
ャレジスタ、タイマの所定の値と一致がとれたことを示
すコンペアレジスタなどの専用のハードウェアを必要と
する。ここでキャプチャレジスタは、燃料噴射開始タイ
ミングを記憶するなめに利用し、コンペアレジスタは、
燃料噴射開始タイミングや終了タイミングを発生するた
めに利用する。前述したように、出力ボートからの出力
パルスは、重なりあったり、なかったり様々なパターン
をとるため、ソフトウェアの介在なしに、燃料噴射開始
タイミング用と終了タイミング用の2本のコンペアレジ
スタだけで、4気筒に対応した制御はできない、従って
、ハードウェアだけで制御するためには、4組のコンペ
アレジスタが必要になり、ハードウェア量が多くなって
経済的な負担となる。当然、気筒数が6個、8個と増え
れば、コンペアレジスタも6組、8組と増大し、特にシ
ングルチップのように、CPUと間近回路を単一基盤上
に集積する構成に適用すると負担が増大する。In addition, in modern engine control, highly accurate fuel injection control is required due to requirements such as exhaust gas regulations and fuel cost savings, and fuel injection start timing and fuel injection end timing can be controlled with minimal error. , and it is becoming necessary to separately spend $1111 for each cylinder. Conventional methods of controlling these requests using only software processing result in a time delay between the occurrence of an interrupt factor and the start of the interrupt processing program, and a delay due to the time it takes to write data to the output port. In order to perform highly accurate control, dedicated hardware is required that has a resolution several steps higher than a series of processing cycles and is based on signals within the control tolerance range. This includes a timer that counts up the number of clocks, a capture register that stores the timer value when a certain event occurs, and a predetermined value for the timer. Requires dedicated hardware such as a compare register to indicate when a match has been made. Here, the capture register is used to store the fuel injection start timing, and the compare register is used to store the fuel injection start timing.
Used to generate fuel injection start timing and end timing. As mentioned above, the output pulses from the output boat take various patterns, such as overlapping and non-overlapping, so it can be done without any software intervention using just two compare registers for fuel injection start timing and end timing. Control corresponding to four cylinders is not possible. Therefore, in order to perform control using only hardware, four sets of compare registers are required, which increases the amount of hardware and becomes an economic burden. Naturally, as the number of cylinders increases to 6 or 8, the number of compare registers also increases to 6 or 8, which is especially burdensome when applied to a configuration in which the CPU and nearby circuits are integrated on a single board, such as a single chip. increases.
基準信号燃料噴射開始タイミングの関係に於いては、必
ず気筒(n)の燃料噴射開始タイミングよりも、気R(
n+ 1>に対する基準信号が時間的に後にくるように
基準信号を選択すれば、第9図に示したように、キャプ
チャレジスタと燃料噴射開始タイミングを発生するコン
ペアレジスタだけは1本ずつの構成で良いが、気筒(n
)の燃料噴射終了タイミングよりも、気f!J(n+1
)の燃料噴射開始タイミングが時間的に先にくる場合が
あることを考慮すると、燃料噴射終了タイミングを与え
るコンペアレジスタは、気筒数分装備しなければならず
、やはりハードウェア量の増大を招く結果となる。In relation to the reference signal fuel injection start timing, the air R(
If the reference signal is selected so that the reference signal for n+1> comes later in time, only one capture register and one compare register that generates the fuel injection start timing can be configured, as shown in Fig. 9. Good, but the cylinder (n
) than the fuel injection end timing! J(n+1
), the fuel injection start timing may be earlier in time, so the compare register that gives the fuel injection end timing must be installed for the number of cylinders, which also results in an increase in the amount of hardware. becomes.
すなわち、従来のパルス発生回路は、最近の自動車エン
ジン制御の高精度化に対応するためには、一連のI制御
処理サイクルよりも数段分解能が高く、且つll1w精
度上の許容誤差範囲内の信号をベースとした専用ハード
ウェアを増設して、ハードウェアによる直接制御を行な
わなければならない、従って、上記専用ハードウェアを
含むハードウェア量が顕著に増大するという欠点がある
。In other words, in order to respond to the recent high precision of automobile engine control, conventional pulse generation circuits must have a resolution several steps higher than a series of I control processing cycles, and must generate signals within the allowable error range in terms of ll1w accuracy. It is necessary to add dedicated hardware based on the above to perform direct control by the hardware, which has the disadvantage that the amount of hardware including the above-mentioned dedicated hardware increases significantly.
本発明のパルス発生回路は、CPUを用いた自動車エン
ジン制御用のパルス発生装置において、前記CPUに対
して非同期の割込み処理の要求を発生するとともに、所
定のデータ処理の要求をも発生する手段と、前記割込み
処理の要求と前記所定のデータ処理の要求とを識別する
ための形態指示手段と、を含むINTCと、所要のデー
タとともに、前記所定のデータ処理の処理形態を指定す
る処理形態情報をも併せて格納するデータメモリと、所
定の7リーランニングタイマと、コンペアレジスタと、
所定のタイミングで前記フリーランニングタイマの値を
取込むキャプチャレジスタと、エンジン制御のための噴
射パルス発生用の複数の出力ボートと、を含む周辺ハー
ドウェアと、命令の実行アドレスを保持するPCと、プ
ログラムの実行状態を保持する手段と、高速記憶Il能
を有する汎用レジスタと、μROWと、を含み、前記T
NTCから前記所定のデータ処理の要求が発生され、
前記形態指示手段において前記所定のデータ処理を指示
していることが検知された場合には、命令実行処理を中
断し、前記処理形態情報に従い、前記コンペアレジスタ
と前記キャプチャレジスタと前記データメモリとを操作
することにより、前記複数の出力ボートから出力される
自動車エンジン制御用の燃料噴射パルスを制御する前記
PCUと、を備えて構成される。The pulse generating circuit of the present invention is a means for generating a request for asynchronous interrupt processing to the CPU and also generating a request for predetermined data processing in a pulse generating device for controlling an automobile engine using a CPU. , a mode specifying means for identifying the interrupt processing request and the predetermined data processing request; and processing mode information specifying the processing mode of the predetermined data processing together with necessary data. a data memory that also stores data, a predetermined 7-lead running timer, a compare register,
Peripheral hardware including a capture register that captures the value of the free running timer at a predetermined timing, a plurality of output ports for generating injection pulses for engine control, and a PC that holds execution addresses of instructions; The T
A request for the predetermined data processing is generated from the NTC,
If the format instruction means detects that the predetermined data processing is instructed, the instruction execution process is interrupted, and the compare register, the capture register, and the data memory are stored in accordance with the processing format information. and the PCU which, when operated, controls fuel injection pulses for controlling the automobile engine output from the plurality of output boats.
次に、本発明について図面を参照して説明する。第1図
は、本発明の第1の実施例のシステム・ブロック図、第
2図は、前記第1の実施例における周辺ハードウェアの
プロ・Yり図である。Next, the present invention will be explained with reference to the drawings. FIG. 1 is a system block diagram of a first embodiment of the present invention, and FIG. 2 is a professional diagram of peripheral hardware in the first embodiment.
第1図に示されるように、前記第1の実施例は、データ
バス300およびアドレスバス301に対応して、AL
U 101 、テンポラリレジスタ102 、汎用レジ
スタ103、アドレスバッファ104、μアドレス生成
部105 、 PC106、PS11107、μROM
108およびタイミング制御部109を含むCPLI
100と、割込み要求フラグ111および形態指定フラ
グ112を含む[NTC110と、プログラムメモリ1
13と、データメモリ114と、周辺ハードウェア11
5とを備えて構成されている。As shown in FIG. 1, in the first embodiment, an AL
U101, temporary register 102, general-purpose register 103, address buffer 104, μ address generation unit 105, PC106, PS11107, μROM
CPLI including 108 and timing control unit 109
100, an interrupt request flag 111, and a format specification flag 112 [NTC 110, program memory 1]
13, data memory 114, and peripheral hardware 11
5.
また、第2図に示されるように、周辺ハードウェア11
5は、フリーランニングタイマ116と、コンペアレジ
スタ(図中ecOMPlと記載)117およびコンペア
レジスタ(図中にC014P 2と記載)119と、キ
ャプチャレジスタ(図中にCAPと記載)118と、ビ
ット選択レジスタ(SR) 120と、ビット選択レジ
スタ(RR)121と、それぞれ4個のANDゲー)
124を含むI11御回路122,123と、4個の出
力ポートPo5P、に対しそれぞれ対応する4#iのR
Sフリップ70ツブ126ならびにバッファ127を含
むボート出力回路125と、を備えている。Further, as shown in FIG. 2, peripheral hardware 11
5 is a free running timer 116, a compare register (denoted as ecOMPl in the diagram) 117, a compare register (described as C014P2 in the diagram) 119, a capture register (described as CAP in the diagram) 118, and a bit selection register. (SR) 120, bit selection register (RR) 121, and four AND games each)
4#i R corresponding to I11 control circuits 122 and 123 including 124 and four output ports Po5P, respectively.
A boat output circuit 125 including an S flip 70 tube 126 and a buffer 127 is provided.
INTC110は、外部のハードウェアから幾つかの割
込み信号を受付け、各別込み要求ソースに割当てられた
優先順位を判別し、最も高い優先順位をもった割込みソ
ースを一つ選択して、その割込みソースに対応した割込
み要求フラグ111をセットする。111込み要求フラ
グ111と形態指定フラグ112は、割込み要求がn個
あるときに、それぞれn個設定されているが、説明を簾
略にするために、図中には1組だけが記載されている。The INTC 110 accepts several interrupt signals from external hardware, determines the priority assigned to each separate request source, selects one interrupt source with the highest priority, and processes that interrupt source. The corresponding interrupt request flag 111 is set. When there are n interrupt requests, n 111 included request flags 111 and mode specification flags 112 are each set, but in order to simplify the explanation, only one set is shown in the figure. There is.
また、外部のハードウェアからの割込み信号や、優先順
位判別部などは、本発明の趣旨に直接に関係がないため
特に図示していない。Furthermore, an interrupt signal from external hardware, a priority order determining section, and the like are not particularly shown because they are not directly related to the gist of the present invention.
INTC110からの割込み要求を、 CPU 100
は二通りの形態で処理することができる。一つは、従来
から行なわれているベクタ割込み処理であり、もう一つ
は、本発明の特徴である処理形態で、割込み要求が発生
すると、ベクタテープ′ルを参照せずに、データメモリ
114の中の特定アドレスに予め設定されている処理形
態情報に基づき、所定のデータ処理を実行する処理形態
である。以下、この所定のデータ処理のことをマクロサ
ービスと記す、なお、上記の二つの処理形態の区分につ
き、ベクタ割込みかマクロサービスかの指定は、形態指
定フラグ112で行なうが、CPLI 100から、形
態指定フラグ112に“0“が指定されている時にはベ
クタ割込みとして指定され、“1′が指定されている時
にはマクロサービスとして指定される。Interrupt request from INTC110 is sent to CPU 100
can be processed in two ways. One is the conventional vector interrupt processing, and the other is a processing form that is a feature of the present invention. When an interrupt request occurs, data memory 114 is processed without referring to the vector file. This is a processing mode in which predetermined data processing is executed based on processing mode information preset to a specific address in . Hereinafter, this predetermined data processing will be referred to as a macro service. Regarding the classification of the above two processing types, designation of vector interrupt or macro service is performed using the type designation flag 112. When "0" is designated in the designation flag 112, it is designated as a vector interrupt, and when "1" is designated, it is designated as a macro service.
次に、本発明のマクロサービスの処理形態を指定する処
理形態情報について説明する。第3図は、マクロサービ
スの%理形態情報構成例を示す図、第4図は、第1の実
施例におけるマクロサービス処理フローチャートを示す
図である。Next, processing type information that specifies the processing type of the macro service of the present invention will be explained. FIG. 3 is a diagram showing an example of the % physical information structure of a macro service, and FIG. 4 is a diagram showing a macro service processing flowchart in the first embodiment.
処理形態情報はデータメモリ114の中の特定のアドレ
スに配置され、本実施例の処理形態情報は、マクロサー
ビスモードとチャネルポインタ(第3図中にPTRと記
載)を有する2バイトのヘッダ部と、前記チャネルポイ
ンタによって指し示される13バイトのマクロサービス
チャネルによって構成される。本実施例のマクロサービ
スチャネルは、4気同の燃料噴射制御を想定した構成と
なっており、初期カウンタ(第3図中に【旧Tと記載)
、燃料噴射パルス幅を指定するリセットデータ、−時的
に燃料噴射パルス幅を記憶するワードバッファ(Pa〜
P3用)、前記ワードバッファに対する書込み位置を示
すライトカウンタ(第3図中に!lRCNT、と記載)
、および前記ワードバッファからの読出し位置を示すリ
ードカウンタ(第3図中にRD CNT、と記載)から
構成されている。The processing mode information is located at a specific address in the data memory 114, and the processing mode information in this embodiment includes a 2-byte header section containing a macro service mode and a channel pointer (indicated as PTR in FIG. 3). , consisting of a 13-byte macro service channel pointed to by the channel pointer. The macro service channel of this embodiment is configured assuming 4-air fuel injection control, and the initial counter (denoted as [old T in Fig. 3)]
, reset data specifying the fuel injection pulse width, - a word buffer (Pa~) that temporarily stores the fuel injection pulse width;
P3), a write counter indicating the write position for the word buffer (described as !lRCNT in Figure 3)
, and a read counter (indicated as RD CNT in FIG. 3) that indicates the read position from the word buffer.
コンペアレジスタ117には、燃料噴射制御に於ける基
準信号から燃料噴射開始タイミングまでの変位を示すデ
ータが、CPjJ 100によって格納される。データ
の設定タイミングは、基準信号が割込みを発生した時点
において、割込み処理プログラムによって設定が行なわ
れる。従来例にて述べたように、本実施例では、1木の
コンペアレジスタ117だけで、複数の気筒に対して燃
料噴射開始タイミングを与えるための基準信号の選択を
行なっている。In the compare register 117, data indicating a displacement from a reference signal to a fuel injection start timing in fuel injection control is stored by the CPjJ 100. The data setting timing is set by the interrupt processing program at the time when the reference signal generates an interrupt. As described in the conventional example, in this embodiment, only one compare register 117 is used to select a reference signal for giving fuel injection start timing to a plurality of cylinders.
本実施例のマクロサービスは、コンペアレジスタ117
からの一致信号307と、コベアレジスタ119からの
一致信号30gによって起動される。マクロサービスが
起動される以前に、CPU 100は、マクロサービス
チャネルやハードウェアに対して初期化を行なう、マク
ロサービスチャネルの1N[T、 WRCNT、および
RD CNT、には、4気筒の時には4を設定しておく
、また、ビット選択レジスタ(SR) 120とビット
選択レジスタ(RR> 121には、最初に燃料噴射パ
ルスを出力すべき出力ボートがPoであることを指定す
るために、出力ボートP。に対応するビットだけを′1
”に、それ以外については0″に設定しておく。The macro service of this embodiment is the compare register 117
and the match signal 30g from the covair register 119. Before the macro service is started, the CPU 100 initializes the macro service channel and hardware.If the cylinder is 4 cylinders, the CPU 100 sets 4 to 1N[T, WRCNT, and RD CNT of the macro service channel. In addition, the bit selection register (SR) 120 and the bit selection register (RR> 121) are set to specify that the output port that should output the fuel injection pulse first is Po. . only the bit corresponding to '1
", and other values are set to 0".
以下に、第7tM(a)および(b)に示される燃料噴
射パルスパターンに対応して、マクロサービスについて
の説明を行なう。The macro service will be explained below in response to the fuel injection pulse patterns shown in 7th tM (a) and (b).
第7図<a>に示される燃料噴射パルスパターンの場合
には、最初に、コンペアレジスタ117からの一致信号
307が発生すると、ビット選択レジスタSR120の
初期値から、出力ボートPOに対応するRSフリップフ
ロップ126だけがセットされ、出力ボートP。からの
出力レベルがハイレベルになり、気筒0に対する燃料噴
射が開始される。同時に、一致信号307によって、フ
リーランニングタイマ11.6の値はキャプチャレジス
タ118に格納される。また、一致信号307は1割込
み要求をfNTclloに対して発生する。 rNTc
110が、データバス300を介して一致信号307
を受付けると、このソースに対応する割込み要求フラグ
111をセットし、割込み要求信号303をアクティブ
にする。タイミング制御部109は、命令処理の終りに
おいて割込み要求信号303をサンプルするが、割込み
要求信号303がアクティブであるため、形態指定信号
305をサンプルする。形態指定信号305がマクロサ
ービスを示す“1″であることを検知すると、PC10
6およびPSll 107を保持したまま、μROM
10gのマクロサービス処理エントリアドレスを生成し
、マクロサービスを開始する。以降、マクロサービスの
μプログラム指令に従ってマクロサービス処理が実行さ
れる。In the case of the fuel injection pulse pattern shown in FIG. 7<a>, when the match signal 307 from the compare register 117 is first generated, the RS flip-flop corresponding to the output boat PO is selected from the initial value of the bit selection register SR120. Only port 126 is set, and output port P. The output level from the cylinder becomes high level, and fuel injection to cylinder 0 is started. At the same time, the value of free-running timer 11.6 is stored in capture register 118 by coincidence signal 307. The match signal 307 also generates one interrupt request to fNTcllo. rNTc
110 outputs a match signal 307 via data bus 300.
When receiving this source, the interrupt request flag 111 corresponding to this source is set and the interrupt request signal 303 is activated. The timing control unit 109 samples the interrupt request signal 303 at the end of instruction processing, and since the interrupt request signal 303 is active, it samples the format designation signal 305. When detecting that the format specification signal 305 is “1” indicating macro service, the PC 10
6 and PSll 107, μROM
Generate a 10g macro service processing entry address and start the macro service. Thereafter, macro service processing is executed according to the μ program command of the macro service.
以下、μプログラム指令による処理フローについて、第
4図のフローチャートを用いて説明する。The processing flow according to the μ program command will be explained below using the flowchart shown in FIG.
最初に、一致信号307を割込みソースとするマクロサ
ービスのヘッダを、データメモリ114の中の特定アド
レスから読出す、この場合のマクロサービスモードは事
前にML(モードの名称)に設定しておく、マクロサー
ビスモードがMlの時には、IJRCNT、 トRD
CNT、 +7)比較を行なう。First, the header of the macro service using the match signal 307 as an interrupt source is read from a specific address in the data memory 114. In this case, the macro service mode is set to ML (mode name) in advance. When the macro service mode is Ml, IJRCNT, RD
CNT, +7) Make a comparison.
上記のWRCNT、とRD CNT−は、共に初期値が
4であるため、キャプチャレジスタ11gの内容と、マ
クロサービスチャネルの中のリセットデータを、ALU
101を利用して加算し、その結果をコンペアレジス
タ119に格納する。リセットデータは、CPU 10
0によって絶えず更新されており、マクロサービスは、
最新の燃料噴射時間であるところのリセットデータを利
用することになる。Since the initial value of both WRCNT and RD CNT- mentioned above is 4, the contents of the capture register 11g and the reset data in the macro service channel are transferred to the ALU.
101 and stores the result in the compare register 119. Reset data is CPU 10
0 and the macro service is
The reset data, which is the latest fuel injection time, will be used.
次に、WRCNT、を1デクリメントして3とする。
WRCNT、はOでないからビット選択レジスタ(SR
> 120の左シフト処理を実行し、出力ボートPIに
相当するビットだけ1にセットする。この場合にはシフ
トアウトが発生しないため、タイミング制御部109は
、割込み要求クリア信号302をlNTe110に対し
て出力し、割込み要求フラグ111をリセットして、マ
クロサービス処理を終了する。マクロサービス処理が終
了すると、タイミング制御部109は、保持していたP
C106およびI’SW 107の値から通常の命令処
理を再開する。Next, WRCNT is decremented by 1 to 3.
Since WRCNT is not O, the bit selection register (SR
> Execute left shift processing of 120 and set only the bit corresponding to the output port PI to 1. In this case, shift-out does not occur, so the timing control unit 109 outputs the interrupt request clear signal 302 to the INTe 110, resets the interrupt request flag 111, and ends the macro service processing. When the macro service processing is completed, the timing control unit 109
Normal instruction processing resumes from the values of C106 and I'SW 107.
第7図(a)のパルスパターンの場合には、パルスの重
なりがないことから、次にコンペアレジスタ119から
の一致信号308が発生する。ビット選択レジスタ(R
R) 121は、出力ボートPoに対応するビットだけ
が1で、その他の出力ボートに対応するビットが0であ
るため、出力ボートP。のRSフリップフロップ126
だけがリセットされ、気筒0に対する燃料噴射は終了す
る。上記の一致信号308は、INTC110に対して
割込み要求を発生する。In the case of the pulse pattern shown in FIG. 7(a), since there is no overlapping of pulses, a match signal 308 is generated from the compare register 119 next. Bit selection register (R
R) 121 is the output port P because only the bit corresponding to the output port Po is 1 and the bits corresponding to the other output ports are 0. RS flip-flop 126
only is reset, and fuel injection to cylinder 0 ends. The above match signal 308 generates an interrupt request to INTC 110.
INTC110は、この一致信号308の割込み要求を
受付けると、このソースに対応する割込み要求フラグ1
11をセットし、割込み要求信号303をアクティブに
する。タイミング制御部109は、命令処理の終りにお
いて割込み要求信号303をサンプルするが、割込み要
求信号303がアクティブであるため、形態指定信号3
05をサンプルする。この結果、形態指定信号305が
マクロサービスを示す“1”であることを検知すると、
PC106およびPSW 107を保持したままμRO
M108のマクロサービス処理エントリアドレスを生成
し、マクロサービス処理を開始する。When the INTC 110 accepts the interrupt request of this match signal 308, it sets the interrupt request flag 1 corresponding to this source.
11 and activates the interrupt request signal 303. The timing control unit 109 samples the interrupt request signal 303 at the end of instruction processing, but since the interrupt request signal 303 is active, the format designation signal 3
Sample 05. As a result, when it is detected that the format designation signal 305 is "1" indicating macro service,
μRO while holding PC106 and PSW 107
A macro service processing entry address of M108 is generated and macro service processing is started.
マクロサービス処理においては、最初に、一致信号30
8を割込みソースとするマクロサービスのヘッダを、デ
ータメモリ114の中の特定アドレスから読出す、この
特定アドレスは、前述の一致信号307に対応するアド
レスとは異なるアドレスが割当てられている。また、マ
クロサービスモードは、事前にM2(モードの名称)に
設定し、且つチャネルポインタは、一致信号307に対
応するマクロサービスチャネルを指し示している。In macro service processing, first, the match signal 30
The header of the macro service whose interrupt source is 8 is read from a specific address in the data memory 114. This specific address is assigned a different address from the address corresponding to the match signal 307 described above. Further, the macro service mode is set to M2 (mode name) in advance, and the channel pointer points to the macro service channel corresponding to the match signal 307.
マクロサービスモードがM2の時は、 RD CNT。When macro service mode is M2, RD CNT.
の1デクリメントを行ない3にする。 RD CNT、
は0ではないため次の処理に進み、RD CNT、が上
述のように3で、%IRCNT、も燃料噴射開始タイミ
ング側のマクロサービスの処理で3となっているなめ、
RD CNT、 =WRCNT、となり、次の処理に進
む。Decrement by 1 to make it 3. RD CNT,
is not 0, so proceed to the next process, and RD CNT is 3 as described above, and %IRCNT is also 3 in the macro service processing on the fuel injection start timing side.
RD CNT, = WRCNT, and the process proceeds to the next step.
ビット選択レジスタ(RR) 121の左シフト処理で
、出力ポートP□に対するビットだけが1となり、その
他のビットは0となる。従ってシフトアウトが発生しな
いため、タイミング制御部109は、割込み要求クリア
信号302をINTC110に対して出力し1割込み要
求フラグ111をリセットしてマクロサービス処理を終
了する。マクロサービス処理が終了すれば、タイミング
制御部109は、保持していたPC106およびPSW
107の値から通常の命令処理を再開する0以上の処
理を、出力ポートP、からP3まで全く同様に繰返す。In the left shift process of the bit selection register (RR) 121, only the bit for the output port P□ becomes 1, and the other bits become 0. Therefore, since shift-out does not occur, the timing control unit 109 outputs the interrupt request clear signal 302 to the INTC 110, resets the 1-interrupt request flag 111, and ends the macro service processing. When the macro service processing is completed, the timing control unit 109 updates the PC 106 and PSW that were held.
The process of 0 or more, which restarts normal instruction processing from the value of 107, is repeated in exactly the same way from output ports P to P3.
出力ポートP3に対する燃料噴射開始タイミングによっ
て起動されるマクロサービスおいては、同様にマクロサ
ービスモードがMlであるため、畦CNT、とRD C
NT、との比較を行なう、この場合、WRCNT、およ
びRD CNT、が共に1であるため、キャプチャレジ
スタ11gの内容と、マクロサービスチャネルの中のリ
セットデータを、ALU 101を利用して加算し、そ
の結果をコンペアレジスタ119に格納する。Similarly, in the macro service activated by the fuel injection start timing for the output port P3, since the macro service mode is Ml, the ridge CNT and RD C
In this case, since both WRCNT and RD CNT are 1, the contents of the capture register 11g and the reset data in the macro service channel are added using the ALU 101, The result is stored in the compare register 119.
次に、WRCNT、を1デクリメントしてOにする。
WRCNT、が0となるため、INITの値4をWRC
NT、に再設定する9次いでビット選択レジスタSR1
20の左シフト処理を実行すると、ビット選択レジスタ
(SR) 120からのシフトアウトが発生するため、
タイミング制御部109は、形態変更信号304をIN
TC110に対して出力し、形態指定フラグ112をリ
セットする。Next, WRCNT is decremented by 1 and set to O.
Since WRCNT is 0, the value 4 of INIT is set to WRC
NT, reset to 9 then bit selection register SR1
When the left shift processing of 20 is executed, a shift out from bit selection register (SR) 120 occurs, so
The timing control unit 109 inputs the form change signal 304
It is output to the TC 110 and the format designation flag 112 is reset.
INTC110は、割込み要求フラグ111がセット状
態にあり、形態指定フラグ112がリセット状態である
ため、この場合には、通常のベクタ割込み要求をCPυ
100に対して発生し、以下、前述したベクタ割込み処
理を実行する0割込み処理プログラムは、4気筒が一巡
したところで起動され、ビット選択レジスタ(SR)
120を初期状態に再設定し、出力ポートPoからの燃
料噴射パルス出力に備える。Since the INTC 110 has the interrupt request flag 111 in the set state and the format specification flag 112 in the reset state, in this case, the INTC 110 sends a normal vector interrupt request to CPυ
The 0 interrupt processing program, which is generated for 100 and executes the vector interrupt processing described above, is started when the 4 cylinders have completed one cycle, and the bit selection register (SR)
120 is reset to the initial state to prepare for fuel injection pulse output from the output port Po.
次に、出力ポートP、に対する燃料噴射終了タイミング
によって起動されるマクロサービスにおいては、マクロ
サービスモードがM2であるため、RD CNT、の1
デクリメントを行ないOにする。Next, in the macro service activated by the fuel injection end timing for output port P, since the macro service mode is M2, 1 of RD CNT,
Decrement it to O.
RD CNT、がOとなるため、RD CNT、にIN
ITの値4を設定する。 RD CNT、が4で、II
RCNT、も燃料噴射開始タイミング側のマクロサービ
ス処理で4となっているなめWRCNT、 =RD C
NT、となり、次の処理に進む。Since RD CNT becomes O, IN to RD CNT
Set the IT value to 4. RD CNT is 4, II
RCNT is also set to 4 in the macro service processing on the fuel injection start timing side. WRCNT = RD C
NT, and the process proceeds to the next step.
ビット選択レジスタ(RR) 121の左シフト処理に
よりシフトアウトが発生するため、タイミング制御部1
09は、形態変更信号304をINTCIICIG、:
対して出力し、形態指定フラグ112をリセットする。Since a shift out occurs due to the left shift processing of the bit selection register (RR) 121, the timing control unit 1
09, the form change signal 304 is INTCIICIG:
The format designation flag 112 is reset.
tNTc 110は、割込み要求フラグ111がセット
状態にあり、形態指定フラグ112がリセット状態にあ
るため、この場合には、通常のベクタ割込み処理要求を
cpu tooに対して発生し、以下前述したベクタ割
込み処理を実行する。燃料噴射終了タイミングで起動さ
れる割込み処理プログラムも、4気筒が一巡したところ
で起動されることになり、ビット選択レジスタ(RR)
121を初期状態に再設定し、出力ポートP。からの
燃料噴射パルス出力に備える。In the tNTc 110, the interrupt request flag 111 is in the set state and the format specification flag 112 is in the reset state, so in this case, a normal vector interrupt processing request is generated to cpu too, and the above-mentioned vector interrupt Execute processing. The interrupt processing program that is started at the timing of the end of fuel injection is also started when the four cylinders have completed one cycle, and the bit selection register (RR)
121 to the initial state and output port P. Prepare for fuel injection pulse output from.
次に、第7図(b)に示される燃料噴射パルスバターン
の場合には、最初にコンペアレジスタ117からの一致
信号307が発生し、出力ポートPQに対応するRSフ
リヅプ70ツブ126だけが設定され、出力ポートP、
からの出力パルスがハイレベルになって、気筒Oに対す
る燃料噴射が開始される。また、一致信号307が割込
み要求をINTC1i0に対して発生し、マクロサービ
スを開始する。ここまでの処理手順は、前述した第7図
(a)の場合と全く同様である。Next, in the case of the fuel injection pulse pattern shown in FIG. 7(b), a match signal 307 is generated from the compare register 117 first, and only the RS flip-flop 70 knob 126 corresponding to the output port PQ is set. , output port P,
The output pulse from the cylinder becomes high level, and fuel injection to the cylinder O is started. Also, the match signal 307 generates an interrupt request to INTC1i0 to start the macro service. The processing procedure up to this point is exactly the same as in the case of FIG. 7(a) described above.
この場合においても、マクロサービスモードがMlであ
るため、IIRCNT、とRD CNT、の比較を行な
う、 IIRCNT、とRD CNT、は共に初期値が
4であるため、キャプチャレジスタ118の内容とマク
ロサービスチャネル中のリセットデータを、ALUlo
lを利用して加算し、その結果をコンペアレジスタ11
9に格納する。In this case as well, since the macro service mode is Ml, IIRCNT and RD CNT are compared. Since both IIRCNT and RD CNT have initial values of 4, the contents of the capture register 118 and the macro service channel are compared. The reset data inside, ALUlo
l is used to add the result, and the result is sent to the compare register 11.
Store in 9.
次に、WRCNT、を1デクリメントし3にする。Next, WRCNT is decremented by 1 to 3.
+11RCNT、は0でないからビット選択レジスタ(
SR)120の左シフト処理を実行し、出力ポートP1
に相応するビットだけを1にセットする。この場合には
シフトアウトが発生しないため、タイミング制御部10
9は、割込み要求クリア信号302をINTClloに
対して出力し、割込み要求フラグ111をリセットして
マクロサービスを終了する。マクロサービスが終了すれ
ば、タイミング制御部109は、保持していたPC10
6およびPSll 107の値から、通常の命令処理を
再開して実行する。+11RCNT is not 0, so the bit selection register (
SR) 120 left shift processing and output port P1
Set only the bit corresponding to . In this case, since no shift-out occurs, the timing control unit 10
9 outputs an interrupt request clear signal 302 to INTCllo, resets the interrupt request flag 111, and ends the macro service. When the macro service ends, the timing control unit 109
6 and the value of PSll 107, normal instruction processing is resumed and executed.
第7[M(b)のパルスパターンの場合には、パルスの
重なりがあり、コンペアレジスタ119からの一致信号
308が発生する前に、再度コンペアレジスタ117か
らの一致信号307が発生する。この時には、出力ポー
トP1に対応するRSフリップ70ツブ126のみがセ
ットされ、出力ポートP1からの出力パルスがハイレベ
ルになり、気@1に対する燃料噴射が開始され、気筒0
と気FJ1の双方ともに燃料噴射が行なわれることにな
る。In the case of the seventh [M(b) pulse pattern, there is an overlap of pulses, and before the match signal 308 from the compare register 119 is generated, the match signal 307 from the compare register 117 is generated again. At this time, only the RS flip 70 knob 126 corresponding to the output port P1 is set, the output pulse from the output port P1 becomes high level, fuel injection to the air @1 is started, and the cylinder 0
Fuel injection will be performed for both the FJ1 and FJ1.
一致信号307は割込み要求をINTC110に対して
発生し、マクロサービスを開始する。この場合において
も、マクロサービスモードがMlであるため、WRCN
T、とRD CNT、の比較を行なう、前述の場合と異
り、IIIRCNT、が3、RD CNT、が4である
ため、キャプチャレジスタ118の内容と、マクロサー
ビスチャネル中のリセットデータとを、ALUlolを
利用して加算し、その結果は、[PTR−胃RCNT、
x2−4 ]すなわち[PTR−101の式により表現
されるアドレス、この場合にはワードバッファ(Pt用
)に格納される。Match signal 307 generates an interrupt request to INTC 110 and starts macro service. In this case as well, since the macro service mode is Ml, WRCN
Unlike the previous case, where IIIRCNT is 3 and RD CNT is 4, the contents of the capture register 118 and the reset data in the macro service channel are compared with ALUolol. and the result is [PTR-gastric RCNT,
x2-4], that is, the address expressed by the formula [PTR-101, in this case stored in the word buffer (for Pt).
次に、IIRCNT、を1デクリメントし2にする。Next, IIRCNT is decremented by 1 to 2.
11RCNT、は0ではないので、ビット選択レジスタ
(SR)120の左シフト処理を実行し、出力ポートP
2に相当するビットだけを1にセットする。この場合に
はシフトアウトが発生しないため、タイミング制御部1
09は、割込み要求クリア信号302 を[NTCI
10に対して出力し、割込み要求フラグ111をリセ
ットしてマクロサービスを終了する。Since 11RCNT is not 0, left shift processing of the bit selection register (SR) 120 is performed and the output port P
Only the bit corresponding to 2 is set to 1. In this case, since no shift out occurs, the timing control section 1
09 sends the interrupt request clear signal 302 to [NTCI
10, resets the interrupt request flag 111, and ends the macro service.
再度コンペアレジスタ117からの一致信号307が発
生すると、この時には、出力ポートP2に対応するRS
フリップ70ツブ126だけがセットされ、出力ポート
P2からの出力パルスがハイレベルになって、気筒2に
対する燃料噴射が開始される。When the match signal 307 from the compare register 117 is generated again, this time the RS corresponding to the output port P2 is
Only the flip 70 knob 126 is set, the output pulse from the output port P2 becomes high level, and fuel injection to the cylinder 2 is started.
一致信号307は、割込み要求をINTC110に対し
て発生し、マクロサービスを開始する。この場合にも、
マクロサービスモードがMlであるため、IlRCNT
、とRD CNT、の比較を行なう、 IIIRCNT
、は2、RD CNT、は4であるため、キャプチャレ
ジスタ118の内容と、マクロサービスチャネル中のリ
セットデータを、ALU 101を利用して加算し、そ
の結果は、[PTR−WRCNT、x2−4 ]すなわ
ち[PTR−8]の式で表現されるアドレス、この場合
はワードバッファ(P2用)に格納される。The match signal 307 generates an interrupt request to the INTC 110 and starts the macro service. Also in this case,
Since the macro service mode is Ml, IlRCNT
, and RD CNT, IIIRCNT
, is 2, and RD CNT is 4, so the contents of the capture register 118 and the reset data in the macro service channel are added using the ALU 101, and the result is [PTR-WRCNT, x2-4 ] That is, the address expressed by the formula [PTR-8], in this case stored in the word buffer (for P2).
次に、IIRCNT、を1デクリメントし1にする。Next, IIRCNT is decremented by 1 to 1.
WRCNT、は0ではないので、ビット選択レジスタ(
SR)120の左シフト処理を実行し、出力ポートP3
に相当するビットだけ1にセットする。この場合もシフ
トアウトが発生しないため、タイミング制m謬109は
、割込み要求クリア信号302を[NTClloに出力
し、割込み要求フラグ111をリセットしてマクロサー
ビス処理を終了する。Since WRCNT is not 0, the bit selection register (
SR) 120 left shift processing and output port P3
Set only the bit corresponding to . Since shift-out does not occur in this case as well, the timing system error 109 outputs the interrupt request clear signal 302 to [NTCllo, resets the interrupt request flag 111, and ends the macro service processing.
再度コンペアレジスタ117からの一致信号307が発
生すると、この時には、出カポ−)P3のRSフリップ
70ツ1126だけがセットされ、出力ボートP、から
の出力パルスがハイレベルになり、気筒3に対する燃料
噴射が開始される。When the match signal 307 from the compare register 117 is generated again, at this time only the RS flip 70 1126 of the output port P3 is set, the output pulse from the output port P becomes high level, and the fuel for cylinder 3 is set. Injection begins.
一致信号307は、割込み要求をINTC110に対し
て発生し、マクロサービスを開始する。この場合にも、
マクロサービスモードがMlであるため。The match signal 307 generates an interrupt request to the INTC 110 and starts the macro service. Also in this case,
Because the macro service mode is Ml.
WRCNT、とRD CNT、 ノ比較を行なう、 W
RCNT、は1 、RD CNT、は4であるため、キ
ャプチャレジスタ118の内容と、マクロサービスチャ
ネル中のリセットデータを、ALU 101を利用して
加算し、その結果は、[PTR−WRCNT、x2−4
]すなわち(PTR−61の式で表現されるアドレス
、この場合はワードバッファ(P3用)に格納される。Compare WRCNT and RD CNT, W
Since RCNT is 1 and RD CNT is 4, the contents of the capture register 118 and the reset data in the macro service channel are added using the ALU 101, and the result is [PTR-WRCNT,x2- 4
] That is, (address expressed by the formula PTR-61, in this case stored in the word buffer (for P3).
次に、IIRCNT、を1デクリメントし0にする。Next, IIRCNT is decremented by 1 and set to 0.
WRCNT、が0になると、tNITノ値4をWRCN
T、に再設定する。そしてビット選択レジスタ(SR)
120の左シフト処理を実行する。この時にはシフトア
ウトが発生するため、タイミング制御部109は、形態
変更信号304をINTC110に対して出力し、形態
指定フラグ112をリセットする。When WRCNT becomes 0, the value of tNIT is changed to WRCN.
Reset to T. and bit selection register (SR)
120 left shift processing is executed. Since shift-out occurs at this time, the timing control unit 109 outputs the format change signal 304 to the INTC 110 and resets the format designation flag 112.
INTC110は、割込み要求フラグ111がセ・:?
ト状態にあり、形態指定フラグ112がリセット状態に
あるため、この場合には、通常のベクタ割込み要求をC
PU 100に対して発生し、以降、前述したベクタ割
込み処理を実行する0割込み処理プログラムでは、ビッ
ト選択レジスタ(SR)120を初期状態に再設定し、
出力ボートP0からの燃料噴射パルス出力に備える。The INTC 110 has the interrupt request flag 111 set to:?
In this case, the normal vector interrupt request is
In the 0 interrupt processing program that occurs to the PU 100 and thereafter executes the vectored interrupt processing described above, the bit selection register (SR) 120 is reset to the initial state,
Prepare for fuel injection pulse output from output boat P0.
次に、出力ボートP。に対する燃料噴射終了タイミング
を与えるコンペアレジスタ119からの一致信号308
が発生すると、ビット選択レジスタ(RR)121は、
出力ボートP、に対応するビットだけが1で、その他は
Oであるため、出カポ゛−トP。に対応するRSフリッ
プ70ツブ126だけがリセットされ、気筒Oに対する
燃料噴射は終了する。この−致信号308は、INTC
110に対して割込み要求を発生し、マクロサービスが
開始される、
この場合におけるマクロサービスモードはM2であるた
め、RD CNT、の1デクリメントを行ない3にする
。 RD CNT、が0ではないため次の処理に進み、
RD CNT、が3で、WRCNT、は燃料噴射開始タ
イミング側のマクロサービスの処理で4に初期設定され
ているため、WRCNT、とRD CNT、の一致がと
れず、[PTR−RD CNT、x2−4 ]すなわち
[PTR−101の式で表現されるアドレス、ワードバ
ッファ(Ps用)に格納されている燃料噴射パルス幅を
示すデータをコンペアレジスタ119に転送する。Next, the output boat P. Match signal 308 from compare register 119 giving the fuel injection end timing for
occurs, the bit selection register (RR) 121
Only the bit corresponding to the output port P is 1 and the others are O, so the output port P. Only the RS flip 70 knob 126 corresponding to is reset, and fuel injection to cylinder O is terminated. This signal 308 is the INTC
110, and the macro service is started. Since the macro service mode in this case is M2, RD_CNT is decremented by 1 to 3. Since RD CNT is not 0, proceed to the next process,
Since RD CNT is 3 and WRCNT is initially set to 4 by the macro service processing on the fuel injection start timing side, WRCNT and RD CNT do not match, and [PTR-RD CNT, x2- 4] That is, the address expressed by the formula [PTR-101] and data indicating the fuel injection pulse width stored in the word buffer (for Ps) are transferred to the compare register 119.
ビット選択レジスタ(RR)121における左シフト処
理により、出力ボートP1に対するビットだけが1とな
り、その他のビットはOとなる。この場合にはシフトア
ウトが発生しないため、タイミング制御部109は、割
込み要求クリア信号302をINTClloに対して出
力し、割込み要求フラグ111をリセットしてマクロサ
ービスを終了する。Due to the left shift processing in the bit selection register (RR) 121, only the bit for the output port P1 becomes 1, and the other bits become O. In this case, since shift-out does not occur, the timing control unit 109 outputs the interrupt request clear signal 302 to INTCllo, resets the interrupt request flag 111, and ends the macro service.
次に、出カポ−)Piに対する燃料噴射終了タイミング
を与えるコンペアレジスタ119からの一致信号308
が発生すると、ビット選択レジスタ(RR)121は、
出力ボートPLに対応するビットだけが1゜で、その他
は0であるため、出力ボートP、に対応するRSフリッ
プ70ツブ126だけがリセットされ、気筒1に対する
燃料噴射は終了する。この−致信号308は、INTC
110に対して割込み要求を発生し、マクロサービス処
理が開始される。Next, a coincidence signal 308 from the compare register 119 giving the fuel injection end timing for the output capo Pi
occurs, the bit selection register (RR) 121
Since only the bit corresponding to the output boat PL is 1° and the others are 0, only the RS flip 70 knob 126 corresponding to the output boat P is reset, and fuel injection to the cylinder 1 ends. This signal 308 is the INTC
An interrupt request is generated to 110, and macro service processing is started.
この場合のマクロサービスモードもM2であるため、R
D CNT、の1デクリメントを行ない2にする。RD
CNT、が0でないため次の処理に進み、RDCNT
、が2で、WRCNT、は燃料噴射開始タイミング側
のマクロサービスの処理において4に初期設定されてい
るため、WRCNT、とRD CNT、の一致がとれず
、 [PTR−RD CNT、x2−4 ]すなわち[
PTR−81の式で表現されるアドレス、ワードバッフ
ァ(P2用)に格納されている燃料噴射パルス幅を示す
データをコンペアレジスタ119に転送する。Since the macro service mode in this case is also M2, R
Decrement D CNT by 1 to make it 2. R.D.
Since CNT is not 0, proceed to the next process and RDCNT
, is 2, and WRCNT is initially set to 4 in the macro service processing on the fuel injection start timing side, so WRCNT and RD CNT do not match, and [PTR-RD CNT, x2-4] That is, [
The address expressed by the formula PTR-81 and data indicating the fuel injection pulse width stored in the word buffer (for P2) are transferred to the compare register 119.
ビット選択レジスタ(RR)12Lにおける左シフト処
理により、出力ボートP2に対するビットだけが1とな
り、その他のビットは0となる。こ場合にはシフトアウ
トが発生しないため、タイミング制御部109は、割込
み要求クリア信号302をr NTClloに対して出
力し、割込み要求フラグ111をリセットして、マクロ
サービス処理を終了する。Due to the left shift processing in the bit selection register (RR) 12L, only the bit for the output port P2 becomes 1, and the other bits become 0. In this case, shift-out does not occur, so the timing control unit 109 outputs the interrupt request clear signal 302 to r_NTCllo, resets the interrupt request flag 111, and ends the macro service processing.
次に、出力ボートP2に対する燃料噴射終了タイミング
を与えるコンペアレジスタ119からの一致信号308
が発生すると、ビット選択レジスタ(RR)121は、
出力ボートP2に対応するビットだけが1で、その他は
0であるため、出力ボートP2のRSフリップ70ヴプ
126だけがリセットされ、気筒2に対する燃料噴射は
終了する。9=の一致信号308は、1NTc 110
に対して割込み要求を発生し、マクロサービス処理が開
始される。Next, a coincidence signal 308 from the compare register 119 giving the fuel injection end timing for the output boat P2
occurs, the bit selection register (RR) 121
Since only the bit corresponding to the output boat P2 is 1 and the others are 0, only the RS flip 70vp 126 of the output boat P2 is reset, and fuel injection to the cylinder 2 ends. 9 = match signal 308 is 1NTc 110
An interrupt request is generated to start macro service processing.
この場合のマクロサービスモードもM2であるため、R
D CNT、の1デクリメントを行ない1にする。 R
D CNT、は0でないなめ次の処理に進み、RD C
NT、が1で、IIRCNT、は燃料噴射開始タイミン
グ側のマクロサービスの処理で4に初期設定されている
ため、WRCNT、とRD CNT、と一致がとれず、
[PTR−RD CNT、x2−4 ]すなわち(PT
R−6]の式で表現されるアドレス、ワードバッファ(
P3用)に格納されている燃料噴射パルス幅を示すデー
タをコンペアレジスタ119に転送する。Since the macro service mode in this case is also M2, R
Decrement D CNT by 1 to make it 1. R
If D CNT is not 0, proceed to the next process and RD C
NT is 1 and IIRCNT is initially set to 4 by the macro service processing on the fuel injection start timing side, so WRCNT and RD CNT do not match.
[PTR-RD CNT,x2-4] i.e. (PT
R-6] address, word buffer (
The data indicating the fuel injection pulse width stored in the register (for P3) is transferred to the compare register 119.
ビット選択レジスタ(RR)121における左シフト処
理により、出力ボートP、に対するビットだけが1とな
り、その他のビットは0となる。こ場合にはシフトアウ
トが発生しないため、タイミング制御部109は、割込
み要求クリア信号302をINTClloに対して出力
し、割込み要求フラグ111をリセットして、マクロサ
ービス処理を終了する。Due to the left shift processing in the bit selection register (RR) 121, only the bit for the output port P becomes 1, and the other bits become 0. In this case, shift-out does not occur, so the timing control unit 109 outputs the interrupt request clear signal 302 to INTCllo, resets the interrupt request flag 111, and ends the macro service processing.
次に、出力ボートP、に対する燃料噴射終了タイミング
を与えるコンペアレジスタ119からの一致信号30g
が発生すると、ビット選択レジスタ(RR)121は、
出力ボートP3に対応するビットだけが1で、その他は
Oであるため、出力ボートP3のRSフリップ70ツブ
126だけがリセットされ、気筒3に対する燃料噴射は
終了する。この一致信号308は、lNTc 110に
対して割込み要求を発生し、マクロサービス処理が開始
される。Next, a coincidence signal 30g from the compare register 119 giving the fuel injection end timing for the output boat P.
occurs, the bit selection register (RR) 121
Since only the bit corresponding to the output boat P3 is 1 and the others are O, only the RS flip 70 knob 126 of the output boat P3 is reset, and fuel injection to the cylinder 3 ends. This match signal 308 generates an interrupt request to the INTc 110 and macro service processing is initiated.
この場合のマクロサービスモードもM2であるため、R
D CNT、の1デクリメントを行ないOにする。 R
D CNT、は0になるためIN[Tの値は4に再設定
される。この結果、RD CNT、 =IIRCNTt
= 4 トなり、コンペアレジスタ119へのデータ
伝送は行なわれず、ビット選択レジスタ(RR)121
の左シフト処理に移行する。この場合には、ビット選択
レジスタ(RR)121からのシフトアウトが発生する
ため、タイミング制御部109は、形態変更信号304
をINTC110に対して出力し、形態指定フラグ11
2をリセットする。 INTC110は、割込み要求フ
ラグ111がセット状態にあり、形態指定フラグ112
がリセット状態にあるため、この場合には、通常のベク
タ割込み要求をCPυ100に対して発生し、以降、前
述したベクタ割込み処理を実行する。Since the macro service mode in this case is also M2, R
D CNT is decremented by 1 and becomes O. R
Since D CNT becomes 0, the value of IN[T is reset to 4. As a result, RD CNT, =IIRCNTt
= 4, no data is transmitted to the compare register 119, and the bit selection register (RR) 121
Shifts to left shift processing. In this case, since a shift out from the bit selection register (RR) 121 occurs, the timing control unit 109 controls the format change signal 304.
is output to the INTC 110, and the format specification flag 11 is
Reset 2. In the INTC 110, the interrupt request flag 111 is set, and the mode specification flag 112 is set.
Since it is in a reset state, in this case, a normal vector interrupt request is generated to CPυ100, and thereafter, the vector interrupt processing described above is executed.
燃料噴射終了タイミングで起動される割込み処理プログ
ラムにおいては、ビット選択レジスタ(RR)121を
初期状態に再設定し、出力ボートP、からの燃料噴射パ
ルス出力に備える。In the interrupt processing program started at the fuel injection end timing, the bit selection register (RR) 121 is reset to the initial state to prepare for the fuel injection pulse output from the output boat P.
本実施例においては、出力ボートP3の燃料噴射終了タ
イミング前に、他の気筒に対する燃料噴射開始タイミン
グが発生していない場合を示したが、例えば、出力ボー
トP3の燃料噴射終了タイミング前に、出力ボートP、
の燃料噴射開始タイミングが発生していたとすると、燃
料噴射開始タイミング側のマクロサービス処理で、キャ
プチャレジスタ118とリセットデータの加算結果が、
[PTR−WRCNT、x2−4 ]すなわち[PTR
−12]の式で表現されるアドレス、ワードバッファ(
Pa用)に格納され、その後 11RCNT、=3とな
るため、出カポ−)P3の燃料噴射終了タイミングで起
動されるマクロサービス処理においては、 IIRCN
T、=3ならびにRD CNT、=4となって不一致と
なる。この場合には、[PTR−12]の式で表現され
るアドレス、つまりワードバッファ(Po用)に格納さ
れているデータを、コンペアレジスタ119に転送する
処理が実行されるため、このような場合においても、論
理的に矛盾なく出力ボートP3に対する燃料噴射終了タ
イミングを得ることができる。In this embodiment, a case is shown in which the fuel injection start timing for other cylinders does not occur before the fuel injection end timing of the output boat P3, but for example, before the fuel injection end timing of the output boat P3, the output boat P,
Assuming that the fuel injection start timing has occurred, in the macro service processing on the fuel injection start timing side, the result of adding the capture register 118 and the reset data is
[PTR-WRCNT,x2-4] i.e. [PTR
-12] address, word buffer (
11RCNT (for Pa), and then becomes 11RCNT, = 3, so in the macro service process that is started at the end timing of fuel injection of output capo (P3), IIRCN
T,=3 and RD CNT,=4, resulting in a mismatch. In this case, the address expressed by the formula [PTR-12], that is, the data stored in the word buffer (for Po), is transferred to the compare register 119. Also, the fuel injection end timing for the output boat P3 can be obtained logically and without contradiction.
以上、第7図(a)および(b)に示されるパルスパタ
ーンの場合について説明をしてきたが、この二つのパタ
ーンの如何なる組合せにおいても、本マクロサービス処
理は適用可能である。Although the case of the pulse patterns shown in FIGS. 7(a) and 7(b) has been described above, the present macro service processing is applicable to any combination of these two patterns.
また、本実施例においては、ビット選択レジスタ(SR
)120とビット選択レジスタ(RR>121からのシ
フト処理の結果、シフトアウトが発生した場合にはベク
タ割込みを発生させ、割込み処理プログラムで初期化を
行なう方法を示したが、これは、エンジンの状態に応じ
て何等かの補正処理が必要となった場合、その補正タイ
ミングを与える目的で設定したもので、そのような補正
処理を必要としないシステムにおいては、ビット選択レ
ジスタ(SR)120またはビット選択レジスタ(RR
)121に対して、ローテート処理を実行し、ビット3
からのシフドア今トがビット0に転送されるようにマク
ロサービス処理を変更すれば、ベクタ割込み処理の発生
なしにマクロサービス処理だけで、完全な燃料噴射制御
が可能となる。In addition, in this embodiment, the bit selection register (SR
) 120 and the bit selection register (RR>121), if a shift out occurs as a result of shift processing, a vector interrupt is generated and initialization is performed using the interrupt processing program. This is set to provide the timing of correction when some kind of correction processing is required depending on the state.In systems that do not require such correction processing, the bit selection register (SR) 120 or bit Selection register (RR
) 121, performs rotation processing and bit 3
If the macro service processing is changed so that the shift door current from the start is transferred to bit 0, complete fuel injection control will be possible with just the macro service processing without the occurrence of vector interrupt processing.
次に、本発明の第2の実施例について説明する0本実施
例のシステム・ブロック図およびマクロサービスの処理
形態情報の構成は、第1の実施例の場合と同様であるた
め、その説明は省略する。第5図は、第2の実施例にお
ける周辺ハードウェアのブロック図である。Next, the second embodiment of the present invention will be explained. Since the system block diagram of this embodiment and the structure of the macro service processing form information are the same as those of the first embodiment, the explanation will be as follows. Omitted. FIG. 5 is a block diagram of peripheral hardware in the second embodiment.
第5図に示されるように11本実施例の周辺ハードウェ
アは、データバス300に対応して、フリーランニング
タイマ128と、コンペアレジスタ(図中にC014P
Iと記載)12つおよびコンペアレジスタ(図中にC
OMP 2と記載)131と、キャプチャレジスタ(図
中にCAPと記載)!30と、デイレイ回路132.i
33と、ビット選択レジスタ(SR)134と、ビット
選択レジスタ(RR)135と、それぞれ4個のAND
ゲート138を含む制御回路136.137と、4個の
出力ボートPo〜P3に対応する4個のRSフリップ7
0ツブ140ならびに4個のバッファ141を含むボー
ト出力口139と、を備えている。As shown in FIG. 5, the eleven peripheral hardware of this embodiment include a free running timer 128 and a compare register (C014P in the figure) corresponding to the data bus 300.
12 compare registers (denoted as I) and compare registers (denoted as C in the figure).
(written as OMP 2) 131, and a capture register (written as CAP in the diagram)! 30, and a delay circuit 132. i
33, bit selection register (SR) 134, bit selection register (RR) 135, and four ANDs each.
Control circuits 136 and 137 including gates 138 and four RS flips 7 corresponding to the four output ports Po to P3
A boat output port 139 including a zero tube 140 and four buffers 141 is provided.
第5図において、一致信号310および311は、それ
ぞれコンペアレジスタ129および131より出力され
る。ビット選択レジスタ(SR)134とビット選択レ
ジスタ(RR)135は、シフトレジスタ構成となって
おり、デイレイ回路132.133からの信号により、
1ビット単位で左シフトする。第1の実施例では、マク
ロサービスの指令によって、ビット選択レジスタ(SR
)120またはビット選択レジスタ(RR)121のシ
フト処理を実行したが、本実施例では、前述の一致信号
310または311をデイレイ回路132または133
によって数クロック遅延させた信号により、ビット選択
レジスタ(SR)134またはビット選択レジスタ(R
R)135のシフト処理を実行している。In FIG. 5, match signals 310 and 311 are output from compare registers 129 and 131, respectively. The bit selection register (SR) 134 and the bit selection register (RR) 135 have a shift register configuration, and are controlled by signals from delay circuits 132 and 133.
Shift left by 1 bit. In the first embodiment, the bit selection register (SR
) 120 or bit selection register (RR) 121, but in this embodiment, the above-mentioned match signal 310 or 311 is transferred to the delay circuit 132 or 133.
The bit selection register (SR) 134 or the bit selection register (R
R) 135 shift processing is being executed.
次に、本実施例におけるマクロサービス処理フローを第
6図に示す、ビット選択レジスタ(SR)134または
ビット選択レジスタ(RR)135におけるシフト−処
理が、デイレイ回路132またはデイレイ回路133に
よる遅延作用を介してハードウェア的に実行できた分、
第1の実施例に対して、マクロサービスのμプログラム
指令により実行するシフト処理の部分が削除され、マク
ロサービスの処理速度が向上される。その他の動作につ
いては、第1の実施例の場合と全く同様であるため、詳
細な説明は省略する。Next, the macro service processing flow in this embodiment is shown in FIG. 6. The shift processing in the bit selection register (SR) 134 or the bit selection register (RR) 135 is performed by the delay effect by the delay circuit 132 or the delay circuit 133. As much as it was possible to execute it hardware-wise via
In contrast to the first embodiment, the shift processing portion executed by the μ program command of the macro service is deleted, and the processing speed of the macro service is improved. The other operations are exactly the same as those in the first embodiment, so detailed explanation will be omitted.
以上、詳細に説明したように、本発明は、燃料噴射制御
タイミングの割込みおよび燃料噴射終了タイミングの割
込みなどを、マクロサービスによって処理し、ベクタ割
込み要求を発生しないため、エンジンの回転数を増して
も1割込み処理プログラムへ移行する際のpc、psw
のスタックへの退避や1割込み処理プログラムからメイ
ン処理に戻る時に、スタックの内容をPC,PSI譬へ
復帰する処理等においてCPU時間を占めることがない
。As described above in detail, the present invention processes interrupts such as fuel injection control timing interrupts and fuel injection end timing interrupts using macro services, and does not generate vector interrupt requests. PC and psw when transitioning to 1 interrupt processing program
The CPU time is not occupied in the process of saving the contents of the stack to the stack or returning the contents of the stack to the PC or PSI when returning from the interrupt processing program to the main process.
従って、エンジン制御における燃料噴射制御、点火時期
制御およびアイドル回転制御など種々雑多な仕事に十分
なCPU時間を割くことが可能となり、多気筒エンジン
による高速回転時にも、マイクロコンピュータが十分余
裕をもってエンジン制御を行なうことができるという効
果がある。Therefore, it is possible to allocate sufficient CPU time to various miscellaneous tasks such as fuel injection control, ignition timing control, and idle rotation control in engine control, and the microcomputer can control the engine with sufficient margin even when the multi-cylinder engine rotates at high speed. It has the effect of being able to do the following.
また、最近の排気ガス規制や燃料・費′1f1減などの
要求から、精度の高い燃料噴射制御が必要となっている
ことに対しても、燃料噴射開始タイミングおよび燃料噴
射終了タイミングを与えるコンペアレジスタからの一致
信号により、直接出力ボートを制御して燃料噴射パルス
を生成することで、割込み要因が発生してから割込み処
理プログラムが開始するまでの時間の遅れや、出力ボー
トへのデ−夕書込み時間による遅れなどなしに、最小限
の誤差でエンジン制御を行なうことができ、且つ各気筒
ごとに、それぞれ独立に制御することができるため、燃
料噴射量の調節を高い精度で行なうことが可能になると
いう効果もある。In addition, in response to the need for highly accurate fuel injection control due to recent exhaust gas regulations and demands for reductions in fuel costs, we have added a compare register that provides fuel injection start timing and fuel injection end timing. By directly controlling the output boat and generating fuel injection pulses based on the coincidence signal from The engine can be controlled with minimal errors without time delays, and each cylinder can be controlled independently, making it possible to adjust the fuel injection amount with high precision. It also has the effect of becoming.
更に加えて、従来例において示されたように、燃料噴射
パルスの重なり合い、重なり合いなしなどの場合を含め
て、様々な燃料噴射パターンをとる必要があるため、ソ
フトウェアの介在なしに、燃料噴射開始タイミング用と
終了タイミング用の2本のコンペアレジスタだけで、複
数の気筒に対応した制御を行なうことはできない、複数
の気筒に対応した制御を行なうためには、複数組のコン
ペアレジスタが必要になり、ハードウェア量が増大して
経済的な負担増となる点に関しても、燃料噴射開始タイ
ミングと燃料噴射終了タイミングとにおいて、本発明に
よる同一のマクロサービスチャネルを対応させたマクロ
サービス処理を適用することにより、IJIIのコンペ
アレジスタとキャプチャレジスタだけで、複数気筒に対
する燃料噴射制御が可能になり、ハードウェア量を増さ
ずに済ますことができる。このことは、気筒数が6個、
8個と増えても、マクロサービスチャネル内のワードバ
ッファの数を増すだけで全く同様な対応がとれるため、
経済的に非常に優位なエンジンM御システムを構成する
ことが可能となり、CPUと周辺回路を単一基盤上に集
積するシングルチップなどにも十分に適用させることが
できるという効果がある。In addition, as shown in the conventional example, it is necessary to take various fuel injection patterns, including cases where the fuel injection pulses overlap and do not overlap, so the fuel injection start timing can be determined without software intervention. It is not possible to perform control corresponding to multiple cylinders with only two compare registers for start and end timing. In order to perform control corresponding to multiple cylinders, multiple sets of compare registers are required. Regarding the issue of an increase in the amount of hardware and an increase in economic burden, by applying macro service processing in which the same macro service channel according to the present invention corresponds at the fuel injection start timing and fuel injection end timing, it is possible to solve the problem. , IJII's compare register and capture register alone make it possible to control fuel injection for multiple cylinders without increasing the amount of hardware. This means that the number of cylinders is 6,
Even if the number is increased to 8, the same response can be achieved by simply increasing the number of word buffers in the macro service channel.
It is possible to construct an economically very advantageous engine control system, and it has the effect that it can be fully applied to a single chip in which a CPU and peripheral circuits are integrated on a single board.
第1図は、本発明の第1および第2の実施例のシステム
・ブロック図、第2図は、前記第1の実施例における周
辺ハードウェアのブロック図、第3図は、マクロサービ
スの処理形態情報構成例を示す図、第4図は、第1の実
施例におけるマクロサービス処理フローチャートを示す
図、第5図は、前記第2の実施例における周辺ハードウ
ェアのブロック図、第6図は、第2の実施例におけるマ
クロサービス処理フローチャートを示す図、第7図(a
)および(b)は、出力ボートからの燃料噴射パルスの
出カバターンを示す図、第8図は、従来例のパルス発生
回路のシステム・ブロック図、第9図は、従来例におけ
る周辺ハードウェアのブロック図である。
図において、100,200・・・・・・CPU 、
101.201・・−・・・・・・ALU 、102,
202・・・・・・テンポラリレジスタ、103゜20
3・・・・・−汎用レジスタ、104.204・・・・
−・アドレスバッファ、105,205・・・・・・μ
アドレス生成部、106゜206−・−−−−PC11
07,207−−−−−−PSII 、LO8,208
−・・uROt4−109.209−== 9 イミン
ク1111m部、110゜210・・・・・−INTC
llll、211・・・・・・割込み要求フラグ、11
2・・−・・・形態指定フラグ、113.212・・・
・・・プログラムメモリ、L12.213・・・・・・
データメモリ、115.214・・・・−・周辺ハード
ウェア、116,128.215・・・・・・フリーラ
ンニングタイマ、117,119.L29.131,2
16.218゜219.220,221−・−・・・コ
ンペアレジスタ、11L130゜217・・・・・・キ
ャプチャレジスタ、120,134.・・・・・−ビッ
ト選択レジスタ(SR)、121.135・・・・・・
ビット選択レジスタ(RR)、 122,123,13
6,137・・・−・・制御回路、124.138・・
−・・・ANDゲート、125,139,222・・・
−・ボート出力回路、126,140・・・・・・RS
フリップフロップ、L27JIH,224・・・・−・
バッファ、132.133・・・・・・デイレイ回路、
223・−・−・・ボートレジスタ。FIG. 1 is a system block diagram of the first and second embodiments of the present invention, FIG. 2 is a block diagram of peripheral hardware in the first embodiment, and FIG. 3 is a macro service processing 4 is a diagram showing a macro service processing flowchart in the first embodiment, FIG. 5 is a block diagram of peripheral hardware in the second embodiment, and FIG. 6 is a diagram showing an example of configuration information configuration. , a diagram showing a macro service processing flowchart in the second embodiment, FIG.
) and (b) are diagrams showing the output turn of the fuel injection pulse from the output boat, FIG. 8 is a system block diagram of a conventional pulse generation circuit, and FIG. 9 is a diagram of peripheral hardware in the conventional example. It is a block diagram. In the figure, 100, 200...CPU,
101.201...ALU, 102,
202...Temporary register, 103゜20
3...-General purpose register, 104.204...
-・Address buffer, 105, 205...μ
Address generation unit, 106゜206-・----PC11
07,207----PSII, LO8,208
-...uROt4-109.209-== 9 Imink 1111m section, 110°210...-INTC
llll, 211... Interrupt request flag, 11
2...Form specification flag, 113.212...
...Program memory, L12.213...
Data memory, 115.214...-Peripheral hardware, 116,128.215...Free running timer, 117,119. L29.131,2
16.218°219.220,221--Compare register, 11L130°217--Capture register, 120,134. ...-Bit selection register (SR), 121.135...
Bit selection register (RR), 122, 123, 13
6,137...--control circuit, 124.138...
--AND gate, 125, 139, 222...
-・Boat output circuit, 126, 140...RS
Flip-flop, L27JIH, 224...-
Buffer, 132.133...delay circuit,
223・−・−・・Boat register.
Claims (1)
生装置において、 前記中央処理装置に対して非同期の割込み処理の要求を
発生するとともに、所定のデータ処理の要求をも発生す
る手段と、前記割込み処理の要求と前記所定のデータ処
理の要求とを識別するための形態指示手段と、を含む割
込み要求発生回路と、 所要のデータとともに、前記所定のデータ処理の処理形
態を指定する処理形態情報をも併せて格納するデータメ
モリと、 所定のフリーランニングタイマと、コンペアレジスタと
、所定のタイミングで前記フリーランニングタイマの値
を取込むキャプチャレジスタと、エンジン制御のための
噴射パルス発生用の複数の出力ポートと、を含む周辺ハ
ードウェアと、命令の実行アドレスを保持するプログラ
ムカウンタと、プログラムの実行状態を保持する手段と
、高速記憶手段と、マイクロプログラムROMと、を含
み、前記割込み要求発生回路から前記所定のデータ処理
の要求が発生され、前記形態指示手段において前記所定
のデータ処理を指示していることが検知された場合には
、命令実行処理を中断し、前記処理形態情報に従い、前
記コンペアレジスタと前記キャプチャレジスタと前記デ
ータメモリとを操作することにより、前記複数の出力ポ
ートから出力される自動車エンジン制御用の燃料噴射パ
ルスを制御する前記中央処理装置と、を備えることを特
徴とするパルス発生装置。[Claims] A pulse generator for controlling an automobile engine using a central processing unit, which generates a request for asynchronous interrupt processing to the central processing unit and also generates a request for predetermined data processing. an interrupt request generation circuit including means for specifying a form for identifying the interrupt processing request and the predetermined data processing request; and specifying the processing form of the predetermined data processing along with required data a data memory that also stores processing mode information, a predetermined free running timer, a compare register, a capture register that captures the value of the free running timer at a predetermined timing, and an injection pulse generation for engine control. peripheral hardware including: a plurality of output ports for the computer, a program counter for holding execution addresses of instructions, means for holding the execution state of the program, high-speed storage means, and a microprogram ROM; When a request for the predetermined data processing is generated from the interrupt request generation circuit and the format instruction means detects that the predetermined data processing is instructed, the instruction execution process is interrupted and the processing format is changed. The central processing unit controls fuel injection pulses for automobile engine control output from the plurality of output ports by operating the compare register, the capture register, and the data memory according to information. A pulse generator featuring:
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP33112788A JP2903526B2 (en) | 1988-12-28 | 1988-12-28 | Pulse generator |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP33112788A JP2903526B2 (en) | 1988-12-28 | 1988-12-28 | Pulse generator |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH02176143A true JPH02176143A (en) | 1990-07-09 |
| JP2903526B2 JP2903526B2 (en) | 1999-06-07 |
Family
ID=18240173
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP33112788A Expired - Lifetime JP2903526B2 (en) | 1988-12-28 | 1988-12-28 | Pulse generator |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2903526B2 (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5572977A (en) * | 1993-08-23 | 1996-11-12 | Nippondenso Co., Ltd. | Fuel injection control system for an internal combustion engine |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2731556B2 (en) | 1988-11-17 | 1998-03-25 | 日本電気株式会社 | Fuel injection control device |
-
1988
- 1988-12-28 JP JP33112788A patent/JP2903526B2/en not_active Expired - Lifetime
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5572977A (en) * | 1993-08-23 | 1996-11-12 | Nippondenso Co., Ltd. | Fuel injection control system for an internal combustion engine |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2903526B2 (en) | 1999-06-07 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US4095268A (en) | System for stopping and restarting the operation of a data processor | |
| US5117387A (en) | Microprogrammed timer processor | |
| US5126944A (en) | Data processing apparatus for producing in sequence pulses having variable width at output ports | |
| JPS6245578B2 (en) | ||
| JP2731556B2 (en) | Fuel injection control device | |
| JPH02176143A (en) | Pulse producing device | |
| US7930523B2 (en) | Inter-CPU data transfer device | |
| JP2536103B2 (en) | Data processing device | |
| JPH076435B2 (en) | Fuel injection control device | |
| JPH1063574A (en) | Processor with cache memory | |
| EP0333213B1 (en) | Microcomputer producing pulses at outout ports in sequence in response to request signal | |
| JPH0718373B2 (en) | Electronic fuel injection control device | |
| JPH0728507A (en) | Microcomputer system | |
| JP2536102B2 (en) | Data processing device | |
| JP2844624B2 (en) | Data processing device | |
| JP2551139B2 (en) | Information processing device | |
| JPS608331B2 (en) | Fuel control device for internal combustion engines | |
| JPS5942331B2 (en) | Prosetsusasouchinoseigiohoshiki | |
| JPS60159958A (en) | Data transfer controlling circuit | |
| JPH05250161A (en) | Microcomputer device | |
| JPH0285951A (en) | Input/output bus cycle control system | |
| JP2021060758A (en) | Vehicle control device | |
| JPS6120139A (en) | Interruption control system | |
| JPS6349941A (en) | Arithmetic processing unit | |
| JPH0675925A (en) | Information processor |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080326 Year of fee payment: 9 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090326 Year of fee payment: 10 |
|
| EXPY | Cancellation because of completion of term | ||
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090326 Year of fee payment: 10 |