JPS58222304A - Control system using microcomputer - Google Patents

Control system using microcomputer

Info

Publication number
JPS58222304A
JPS58222304A JP10537782A JP10537782A JPS58222304A JP S58222304 A JPS58222304 A JP S58222304A JP 10537782 A JP10537782 A JP 10537782A JP 10537782 A JP10537782 A JP 10537782A JP S58222304 A JPS58222304 A JP S58222304A
Authority
JP
Japan
Prior art keywords
counter
data
sensor
engine
output
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP10537782A
Other languages
Japanese (ja)
Inventor
Tatsuo Imai
達夫 今井
Shiro Baba
馬場 志朗
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Microcomputer System Ltd
Hitachi Ltd
Original Assignee
Hitachi Ltd
Hitachi Microcomputer Engineering Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd, Hitachi Microcomputer Engineering Ltd filed Critical Hitachi Ltd
Priority to JP10537782A priority Critical patent/JPS58222304A/en
Publication of JPS58222304A publication Critical patent/JPS58222304A/en
Pending legal-status Critical Current

Links

Classifications

    • FMECHANICAL ENGINEERING; LIGHTING; HEATING; WEAPONS; BLASTING
    • F02COMBUSTION ENGINES; HOT-GAS OR COMBUSTION-PRODUCT ENGINE PLANTS
    • F02DCONTROLLING COMBUSTION ENGINES
    • F02D28/00Programme-control of engines

Abstract

PURPOSE:To control effectively an engine of a car, by taking a prescribed time width determined depending on a built-in counter all as the unit of time measurement for applying interruption at each prescribed time. CONSTITUTION:A one-chip microcomputer MC is provided with a CPU1, an RAM2, and ROM3, a counter 4, an input port 5, and an output port 6 and the like. Further, the counter 4 counts a reference clock from a system clock generating circuit and the period of a count-up signal outputted from the counter 4 depends on preset data. A crank angle sensor DET1, an engine cooling water temperature sensor DET2, a suction amount sensor DET3, a ventilation oxygen density sensor DET4, and a car speed sensor DET5 are provided. An interruption is applied at each prescribed time to each sensor output by taking a prescribed time width determined with the counter 4 as the unit of time measurement.

Description

【発明の詳細な説明】 本発明は自動車のエンジン制御等に応用されるマイクロ
コンビエータ使用制御システムに関するものである。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a control system using a micro combinator which is applied to engine control of automobiles and the like.

フィクロコンビエータ(以下、マイコンといつ)に、セ
ントラルプロセッサユニット(opv)、データ配憶の
πめのランダJA7クセスメモリ(RAM)、プログラ
ムなどの適当な情報か書き込筐れ7t1)−ドオン11
メモリ(ROM)、人力ボート、出力ボートを含み、斐
に必9rIC応じてカウンタを含む。
The phycrocombinator (hereinafter referred to as microcomputer) has a central processor unit (OPV), a data storage π-th random access memory (RAM), a program, and other appropriate information. 11
It includes a memory (ROM), a manual port, an output port, and a counter depending on the required IC.

ここで1個の内蔵カウンタ〒含む1チツプマイコンを使
用することによって、自動車の電子制御キャブレタ、ア
イドルスピード制#等のエンジン制御、例えば、(1)
クランク角セン?(エンジン1回転毎に例えば3個のパ
ルス信号を発生)から発生されるパルス信号tカウント
する仁とによってエンジン回転数データを形成し、(2
)  基準パルスtカウントしたカウント数とデータと
の比軟によって出力をして一定周期でデユーティ(Du
ty)比が制御さnるパルスを発生する等の動作を含む
制御1’に行うような場合、上記内蔵カウンタとともに
外付けのカウンタが必要と賂れる。丁なゎち、例えば、
前記(2)のデータ形成のためにマイコンの内蔵カウン
タkit’用すると、前記(すの制御におけるパルス数
tカウントするのに外付はカウンタ7が必要となる。
Here, by using one chip microcomputer including one built-in counter, engine control such as electronically controlled carburetor, idle speed control, etc. of automobiles, for example, (1)
Crank angle? (For example, 3 pulse signals are generated for every engine rotation.) The engine rotation speed data is formed by counting the pulse signals t and (2
) The reference pulse t is output based on the ratio between the counted number and the data, and the duty (Du
ty) When performing control 1' including operations such as generating pulses with a controlled ratio, an external counter is required in addition to the above-mentioned built-in counter. For example,
If the built-in counter kit' of the microcomputer is used to form the data in (2) above, an external counter 7 is required to count the number of pulses t in the control described above.

本発明の目的扛、前記外付はカウンタk1gll除丁る
と共に制御機能を拡張した1チツプマイコンr使用し7
を低コストのマイコン応用システムを提供することにあ
る。
The purpose of the present invention is to use a one-chip microcomputer r with expanded control functions as well as a counter k1gll for the external device.
Our goal is to provide low-cost microcomputer application systems.

本発明に従うとマイコンにおける内戚カウンタによって
決められる一定時間幅が丁べての時間測定の単位とされ
、この内蔵カウンタの出力によって一定時間毎にプログ
ラムに割込みかかけらnることにより、種々の入力パル
スの周期測定、出力パルスの暢及び周期の決定等が行な
われる。
According to the present invention, a fixed time width determined by a built-in counter in a microcontroller is used as a unit for all time measurements, and the output of this built-in counter interrupts the program at fixed time intervals, thereby allowing various inputs to be processed. Measurement of pulse period, determination of output pulse duration and period, etc. are performed.

以下、実施例により、本発明の詳細な説明する。Hereinafter, the present invention will be explained in detail with reference to Examples.

第1図は、本発明r自動車のエンジン制御に適用する場
合のマイコン応用システムの一実施例のシステム図であ
る。
FIG. 1 is a system diagram of an embodiment of a microcomputer application system in which the present invention is applied to engine control of an automobile.

同図において、MOは、例えばHD6805 (商品名
)から111成される1チツプマイコンでめり、全体か
2点鎖−によって11!a、、、、fi Ay’t:、
各回路1ないし6r含んでいる。lチップヤイコンMO
においては、lはOf’U、2はパスラインBS’i(
弁して過当な情報のmm!込み及び読み出しか行なわれ
る、RAM、3はプログラム及び適当な情報か書き込1
れたROM、4はタイマーとして使用されるカウンタ、
5は入力ボート、そして6は出力ボートである。
In the same figure, the MO is a one-chip microcontroller made of, for example, HD6805 (product name) 111, and the entire MO is 11! a,,,,fi Ay't:,
Each circuit includes circuits 1 to 6r. l Chip Yacon MO
, l is Of'U and 2 is the pass line BS'i (
mm of unfair information! Only writing and reading are performed, RAM 3 is for programming and appropriate information or writing 1
4 is a counter used as a timer,
5 is an input boat, and 6 is an output boat.

カウンタ4は、lチップマイコンMO内に設けられる図
示しないシステムクロック発生回路から供給される基準
クロックrカウントする構成とされる。カウンタ4は、
凍た特に制限されないが、それにおけるカウント数か、
パスラインB519して供給されるプリセットデータに
よって指定されるような構成とされる。従って、カウン
タ4から出力されるカウントアツプ信号の周期eよ、上
記基準クロックの周期と上記プリセットデータによって
指定されるカウント数とによって決まる。カウンタ4の
カウントアツプ信号は、タイマー割込みイ=号T工Rと
してOPU 1に供給δれる。
The counter 4 is configured to count a reference clock r supplied from a system clock generation circuit (not shown) provided in the l-chip microcomputer MO. Counter 4 is
There is no particular limit to freezing, but the number of counts in it,
The configuration is such that it is specified by preset data supplied as a pass line B519. Therefore, the period e of the count-up signal output from the counter 4 is determined by the period of the reference clock and the count number specified by the preset data. The count-up signal of the counter 4 is supplied to the OPU 1 as a timer interrupt signal T.

第1図におりて、D凡T、ないしDEIT、は、例えは
それぞれクラン、、り角センサー、エンジン冷却水温度
センサー、吸気量センサー、排気M素#夏センサー、車
速センサーである。
In FIG. 1, D and T to DEIT are, for example, a crank, a steering angle sensor, an engine coolant temperature sensor, an intake air amount sensor, an exhaust M element, a summer sensor, and a vehicle speed sensor, respectively.

クランク角センサーDOT、は、エンジンのクランク軸
に結合され、クランク軸が特定の角度になつπときパル
ス信号を出力する。特に制限されないが、クランク角セ
ンサーD RT r [、クランク軸の1回転当り3個
のパルス信号を出力する構成とされる。
The crank angle sensor DOT is coupled to the engine crankshaft and outputs a pulse signal when the crankshaft is at a particular angle π. Although not particularly limited, the crank angle sensor D RT r [, is configured to output three pulse signals per revolution of the crankshaft.

クランク角センサーDgTiから出力されるパルス信号
は、クランク角情報とともに、エンジン回転速度情報を
含んでいる。エンジン回転速度情報は、クランク角セン
サーDJIITlから出力されるメルフ46号の周期1
!−1チツプマイコンMOのプログラムの実行によって
測定することによって、もしくはクランク角センサーD
ET、から単位時間当りに出力さnるパルス信号の数t
カウントすることによって得ることかできる。
The pulse signal output from the crank angle sensor DgTi includes engine rotation speed information as well as crank angle information. The engine rotation speed information is the period 1 of Melf No. 46 output from the crank angle sensor DJIITl.
! -1 By measuring by executing the program of the chip microcomputer MO or by crank angle sensor D
ET, the number of pulse signals output per unit time t
You can get it by counting.

クランク角センサーDJ!lTtから得られるクランク
角情報とエンジン回転速度情報は、クランク角かエン、
ジンの点火角に違するタイばングを求める上で1嶽でめ
り、比較的正確でめることか必費とされる。そこで、こ
の実施例では、クランク角センサーDfiT、の出力パ
ルス信号〃・ら倚られる情報音優先的に処理できるよう
にするため、この出力パルス信号はOPU1への外部割
込信号E工Rと  ′してoptyiに供給される。
Crank angle sensor DJ! The crank angle information and engine speed information obtained from lTt are determined by the crank angle, engine,
In order to find the tie-bang that differs from the ignition angle of the gin, it is said that it is necessary to be able to set it in one go, and it is relatively accurate. Therefore, in this embodiment, in order to preferentially process the information sound contained in the output pulse signal of the crank angle sensor DfiT, this output pulse signal is sent to the external interrupt signal E and R to the OPU1. and supplied to optyi.

エンジン冷却水温度センサーDIIIT、は、サーミス
タのような感温素子Th直とそれにバイアス電流を与え
るためのバイアス抵抗R1とからWt成され、エンジン
冷却水湯度に対応したアナログレベルの電圧を出力する
The engine coolant temperature sensor DIIIT is composed of a temperature sensing element such as a thermistor and a bias resistor R1 for applying a bias current to it, and outputs an analog level voltage corresponding to the engine coolant temperature. .

吸気センサーD[Tsは、エンジン吸気量に比例したア
ナログレベルの電圧を出力する。
The intake sensor D[Ts outputs an analog level voltage proportional to the engine intake amount.

排気eIt素濃度センサーDEIT4は、排気ガス中に
おける酸素濃度に比例したアナログレベルの電圧を出力
する。
The exhaust eIt elementary concentration sensor DEIT4 outputs an analog level voltage proportional to the oxygen concentration in the exhaust gas.

これらアナログセンサーDET、ないしDFltT4の
出力は、アナログ・ディジタル変換回路10に供給され
る。
The outputs of these analog sensors DET or DFltT4 are supplied to an analog-to-digital conversion circuit 10.

車速センサーDNTIrc、例えば自動車の変速機の出
力軸に結合され、その出力軸の1回転当v411iAI
7)ようなパルス信号を出力する。
Vehicle speed sensor DNTIrc, for example, coupled to the output shaft of a car transmission, and configured to detect v411iAI per revolution of the output shaft.
7) Output a pulse signal like this.

アナログ・ディジタル変換回#N!toは、その内部に
必要九応じて、センサーD It T z fx lh
 L D E T 4から供給湯几る信号會選択するた
めのマルチプレクサを含んでいる。この回路10の動作
は、lチップマイコンMO内のボート5から制御110
L7弁して供給される制御信号によって制御される。
Analog-digital conversion #N! to have a sensor D It T z fx lh as required inside it.
It includes a multiplexer for selecting the signal system to be supplied from L D E T 4 . The operation of this circuit 10 is controlled by the board 5 in the l-chip microcomputer MO.
It is controlled by a control signal supplied to the L7 valve.

この回路10から出力されるディジタル信号は、データ
線DLI介してボート5゛に供給される。
A digital signal output from this circuit 10 is supplied to the boat 5' via a data line DLI.

ボート5は、アナログ・ディジタル変換回路10から供
給されるディジタル信号に応じてセットされ、処理プロ
グラムの実行によってリセットされるようなラッチ回路
、及び同様に、車速センサー′DコTsから供給される
パルス信号によってセットでれ処理プログラムの実行に
よってリセットさnるようなラッチ回路r含んでいる。
The boat 5 includes a latch circuit that is set according to a digital signal supplied from the analog-to-digital conversion circuit 10 and reset by execution of a processing program, and a latch circuit that is similarly set according to a digital signal supplied from the analog-to-digital conversion circuit 10, and a latch circuit that is set according to a digital signal supplied from the analog-to-digital conversion circuit 10 and reset by the execution of a processing program. It includes a latch circuit r that is set by a signal and reset by execution of a processing program.

1チツプマイコンMO内の出力ポートロは、パスライン
B8r介して供給される制御信号に1つ′1:11 てそれぞれのセット、リセットか制御される覆数のラッ
チ回路を含んでいる。
The output ports in the one-chip microcomputer MO include an inverted number of latch circuits each set or reset by one '1:11 control signal supplied via the pass line B8r.

出力ホード6の出力は、必要に応じて設けられた駆動回
路DRVIないしD RV婁f弁してエンジンにおける
適当な電気機器に供給される。
The output of the output hoard 6 is supplied to appropriate electrical equipment in the engine via a drive circuit DRVI or DRV provided as required.

例えば、駆動回路DRV、の出力は、点火コイルに供給
さn1駆動回路DRV、の出力は、吸気バルブ制御のた
めの電磁ソレノイドに供給され、駆動回路DRYsの出
力は、排ガス再循環用バルブ制御のための電磁ソレノイ
ドに供給される。
For example, the output of the drive circuit DRV, is supplied to the ignition coil, the output of the drive circuit DRV, n1 is supplied to the electromagnetic solenoid for intake valve control, and the output of the drive circuit DRYs is supplied to the control of the valve for exhaust gas recirculation. is supplied to the electromagnetic solenoid for.

図示の回路のための電源電圧v0゜は、バッテリBから
の電圧vB12受ける定電圧回Mllによって形成され
る。
The supply voltage v0° for the illustrated circuit is formed by a constant voltage circuit Mll which receives a voltage vB12 from battery B.

この実施例では、1個の内部カウンタのみで、以下のよ
うな情報処@lがソフト的に行なわnlその結果前記の
外付はカウンタのようなカウンタを必要としない。
In this embodiment, the following information processing @l is performed by software using only one internal counter.As a result, the above-mentioned external counter is not required.

(1)クランク角センサDKT、から出力されるパルス
信号の周期の1+測。
(1) 1+ measurement of the period of the pulse signal output from the crank angle sensor DKT.

(2)車速センサDHT、から出力さnるパルス信号の
周期の針側o”1111”””’′□・(3)出力パル
スの周期、パルス暢の制御。
(2) Needle side of the period of the pulse signal output from the vehicle speed sensor DHT.(3) Control of the period of the output pulse and the pulse length.

第2図は、第4図の実施例のシステムの処理タイミング
を示したタイミング図である。。
FIG. 2 is a timing diagram showing the processing timing of the system of the embodiment shown in FIG. .

上記のような情報処理において、倚るべ@種々のカウン
タデータは、それぞれRAMZ内の適当な番地内に記憶
される。インターバルタイマーとしてのカウンタ4から
カウントアツプ信号が出力言nると、丁なわちタイマー
割込み要求(TLmθr工nt6rrupt R8qu
eat、以下T工Rという)か出場nると、ROMa内
に予め4にき込まれているタイマー割込みプログラムか
実行はれる。タイマー割込みプログラムの実行によって
、RAMZ内の種々のカウンタデータが更新さnる。第
3図には、タイマー割込みプログラムの実行とメインプ
ログラムの実行(メインルーチン)とのタイムチャート
か水式れている。
In the above information processing, various counter data are stored at appropriate addresses in the RAMZ. When a count-up signal is output from the counter 4 as an interval timer, a timer interrupt request (TLm
When the timer interrupt program (hereinafter referred to as T-R) is entered, the timer interrupt program stored in ROMA in advance is executed. By executing the timer interrupt program, various counter data in RAMZ are updated. FIG. 3 shows a time chart of the execution of the timer interrupt program and the execution of the main program (main routine).

従って、RAMZ内の櫨々のカウンタデータは、カウン
タ4によって決められる時間ベース(時間単位)h持つ
。カウンタ4から出力される1百号の周期は、例えばR
AMZ内に保持させるべきカウンタデータに狭求石れる
時間単位に応じて過当に決定することができる。特にf
f1lJ限されないか、カウンタ4の出力信号の周期は
160μ日とされる。
Therefore, the counter data in the RAMZ has a time base (time unit) h determined by the counter 4. For example, the period of 100 output from the counter 4 is R
The counter data to be held in the AMZ can be determined excessively depending on the time unit required. Especially f
The period of the output signal of the counter 4 is assumed to be 160 μ days.

上記(1)の情報処理のために、RA M、 2内には
2つの番地が割り当てられる。この2つめ番地のうちの
1つを工Nとし、残りの1つの番地?Rとする。
Two addresses are allocated within the RAM 2 for the information processing in (1) above. One of these second addresses is engineering number N, and the remaining one address? Let it be R.

クランク角センサーDET、から出力さnるパルス信号
によって0PUIに外部割り込み要求(Fixtern
al 工nterrupt R@qu6st 、以下E
工Rという)が出されると、これによって外部割込み処
理プログラムが起動される。外部wt+p込み処理プロ
グラムか実行されると、それによってRA−M2の番地
IN内の内容が番地R内に書き込まれ、かつ番地IN内
の内容がOにリセットされる。な−お 外部割込み処理
プログラムは、必要に応じて、RAMZ内の適当な番地
内に、外部割り込み処理プログラム実行葡意味するフラ
グデータ會セットさせるための命令を含む。
An external interrupt request (Fixtern) is sent to 0PUI by a pulse signal output from the crank angle sensor DET.
al engineering interrupt R@qu6st, hereinafter E
When an external interrupt processing program (referred to as R) is issued, an external interrupt processing program is activated. When the external wt+p write processing program is executed, the contents at address IN of RA-M2 are written into address R, and the contents at address IN are reset to O. Note that the external interrupt processing program includes an instruction for setting flag data indicating the external interrupt processing program in an appropriate address in RAMZ, if necessary.

外S割り込み処理プログラムの実行の後、カウンタ4か
ら出力されるT工Rによってタイマー割込み処理プログ
ラム力S実行されると、そnによってRAM2の帯地工
N内の内容か1だけ増加(インクリメント)さnる。
After the external S interrupt processing program is executed, when the timer interrupt processing program S is executed by the T function outputted from the counter 4, the content in the band process N of the RAM 2 is increased (incremented) by 1. nru.

従って、クランク角センサーDET、から再びE工Rが
出さノするまでの間に、RAM2の番地IN内の内容は
、TIRが生じた回数に等しb値に更新ぜ7Lる。言い
換えると、TIJ’tが160μaに1回生じるので、
番地IN内の内容ハ、クランク角* ンt  D Jn
 T tから出力されるパルス48号の周期に対応され
た値まで増加さnる。
Therefore, during the period from the crank angle sensor DET until the engine R is output again, the content in the address IN of the RAM 2 is updated to a value b equal to the number of times TIR occurs.7L. In other words, TIJ't occurs once every 160μa, so
Contents in address IN: Crank angle* Nt D Jn
It increases from Tt to a value corresponding to the period of pulse No. 48 outputted.

クランク角センサーDI!tT、から栴び出力されるパ
ルス信号によって再び外部割込み処理プログラムか実行
されると、1iiJ記と同様にRAM2の番地工Nの内
容か番地R内に書き込まれ、番地IN内の内容か0にリ
セットされる。その結果、番地R内には、クランク角セ
ンサーD B T R(D 出7]パルス信号の周期に
対応した値、言込換えればエンジンの回転速度に比例し
たイーオー夕が書き込まれることになる。
Crank angle sensor DI! When the external interrupt processing program is executed again by the pulse signal output from tT, the contents of address N in RAM2 are written to address R, and the contents of address IN are written to 0, as in 1iiJ. will be reset. As a result, a value corresponding to the cycle of the crank angle sensor DBTR (D output 7) pulse signal, in other words, an EO value proportional to the engine rotational speed is written in the address R.

Fi’iJ記情報処@(2)も上配情報処1と同様に行
なわiする。この実施例では、車速センサDOT、から
のパルス13号は、罰自己のようにボート5におけるラ
ッチ回路に供給される。従って、ボート5におけるラッ
チ回路は、車速センサDEIT、からパルス信号か出力
さnたときにセット状態にされる。車速データの処理の
ために、RAMZ内には前記と同様に2つの番地が割り
当てらnる。ここで、上記2つの番地のうちの1つt工
v1残りの1つ’IMとする。
The Fi'iJ record information processing@(2) is also carried out in the same manner as the superior information processing 1. In this example, pulse number 13 from the vehicle speed sensor DOT is fed to the latch circuit in the boat 5 in a self-contained manner. Therefore, the latch circuit in the boat 5 is set when a pulse signal is output from the vehicle speed sensor DEIT. For processing vehicle speed data, two addresses are allocated in the RAMZ as described above. Here, it is assumed that one of the above two addresses is ``t'' and the remaining one is ``IM''.

前記と同様にカウンタ4からTIRか出されるとこれに
応じてタイマー割込み処理プログラムか実行さnる。タ
イマー割込み処理プログラムによって、ボート5内にお
ける上記車速センサーD[Tlと対応されたラッチ回路
のセット、リセット状態−か判定される。
Similarly to the above, when TIR is output from the counter 4, the timer interrupt processing program is executed in response. The timer interrupt processing program determines whether the latch circuit corresponding to the vehicle speed sensor D[Tl in the boat 5 is set or reset.

上記ラッチ回路かりセット状態にされている場合、上記
判定に続くプログラムの実行によってRAM20番地X
V内の内容かlたけ増加さnる。
If the latch circuit is in the set state, the execution of the program following the above determination causes the RAM address
The content in V is increased by l.

番地lV内の内容は、上記ラッチ回路かりセット状態に
さnている期間におhて、タイマー割込みプログラムが
実行される毎に増加される。従って、番地lV内の内容
は車速センサーDJ11.T、から出力されるパルス信
号の周期に対応された値に向けて増加される。
The contents at address lV are incremented each time the timer interrupt program is executed during the period when the latch circuit is in the set state. Therefore, the contents in address lV are vehicle speed sensor DJ11. T, is increased toward a value corresponding to the period of the pulse signal output from T.

上記ラッチ回路がセット状態にされている場合、RAM
20番地IV内の内容か番地M内に書き込まれ、上記番
地工V内の内容が0にリセットされる。またボート5に
おける上記ラッチ回路もリセットされる。その結果、R
AM2の番地M内には車速センサーDPIT、から出力
されるパルス信号の周期に比例した値のデータ、言い換
えると車速に比例し7を値のデータが保持嘔nることに
なる。
When the above latch circuit is set, the RAM
The contents of address 20 IV are written to address M, and the contents of address V are reset to zero. The latch circuit in the boat 5 is also reset. As a result, R
In address M of AM2, data with a value proportional to the period of the pulse signal output from the vehicle speed sensor DPIT, in other words, data with a value 7 proportional to the vehicle speed is held.

前記情報部[(3)は次のようにして行なうことかでき
る。RAM2には、この情報処理(3)Kよって形成さ
れる檎々のカウンタデータr配憧するための適当な番地
が設定式れる。そこで、このカウンタデータを配憶する
ためにRAM2内に設足さnる番地−、工T1%  工
T1及びIT、とする。
The information section [(3) can be performed as follows. In the RAM 2, an appropriate address is set for storing the counter data r of the records formed by this information processing (3)K. Therefore, in order to store this counter data, it is assumed that an address n is set in the RAM 2 as T1% T1 and IT.

特に制限されないか、RAM2の番地IT&は駆動回路
DRV、と対応され、査地工T[は駆動回路DRVIと
対応され、更に番地工T3は駆動回路DRY婁と対応式
れる。
Although not particularly limited, the address IT& of RAM2 corresponds to the drive circuit DRV, the address T[ corresponds to the drive circuit DRVI, and the address T3 corresponds to the drive circuit DRY.

前記タイマー割込み処理プログラムは、前記の情報部1
(1)及び(2)の実行のための種々の命令とともに、
情報処理実行のための種々の命令tも含む。
The timer interrupt processing program includes the information unit 1.
With various instructions for the execution of (1) and (2),
It also includes various instructions t for executing information processing.

タイマー割込み処理プログラムの実行によって、RAM
2の番地工T11 工Tl及び工T3  内のデータが
それぞれ1ずつ更新される。同じプログラムの実行によ
って番地lTI内の更新されたデータが、RAMZ内の
適当な番地内に予め書き込まれている屏比較データと比
較され、この更新されたデータと第1比軟データとか一
致していれば、この比較結果にもとづiてボート6内の
MA#回路DRV。
By executing the timer interrupt processing program, the RAM
The data in addresses T11, T1 and T3 of No. 2 are each updated by 1. By executing the same program, the updated data in the address lTI is compared with the comparison data written in advance in an appropriate address in RAMZ, and it is determined whether the updated data and the first ratio soft data match. If so, MA# circuit DRV in boat 6 is determined based on this comparison result.

に対応はれたラッチ回路がセット状態にさnる。The corresponding latch circuit is set to the set state.

=仄いで、番地17区内の更新されたデータが、RAM
2内の適当な番地内に予め書き込まnている第2比較デ
ータと比軟され、この更新されたデータと第2比較デー
タとが一致していれば、この比較結果にもとづいてボー
ト6内の駆動回路DRVIに対応されたラッチ回路かり
セット状態にもと逼れ、またRAM2の番地工T1内の
データか0にリセットされる。これによって、jlAl
lb回路DRV、に対応されたボート6内のラッチ回路
は% Flr定の期間だけ、丁なわち、RAM2の番地
ITi内のデータか第1比叡テータと等しい値になって
から第2比較データと等しい値になるまでの期間だけセ
ット状態におかnる。
= The updated data within the 17th block of address is stored in RAM.
If the updated data and the second comparison data match, the data in the boat 6 is compared with the second comparison data previously written in an appropriate address in the boat 6. The latch circuit corresponding to the drive circuit DRVI returns to the set state, and the data in the address T1 of the RAM 2 is reset to 0. By this, jlAl
The latch circuit in the boat 6, which corresponds to the lb circuit DRV, outputs the second comparison data for a period of %Flr, that is, after the data in address ITi of RAM 2 reaches a value equal to the first Hiei theta. The set state is maintained only for a period until the values become equal.

RAM2の番地工T!及び工T3内のカウントデータは
、[1ソレノイドの制御のために利用式nる。このよう
なカウントデータを利用する制御動作は、比較的低速動
作であっても良い。そこで、特に制限逼れないが、RA
M2の番地工T2及びITs内のカウントデータを利用
する慣報処@は、タイマー割込み処理プログラムの実行
の後のメインプログラムの実行(メインルーチン)によ
って行なわれる。
RAM2 addressee T! And the count data in T3 is used to control the solenoid. Control operations using such count data may be relatively slow operations. Therefore, although there are no particular restrictions, RA
The routine processing @ which uses the address code T2 of M2 and the count data in ITs is performed by executing the main program (main routine) after executing the timer interrupt processing program.

丁なわち、メインプログラムの実行によって、RAM2
0番地工T!内のデー−かRAM20適当:11・□・
11 な番地内に予め薔き込まnた第3比較データと比較さn
l  もしこれらのデータの比較結果か一致していれは
、七の比11M来にもとついてボート6内の駆動回1I
IIDRV、に対応されたラッチ回路かリセット状態に
される。仄い・でRAM2内の上記番地工T!内のデー
タが、ROMa内に予め畳き込まれた固定比較データと
比IMキれ、もしもこれらのデータの比較結果か一致し
ていれば、その比軟結果にもとついてボート6内の駆動
回路DRV、に対応さnたランチ回路かセット状態にさ
れ、ま7jRAM2の番地工T冨内のデータが(HCリ
セットされる。
In other words, by executing the main program, RAM2
0th address engineering T! Inner data or RAM20 appropriate: 11・□・
11 Compare with the third comparison data that has been entered in advance within the address.
l If the comparison results of these data match, then the drive circuit 1I in the boat 6 based on the ratio 11M of the seventh
The latch circuit corresponding to IIDRV is reset. The above address in RAM2 is blurred! The data in the IM is compared with the fixed comparison data convoluted in advance in the ROMa, and if the comparison results of these data match, the drive in the boat 6 is changed based on the comparison result. The launch circuit corresponding to circuit DRV is set, and the data at address T of RAM2 is reset (HC).

従って、駆動回路DRV、に対応されたラッチ回路は、
上記固定比較データによって決められるパルス期間の1
絢期のうち、上記第3比較データによって決められる期
閣友はセット状態にされる。
Therefore, the latch circuit corresponding to the drive circuit DRV is
1 of the pulse period determined by the above fixed comparison data
Among the Ayan periods, the period determined by the third comparison data is set.

上記番地工T3内のリセットされたデータは、タイマー
割込み処理プログラムか再び実行IAることによって順
次に更新される。
The reset data in the address code T3 is sequentially updated by executing the timer interrupt processing program again.

特に制限されないか、第2図には固定比較データか16
1Jと場れた場合、丁なわちボート6内のラッチ回路か
ら出ガさ・れるパルス信号の1周期か160μs X 
160 (= 25.6ms )  とされた場合のタ
イミングチャートか示されている。
Is there no particular restriction, or is there fixed comparison data in Figure 2?
1J, that is, one period of the pulse signal output from the latch circuit in the boat 6, or 160μs
160 (=25.6ms).

RAM20番地lTl内のデータは、上記番地工T、内
のデータと同様な手順によって処理される。
The data in RAM 20 address lTl is processed by the same procedure as the data in address T.

駆動回路DRVgに対応されたラッチ回路は、固定比較
データによって決められるパルス期間の1周期のうち、
RAM2の適当な番地内に書き込まれ7を第4比較デー
タによって決められる期間だけセット状態にされる。
The latch circuit corresponding to the drive circuit DRVg is configured to perform one cycle of the pulse period determined by the fixed comparison data.
It is written into an appropriate address in RAM 2, and 7 is kept in a set state for a period determined by the fourth comparison data.

メインプログラムは、アナログセンサーDffiT。The main program is analog sensor DffiT.

ないしDjnT4から出力埒nるアナログレベルの電圧
tアナログーディジタル変換回路10によってディジタ
ル信号に変換させた上でRAM20適当な番地内゛に1
1き込ませるプログラムを含む。
Alternatively, the analog level voltage t outputted from DjnT4 is converted into a digital signal by the analog-to-digital conversion circuit 10, and then stored in the RAM 20 at an appropriate address.
1. Contains a program to be loaded.

メインプログラムは、また、上記第1ないし第4比をデ
ータr形底するためのプログラムを含む。
The main program also includes a program for converting the first to fourth ratios into an r-shaped base.

ROM 3ri、fi制御丁べきエンジンの特性によっ
て決定さnb%性データに含む。例えはエンジンtJM
切な動作状態に嘔せるために、適当な点火進角を設足す
ることか必貴とされる。この点火進角に エンジンの回
転速度とエンジン温度(エンクン冷却水編匿ンとの関数
とみなされる。従って、ROMa内には、制御子べきエ
ンジンに応じて歳虐なエンジン回転数対点火タイミング
データか各エンジン湛度毎に書き込壕れる。なお、RO
Ma内に保持されるべきエンジン特性データは、ROM
3の記憶容量の増加を防ぐために、飛び飛びのサンプリ
ング値とされる。サンプリング値とサンプリング値との
間の必要とされるべきデータは、プログラムの実行によ
る補間演算によって形成される。
ROM 3RI, FI control engine characteristics are determined by the characteristics of the engine and are included in the NB% performance data. For example, engine tJM
In order to achieve proper operating conditions, it is necessary to provide an appropriate ignition advance angle. This ignition advance angle is considered to be a function of engine rotational speed and engine temperature (engine coolant storage).Therefore, in ROMA, the engine rotational speed vs. ignition timing data is stored in the control device depending on the engine. It is written for each engine level.In addition, the RO
Engine characteristic data to be held in Ma is ROM
In order to prevent an increase in the storage capacity of 3, sampling values are taken at discrete intervals. The required data between the sampled values is formed by interpolation operations by executing the program.

従ってメインプログラムの実行によって、例えば第1比
較データは次のようにして形成される。
Therefore, by executing the main program, for example, the first comparison data is formed as follows.

丁なわち、RAMZ内に書き込まれた実際のエンジン温
度データとエンジン回転数データか参照嘔れ、この実際
の温度データとエンジン回転数データに近い2つのエン
ジン温度サンプリング値とエンジン回転数値に対応した
2つの点火タイミングデータかROM3から読み出場れ
る。読み出された2つの点火タイミングデータvfil
i11.データとする補間演算によって、実際のエンジ
ン温度とエンジン回転数に通したタイミングデータか形
成される。このタイばングデータか#Il比11Rf−
夕してRAMZ内に41き込まれる。
In other words, it refers to the actual engine temperature data and engine speed data written in RAMZ, and corresponds to two engine temperature sampling values and engine speed values that are close to the actual temperature data and engine speed data. Two ignition timing data can be read from ROM3. Two read ignition timing data vfil
i11. By interpolating the data, timing data is formed that passes through the actual engine temperature and engine speed. Is this tying data #Il ratio 11Rf-
In the evening, 41 is written into RAMZ.

第2比軟データは、第1比較データにハr定のデータr
加其することによって形成される。
The second comparative soft data is the constant data r
It is formed by adding.

駆動回路DRVIに結合される図示しない点火コイルは
、この駆動回路DRY、に対応するボート6内のラッチ
回路かセット状態にされている間、すなわち、クランク
角センサーD]1iT、からパルス信号が発生されかつ
上記点火タイミングデータによって指定された期間か経
過したときから所定の期間、において駆#芒nる。  
  ′ 同様に、第3比較データは、ROMa内に書き込まれた
エンジン湯度及びエンジン回転数対吸気パルプ制御デー
タのようなデータと、適当な補間演算によって形成場れ
る。
The ignition coil (not shown) connected to the drive circuit DRVI generates a pulse signal from the crank angle sensor D]1iT while the latch circuit in the boat 6 corresponding to the drive circuit DRY is set. The engine is activated for a predetermined period after the period specified by the ignition timing data has elapsed.
Similarly, the third comparison data is formed by data such as engine hot water temperature and engine speed versus intake pulp control data written in ROMa and appropriate interpolation calculations.

IIA勤回路DRI/、に結合される図示しない吸気バ
ルブr躯動するtめの電磁ソレノイドには、このMAI
Jh回路DRV、に対応するボート6内のラッチ回路か
セットちれている間、丁なわち、前記のようにl周期1
60p8X 160当り第2比戦データによって指示さ
nrt期間ずつ駆動電流か流される。従つて、この電磁
ソレノイドに流路れる駆動を流の平均値は、第2比較デ
ータの値と比例賂れる。電磁ソレノイドから出力される
機械力は、第2比較データの値と比例される。その結果
、吸気バルブのバルブ開度は、第2比較データと対応さ
れる。
This MAI is connected to the third electromagnetic solenoid that moves the intake valve (not shown) connected to
While the latch circuit in the boat 6 corresponding to the Jh circuit DRV is set, that is, l period 1 as described above.
60p8x160 The drive current is passed for each nrt period as instructed by the second ratio data. Therefore, the average value of the drive flow flowing through the electromagnetic solenoid is proportional to the value of the second comparison data. The mechanical force output from the electromagnetic solenoid is proportional to the value of the second comparison data. As a result, the valve opening degree of the intake valve corresponds to the second comparison data.

第4比較データは類似の方法によって形成される。排ガ
ス再循環用バルブは、駆動回路DRV3に結合される図
示しない電磁ソレノイドによって駆動さn、そのバルブ
開度が第4比較データと対応されπ値にされる。
The fourth comparison data is formed by a similar method. The exhaust gas recirculation valve is driven by an electromagnetic solenoid (not shown) coupled to the drive circuit DRV3, and the opening degree of the valve is made into a π value in correspondence with the fourth comparison data.

なお、この実施例において、前記処理が実用になるため
の条件は、マイコンの砧令実行時間く力°ウンタ(イン
ターバルタイマー)のa定値<パルス入力及びパルス出
力の幅1周期である。
In this embodiment, the conditions for the above-mentioned process to become practical are as follows: a constant value of the microcomputer's command execution time counter (interval timer) < width of one cycle of pulse input and pulse output.

また、ボート6から出力されるパルス信号のパルxON
幅及びパルス周期はカウンタ4(インターi<ルタイマ
ー)の値の整数倍になる。
Also, the pulse xON of the pulse signal output from the boat 6
The width and pulse period are integral multiples of the value of counter 4 (interval i<timer).

別記処理におけるメインルーチン、a工Rルーチン、f
f1IRルーチンのフロチャートは#44図に示されて
いる。
Main routine, a-R routine, f in separate processing
A flowchart of the f1IR routine is shown in Figure #44.

前述のシステムのタイマー割込みは160μ8に限定し
ているか、本発明の方式ではタイマー割込みレジスタ1
C任意の値tセットすることで割込み時間も任意にする
ことができる。七のため、例えば8ビツト構成のデータ
をする場合であって、し 、かもパルス周期がかなり長
くなっても、それに対応できる。本発明に従うと、例え
ば、自動車のアイドリンク状態におけるエンジンの回転
数を本発明のシステムによりオートチョークを制御して
任意に設定することかできる。
In the system described above, the timer interrupt is limited to 160 μ8, or in the system of the present invention, the timer interrupt register 1
By setting t to an arbitrary value, the interrupt time can be set arbitrarily. Therefore, even if the pulse period is considerably long, for example, when data is in an 8-bit configuration, it can be handled. According to the present invention, for example, it is possible to arbitrarily set the engine rotational speed of an automobile in an idling state by controlling an auto choke using the system of the present invention.

なお、本発明は自動車に駆足されることなく、他の分野
にも応用できる。
Note that the present invention is not limited to automobiles and can be applied to other fields as well.

以上説明したように、本発明に工れば、内蔵のカウンタ
(インターバルタイマー)による一定時間幅を丁べての
時間測定の単位とし、一定時間毎に割込みケかけること
により、人カッくルスの周期の測定、出力パルスの幅及
び周期等を設定することかでさるようにしたので、入出
カッくルス処理か外付はカウンターなしに行うことかで
き、低コストのマイコン応用システムを提供することか
てき特に、前記処理手段は、パルス入力、パルス出力か
何本あっても同じようにして実行できるので、自動車エ
ンジン制御に有用である。
As explained above, according to the present invention, by using a built-in counter (interval timer) as a unit of time measurement, a built-in counter (interval timer) is used as a unit of time measurement, and by interrupting at regular intervals, it is possible to Since it is possible to measure the period and set the width and period of the output pulse, input/output pulse processing and external connection can be performed without a counter, thereby providing a low-cost microcomputer application system. In particular, the processing means is useful for automobile engine control because it can be executed in the same way regardless of the number of pulse inputs and pulse outputs.

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

第1図は、本発明による自動車搭載用マイコンシステム
の一実施例のブロック歯、 第2図は、第1図の実施例の処理タイミング勿示した図
、 第3図は、割込みに説明するための図、第4図は、メイ
ンルーチン、TIRルーチン及びE工Rルーチンのフロ
ーチャートである。 第  2 図 第  3 図
FIG. 1 is a block diagram of an embodiment of a microcomputer system for use in an automobile according to the present invention, FIG. 2 is a diagram showing the processing timing of the embodiment of FIG. 1, and FIG. 3 is a diagram for explaining an interrupt. FIG. 4 is a flowchart of the main routine, TIR routine, and E/R routine. Figure 2 Figure 3

Claims (1)

【特許請求の範囲】 OPυ、RAM 、ROM 、入出力ボート及び1・ご
−p 個Oカウンタを有するクロコンピユータを使用した制御
システムであって、前記カウンタにより決められる一定
時間幅r丁べての時間測定の単位とし、一定時間毎に割
込みにかけることにより、入力パルスの鳩期測定、出力
パルスの暢及び周期等を設定する手段’に備えたことt
特徴とするマイクロコンピュータを使用したtlllJ
ll シ’スf l−0
[Claims] A control system using a computer having an OPυ, a RAM, a ROM, an input/output board, and 1.0 counters, the control system comprising: a constant time period determined by the counters; It is a unit of time measurement and has a means for measuring the period of input pulses and setting the duration and period of output pulses by interrupting at regular intervals.
tlllJ using a featured microcomputer
ll sis f l-0
JP10537782A 1982-06-21 1982-06-21 Control system using microcomputer Pending JPS58222304A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10537782A JPS58222304A (en) 1982-06-21 1982-06-21 Control system using microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10537782A JPS58222304A (en) 1982-06-21 1982-06-21 Control system using microcomputer

Publications (1)

Publication Number Publication Date
JPS58222304A true JPS58222304A (en) 1983-12-24

Family

ID=14405987

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10537782A Pending JPS58222304A (en) 1982-06-21 1982-06-21 Control system using microcomputer

Country Status (1)

Country Link
JP (1) JPS58222304A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE4117815C3 (en) * 1991-05-31 1999-03-18 Bosch Gmbh Robert Regulation arrangement, in particular for motor vehicles
DE19851974B4 (en) * 1998-11-03 2011-04-28 Robert Bosch Gmbh Method and device for controlling operations in a vehicle

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE4117815C3 (en) * 1991-05-31 1999-03-18 Bosch Gmbh Robert Regulation arrangement, in particular for motor vehicles
DE19851974B4 (en) * 1998-11-03 2011-04-28 Robert Bosch Gmbh Method and device for controlling operations in a vehicle

Similar Documents

Publication Publication Date Title
USRE35197E (en) Monolithic integrated circuit having common external terminal for analog and digital signals and digital system using the same
US4380979A (en) Idling revolution control device for an internal combustion engine
US4430976A (en) Method for controlling air/fuel ratio in internal combustion engines
US4482962A (en) Engine control method
KR890002530A (en) Engine Control System Using Learning Control
US4664085A (en) Air-fuel ratio control system for an automotive engine
US4254744A (en) Method and apparatus for measuring air quantity in relation to engine speed
EP0740059A2 (en) An A/D conversion control apparatus for an internal combustion engine
JPS58222304A (en) Control system using microcomputer
JPH07271408A (en) Processor for control
JP3323655B2 (en) Control processing device and one-chip microcomputer
KR940001332B1 (en) Engine control method
JP2759957B2 (en) Engine control method
US4428051A (en) Electronic control apparatus for internal combustion engine
US4562812A (en) Electronic ignition control for internal combustion engine
US4188922A (en) Digital control device for a fuel injection system of an internal combustion engine
Breitzman et al. Development of an optimal automotive control custom microprocessor
JPS58156142U (en) Internal combustion engine electronic control unit
KR950000914B1 (en) Process and digital control unit for determining and controlling pulse-width modulated operating values in internal combustion engine
JPS6232258A (en) Method of detecting variation of number of revolution of internal combustion engine
JPS60122237A (en) Electronic engine controller
JPS55124806A (en) Sequencing circuit of microcomputer
JP2903526B2 (en) Pulse generator
JPH0868356A (en) Internal combustion engine control device
KR900007464B1 (en) Emulation system for electronic fuel injection device