JPH102248A - Current-carrying control device for electric load - Google Patents

Current-carrying control device for electric load

Info

Publication number
JPH102248A
JPH102248A JP15571196A JP15571196A JPH102248A JP H102248 A JPH102248 A JP H102248A JP 15571196 A JP15571196 A JP 15571196A JP 15571196 A JP15571196 A JP 15571196A JP H102248 A JPH102248 A JP H102248A
Authority
JP
Japan
Prior art keywords
drive signal
time
register
level
count value
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
Application number
JP15571196A
Other languages
Japanese (ja)
Other versions
JP3458602B2 (en
Inventor
Takayoshi Honda
隆芳 本多
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.)
Denso Corp
Original Assignee
Denso Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Denso Corp filed Critical Denso Corp
Priority to JP15571196A priority Critical patent/JP3458602B2/en
Publication of JPH102248A publication Critical patent/JPH102248A/en
Application granted granted Critical
Publication of JP3458602B2 publication Critical patent/JP3458602B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To improve control responsiveness in the case of duty control a current of an electric load. SOLUTION: A microcomputer 4 outputting a drive signal Po controlling duty ratio in order to control a current of a solenoid L is provided with a CPU 14 calculating duty ratio of the drive signal Po in each prescribed period to store a count value showing a high level time TON during 1 period TS of the drive signal in a register RON in the inside and a PWM output circuit 16 performing action such as repeatedly counting 1 period TS of the drive signal by a counter also starting counting of a new 1 period TS, at each low outputting the drive signal Po, transmitting a count value from the register RON of the CPU 14 to a self register R2, when a value of the counter leads to a count value in the register R2, inverting the drive signal Po to a high level. Accordingly, the PWM output circuit 16, when the count value in the register RON is changed, is constituted so as to instantaneously transmit the latest count value to the register R2.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、電気負荷へ電流を
流す駆動手段に対して、デューティ比を制御したパルス
状の駆動信号を出力することにより、電気負荷に流れる
電流を制御する電気負荷の通電制御装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an electric load for controlling a current flowing through an electric load by outputting a pulse-shaped driving signal with a controlled duty ratio to a driving means for flowing a current to the electric load. The present invention relates to an energization control device.

【0002】[0002]

【従来の技術】従来より、例えば車両においては、内燃
機関のスロットル弁をバイパスするバイパス通路に電磁
ソレノイド式の電磁弁(アイドル制御弁)を設け、その
電磁弁の開弁量を調節することにより、内燃機関のアイ
ドル回転数を制御している。また、自動変速機の油圧経
路に上記と同様の電磁弁を設け、その電磁弁の開弁量を
調節することにより、自動変速機の変速制御を行ってい
る。
2. Description of the Related Art Conventionally, for example, in a vehicle, an electromagnetic solenoid type solenoid valve (idle control valve) is provided in a bypass passage which bypasses a throttle valve of an internal combustion engine, and the opening amount of the solenoid valve is adjusted. And controls the idle speed of the internal combustion engine. Further, a shift valve of the automatic transmission is controlled by providing an electromagnetic valve similar to the above in the hydraulic path of the automatic transmission and adjusting the opening amount of the electromagnetic valve.

【0003】そして、このようなアイドル回転数制御や
変速制御を行う制御装置では、特開昭61−65048
号公報や特開平4−232360号公報に開示されてい
るように、電磁弁の電磁ソレノイドへ電流を流す駆動回
路に対して、デューティ比を制御したパルス状の駆動信
号を出力することにより、電磁ソレノイドに流れる電流
を制御して、電磁弁の開弁量を調整するようにしてい
る。
A control device for performing such idle speed control and shift control is disclosed in Japanese Patent Application Laid-Open No. 61-65048.
As disclosed in Japanese Unexamined Patent Publication (Kokai) No. Hei 4-232360, a pulse-like drive signal with a controlled duty ratio is output to a drive circuit for flowing a current to an electromagnetic solenoid of a solenoid valve. The current flowing through the solenoid is controlled to adjust the opening amount of the solenoid valve.

【0004】即ち、駆動信号の1周期におけるハイレベ
ル時間或いはロウレベル時間の割合(デューティ比)に
応じて、駆動回路により電磁ソレノイドへ流される電流
の平均値を制御することができ、延いては、駆動信号の
デューティ比によって電磁弁の開弁量を調節することが
できる。そこで、この種の電磁弁を制御する制御装置で
は、CPU(中央処理装置)等の演算部が、所定の演算
周期毎に、電磁弁の目標開弁量に応じた駆動信号のデュ
ーティ比を算出し、この演算部とは別個に設けられた駆
動信号出力用の論理回路が、演算部にて算出されたデュ
ーティ比で駆動回路へ駆動信号を出力するようにしてい
る。
That is, the average value of the current flowing to the electromagnetic solenoid by the drive circuit can be controlled in accordance with the ratio (duty ratio) of the high level time or the low level time in one cycle of the drive signal. The opening amount of the solenoid valve can be adjusted by the duty ratio of the drive signal. Therefore, in a control device for controlling this type of solenoid valve, a calculation unit such as a CPU (central processing unit) calculates a duty ratio of a drive signal according to a target opening amount of the solenoid valve at every predetermined calculation cycle. Then, a drive signal output logic circuit provided separately from the operation unit outputs the drive signal to the drive circuit at the duty ratio calculated by the operation unit.

【0005】具体的に説明すると、CPU等からなる演
算部は、算出したデューティ比に基づいて、駆動信号の
1周期中における反転タイミング(つまり、駆動信号の
1周期の開始時を起点として、その信号レベルを反転さ
せるまでの時間)を求め、その反転タイミングを示すデ
ータを、RAMの特定アドレスに格納するようにしてい
る。一方、駆動信号出力用の論理回路は、駆動信号の1
周期を繰り返してカウントするためのカウンタと、駆動
信号の1周期中における反転タイミングを示すデータを
記憶するためのレジスタとを備えており、カウンタの値
に基づき検出される駆動信号の各1周期の開始時点で、
駆動信号をハイレベル或いはロウレベルの何れかで出力
すると共に、演算部によってRAMの上記特定アドレス
に格納されているデータを上記レジスタに転送し、その
後、カウンタの値が上記レジスタに記憶したデータ値と
等しくなると駆動信号の出力レベルを反転させる、とい
った動作を繰り返すように構成されている。
More specifically, an arithmetic unit including a CPU and the like, based on the calculated duty ratio, uses the inversion timing in one cycle of the drive signal (that is, starting from the start of one cycle of the drive signal as a starting point). The time until the signal level is inverted is obtained, and data indicating the inversion timing is stored at a specific address of the RAM. On the other hand, the logic circuit for outputting the drive signal has the drive signal 1
A counter for repeatedly counting the period; and a register for storing data indicating the inversion timing during one period of the drive signal, wherein each of the periods of the drive signal detected based on the value of the counter is provided. At the start,
The drive signal is output at either the high level or the low level, and the data stored in the specific address of the RAM is transferred to the register by the arithmetic unit. Thereafter, the counter value is changed to the data value stored in the register. The operation of inverting the output level of the drive signal when they become equal is repeated.

【0006】そして、このような構成により、演算部が
駆動信号を出力するための複雑な処理を実行する必要な
く、駆動回路へ所望デューティ比の駆動信号を出力する
ことができるようにしている。
[0006] With such a configuration, it is possible to output a drive signal having a desired duty ratio to the drive circuit without having to execute complicated processing for outputting a drive signal by the arithmetic unit.

【0007】[0007]

【発明が解決しようとする課題】しかしながら、上記従
来の制御装置では、演算部によって算出されたデューテ
ィ比が、実際の出力に反映されるまでには、最大で駆動
信号1周期分の時間を要してしまい、制御応答性を向上
させるには限度があるという問題があった。
However, in the above-mentioned conventional control device, it takes a maximum of one cycle of the drive signal before the duty ratio calculated by the arithmetic unit is reflected on the actual output. Thus, there is a problem that there is a limit in improving the control response.

【0008】つまり、上記従来の制御装置では、前述し
たように、演算部と駆動信号出力用の論理回路とが非同
期で動作すると共に、論理回路は、駆動信号1周期の開
始時点で、そのときRAMに格納されているデータを自
己のレジスタへ転送するように構成されているため、駆
動信号の1周期中に、演算部が最新のデューティ比を算
出して、それに対応するデータをRAMに格納しても、
その最新のデータは、次回の駆動信号の周期でしか出力
に反映されないのである。
That is, in the above-described conventional control device, as described above, the arithmetic unit and the drive signal output logic circuit operate asynchronously, and the logic circuit operates at the start of one cycle of the drive signal. Since the data stored in the RAM is transferred to its own register, the arithmetic unit calculates the latest duty ratio during one cycle of the drive signal and stores the corresponding data in the RAM. Even
The latest data is reflected on the output only in the cycle of the next drive signal.

【0009】尚、このような問題は、電磁弁(電磁ソレ
ノイド)を制御する場合に限らず、他の電気負荷への通
電を駆動信号のデューティ比によって制御する場合につ
いても、同様である。また、上述した特開平4−232
360号公報には、CPU等の演算部が、駆動信号の1
周期よりも短い時間間隔で、デューティ比の演算処理と
駆動信号の出力処理とを行うことにより、演算結果を駆
動信号の出力に素早く反映させることが提案されている
が、このようにすると、演算部の処理負荷が膨大になっ
てしまい、他の制御処理を行うことができなくなってし
まう。
[0009] Such a problem is not limited to the case where the electromagnetic valve (electromagnetic solenoid) is controlled, but also applies to the case where the energization to other electric loads is controlled by the duty ratio of the drive signal. Further, the above-mentioned Japanese Patent Application Laid-Open No. 4-232
In Japanese Patent Publication No. 360, an arithmetic unit such as a CPU includes a drive signal 1
It has been proposed that the calculation result of the duty ratio and the output processing of the drive signal are performed at a time interval shorter than the cycle, so that the calculation result is promptly reflected in the output of the drive signal. The processing load on the unit becomes enormous, and other control processes cannot be performed.

【0010】本発明は、このような問題に鑑みなされた
ものであり、CPU等からなる演算部の処理負荷を増加
させずに、電気負荷への電流を制御する際の制御応答性
を向上させることができる電気負荷の通電制御装置を提
供することを目的としている。
The present invention has been made in view of such a problem, and improves control responsiveness when controlling a current to an electric load without increasing a processing load of an arithmetic unit including a CPU and the like. It is an object of the present invention to provide an electric load energization control device that can perform the control.

【0011】[0011]

【課題を解決するための手段、及び発明の効果】上記目
的を達成するためになされた請求項1に記載の電気負荷
の通電制御装置は、電気負荷へ電流を流す駆動手段に対
して、デューティ比を制御したパルス状の駆動信号を出
力することにより、その電気負荷に流れる電流を制御す
るものであり、演算部と駆動信号出力部とを備えてい
る。
Means for Solving the Problems and Effects of the Invention In order to achieve the above object, an electric load energization control device according to claim 1, wherein a drive means for flowing a current to the electric load has a duty cycle. By outputting a pulse-shaped drive signal whose ratio is controlled, the current flowing through the electric load is controlled, and it includes a calculation unit and a drive signal output unit.

【0012】そして、演算部は、所定の演算周期毎に、
外部からの情報に基づき駆動信号のデューティ比を算出
して、駆動信号の1周期の開始時を起点として該駆動信
号の信号レベルを第1レベルから第2レベルに反転させ
るまでの時間を示すデータを、特定の記憶領域に格納す
る。
[0012] Then, the arithmetic unit, for each predetermined arithmetic cycle,
Data indicating the duty ratio of the drive signal based on information from the outside and indicating the time from the start of one cycle of the drive signal until the signal level of the drive signal is inverted from the first level to the second level Is stored in a specific storage area.

【0013】一方、駆動信号出力部は、演算部の演算周
期とは同期せずに前記駆動信号の1周期を繰り返して計
時する計時手段と、前記特定の記憶領域に格納されたデ
ータを記憶するための記憶手段と、前記計時手段が前記
駆動信号の新たな1周期の計時を開始する度に、その時
点で前記特定の記憶領域に格納されているデータを読み
出して前記記憶手段に記憶させるデータ転送手段と、前
記計時手段にて計時される時間が前記記憶手段に記憶さ
れたデータの示す時間を経過したか否かを判定する判定
手段と、前記計時手段が前記駆動信号の新たな1周期の
計時を開始する度に、前記駆動信号の信号レベルを前記
第1レベルに設定し、前記判定手段により肯定判定され
ると、前記駆動信号の信号レベルを前記第2レベルに設
定する信号レベル設定手段と、該信号レベル設定手段に
より設定された信号レベルに応じて、前記駆動信号を前
記駆動手段に出力する出力手段と、を有している。
[0013] On the other hand, the drive signal output unit stores time data that is clocked by repeating one cycle of the drive signal without synchronizing with the calculation cycle of the calculation unit, and data stored in the specific storage area. Storage means for reading the data stored in the specific storage area at that time and storing the data in the storage means each time the timing means starts timing of a new cycle of the drive signal Transfer means, determination means for determining whether or not the time measured by the time measurement means has exceeded the time indicated by the data stored in the storage means, and wherein the time measurement means determines a new cycle of the drive signal. The signal level for setting the signal level of the drive signal to the first level and setting the signal level of the drive signal to the second level when the determination unit makes an affirmative determination each time the time measurement is started. A constant section, in response to a signal level set by the signal level setting means, and said drive signals have an output means for outputting to said driving means.

【0014】即ち、駆動信号出力部では、計時手段が、
演算部の演算周期とは同期せずに駆動信号の1周期を繰
り返して計時する。そして、この計時手段が駆動信号の
新たな1周期の計時を開始する度に、データ転送手段
が、その時点で前記特定の記憶領域に格納されているデ
ータを読み出して、その読み出したデータを前記記憶手
段に記憶させると共に、信号レベル設定手段が、駆動信
号の信号レベルを第1レベルに設定する。
That is, in the drive signal output unit, the time measuring means
One cycle of the drive signal is repeated and clocked without being synchronized with the calculation cycle of the calculation unit. Each time the timing means starts timing of a new cycle of the drive signal, the data transfer means reads the data stored in the specific storage area at that time, and reads the read data. The signal level setting means sets the signal level of the drive signal to the first level while storing the signal in the storage means.

【0015】また、判定手段が、計時手段にて計時され
る時間が記憶手段に記憶されたデータの示す時間を経過
したか否かを判定し、この判定手段により肯定判定され
ると(つまり、計時手段にて計時される時間が記憶手段
に記憶されたデータの示す時間を経過したと判定される
と)、信号レベル設定手段が、駆動信号の信号レベルを
第2レベルに設定する。
The determination means determines whether or not the time measured by the time measurement means has exceeded the time indicated by the data stored in the storage means. If the determination means makes an affirmative determination (ie, If it is determined that the time measured by the timer means has elapsed the time indicated by the data stored in the storage means), the signal level setting means sets the signal level of the drive signal to the second level.

【0016】そして、出力手段が、信号レベル設定手段
により設定された信号レベルに応じて、駆動信号を前記
駆動手段に出力するため、この出力手段から駆動手段へ
出力される駆動信号は、計時手段が駆動信号の新たな1
周期の計時を開始する度に、第1レベルとなり、計時手
段にて計時される時間が記憶手段に記憶されたデータの
示す時間を経過すると、第2レベルに反転する。
The output means outputs a drive signal to the drive means in accordance with the signal level set by the signal level setting means. Is a new driving signal
Each time the timing of the cycle is started, the level becomes the first level, and when the time measured by the timing means elapses the time indicated by the data stored in the storage means, the level is inverted to the second level.

【0017】よって、このような駆動信号出力部の動作
により、演算部が駆動信号を出力するための特別な処理
を実行することなく、駆動手段へは、演算部により特定
の記憶領域に格納されたデータに応じたデューティ比
で、駆動信号が出力されることとなる。
Thus, by the operation of the drive signal output section, the arithmetic section does not execute a special process for outputting the drive signal, and the drive section stores the drive signal in a specific storage area by the arithmetic section. The drive signal is output at a duty ratio according to the data.

【0018】ここで、駆動信号出力部をただ単に上記の
如く構成しただけでは、「発明が解決しようとする課
題」の項で説明したように、駆動信号の1周期中(つま
り、計時手段が駆動信号の新たな1周期の計時を開始し
てから次の1周期の計時を開始するまでの間)に、演算
部が最新のデータを特定の記憶領域に格納しても、その
最新データは駆動信号の次の周期でしか出力に反映され
ないこととなる。
Here, if the drive signal output section is simply constructed as described above, as described in the section "Problems to be Solved by the Invention", during one cycle of the drive signal (that is, when Even if the arithmetic unit stores the latest data in a specific storage area between the start of the timing of a new cycle of the drive signal and the start of the timing of the next cycle, the latest data is The output is reflected only in the next cycle of the drive signal.

【0019】そこで特に、請求項1に記載の通電制御装
置では、駆動信号出力部に、更に、監視手段とデータ変
更手段とを設けている。そして、監視手段は、計時手段
が駆動信号の新たな1周期の計時を開始してから次の1
周期の計時を開始するまでの間に、前記特定の記憶領域
に格納されているデータが記憶手段に記憶されているデ
ータから変化したか否かを監視し、この監視手段により
データの変化が検出されると、データ変更手段が、前記
特定の記憶領域に格納されているデータを読み出して、
その読み出したデータを記憶手段に新たに記憶させる。
Therefore, in the power supply control device according to the first aspect, the drive signal output unit is further provided with monitoring means and data changing means. Then, the monitoring means starts the next one after the timing means starts the timing of a new one cycle of the drive signal.
It is monitored whether or not the data stored in the specific storage area has changed from the data stored in the storage means until the timing of the cycle is started, and a change in the data is detected by the monitoring means. Then, the data change means reads the data stored in the specific storage area,
The read data is newly stored in the storage means.

【0020】このような請求項1に記載の通電制御装置
によれば、計時手段が駆動信号の新たな1周期の計時を
開始してから次の1周期の計時を開始するまでの間に、
演算部の演算周期が到来して、演算部により特定の記憶
領域に前回のデータとは異なる最新のデータが格納され
ると、駆動信号出力部においては、このことが監視手段
により検出され、特定の記憶領域に格納された上記最新
のデータが、データ変更手段によって記憶手段に転送さ
れる。
According to the energization control device of the first aspect, the time counting means starts the timing of the new one cycle of the drive signal and starts the timing of the next one cycle.
When the operation cycle of the operation unit arrives and the operation unit stores the latest data different from the previous data in the specific storage area, this is detected by the monitoring unit in the drive signal output unit, and The latest data stored in the storage area is transferred to the storage means by the data change means.

【0021】よって、この転送時点で、駆動手段へ出力
されている駆動信号の信号レベル(以下、駆動信号の出
力レベルともいう)が未だ第1レベルであり(換言すれ
ば、計時手段にて計時されている時間が記憶手段に記憶
されていた前回データの示す時間を経過しておらず)、
且つ、計時手段にて計時されている時間が記憶手段に新
たに記憶された最新データの示す時間を経過していない
場合には、その後、判定手段により肯定判定された時に
(つまり、計時手段にて計時される時間が記憶手段に新
たに記憶された最新データの示す時間を経過したと判定
された時に)、駆動手段の出力レベルが第1レベルから
第2レベルに反転することとなる。
Therefore, at the time of this transfer, the signal level of the drive signal output to the drive means (hereinafter also referred to as the output level of the drive signal) is still the first level (in other words, the time is counted by the timekeeping means). Time has not passed the time indicated by the previous data stored in the storage means),
If the time measured by the time counting means has not passed the time indicated by the latest data newly stored in the storage means, then when the determination means makes a positive determination (that is, the time counting means (When it is determined that the time indicated by the latest data newly stored in the storage means has elapsed), the output level of the driving means is inverted from the first level to the second level.

【0022】また、上記転送時点で駆動信号の出力レベ
ルが未だ第1レベルであり、且つ、計時手段にて計時さ
れている時間が記憶手段に新たに記憶された最新データ
の示す時間を既に経過していた場合には、判定手段によ
り即座に肯定判定されて、駆動手段の出力レベルは、即
座に第1レベルから第2レベルに反転することとなる。
At the time of the transfer, the output level of the drive signal is still the first level, and the time measured by the timer means has already passed the time indicated by the latest data newly stored in the storage means. If so, an affirmative determination is immediately made by the determining means, and the output level of the driving means is immediately inverted from the first level to the second level.

【0023】このように、請求項1に記載の通電制御装
置によれば、演算部によって特定の記憶領域に格納され
るデータを、駆動信号の今回の周期に反映することがで
き、この結果、演算部の処理負荷を全く増加させずに、
電気負荷への電流を制御する際の制御応答性を向上させ
ることができる。
As described above, according to the power supply control device of the first aspect, the data stored in the specific storage area by the arithmetic unit can be reflected in the current cycle of the drive signal. Without increasing the processing load of the arithmetic unit at all
Control responsiveness when controlling the current to the electric load can be improved.

【0024】ところで、請求項1に記載の通電制御装置
では、上記の如くデータ変更手段によって記憶手段に最
新のデータが転送された時に、駆動信号の出力レベルが
既に第2レベルに反転されている場合(即ち、計時手段
にて計時されている時間が記憶手段に記憶されていた前
回データの示す時間を経過していた場合)には、記憶手
段に新たに記憶された最新データの示す時間が未だ経過
していなくても、駆動信号の出力レベルは、計時手段が
次の1周期の計時を開始するまでは、第2レベルのまま
となる。
By the way, in the power supply control device according to the first aspect, when the latest data is transferred to the storage means by the data change means as described above, the output level of the drive signal has already been inverted to the second level. In this case (that is, when the time measured by the clock means has elapsed the time indicated by the previous data stored in the storage means), the time indicated by the latest data newly stored in the storage means has Even if the time has not yet elapsed, the output level of the drive signal remains at the second level until the timing means starts timing of the next one cycle.

【0025】そこで、請求項2に記載の通電制御装置で
は、信号レベル設定手段が、判定手段により否定判定さ
れている間、駆動信号の信号レベルを第1レベルに設定
するように構成されている。このような請求項2に記載
の通電制御装置によれば、データ変更手段によって記憶
手段に最新のデータが転送された時に、駆動信号の出力
レベルが既に第2レベルに反転していても、計時手段に
て計時されている時間が最新データの示す時間を経過し
ておらず、判定手段によって否定判定されれば、駆動信
号の出力レベルは第2レベルから第1レベルに戻ること
となる。そして、その後、計時手段にて計時される時間
が上記最新データの示す時間を経過して、判定手段によ
り肯定判定されると、駆動信号の出力レベルは再び第1
レベルから第2レベルに反転することとなる。
Therefore, in the energization control device according to a second aspect, the signal level setting means sets the signal level of the drive signal to the first level while the determination means makes a negative determination. . According to the energization control device of the second aspect, when the latest data is transferred to the storage unit by the data change unit, even if the output level of the drive signal has already been inverted to the second level, the time is measured. If the time measured by the means has not passed the time indicated by the latest data, and the determination means makes a negative determination, the output level of the drive signal returns from the second level to the first level. Then, after that, the time measured by the timer means elapses the time indicated by the latest data, and when the determination means makes an affirmative determination, the output level of the drive signal is again set to the first level.
It will be inverted from the level to the second level.

【0026】よって、請求項2に記載の通電制御装置に
よれば、駆動信号の出力レベルのうち、第2レベルの出
力時間を短くする方の応答性を、より向上させることが
できる。一方、請求項3に記載の電気負荷の通電制御装
置では、請求項1又は請求項2に記載の通電制御装置に
おいて、駆動手段は、車両に搭載されたバッテリからの
電源供給を受けて前記電気負荷へ電流を流すように構成
されており、演算部は、前記バッテリの電圧を検出する
電圧検出手段と、該電圧検出手段により検出された電圧
の値に応じて、その電圧値が低い場合ほど、前記特定の
記憶領域に格納するデータを電気負荷に流れる電流が大
きくなるように補正する補正手段と、を備えている。
Therefore, according to the power supply control device of the second aspect, of the output levels of the drive signal, the response of shortening the output time of the second level can be further improved. According to a third aspect of the present invention, in the energization control device for an electric load according to the first or second aspect, the driving unit receives the power supply from a battery mounted on the vehicle and receives the electric power. The arithmetic unit is configured to flow a current to a load, and the calculation unit is configured to detect a voltage of the battery, and, according to a value of the voltage detected by the voltage detection unit, the lower the voltage value, Correction means for correcting the data stored in the specific storage area so that the current flowing to the electric load becomes large.

【0027】そして更に、請求項3に記載の通電制御装
置において、駆動信号出力部のデータ変更手段は、前記
特定の記憶領域に格納されているデータが、前記記憶手
段に記憶されているデータに対して、電気負荷に流れる
電流が大きくなるように変化した場合にだけ、前記特定
の記憶領域に格納されているデータを前記記憶手段に新
たに記憶させるように構成されている。
Further, in the power supply control device according to claim 3, the data change unit of the drive signal output unit converts the data stored in the specific storage area to the data stored in the storage unit. On the other hand, the data stored in the specific storage area is newly stored in the storage unit only when the current flowing to the electric load changes so as to increase.

【0028】つまり、請求項3に記載の通電制御装置で
は、駆動手段が、車両に搭載されたバッテリからの電源
供給を受けて、電気負荷へ電流を流すように構成されて
いるため、駆動手段に出力する駆動信号のデューティ比
が同じであっても、バッテリ電圧が高ければ、電気負荷
に実際に流れる電流は大きくなり、逆にバッテリ電圧が
低くければ、電気負荷に実際に流れる電流は小さくな
る。
That is, in the power supply control device according to the third aspect, the drive means is configured to receive the power supply from the battery mounted on the vehicle and to flow the current to the electric load. Even if the duty ratio of the drive signal to be output is the same, if the battery voltage is high, the current that actually flows to the electric load increases, and if the battery voltage is low, the current that actually flows to the electric load decreases. Become.

【0029】このため、請求項3に記載の通電制御装置
では、演算部にて、電圧検出手段がバッテリの電圧を検
出し、補正手段が、電圧検出手段によって検出されたバ
ッテリ電圧の値に応じて、その電圧値が低い場合ほど、
特定の記憶領域に格納するデータを電気負荷に流れる電
流が大きくなるように補正するようにしている。そし
て、このような演算部の電圧補正動作により、バッテリ
電圧が変動しても、電気負荷に所望の電流を流すことが
できるようにしている。
Therefore, in the power supply control device according to the third aspect of the present invention, in the operation unit, the voltage detecting means detects the voltage of the battery, and the correcting means responds to the value of the battery voltage detected by the voltage detecting means. The lower the voltage value,
The data stored in the specific storage area is corrected so that the current flowing to the electric load becomes large. The voltage correction operation of the arithmetic unit allows a desired current to flow to the electric load even if the battery voltage fluctuates.

【0030】ところが、車両において、バッテリ電圧の
低下は比較的長い時間継続するものの、バッテリ電圧の
上昇は瞬間的にしか起こらないことが多い。即ち、バッ
テリ電圧の低下は、例えばエアコンやパワーウインドウ
等の電気装置が作動されると発生するのであるが、発電
機(オルタネータ)の出力制御によってバッテリ電圧が
通常値にまで復帰には時間がかかる。これに対して、バ
ッテリ電圧の上昇は、エアコンやパワーウインドウ等の
電気装置が停止された時に、瞬間的に起こるだけであ
る。
However, in a vehicle, although the battery voltage drops for a relatively long time, the battery voltage often rises only momentarily. That is, a decrease in the battery voltage occurs when, for example, an electric device such as an air conditioner or a power window is operated. However, it takes time to return the battery voltage to the normal value by controlling the output of the generator (alternator). . In contrast, a rise in battery voltage only occurs momentarily when an electric device such as an air conditioner or a power window is stopped.

【0031】よって、演算部が、バッテリ電圧の上昇を
検出して、特定の記憶領域に格納するデータを電気負荷
に流れる電流が小さくなるように補正した場合、その補
正後のデータが駆動手段へ出力される駆動信号のデュー
ティ比に反映される頃には、バッテリ電圧は通常値に戻
ってしまっていることとなるため、上記補正後のデータ
を、駆動手段へ出力する駆動信号のデューティ比に即座
に反映させると、駆動手段により電気負荷へ流される電
流としては、本来の値よりも低下してしまう虞がある。
Therefore, when the arithmetic unit detects a rise in the battery voltage and corrects the data stored in the specific storage area so that the current flowing through the electric load becomes small, the corrected data is sent to the driving means. By the time the duty ratio of the output drive signal is reflected, the battery voltage has returned to the normal value. Therefore, the corrected data is converted to the duty ratio of the drive signal output to the drive means. If reflected immediately, the current flowing to the electric load by the driving means may be lower than the original value.

【0032】そこで特に、請求項3に記載の通電制御装
置では、特定の記憶領域に格納されているデータが、記
憶手段に記憶されているデータに対して、電気負荷に流
れる電流が大きくなるように変化した場合にだけ、駆動
信号出力部のデータ変更手段が、特定の記憶領域に格納
されているデータを記憶手段に新たに記憶させるように
している。そして、この請求項3に記載の構成を採用す
れば、演算部での電圧補正による効果と電流制御の高い
応答性とを、両立して得ることができるようになる。
Therefore, in particular, in the energization control device according to the third aspect, the data stored in the specific storage area has a larger current flowing through the electric load than the data stored in the storage means. The data changing means of the drive signal output unit causes the data stored in the specific storage area to be newly stored in the storage means only when the data is changed to the above. By adopting the configuration of the third aspect, it is possible to obtain both the effect of voltage correction in the calculation unit and the high responsiveness of current control.

【0033】[0033]

【発明の実施の形態】以下、本発明が適用された実施例
について図面を用いて説明する。尚、本発明の実施の形
態は、下記の実施例に何ら限定されることなく、本発明
の技術的範囲に属する限り、種々の形態を採り得ること
は言うまでもない。
Embodiments of the present invention will be described below with reference to the drawings. It is needless to say that the embodiments of the present invention are not limited to the following examples, and can take various forms as long as they belong to the technical scope of the present invention.

【0034】「第1実施例」まず図1は、第1実施例の
車両制御装置2の構成を表わす構成図である。尚、本実
施例の車両制御装置2は、車両に搭載された自動変速機
のギヤ位置や、ロックアップクラッチのオン・オフ状態
を切り換えるための電磁ソレノイド式の電磁弁を、車両
の運転状態に応じて制御する。そして、当該車両制御装
置2は、上記電磁弁の電磁ソレノイドLに流す電流をデ
ューティ制御(所謂、PWM制御)することにより、電
磁弁の開弁量を変化させる。
First Embodiment FIG. 1 is a configuration diagram showing the configuration of a vehicle control device 2 according to a first embodiment. The vehicle control device 2 of the present embodiment changes the gear position of the automatic transmission mounted on the vehicle and the electromagnetic solenoid type solenoid valve for switching the lock-up clutch on and off to the operating state of the vehicle. Control according to. The vehicle control device 2 changes the opening amount of the solenoid valve by performing duty control (so-called PWM control) on the current flowing through the solenoid L of the solenoid valve.

【0035】図1に示すように、車両制御装置2は、上
記電磁弁を制御するための様々な処理動作等を行うマイ
クロコンピュータ(以下、単にマイコンという)4と、
バッテリからの電源供給を受け、マイコン4から出力さ
れるパルス状の駆動信号Poに応じて上記電磁弁の電磁
ソレノイド(以下、単にソレノイドという)Lへ電流を
流す駆動手段としての駆動回路6と、ソレノイドLの電
流経路に直列に設けられた電流検出用の抵抗器Rと、該
抵抗器Rの両端に生じた電位差に基づき、ソレノイドL
に実際に流れている電流(以下、ソレノイド電流とい
う)Iに応じた電圧信号を出力する電流検出器8と、を
備えている。
As shown in FIG. 1, the vehicle control device 2 includes a microcomputer (hereinafter, simply referred to as a microcomputer) 4 for performing various processing operations and the like for controlling the solenoid valve.
A drive circuit 6 as drive means for receiving a power supply from a battery and flowing a current to an electromagnetic solenoid (hereinafter simply referred to as a solenoid) L of the solenoid valve according to a pulsed drive signal Po output from the microcomputer 4; Based on a current detecting resistor R provided in series with the current path of the solenoid L and a potential difference generated at both ends of the resistor R, the solenoid L
And a current detector 8 that outputs a voltage signal according to a current (hereinafter, referred to as a solenoid current) I actually flowing.

【0036】ここで、駆動回路6は、マイコン4から出
力される駆動信号Poの信号レベルが、所定の基準電圧
Vref よりも大きいハイレベルであるときに、ソレノイ
ドLへ電流を流すように構成されている。そして、これ
により、駆動回路6からソレノイドLへは、駆動信号P
oのデューティ比に応じた電流が流れることとなる。
尚、本実施例において、上記基準電圧Vref は、接地電
位(=0V)とマイコン4の電源電圧(=5V)との中
心電圧(=2.5V)に設定されており、マイコン4
は、上記駆動信号Poを、0Vを第1レベルとしてのロ
ウレベルとし、5Vを第2レベルとしてのハイレベルと
して出力する。また、本実施例で言うデューティ比と
は、図1に示すように、駆動信号Poの1周期(以下、
パルス周期ともいう)TS におけるハイレベル時間(以
下、オン時間という)TONの割合を指している。
Here, the drive circuit 6 is configured to supply a current to the solenoid L when the signal level of the drive signal Po output from the microcomputer 4 is at a high level higher than a predetermined reference voltage Vref. ing. Thus, the drive signal P is sent from the drive circuit 6 to the solenoid L.
A current corresponding to the duty ratio o flows.
In this embodiment, the reference voltage Vref is set to the center voltage (= 2.5 V) between the ground potential (= 0 V) and the power supply voltage (= 5 V) of the microcomputer 4.
Outputs the drive signal Po as a low level of 0V as a first level and a high level of 5V as a second level. In addition, the duty ratio referred to in the present embodiment is, as shown in FIG. 1, one cycle of the drive signal Po (hereinafter, referred to as a duty cycle).
It indicates the ratio of the high-level time (hereinafter referred to as the on-time) TON in the pulse period TS.

【0037】一方、マイコン4は、車両に設けられた各
種センサやスイッチからの信号を入力するためのI/O
バッファ10と、電流検出器8からの電圧信号や駆動回
路6に印加されているバッテリ電圧VB をデジタル信号
に変換(A/D変換)して取り込むためのA/D変換器
12と、上記I/Oバッファ10及びA/D変換器12
を介して取得する情報に基づき、駆動回路6へ出力すべ
き駆動信号Poのデューティ比を所定の演算周期毎に算
出する演算部としてのCPU14と、CPU14によっ
て算出されたデューティ比に基づき、駆動信号Poを駆
動回路6へ出力する駆動信号出力部としてのPWM出力
回路16と、を備えている。
On the other hand, the microcomputer 4 is an I / O for inputting signals from various sensors and switches provided in the vehicle.
A buffer 10; an A / D converter 12 for converting (A / D converting) the voltage signal from the current detector 8 and the battery voltage VB applied to the driving circuit 6 into a digital signal; / O buffer 10 and A / D converter 12
The CPU 14 as an arithmetic unit for calculating the duty ratio of the drive signal Po to be output to the drive circuit 6 at each predetermined calculation cycle based on the information obtained through the CPU, and the drive signal based on the duty ratio calculated by the CPU 14. A PWM output circuit 16 as a drive signal output unit that outputs Po to the drive circuit 6.

【0038】次に、マイコン4の内部に設けられたCP
U14が実行するソレノイド制御処理と、同じくマイコ
ン4の内部に設けられたPWM出力回路16の動作につ
いて、説明する。まず、図2はCPU14が実行するソ
レノイド制御処理を表すフローチャートである。尚、こ
の処理は、予め設定された所定時間毎(例えば4ms)
に実行される。
Next, the CP provided inside the microcomputer 4
The solenoid control processing executed by U14 and the operation of the PWM output circuit 16 also provided inside the microcomputer 4 will be described. First, FIG. 2 is a flowchart showing a solenoid control process executed by the CPU 14. This process is performed at predetermined time intervals (for example, 4 ms).
Is executed.

【0039】図2に示すように、CPU14がソレノイ
ド制御処理の実行を開始すると、まず、ステップ(以
下、単に「S」と記す)110にて、電流検出器8から
の電圧信号をA/D変換器12でA/D変換することに
より、現在のソレノイド電流Iを検出し、続くS120
にて、同じくA/D変換器12からのデジタル信号に基
づきバッテリ電圧VB を検出する。
As shown in FIG. 2, when the CPU 14 starts the execution of the solenoid control processing, first, in step (hereinafter simply referred to as “S”) 110, the voltage signal from the current detector 8 is A / D A / D conversion is performed by the converter 12 to detect the current solenoid current I.
In the same manner, the battery voltage VB is detected based on the digital signal from the A / D converter 12.

【0040】そして、続くS130にて、I/Oバッフ
ァ10を介して入力されるセンサ信号等に基づく車両の
運転状態に応じて、ソレノイドLに流すべき目標電流を
設定すると共に、S110で検出したソレノイド電流I
が前記設定した目標電流となるように、駆動信号Poの
デューティ比を算出する。尚、デューティ比の算出は、
駆動信号Poのパルス周期TS とオン時間TONとを算出
することによって行われるが、本実施例においては、パ
ルス周期TS が固定値になっており、実際にはオン時間
TONのみが算出される。そして更に、このS130で
は、上記算出したオン時間TONに応じたカウント値NON
と、パルス周期TS に応じたカウント値NS を求める。
Then, in S130, a target current to be passed to the solenoid L is set according to the driving state of the vehicle based on a sensor signal or the like input via the I / O buffer 10, and detected in S110. Solenoid current I
The duty ratio of the drive signal Po is calculated so that the target current becomes the set target current. The duty ratio is calculated as follows:
This is performed by calculating the pulse period TS and the ON time TON of the drive signal Po. In this embodiment, the pulse period TS is a fixed value, and only the ON time TON is actually calculated. Further, in S130, the count value NON corresponding to the calculated ON time TON is calculated.
And a count value NS corresponding to the pulse period TS.

【0041】このようにパルス周期TS 及びオン時間T
ONに夫々応じたカウント値NS ,NONを求めると、次の
S140にて、S120で検出したバッテリ電圧VB に
基づき、S130で求めたカウント値NONを補正する。
尚、このS140の補正では、バッテリ電圧VB に応じ
て、その値が低い場合ほど、オン時間TONが長くなるよ
うに(つまり、ソレノイド電流Iが大きくなるよう
に)、カウント値NONを大きな値に補正する。
As described above, the pulse period TS and the ON time T
When the count values NS and NON corresponding to ON are obtained, at S140, the count value NON obtained at S130 is corrected based on the battery voltage VB detected at S120.
In the correction in S140, the count value NON is increased according to the battery voltage VB so that the ON time TON increases (that is, the solenoid current I increases) as the value decreases. to correct.

【0042】そして、続くS150にて、S130で求
めたカウント値NS を周期レジスタRS に格納すると共
に、S140で補正したカウント値NONを、特定の記憶
領域としてのオン時間レジスタRONに格納し、このS1
50の処理を実行した後、当該ソレノイド制御処理を一
旦終了する。尚、周期レジスタRS とオン時間レジスタ
RONは、CPU14がアクセスするRAM(図示省略)
内の所定アドレス領域であってもよいが、本実施例で
は、図1に示すように、CPU14の内部にハードウェ
ア的に設けられたレジスタを用いている。
In S150, the count value NS obtained in S130 is stored in the period register RS, and the count value NON corrected in S140 is stored in the ON time register RON as a specific storage area. S1
After performing the process of 50, the solenoid control process is temporarily terminated. The period register RS and the ON time register RON are RAMs (not shown) accessed by the CPU 14.
In this embodiment, a register provided as hardware inside the CPU 14 is used, as shown in FIG.

【0043】次に、図3はPWM出力回路16の動作を
説明するフローチャートである。尚、PWM出力回路1
6は、実際には論理回路によるハードウェアで構成され
ているが、ここでは説明の便宜上、フローチャートに沿
って動作を説明する。まず、PWM出力回路16は、C
PU14から指令(PWM出力指令)を受けると動作す
るように構成されており、図1に示すように、CPU1
4の周期レジスタRS に格納されたカウント値NS を記
憶するための第1レジスタR1と、CPU14のオン時
間レジスタRONに格納されたカウント値NONを記憶する
ための、記憶手段としての第2レジスタR2とを備えて
いる。そして更に、PWM出力回路16は、後述するよ
うに周期レジスタRS から第1レジスタR1へ転送され
るカウント値NS がセットされ、マイコン4内で生成さ
れる所定の基準クロックが1回入力される度にダウンカ
ウントを行うカウンタCNTと、後述する図3のS28
0やS290等の動作によって内部的に設定されるハイ
レベル或いはロウレベルの出力レベルに応じて駆動回路
6へ駆動信号Poを出力する、出力手段としての出力バ
ッファ(図示省略)も備えている。
FIG. 3 is a flowchart for explaining the operation of the PWM output circuit 16. The PWM output circuit 1
6 is actually configured by hardware using a logic circuit, but here, for convenience of explanation, the operation will be described along a flowchart. First, the PWM output circuit 16 outputs C
It is configured to operate when a command (PWM output command) is received from the PU 14, and as shown in FIG.
4, a first register R1 for storing the count value NS stored in the cycle register RS, and a second register R2 as storage means for storing the count value NON stored in the on-time register RON of the CPU 14. And Further, the PWM output circuit 16 sets the count value NS transferred from the period register RS to the first register R1 as described later, and every time a predetermined reference clock generated in the microcomputer 4 is input once. The counter CNT performs a down-counting operation, and S28 in FIG.
There is also provided an output buffer (not shown) as output means for outputting a drive signal Po to the drive circuit 6 in accordance with a high level or low level output level internally set by an operation such as 0 or S290.

【0044】このようなPWM出力回路16は、CPU
14からのPWM出力指令を受けていない時には、図3
に示す動作を行わず、駆動回路6への駆動信号Poを継
続してロウレベルで出力する。そして、CPU14から
のPWM出力指令を受けると、図3に示す動作を開始し
て、まず、S210に示すように、その時点でCPU1
4の周期レジスタRSとオン時間レジスタRONとに夫々
格納されているカウント値NS ,NONを読み出して、カ
ウント値NS を第1レジスタR1に記憶させると共に、
カウント値NONを第2レジスタR2に記憶させる。つま
り、周期レジスタRS 内のカウント値NS を第1レジス
タR1へ転送すると共に、オン時間レジスタRON内のカ
ウント値NONを第2レジスタR2へ転送する。そして更
に、S210の動作では、上記の如く第1レジスタR1
に転送したカウント値NS を、前述したカウンタCNT
にセットする。
The PWM output circuit 16 has a CPU
3 when no PWM output command is received from
, The drive signal Po to the drive circuit 6 is continuously output at a low level. Then, upon receiving a PWM output command from the CPU 14, the operation shown in FIG. 3 is started, and first, as shown in S210, the CPU 1
4 to read the count values NS and NON stored in the period register RS and the ON time register RON, respectively, and store the count value NS in the first register R1.
The count value NON is stored in the second register R2. That is, the count value NS in the period register RS is transferred to the first register R1, and the count value NON in the on-time register RON is transferred to the second register R2. Further, in the operation of S210, as described above, the first register R1
Is transferred to the counter CNT described above.
Set to.

【0045】次に、S220に示すように、第1レジス
タR1の値と第2レジスタR2の値との大小関係を判定
し、第1レジスタR1の値の方が第2レジスタR2の値
よりも大きければ(R1>R2)、通常状態であると判
断して、S230の動作に進む。つまり、第1レジスタ
R1には、駆動信号Poのパルス周期TS に応じたカウ
ント値NS が格納され、第2レジスタR2には、駆動信
号Poのオン時間TONに応じたカウント値NONが格納さ
れるため、通常状態ならば第1レジスタR1の値の方が
大きいからである。
Next, as shown in S220, the magnitude relationship between the value of the first register R1 and the value of the second register R2 is determined, and the value of the first register R1 is larger than the value of the second register R2. If it is larger (R1> R2), it is determined that it is in the normal state, and the operation proceeds to S230. That is, the first register R1 stores the count value NS corresponding to the pulse period TS of the drive signal Po, and the second register R2 stores the count value NON corresponding to the ON time TON of the drive signal Po. Therefore, in a normal state, the value of the first register R1 is larger.

【0046】そして、S230の動作では、CPU14
のオン時間レジスタRONの現在値(つまり、現在CPU
14のオン時間レジスタRONに格納されているカウント
値NON)と、第2レジスタR2の現在値(つまり、上記
S210の実行時点でオン時間レジスタRONから第2レ
ジスタR2へ転送したカウント値NON)とが等しいか否
かを判定し、両レジスタRON,R2の値が等しい場合に
は、そのままS250の動作へ移行する。これに対し、
S230で両レジスタRON,R2の値が等しくないと判
定した場合には、続くS240の動作により、現在CP
U14のオン時間レジスタRONに格納されている最新の
カウント値NONを第2レジスタR2へ新たに転送し、そ
の後、S250の動作に進む。
Then, in the operation of S230, the CPU 14
Current value of the ON time register RON (that is, the current CPU
And the current value of the second register R2 (that is, the count value NON transferred from the on-time register RON to the second register R2 at the time of execution of S210). Are determined to be equal to each other, and if the values of both registers RON and R2 are equal, the operation directly proceeds to the operation of S250. In contrast,
If it is determined in S230 that the values of the two registers RON and R2 are not equal, the subsequent operation of S240 determines that the current CP
The latest count value NON stored in the ON time register RON of U14 is newly transferred to the second register R2, and thereafter, the operation proceeds to S250.

【0047】次にS250の動作では、カウンタCNT
の値と第2レジスタR2の値との大小関係を判定し、カ
ウンタCNTの値の方が第2レジスタR2の値よりも大
きければ(CNT>R2)、そのままS260の動作に
移行して、カウンタCNTの値を1つダウンカウントす
る。尚、このダウンカウントは、前述したように、マイ
コン4内の基準クロックが当該PWM出力回路16に入
力されることで行われる。
Next, in the operation of S250, the counter CNT
And the value of the second register R2 is determined, and if the value of the counter CNT is larger than the value of the second register R2 (CNT> R2), the process directly proceeds to the operation of S260, and The value of CNT is counted down by one. This down-counting is performed by inputting the reference clock in the microcomputer 4 to the PWM output circuit 16 as described above.

【0048】そして、続くS270の動作にて、CPU
14からのPWM出力指令が継続しているか否かによ
り、駆動信号Poの出力動作(図3において、PWM出
力)を停止するか否かを判定し、PWM出力を停止しな
いと判定した場合には、前述したS230の動作に戻
る。また、PWM出力を停止すると判定した場合には、
駆動信号Poの出力レベルを強制的にロウレベルに設定
して全ての動作を終了し、CPU14からのPWM出力
指令を再び受けるまで待機する。
Then, in the subsequent operation of S270, the CPU
It is determined whether or not the output operation of the drive signal Po (PWM output in FIG. 3) is stopped based on whether or not the PWM output command from 14 is continued. If it is determined that the PWM output is not stopped, Then, the operation returns to the operation of S230 described above. If it is determined to stop the PWM output,
The output level of the drive signal Po is forcibly set to the low level, all operations are terminated, and the process waits until a PWM output command from the CPU 14 is received again.

【0049】一方、S260でのカウンタCNTのダウ
ンカウントが進んで、S250の判定動作により、カウ
ンタCNTの値が第2レジスタR2の値以下であると判
定した場合には(CNT≦R2)、S280の動作に移
行して、駆動信号Poの出力レベルをハイレベルに設定
する。すると、前述した出力バッファから駆動回路6へ
出力される駆動信号Poは、ロウレベルからハイレベル
に反転する。そして、その後、前述したS260及びS
270の動作を行う。
On the other hand, if the count down of the counter CNT in S260 proceeds, and if the value of the counter CNT is determined to be equal to or less than the value of the second register R2 by the determination operation in S250 (CNT ≦ R2), S280 is performed. Then, the output level of the drive signal Po is set to the high level. Then, the drive signal Po output from the output buffer to the drive circuit 6 is inverted from a low level to a high level. Then, after that, S260 and S
Operation 270 is performed.

【0050】そして、その後更に、S260でのカウン
タCNTのダウンカウントが進んで、S250の判定動
作により、カウンタCNTの値が「0」であると判定し
た場合には(CNT=0)、S290の動作に移行し
て、駆動信号Poの出力レベルをロウレベルに設定す
る。すると、前述した出力バッファから駆動回路6へ出
力される駆動信号Poは、ハイレベルからロウレベルに
戻る。
After that, the counter CNT is further counted down in S260, and if the value of the counter CNT is determined to be “0” by the determination operation in S250 (CNT = 0), the process proceeds to S290. In the operation, the output level of the drive signal Po is set to the low level. Then, the drive signal Po output from the output buffer to the drive circuit 6 returns from the high level to the low level.

【0051】そして、続くS300の動作にて、S27
0の場合と同様にPWM出力を停止するか否かを判定
し、PWM出力を停止しないと判定した場合には、前述
したS210の動作に戻って、その時点でCPU14の
周期レジスタRS 及びオン時間レジスタRONに夫々格納
されているカウント値NS ,NONを、夫々、第1レジス
タR1と第2レジスタR2へ転送し、更に、第1レジス
タR1に転送したカウント値NS をカウンタCNTにセ
ットする。そして、S220以降の動作を繰り返す。ま
た、S300の動作にて、PWM出力を停止すると判定
した場合には、駆動信号Poの出力レベルを強制的にロ
ウレベルに設定して全ての動作を終了し、CPU14か
らのPWM出力指令を再び受けるまで待機する。
Then, in the subsequent operation of S300, S27
As in the case of 0, it is determined whether or not to stop the PWM output. If it is determined that the PWM output is not to be stopped, the process returns to the above-described step S210, and at that time, the period register RS of the CPU 14 and the on-time The count values NS and NON stored in the register RON are transferred to the first register R1 and the second register R2, respectively, and the count value NS transferred to the first register R1 is set in the counter CNT. Then, the operation after S220 is repeated. If it is determined in step S300 that the PWM output is to be stopped, the output level of the drive signal Po is forcibly set to the low level, all the operations are terminated, and the PWM output command from the CPU 14 is received again. Wait until.

【0052】一方更に、S220の判定動作にて、第1
レジスタR1の値が第2レジスタR2の値以下であるか
(R1≦R2)、第1レジスタR1の値が「0」である
か(R1=0)、或いは第2レジスタR2の値が「0」
である(R2=0)、と判定した場合には、通常状態で
ないと判断して、S310の動作に移行する。
On the other hand, in the determination operation of S220, the first
Whether the value of the register R1 is equal to or less than the value of the second register R2 (R1 ≦ R2), whether the value of the first register R1 is “0” (R1 = 0), or the value of the second register R2 is “0” "
(R2 = 0), it is determined that the state is not the normal state, and the operation shifts to S310.

【0053】そして、S310では、第2レジスタR2
の値が「0」であるか否かを判定し、「0」であれば、
CPU14によって算出された駆動信号Poのオン時間
TONが「0」でありオン時間レジスタRONに格納された
カウント値NONが「0」であることから、前述したS2
90の動作に移行して、駆動信号Poの出力レベルをロ
ウレベルに設定して、出力バッファから駆動回路6へ出
力される駆動信号Poを強制的にロウレベルにし、その
後S300の判定動作を行う。
Then, in S310, the second register R2
It is determined whether or not the value of “0” is “0”.
The ON time TON of the drive signal Po calculated by the CPU 14 is "0" and the count value NON stored in the ON time register RON is "0".
In step 90, the output level of the drive signal Po is set to the low level, the drive signal Po output from the output buffer to the drive circuit 6 is forced to the low level, and then the determination operation of S300 is performed.

【0054】また、S310の判定動作にて、第2レジ
スタR2の値が「0」ではないと判定した場合、即ち、
第1レジスタR1の値が第2レジスタR2の値以下であ
る場合、或いは第1レジスタR1の値が「0」であった
場合には、通常の設定状態ではないものの、CPU14
によって算出された駆動信号Poのオン時間TONが
「0」ではなく、ソレノイドLへ電流を流すべきと判断
して、S320の動作に進む。そして、このS320の
動作にて、駆動信号Poの出力レベルをハイレベルに設
定することにより、出力バッファから駆動回路6へ出力
される駆動信号Poを強制的にハイレベルにし、その後
S300の判定動作を行う。
When the value of the second register R2 is determined not to be "0" in the determination operation of S310, that is,
When the value of the first register R1 is equal to or less than the value of the second register R2, or when the value of the first register R1 is "0", the CPU 14 is not in a normal setting state,
It is determined that the ON time TON of the drive signal Po calculated by the above is not “0” but a current should be passed to the solenoid L, and the operation proceeds to S320. Then, by setting the output level of the drive signal Po to the high level in the operation of S320, the drive signal Po output from the output buffer to the drive circuit 6 is forcibly set to the high level, and then the determination operation of S300 is performed. I do.

【0055】つまり、PWM出力回路16では、CPU
14からのPWM出力指令を受けると、その時点でCP
U14の周期レジスタRS に格納されているパルス周期
TSに応じたカウント値NS を、第1レジスタR1に転
送してカウンタCNTにセットすると共に、同じくその
時点でCPU14のオン時間レジスタRONに格納されて
いるオン時間TONに応じたカウント値NONを、第2レジ
スタR2へ転送するようにしている(S210)。
That is, in the PWM output circuit 16, the CPU
When a PWM output command is received from the
The count value NS corresponding to the pulse cycle Ts stored in the cycle register Rs of U14 is transferred to the first register R1 and set in the counter CNT. At the same time, the count value NS is stored in the on-time register RON of the CPU 14. The count value NON corresponding to the ON time TON is transferred to the second register R2 (S210).

【0056】そして、カウンタCNTへのカウント値N
S のセットと、第2レジスタR2へのカウント値NONの
転送とを行った時点から、マイコン4内の基準クロック
が入力される度に、カウンタCNTをダウンカウントし
て(S260)、カウンタCNTの値が「0」になるま
での時間を(S250:CNT=0)、駆動信号Poの
パルス周期TONとして計時しているのであるが、その計
時中に、カウンタCNTの値が第2レジスタR2の値
(即ちカウント値NON)以下になると(S250:CN
T≦R2)、駆動信号Poの出力レベルをロウレベルか
らハイレベルに反転させ(S280)、更にその後、カ
ウンタCNTの値が「0」になると(S250:CNT
=0)、今回のパルス周期TS が経過したとして、駆動
信号Poの出力レベルをハイレベルからロウレベルに戻
すようにしている(S290)。
Then, the count value N to the counter CNT is obtained.
After the setting of S and the transfer of the count value NON to the second register R2, the counter CNT is down-counted every time the reference clock in the microcomputer 4 is input (S260). The time until the value becomes “0” (S250: CNT = 0) is measured as the pulse period TON of the drive signal Po. During the time measurement, the value of the counter CNT is stored in the second register R2. Value (that is, the count value NON) or less (S250: CN
T ≦ R2), the output level of the drive signal Po is inverted from the low level to the high level (S280), and thereafter, when the value of the counter CNT becomes “0” (S250: CNT)
= 0), assuming that the current pulse period TS has elapsed, the output level of the drive signal Po is returned from the high level to the low level (S290).

【0057】そして、カウンタCNTの値が「0」にな
って今回のパルス周期TS の計時を終了すると、再度S
210の動作を行って、その時点でCPU14の周期レ
ジスタRS に格納されているカウント値NS をカウンタ
CNTにセットすると共に、同じくその時点でCPU1
4のオン時間レジスタRONに格納されているカウント値
NONを第2レジスタR2へ転送して、駆動信号Poの次
のパルス周期TS の計時を開始し、上記動作を繰り返す
ようにしている。
Then, when the value of the counter CNT becomes "0" and the clocking of the current pulse period Ts ends, S
The operation of the CPU 210 is performed, and the count value NS stored in the cycle register RS of the CPU 14 at that time is set in the counter CNT.
The count value NON stored in the ON time register RON of No. 4 is transferred to the second register R2 to start measuring the next pulse period TS of the drive signal Po, and the above operation is repeated.

【0058】よって、このPWM出力回路16では、C
PU14によるソレノイド制御処理の実行周期とは同期
せずに、カウンタCNTによって駆動信号Poのパルス
周期TS が繰り返して計時される。そして、カウンタC
NTの値が「0」になって駆動信号Poの新たな次のパ
ルス周期TS の計時が開始される度に、その時点でCP
U14のオン時間レジスタRONに格納されているオン時
間TONに応じたカウント値NONが第2レジスタR2へ転
送されると共に、駆動信号Poの出力レベルがロウレベ
ルとなり、カウンタCNTの値が第2レジスタR2内の
カウント値NON以下になると駆動信号Poの出力レベル
がハイレベルに反転する、といった動作が繰り返される
こととなる。
Therefore, in this PWM output circuit 16, C
The pulse cycle TS of the drive signal Po is repeatedly measured by the counter CNT without being synchronized with the execution cycle of the solenoid control processing by the PU 14. And the counter C
Each time the value of NT becomes "0" and the timing of a new next pulse period TS of the drive signal Po is started, CP at that time is started.
The count value NON corresponding to the ON time TON stored in the ON time register RON of U14 is transferred to the second register R2, the output level of the drive signal Po becomes low level, and the value of the counter CNT becomes the second register R2. When the count value is less than or equal to the count value NON, the operation of inverting the output level of the drive signal Po to a high level is repeated.

【0059】この結果、当該PWM出力回路16から駆
動回路6へ出力される駆動信号Poのパルス周期TS
は、CPU14の周期レジスタRS に格納されたカウン
ト値NS に、基準クロックの周期を乗じた時間となる。
そして同様に、駆動信号Poのパルス周期TS 中におけ
るオン時間TONは、CPU14のオン時間レジスタRON
に格納されたカウント値NONに、基準クロックの周期を
乗じた時間となるが、駆動信号Poは、パルス周期TS
の開始時を起点として、カウント値NS からカウント値
NONを引いた値(NS −NON)に基準クロックの周期を
乗じた時間が経過すると、その出力レベルがロウレベル
からハイレベルに反転することとなる。つまり、本実施
例では、カウント値NONが、駆動信号の1周期の開始時
を起点として該駆動信号の信号レベルを反転させるまで
の時間を示すデータとして用いられている。
As a result, the pulse period TS of the drive signal Po output from the PWM output circuit 16 to the drive circuit 6
Is the time obtained by multiplying the count value NS stored in the cycle register RS of the CPU 14 by the cycle of the reference clock.
Similarly, the ON time TON of the drive signal Po during the pulse period TS is determined by the ON time register RON of the CPU 14.
Is multiplied by the period of the reference clock, and the drive signal Po has a pulse period TS.
When the time obtained by multiplying the value obtained by subtracting the count value NON from the count value NS (NS-NON) by the period of the reference clock has elapsed from the start of the operation, the output level is inverted from the low level to the high level. . That is, in the present embodiment, the count value NON is used as data indicating the time from the start of one cycle of the drive signal to the inversion of the signal level of the drive signal.

【0060】そして特に、本実施例のPWM出力回路1
6では、カウンタCNTによって駆動信号Poの新たな
パルス周期TS の計時を開始してから次のパルス周期T
S の計時を開始するまでの間に、CPU14のオン時間
レジスタRONに格納されているカウント値NONが第2レ
ジスタR2に記憶されているカウント値NONから変化し
たか否かを、S230の動作によって常時監視し、カウ
ント値NONの変化が検出されると(S230:NO)、
そのときCPU14のオン時間レジスタRONに格納され
ている最新のカウント値NONを読み出して第2レジスタ
R2に新たに記憶させるようにしている(S240)。
In particular, the PWM output circuit 1 of this embodiment
In step 6, after the counter CNT starts measuring a new pulse period TS of the drive signal Po, the next pulse period T
By the operation of S230, it is determined whether the count value NON stored in the on-time register RON of the CPU 14 has changed from the count value NON stored in the second register R2 before the time measurement of S is started. When monitoring is performed constantly and a change in the count value NON is detected (S230: NO),
At this time, the latest count value NON stored in the ON time register RON of the CPU 14 is read out and newly stored in the second register R2 (S240).

【0061】尚、本第1実施例においては、S210及
びS260が計時手段としての動作に相当し、S210
がデータ転送手段としての動作に相当し、S250が判
定手段としての動作に相当し、S280及びS290が
信号レベル設定手段としての動作に相当している。そし
て更に、S230が監視手段としての動作に相当し、S
240がデータ変更手段としての動作に相当している。
In the first embodiment, S210 and S260 correspond to the operation as the time measuring means.
Corresponds to the operation as the data transfer unit, S250 corresponds to the operation as the determination unit, and S280 and S290 correspond to the operation as the signal level setting unit. Further, S230 corresponds to the operation as the monitoring means,
240 corresponds to the operation as data changing means.

【0062】次に、図2のソレノイド制御処理を実行す
るCPU14と図3の動作を行うPWM出力回路16と
を備えたマイコン4の基本的な動作について、PWM出
力回路16が本第1実施例に特有の図3に示したS23
0及びS240の動作を行わない場合の、マイコン4の
動作を表す図4のタイムチャートを用いて説明する。
尚、図4及び後述する図5,6,8において、「PWM
出力Po」とは駆動信号Poの出力レベルを表してい
る。
Next, the basic operation of the microcomputer 4 including the CPU 14 for executing the solenoid control processing of FIG. 2 and the PWM output circuit 16 for performing the operation of FIG. S23 shown in FIG.
A description will be given with reference to the time chart of FIG. 4 showing the operation of the microcomputer 4 when the operations of 0 and S240 are not performed.
Note that in FIG. 4 and FIGS.
The output Po ”indicates the output level of the drive signal Po.

【0063】図4に示すように、まずCPU14が、時
刻t1のタイミングで図2のソレノイド制御処理を実行
したことにより、周期レジスタRS とオン時間レジスタ
RONとに、夫々、パルス周期TS に応じたカウント値N
S とオン時間TON1 に応じたカウント値NON1 とを格納
したとする。
As shown in FIG. 4, first, the CPU 14 executes the solenoid control processing of FIG. 2 at the timing of time t1, and accordingly, the cycle register RS and the on-time register RON correspond to the pulse cycle TS, respectively. Count value N
It is assumed that S and a count value NON1 corresponding to the ON time TON1 are stored.

【0064】すると、PWM出力回路16では、その後
カウンタCNTの値が「0」となり、駆動信号Poがロ
ウレベルになった時刻t2のタイミングで、CPU14
の周期レジスタRS に格納されたカウント値NS を第1
レジスタR1に転送してカウンタCNTにセットすると
共に、オン時間レジスタRONに格納されたカウント値N
ON1 を第2レジスタR2へ転送して、カウンタCNTの
ダウンカウントを開始する。
Then, in the PWM output circuit 16, the value of the counter CNT becomes “0” after that, and at the time t 2 when the drive signal Po becomes low level, the CPU 14
The count value NS stored in the period register RS of the first
The value is transferred to the register R1 and set in the counter CNT.
ON1 is transferred to the second register R2 to start counting down the counter CNT.

【0065】そして、PWM出力回路16は、ダウンカ
ウントするカウンタCNTの値と第2レジスタR2の値
(即ち、カウント値NON1 )とが一致する時刻t3のタ
イミングで、駆動信号Poをロウレベルからハイレベル
に反転させ、その後、カウンタCNTの値が「0」にな
った時刻t4のタイミングで、駆動信号Poをハイレベ
ルからロウレベルに再度反転させる。またこれと同時
に、CPU14の周期レジスタRS に格納されたカウン
ト値NS をカウンタCNTに再度セットすると共に、C
PU14のオン時間レジスタRONに格納されているカウ
ント値NON1 を第2レジスタR2へ転送し、再びカウン
タCNTのダウンカウントを開始する。よって、時刻t
2から時刻t4までの時間が、カウント値NS に対応す
るパルス周期TS となり、時刻3から時刻t4までの時
間が、カウント値NON1 に対応するオン時間TON1 とな
る。
Then, the PWM output circuit 16 changes the drive signal Po from the low level to the high level at the time t3 when the value of the counter CNT to be counted down and the value of the second register R2 (ie, the count value NON1) match. After that, at the time t4 when the value of the counter CNT becomes “0”, the drive signal Po is again inverted from the high level to the low level. At the same time, the count value NS stored in the cycle register RS of the CPU 14 is set again in the counter CNT, and
The count value NON1 stored in the ON time register RON of the PU 14 is transferred to the second register R2, and the counter CNT starts counting down again. Therefore, time t
The time from 2 to time t4 is the pulse period TS corresponding to the count value NS, and the time from time 3 to time t4 is the ON time TON1 corresponding to the count value NON1.

【0066】尚、本実施例では、前述したように、CP
U14によって算出されるパルス周期TS は一定の固定
値であり、周期レジスタRS には常に一定のカウント値
NSが格納されるため、以下では、CPU14が周期レ
ジスタRS へカウント値NSを格納する動作と、PWM
出力回路16がカウンタCNTにカウント値NS をセッ
トする動作については説明を省略する。
In this embodiment, as described above, the CP
The pulse period Ts calculated by U14 is a fixed value, and a constant count value NS is always stored in the period register RS. Therefore, in the following, the operation in which the CPU 14 stores the count value NS in the period register RS will be described. , PWM
The description of the operation of the output circuit 16 for setting the count value NS to the counter CNT will be omitted.

【0067】次に、例えば時刻t5に示すように、駆動
信号Poがハイレベルからロウレベルに反転してPWM
出力回路16が新たなパルス周期TS の計時を開始した
直後に、CPU14が図2のソレノイド制御処理を実行
して、オン時間レジスタRONに最新のオン時間TON2 に
応じたカウント値NON2 を格納したとする。
Next, for example, as shown at time t5, the drive signal Po is inverted from high level to low level and PWM
Immediately after the output circuit 16 starts measuring a new pulse period T S, the CPU 14 executes the solenoid control processing of FIG. 2 and stores the count value N ON2 corresponding to the latest on-time T ON2 in the on-time register R ON. I do.

【0068】このとき、PWM出力回路16が図3に示
したS230及びS240の動作を行わない場合には、
第2レジスタR2の値は、時刻t4のタイミングでオン
時間レジスタRONから転送したカウント値NON1 (つま
り、時刻t1でCPU14がオン時間レジスタRONに格
納したカウント値NON1 )のままである。
At this time, if the PWM output circuit 16 does not perform the operations of S230 and S240 shown in FIG.
The value of the second register R2 remains the count value NON1 transferred from the on-time register RON at the timing of the time t4 (that is, the count value NON1 stored in the on-time register RON by the CPU 14 at the time t1).

【0069】よって、PWM出力回路16は、その後、
カウンタCNTの値と第2レジスタR2の値(即ち、カ
ウント値NON1 )とが一致する時刻t6のタイミング
で、駆動信号Poをロウレベルからハイレベルに反転さ
せ、更にその後、カウンタCNTの値が「0」になった
時刻t7のタイミングで、駆動信号Poをハイレベルか
らロウレベルに反転させる。そして、時刻t7のタイミ
ングで初めて、CPU14のオン時間レジスタRONに格
納されている最新のカウント値NON2 を第2レジスタR
2へ転送し、再びカウンタCNTのダウンカウントを開
始する。
Therefore, the PWM output circuit 16
At the time t6 when the value of the counter CNT matches the value of the second register R2 (that is, the count value NON1), the drive signal Po is inverted from the low level to the high level, and thereafter, the value of the counter CNT becomes "0". , The drive signal Po is inverted from the high level to the low level. Only at the timing of time t7, the latest count value NON2 stored in the ON time register RON of the CPU 14 is stored in the second register RON.
2 and the counter CNT starts counting down again.

【0070】そして、PWM出力回路16は、時刻t7
で次のパルス周期TS の計時を開始した後、カウンタC
NTの値と第2レジスタR2の値(即ち、カウント値N
ON2)とが一致した時刻t8のタイミングで、駆動信号
Poをロウレベルからハイレベルに反転させ、その後、
カウンタCNTの値が「0」になった時刻t9のタイミ
ングで、駆動信号Poをハイレベルからロウレベルに再
度反転させる。
Then, the PWM output circuit 16 outputs the signal at time t7.
After starting time measurement of the next pulse period TS, the counter C
NT and the value of the second register R2 (that is, the count value N
ON2), the driving signal Po is inverted from the low level to the high level at the timing of time t8, and thereafter,
At the timing of time t9 when the value of the counter CNT becomes “0”, the drive signal Po is again inverted from the high level to the low level.

【0071】よって、CPU14がソレノイド制御処理
を実行した時刻t5の次のパルス周期(時刻t7から時
刻t9までのパルス周期TS )において、時刻t8から
時刻t9までの時間が、カウント値NON2 に対応するオ
ン時間TON2 となる。その後は、例えば時刻t9の前
に、CPU14が次のオン時間TON3 に対応するカウン
ト値NON3 をオン時間レジスタRONに格納していれば、
PWM出力回路16は、この時刻t9のタイミングで、
上記カウント値NON3 を第2レジスタR2へ転送し、再
びカウンタCNTのダウンカウントを開始する。
Therefore, in the pulse cycle (pulse cycle TS from time t7 to time t9) subsequent to time t5 when the CPU 14 executes the solenoid control processing, the time from time t8 to time t9 corresponds to the count value NON2. The ON time TON2 is reached. Thereafter, for example, before time t9, if the CPU 14 stores the count value NON3 corresponding to the next ON time TON3 in the ON time register RON,
At this time t9, the PWM output circuit 16
The count value NON3 is transferred to the second register R2, and the counter CNT starts counting down again.

【0072】以上のように、PWM出力回路16が図3
に示したS230及びS240の動作を行わない場合に
は、時刻t5に示す如く、駆動信号Poの1周期(パル
ス周期)TS 中に、CPU14が最新のオン時間TON2
を算出して、それに応じたカウント値NON2 をオン時間
レジスタRONに格納しても、そのカウント値NON2 は次
のパルス周期TS でしか駆動信号Poの出力に反映され
ない。
As described above, the PWM output circuit 16
In the case where the operations of S230 and S240 shown in (1) are not performed, as shown at time t5, during one cycle (pulse cycle) TS of the drive signal Po, the CPU 14 makes the latest ON time TON2
Is calculated and the corresponding count value NON2 is stored in the on-time register RON, the count value NON2 is reflected on the output of the drive signal Po only in the next pulse period TS.

【0073】そこで、本実施例のマイコン4に設けられ
たPWM出力回路16では、図3のS230及びS24
0の動作により、CPU14のオン時間レジスタRONに
格納されているカウント値NONが第2レジスタR2に現
在記憶されているカウント値NONから変化したか否かを
常時監視し、カウント値NONの変化を検出すると、その
ときオン時間レジスタRONに格納されている最新のカウ
ント値NONを第2レジスタR2に新たに転送するように
している。
Therefore, in the PWM output circuit 16 provided in the microcomputer 4 of this embodiment, S230 and S24 in FIG.
By the operation of 0, it is constantly monitored whether or not the count value NON stored in the on-time register RON of the CPU 14 has changed from the count value NON currently stored in the second register R2. Upon detection, the latest count value NON stored in the on-time register RON at that time is newly transferred to the second register R2.

【0074】以下、PWM出力回路16が図3に示した
S230及びS240の動作を行うことによる作用につ
いて、図5及び図6を用いて説明する。尚、図5及び図
6に示す時刻t3,t4,t7は、図4に示した時刻t
3,t4,t7と同じタイミングを示している。そし
て、図5は、時刻t4から時刻t7までのパルス周期T
S の間に、CPU14がソレノイド制御処理を実行し
て、オン時間レジスタRONに格納するカウント値NON
を、「NON1 」からそれよりも大きい値の「NON2 」に
変更した場合を示しており、図6は、時刻t4から時刻
t7までのパルス周期TS の間に、CPU14がソレノ
イド制御処理を実行して、オン時間レジスタRONに格納
するカウント値NONを、「NON1 」からそれよりも小さ
い値の「NON2」に変更した場合を示している。また、
図5及び図6における点線は、PWM出力回路16が図
3に示したS230及びS240の動作を行わない場合
の状態を示している。
The operation of the PWM output circuit 16 by performing the operations of S230 and S240 shown in FIG. 3 will be described below with reference to FIGS. Times t3, t4, and t7 shown in FIGS. 5 and 6 correspond to time t3 shown in FIG.
3, the same timings as t4 and t7 are shown. FIG. 5 shows a pulse cycle T from time t4 to time t7.
During the period S, the CPU 14 executes the solenoid control processing to count the count value NON stored in the on-time register RON.
Is changed from "NON1" to "NON2", which is a larger value. FIG. 6 shows that the CPU 14 executes the solenoid control process during the pulse period TS from time t4 to time t7. This shows a case where the count value NON stored in the on-time register RON has been changed from "NON1" to "NON2" which is a smaller value. Also,
The dotted lines in FIG. 5 and FIG. 6 show the state when the PWM output circuit 16 does not perform the operations of S230 and S240 shown in FIG.

【0075】まず、図5(A)に示すように、時刻t4
でPWM出力回路16が新たなパルス周期TS の計時を
開始し、駆動信号Poの出力レベルが未だロウレベルで
あるときに(換言すれば、カウンタCNTの値が第2レ
ジスタR2に記憶されているカウント値NON1 に未だ達
していないときに)、時刻t5に示す如く、CPU14
がソレノイド制御処理を実行してオン時間レジスタRON
内のカウント値NONを「NON1 」から「NON2 (>NON
1 )」に変更すると、PWM出力回路16では、図3の
S230の動作によって、カウント値NONが変更された
ことを検出し、図3のS240の動作によって、上記変
更された最新のカウント値NON2 を即座に第2レジスタ
R2へ転送する。
First, as shown in FIG. 5A, at time t4
, The PWM output circuit 16 starts measuring a new pulse period Ts, and when the output level of the drive signal Po is still at the low level (in other words, the count of the counter CNT is stored in the second register R2). When the value NON1 has not yet been reached), as shown at time t5, the CPU 14
Executes the solenoid control process and turns on the ON time register RON.
The count value NON in the range from “NON1” to “NON2 (> NON
1), the PWM output circuit 16 detects that the count value NON has been changed by the operation of S230 in FIG. 3, and by the operation of S240 in FIG. 3, the changed latest count value NON2. Is immediately transferred to the second register R2.

【0076】そして、図5(A)に例示するように、第
2レジスタR2へ最新のカウント値NON2 が転送された
時刻t5の時点で、カウンタCNTの値が最新のカウン
ト値NON2 よりも未だ大きければ、駆動信号Poの出力
レベルは、その後、カウンタCNTの値がカウント値N
ON2 と一致する時刻t6’のタイミングで、ロウレベル
からハイレベルに反転し、カウンタCNTの値が「0」
となる時刻t7のタイミングで、ハイレベルからロウレ
ベルに戻ることとなる。
Then, as illustrated in FIG. 5A, at time t5 when the latest count value NON2 is transferred to the second register R2, the value of the counter CNT is still larger than the latest count value NON2. For example, the output level of the drive signal Po is then changed to the count value N
At time t6 ', which coincides with ON2, the signal is inverted from low level to high level, and the value of the counter CNT becomes "0".
At time t7, the high level returns to the low level.

【0077】よって、この場合には、時刻t6’から時
刻t7までの時間が、最新のカウント値NON2 に応じた
オン時間TON2 となり、時刻t5で変更された最新のカ
ウント値NON2 は、今回のパルス周期TS (時刻t4か
ら時刻t7までのパルス周期TS )で駆動信号Poの出
力に忠実に反映されることとなる。
Therefore, in this case, the time from time t6 ′ to time t7 is the ON time TON2 corresponding to the latest count value NON2, and the latest count value NON2 changed at time t5 is The driving signal Po is faithfully reflected in the cycle TS (pulse cycle TS from time t4 to time t7).

【0078】また、図5(B)に例示するように、駆動
信号Poの出力レベルが未だロウレベルであるときに、
時刻t5’に示す如く、CPU14がオン時間レジスタ
RON内のカウント値NONを「NON1 」から「NON2 (>
NON1 )」に変更して、PWM出力回路16が、上記変
更された最新のカウント値NON2 を第2レジスタR2へ
転送した時に、既にカウンタCNTの値が最新のカウン
ト値NON2 以下であった場合には、駆動信号Poの出力
レベルは、最新のカウント値NON2 が第2レジスタR2
へ転送された時刻t5’のタイミングで、即座にロウレ
ベルからハイレベルに反転し、その後、カウンタCNT
の値が「0」となる時刻t7のタイミングで、ハイレベ
ルからロウレベルに戻ることとなる。
As shown in FIG. 5B, when the output level of the drive signal Po is still at the low level,
As shown at time t5 ', the CPU 14 changes the count value NON in the on-time register RON from "NON1" to "NON2 (>
NON1) ", and when the PWM output circuit 16 transfers the changed latest count value NON2 to the second register R2, the value of the counter CNT is already less than the latest count value NON2. Is the output level of the drive signal Po, the latest count value NON2 is the second register R2
At time t5 ', the signal is immediately inverted from low level to high level.
At the time t7 when the value of the data becomes "0", the level returns from the high level to the low level.

【0079】よって、この場合には、オン時間TONが時
刻t5’から時刻t7までの時間TON2 ’となって、最
新のカウント値NON2 に対応するオン時間TON2 よりも
短くなるが、その時間TON2 ’は、前回のカウント値N
ON1 に応じたオン時間TON1よりは長くなり、この結
果、時刻t5で変更された最新のカウント値NON2 (>
NON1 )を、今回のパルス周期TS における駆動信号P
oの出力に反映させることができる。
Accordingly, in this case, the ON time TON becomes the time TON2 'from the time t5' to the time t7, which is shorter than the ON time TON2 corresponding to the latest count value NON2. Is the previous count value N
The ON time TON1 corresponding to ON1 is longer than the ON time. As a result, the latest count value NON2 (>) changed at time t5.
NON1) to the drive signal P in the current pulse cycle TS.
o can be reflected in the output.

【0080】一方、図6(A)に示すように、駆動信号
Poの出力レベルが未だロウレベルであるときに、時刻
t5に示す如く、CPU14がオン時間レジスタRON内
のカウント値NONを「NON1 」から「NON2 (<NON1
)」に変更すると、PWM出力回路16は、図5の場
合と同様に、上記変更された最新のカウント値NON2 を
即座に第2レジスタR2へ転送する。そして、駆動信号
Poの出力レベルは、その後、カウンタCNTの値がカ
ウント値NON2 と一致する時刻t6”のタイミングで、
ロウレベルからハイレベルに反転し、カウンタCNTの
値が「0」となる時刻t7のタイミングで、ハイレベル
からロウレベルに戻ることとなる。
On the other hand, as shown in FIG. 6A, when the output level of the drive signal Po is still at the low level, as shown at time t5, the CPU 14 sets the count value NON in the on-time register RON to "NON1". To “NON2 (<NON1
) ", The PWM output circuit 16 immediately transfers the updated latest count value NON2 to the second register R2, as in the case of FIG. Then, the output level of the drive signal Po is thereafter changed at the timing of time t6 ″ when the value of the counter CNT matches the count value NON2.
The signal is inverted from the low level to the high level, and returns from the high level to the low level at the time t7 when the value of the counter CNT becomes “0”.

【0081】よって、この場合には、時刻t6”から時
刻t7までの時間が、最新のカウント値NON2 に応じた
オン時間TON2 となり、時刻t5で変更された最新のカ
ウント値NON2 は、今回のパルス周期TS で駆動信号P
oの出力に忠実に反映されることとなる。
In this case, the time from time t6 ″ to time t7 is the ON time TON2 corresponding to the latest count value NON2, and the latest count value NON2 changed at time t5 is the current pulse value NON2. Drive signal P with period TS
This will be faithfully reflected in the output of o.

【0082】尚、図6(B)に示すように、駆動信号P
oの出力レベルがハイレベルに反転した後に(換言すれ
ば、カウンタCNTの値が第2レジスタR2に記憶され
ているカウント値NON1 以下になってから)、時刻t
5”の如く、CPU14がオン時間レジスタRON内のカ
ウント値NONを「NON1 」から「NON2 (<NON1 )」
に変更した場合には、オン時間TONは、今回のパルス周
期TSでは前回のカウント値NON1 に応じた時間TON1
となり、次のパルス周期TS で変更後のカウント値NON
2 に応じた時間TON2 となる。そして、このような動作
は、オン時間レジスタRON内のカウント値NONが、「N
ON1 」からそれよりも大きい値の「NON2(>NON1
)」に変更された場合も同様である。
As shown in FIG. 6B, the drive signal P
After the output level of the counter o is inverted to the high level (in other words, after the value of the counter CNT becomes equal to or less than the count value NON1 stored in the second register R2), the time t
As in 5 ", the CPU 14 changes the count value NON in the on-time register RON from" NON1 "to" NON2 (<NON1) ".
, The ON time TON becomes the time TON1 corresponding to the previous count value NON1 in the current pulse cycle TS.
And the count value NON after the change in the next pulse cycle TS
2 is the time TON2 corresponding to 2. Such an operation is performed when the count value NON in the on-time register RON is “N
ON1 ”to a larger value“ NON2 (> NON1
The same applies to the case where ")" has been changed.

【0083】以上詳述したように本第1実施例の車両制
御装置2に設けたマイコン4によれば、駆動信号Poの
出力レベルが未だロウレベルであるときに、CPU14
が駆動信号Poのオン時間TONに対応するカウント値N
ONを変更すると、その変更後のカウント値NONは、駆動
信号Poの今回のパルス周期TS で出力に反映される。
よって、本第1実施例のマイコン4によれば、CPU1
4の処理負荷を全く増加させずに、ソレノイドLへの電
流を制御する際の制御応答性を向上させることができ
る。
As described in detail above, according to the microcomputer 4 provided in the vehicle control device 2 of the first embodiment, when the output level of the drive signal Po is still low, the CPU 14
Is the count value N corresponding to the ON time TON of the drive signal Po.
When ON is changed, the count value NON after the change is reflected in the output in the current pulse cycle TS of the drive signal Po.
Therefore, according to the microcomputer 4 of the first embodiment, the CPU 1
The control responsiveness when controlling the current to the solenoid L can be improved without increasing the processing load of No. 4 at all.

【0084】「第2実施例」ところで、上記第1実施例
のマイコン4では、図6(B)に示したように、CPU
14がオン時間レジスタRON内のカウント値NONを変更
した時に、PWM出力回路16がオン時間レジスタRON
から第2レジスタR2へ最新のカウント値NONを転送し
ても、駆動信号Poの出力レベルが既にハイレベルに反
転されている場合(即ち、カウンタCNTの値が第2レ
ジスタR2に記憶されていた前回のカウント値NON以下
となっていた場合)には、たとえ、その時点のカウンタ
CNTの値が最新のカウント値NONより大きくても、駆
動信号Poの出力レベルは、カウンタCNTの値が
「0」になるまで継続してハイレベルとなる。
[Second Embodiment] By the way, in the microcomputer 4 of the first embodiment, as shown in FIG.
14 changes the count value NON in the on-time register RON, the PWM output circuit 16
, The output level of the drive signal Po has already been inverted to a high level (that is, the value of the counter CNT has been stored in the second register R2). If the previous count value NON is less than or equal to), even if the value of the counter CNT at that time is larger than the latest count value NON, the output level of the drive signal Po is such that the value of the counter CNT is "0". Until it reaches "".

【0085】そこで、次に説明する第2実施例の車両制
御装置では、マイコン4内のPWM出力回路16が、図
3に示した動作に代えて、図7に示す動作を行うように
構成されている。即ち、第2実施例のPWM出力回路1
6では、図7に示すように、S250の判定動作によっ
てカウンタCNTの値の方が第2レジスタR2の値より
も大きいと判定すると(CNT>R2)、S255の動
作を追加して行うことにより、駆動信号Poの出力レベ
ルをロウレベルに設定し、その後、S260の動作に移
行する。つまり、S250の判定動作にてカウンタCN
Tの値の方が第2レジスタR2の値よりも大きいと判定
している間、駆動信号Poの出力レベルをロウレベルに
設定するようにしている。そして、上記S255以外の
動作については、第1実施例の場合と全く同じである。
Therefore, in the vehicle control device according to the second embodiment described below, the PWM output circuit 16 in the microcomputer 4 is configured to perform the operation shown in FIG. 7 instead of the operation shown in FIG. ing. That is, the PWM output circuit 1 of the second embodiment
In FIG. 6, as shown in FIG. 7, when it is determined that the value of the counter CNT is larger than the value of the second register R2 by the determination operation of S250 (CNT> R2), the operation of S255 is additionally performed. , The output level of the drive signal Po is set to a low level, and thereafter, the operation shifts to S260. That is, the counter CN is determined in the determination operation of S250.
While it is determined that the value of T is larger than the value of the second register R2, the output level of the drive signal Po is set to the low level. Operations other than S255 are exactly the same as those in the first embodiment.

【0086】尚、本第1実施例においては、上記追加の
S255とS280及びS290とが、信号レベル設定
手段としての動作に相当している。このような第2実施
例のマイコン4によれば、前述した図6(B)と同様の
状況を表す図8に示すように、駆動信号Poの出力レベ
ルがハイレベルに反転した後に(換言すれば、カウンタ
CNTの値が第2レジスタR2に既に記憶されているカ
ウント値NON1 以下になった後に)、時刻t5”の如く
CPU14がオン時間レジスタRON内のカウント値NON
を「NON1 」からそれよりも小さい値の「NON2 (<N
ON1 )」に変更した場合において、その時点のカウンタ
CNTの値が最新のカウント値NON2 よりも大きけれ
ば、駆動信号Poの出力レベルはハイレベルからロウレ
ベルに戻ることとなる。そして、駆動信号Poの出力レ
ベルは、その後、カウンタCNTの値が最新のカウント
値NON2 以下になる時刻taのタイミングで、再びロウ
レベルからハイレベルに反転し、更にその後、カウンタ
CNTの値が「0」となる時刻t7のタイミングで、ハ
イレベルからロウレベルに戻ることとなる。
In the first embodiment, the additional steps S255, S280 and S290 correspond to the operation as signal level setting means. According to the microcomputer 4 of the second embodiment, after the output level of the drive signal Po is inverted to the high level as shown in FIG. 8 showing the same situation as that of FIG. For example, after the value of the counter CNT becomes equal to or less than the count value NON1 already stored in the second register R2), the CPU 14 sets the count value NON in the on-time register RON at time t5 ″.
From “NON1” to a smaller value of “NON2 (<N
ON1) ", if the value of the counter CNT at that time is larger than the latest count value NON2, the output level of the drive signal Po returns from the high level to the low level. Then, the output level of the drive signal Po is thereafter inverted from the low level to the high level again at the time ta at which the value of the counter CNT becomes equal to or less than the latest count value NON2, and thereafter, the value of the counter CNT becomes "0". At the time t7, the level returns from the high level to the low level.

【0087】従って、このような第2実施例のマイコン
4によれば、駆動信号Poの出力レベルのうち、ハイレ
ベルの出力時間(オン時間TON)を短くする方の応答性
を、より向上させることができる。 「第3実施例」次に、第3実施例の車両制御装置につい
て説明する。本第3実施例の車両制御装置では、第1実
施例の車両制御装置2に対して、PWM出力回路16
が、図3に示した動作に代えて、図9に示す動作を行う
ように構成されている。
Therefore, according to the microcomputer 4 of the second embodiment, of the output levels of the drive signal Po, the responsiveness of shortening the high-level output time (ON time TON) is further improved. be able to. Third Embodiment Next, a vehicle control device according to a third embodiment will be described. The vehicle control device of the third embodiment differs from the vehicle control device 2 of the first embodiment in that the PWM output circuit 16
However, it is configured to perform the operation shown in FIG. 9 instead of the operation shown in FIG.

【0088】即ち、第3実施例のPWM出力回路16で
は、図9に示すように、S230の判定動作によってオ
ン時間レジスタRONの現在値と第2レジスタR2の現在
値とが等しくないと判定した場合に、S235の判定動
作を追加して行う。そして、このS235の動作では、
オン時間レジスタRONの現在値が第2レジスタR2の現
在値よりも大きいか否かを判定し、オン時間レジスタR
ONの現在値の方が第2レジスタR2の現在値よりも大き
い場合には、続くS240の動作を行って、その時点で
オン時間レジスタRONに格納されている最新のカウント
値NONを第2レジスタR2へ転送するが、オン時間レジ
スタRONの現在値が第2レジスタR2の現在値よりも大
きくなければ、S240の転送動作を行うことなく、S
250の動作へ進む。尚、上記S235以外の動作につ
いては、第1実施例の場合と全く同じである。
That is, in the PWM output circuit 16 of the third embodiment, as shown in FIG. 9, it is determined by the determination operation of S230 that the current value of the on-time register RON and the current value of the second register R2 are not equal. In this case, the determination operation in S235 is additionally performed. Then, in the operation of S235,
It is determined whether or not the current value of the on-time register RON is greater than the current value of the second register R2.
If the current value of ON is larger than the current value of the second register R2, the operation of the following S240 is performed, and the latest count value NON stored in the on-time register RON at that time is stored in the second register R2. When the current value of the on-time register RON is not larger than the current value of the second register R2, the transfer to S2 is performed without performing the transfer operation of S240.
Proceed to operation 250. Operations other than S235 are exactly the same as those in the first embodiment.

【0089】つまり、第3実施例のPWM出力回路16
では、オン時間レジスタRONに格納されるカウント値N
ONが、第2レジスタR2に記憶されているカウント値N
ONに対して、オン時間TONが長くなるように(換言すれ
ば、ソレノイドLに流れる電流が大きくなるように)変
化した場合にだけ、S240の動作を実行して、オン時
間レジスタRONに格納されている最新のカウント値NON
を即座に第2レジスタR2へ転送するようにしている。
That is, the PWM output circuit 16 of the third embodiment
Now, the count value N stored in the on-time register RON
ON is the count value N stored in the second register R2.
Only when the ON time TON changes with respect to ON so that the ON time TON becomes longer (in other words, the current flowing through the solenoid L increases), the operation of S240 is executed, and the ON time TON is stored in the ON time register RON. Latest count value NON
Is immediately transferred to the second register R2.

【0090】ここで、PWM出力回路16が上記S23
5の動作を追加して行う理由について説明する。まず、
本実施例の車両制御装置では、駆動回路6が、バッテリ
からの電源供給を受けて、ソレノイドLへ電流を流すよ
うに構成されているため、駆動回路6に出力する駆動信
号Poのデューティ比が同じであっても、バッテリ電圧
VB が高ければソレノイド電流Iは大きくなり、逆にバ
ッテリ電圧VB が低くければソレノイド電流Iは小さく
なる。
Here, the PWM output circuit 16 operates in step S23.
The reason for adding the operation 5 will be described. First,
In the vehicle control device of the present embodiment, the drive circuit 6 is configured to receive the power supply from the battery and flow the current to the solenoid L, so that the duty ratio of the drive signal Po output to the drive circuit 6 is Even if they are the same, the solenoid current I increases when the battery voltage VB is high, and conversely, the solenoid current I decreases when the battery voltage VB is low.

【0091】このため、本実施例の車両制御装置では、
CPU14が、ソレノイド制御処理(図2)のS120
にて、バッテリ電圧VB を検出し、同処理のS140に
て、S120で検出したバッテリ電圧VB に基づき、そ
の電圧値が低い場合ほど、駆動信号Poのオン時間TON
が長くなるように(つまり、ソレノイド電流Iが大きく
なるように)、S130で求めたカウント値NONを大き
な値に補正するようにしている。そして、このような電
圧補正を行うことで、バッテリ電圧VB が変動しても、
ソレノイドLに所望の電流を流すことができるようにし
ている。
For this reason, in the vehicle control device of this embodiment,
The CPU 14 executes S120 in the solenoid control process (FIG. 2).
, The battery voltage VB is detected, and in S140 of the same process, based on the battery voltage VB detected in S120, the ON time TON of the drive signal Po decreases as the voltage value decreases.
Is made longer (that is, the solenoid current I becomes larger), the count value NON obtained in S130 is corrected to a larger value. By performing such a voltage correction, even if the battery voltage VB fluctuates,
A desired current can be supplied to the solenoid L.

【0092】ところが、「課題を解決するための手段、
及び発明の効果」の項で説明したように、車両におい
て、バッテリ電圧VB の低下は比較的長い時間継続する
ものの、バッテリ電圧VB の上昇は瞬間的にしか起こら
ないことが多い。よって、CPU14が、バッテリ電圧
VB の上昇を検出して、オン時間レジスタRONに格納す
るカウント値NONをソレノイド電流Iが小さくなるよう
に補正した場合(つまり、カウント値NONを小さい値に
補正した場合)、その補正後のカウント値NONが駆動回
路6へ出力される駆動信号Poのデューティ比に反映さ
れる頃には、バッテリ電圧VB は通常値に戻ってしまっ
ていることとなるため、上記補正後のカウント値NON
を、駆動回路6へ出力する駆動信号Poのデューティ比
に即座に反映させると、駆動回路6によりソレノイドL
へ流される電流としては、本来の目標電流よりも低下し
てしまう虞がある。
However, “means for solving the problem,
As described in the section “Effects of the Invention”, in a vehicle, the decrease in battery voltage VB continues for a relatively long time, but the increase in battery voltage VB often occurs only momentarily. Therefore, when the CPU 14 detects the rise in the battery voltage VB and corrects the count value NON stored in the on-time register RON so that the solenoid current I becomes small (that is, when the CPU 14 corrects the count value NON to a small value). ) By the time the corrected count value NON is reflected in the duty ratio of the drive signal Po output to the drive circuit 6, the battery voltage VB has returned to the normal value. Later count value NON
Is immediately reflected in the duty ratio of the drive signal Po output to the drive circuit 6, the drive circuit 6
There is a possibility that the current flowing to the lower side becomes lower than the original target current.

【0093】そこで特に、第3実施例では、オン時間レ
ジスタRONに格納されるカウント値NONが、第2レジス
タR2に記憶されているカウント値NONに対して、オン
時間TONが長くなるように変化した場合にだけ、S24
0の動作を実行して、オン時間レジスタRONに格納され
ている最新のカウント値NONを即座に第2レジスタR2
へ転送するようにしている。
In particular, in the third embodiment, the count value NON stored in the on-time register RON changes so that the on-time TON becomes longer than the count value NON stored in the second register R2. S24 only if
0, the latest count value NON stored in the on-time register RON is immediately updated to the second register R2.
To be transferred to

【0094】そして、この第3実施例の車両制御装置に
よれば、CPU14がソレノイド制御処理のS120及
びS140で実行する電圧補正のための処理による効果
と、ソレノイドLに対する電流制御の高い応答性とを、
両立して得ることができるようになる。
According to the vehicle control apparatus of the third embodiment, the effect of the voltage correction processing executed by the CPU 14 in S120 and S140 of the solenoid control processing, and the high responsiveness of the current control to the solenoid L, To
You will be able to get both.

【0095】尚、本第3実施例においては、上記追加の
S235とS240が、データ変更手段としての動作に
相当している。また、CPU14側では、図2のソレノ
イド制御処理にて、S120が電圧検出手段としての処
理に相当しており、S140が補正手段としての処理に
相当している。
In the third embodiment, the additional steps S235 and S240 correspond to the operation as data changing means. On the CPU 14 side, in the solenoid control processing of FIG. 2, S120 corresponds to processing as voltage detection means, and S140 corresponds to processing as correction means.

【0096】「その他」上記各実施例のPWM出力回路
16は、カウンタCNTの値が「0」になった時点で、
駆動信号Poの出力レベルをロウレベルにし、カウンタ
CNTの値が第2レジスタR2に記憶したカウント値N
ON以下になると、駆動信号Poの出力レベルをロウレベ
ルからハイレベルに反転するようにした。つまり、第1
レベルをロウレベルとし、第2レベルをハイレベルとし
たものであったが、ロウレベルとハイレベルとを逆にし
てもよい。
[Others] When the value of the counter CNT becomes “0”, the PWM output circuit 16 of each of the above embodiments
The output level of the drive signal Po is set to the low level, and the value of the counter CNT is changed to the count value N stored in the second register R2.
The output level of the drive signal Po is inverted from a low level to a high level when it becomes lower than ON. That is, the first
Although the level is a low level and the second level is a high level, the low level and the high level may be reversed.

【0097】例えば第3実施例の場合には、CPU14
が実行するソレノイド制御処理を下記の(1),(2)
のように変更すると共に、PWM出力回路16を下記の
(3),(4)のように変更すればよい。 (1)ソレノイド制御処理(図2)のS130では、駆
動信号Poのパルス周期TS 中におけるロウレベル時間
(オフ時間)TOFF を算出し、そのオフ時間TOFF に応
じたカウント値NOFF を求める。
For example, in the case of the third embodiment, the CPU 14
(1), (2)
And the PWM output circuit 16 may be changed as shown in (3) and (4) below. (1) In S130 of the solenoid control process (FIG. 2), a low level time (off time) TOFF during the pulse period TS of the drive signal Po is calculated, and a count value NOFF corresponding to the off time TOFF is obtained.

【0098】(2)そして、ソレノイド制御処理のS1
40では、バッテリ電圧VB が低い場合ほど、上記オフ
時間TOFF が短くなるように、S130で求めたカウン
ト値NOFF を補正して、続くS150では、その補正後
のカウント値NOFF を、前述したオン時間レジスタRON
に格納する。
(2) Then, S1 of the solenoid control processing
At 40, the count value NOFF obtained at S130 is corrected so that the OFF time TOFF becomes shorter as the battery voltage VB becomes lower. At S150, the count value NOFF after the correction is changed to the above-mentioned ON time. Register RON
To be stored.

【0099】(3)一方、PWM出力回路16では、図
9のS290の動作で、駆動信号Poの出力レベルをハ
イレベルに設定し、また、図9のS280及びS320
の動作で、駆動信号Poの出力レベルをロウレベルに設
定する。 (4)そして更に、PWM出力回路16では、図9のS
235の判定動作にて、オン時間レジスタRONの現在値
(つまり、この場合には、最新のオフ時間TOFF に対応
するカウント値NOFF )の方が第2レジスタR2の現在
値よりも小さい場合にのみ、S240での転送動作を行
う。
(3) On the other hand, in the PWM output circuit 16, the output level of the drive signal Po is set to the high level by the operation of S290 in FIG. 9, and S280 and S320 in FIG.
With the operation described above, the output level of the drive signal Po is set to the low level. (4) Further, in the PWM output circuit 16, S in FIG.
In the determination operation at 235, only when the current value of the on-time register RON (that is, in this case, the count value NOFF corresponding to the latest off-time TOFF) is smaller than the current value of the second register R2. , S240.

【0100】そして、このように構成しても、第3実施
例のものと全く同様の効果を得ることができる。尚、こ
のようにロウレベルとハイレベルとを逆にする考え方
は、第1実施例及び第2実施例についても全く同様であ
る。また、上記各実施例のマイコン4は、自動変速機用
の電磁弁を制御するために用いられたが、例えば内燃機
関のスロットル弁をバイパスする補助空気通路に介装さ
れた電磁ソレノイド式のアイドル制御弁(ISCV)
等、高い制御応答性が要求される他の電磁弁や、或いは
ランプ等の他の電気負荷のデューティ制御にも、同様に
使用することができる。
[0100] Even with this configuration, the same effect as that of the third embodiment can be obtained. Note that the concept of reversing the low level and the high level is exactly the same for the first embodiment and the second embodiment. The microcomputer 4 of each of the above embodiments is used to control an electromagnetic valve for an automatic transmission. For example, the microcomputer 4 is an electromagnetic solenoid type idle that is interposed in an auxiliary air passage that bypasses a throttle valve of an internal combustion engine. Control valve (ISCV)
For example, the present invention can be similarly used for duty control of another electromagnetic valve requiring high control responsiveness or another electric load such as a lamp.

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

【図1】 第1実施例の車両制御装置の構成を表わす構
成図である。
FIG. 1 is a configuration diagram illustrating a configuration of a vehicle control device according to a first embodiment.

【図2】 第1実施例のCPUが実行するソレノイド制
御処理を表すフローチャートである。
FIG. 2 is a flowchart illustrating a solenoid control process executed by a CPU according to the first embodiment.

【図3】 第1実施例のPWM出力回路の動作を説明す
るフローチャートである。
FIG. 3 is a flowchart illustrating an operation of the PWM output circuit according to the first embodiment.

【図4】 第1実施例のPWM出力回路が図3のS23
0及びS240の動作を行わない場合の、マイコンの動
作を説明するタイムチャートである。
FIG. 4 is a block diagram showing a PWM output circuit according to the first embodiment;
6 is a time chart for explaining the operation of the microcomputer when the operations of 0 and S240 are not performed.

【図5】 第1実施例のマイコンにて、CPUがオン時
間に対応するカウント値を大きい値に変更した場合の動
作を説明するタイムチャートである。
FIG. 5 is a time chart illustrating an operation when the CPU changes the count value corresponding to the ON time to a large value in the microcomputer of the first embodiment.

【図6】 第1実施例のマイコンにて、CPUがオン時
間に対応するカウント値を小さい値に変更した場合の動
作を説明するタイムチャートである。
FIG. 6 is a time chart illustrating an operation when the CPU changes the count value corresponding to the ON time to a small value in the microcomputer of the first embodiment.

【図7】 第2実施例のPWM出力回路の動作を説明す
るフローチャートである。
FIG. 7 is a flowchart illustrating an operation of the PWM output circuit according to the second embodiment.

【図8】 第2実施例の作用を説明するタイムチャート
である。
FIG. 8 is a time chart for explaining the operation of the second embodiment.

【図9】 第3実施例のPWM出力回路の動作を説明す
るフローチャートである。
FIG. 9 is a flowchart illustrating an operation of the PWM output circuit according to the third embodiment.

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

2…車両制御装置 4…マイクロコンピュータ(マイ
コン) 6…駆動回路 8…電流検出器 10…I/Oバッ
ファ 12…A/D変換器 14…CPU 16…PWM
出力回路 L…電磁ソレノイド R…抵抗器 RON…オン時間
レジスタ RS …周期レジスタ R1…第1レジスタ R2…
第2レジスタ
DESCRIPTION OF SYMBOLS 2 ... Vehicle control apparatus 4 ... Microcomputer (microcomputer) 6 ... Drive circuit 8 ... Current detector 10 ... I / O buffer 12 ... A / D converter 14 ... CPU 16 ... PWM
Output circuit L: Electromagnetic solenoid R: Resistor RON: ON time register RS: Period register R1: First register R2 ...
Second register

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 電気負荷へ電流を流す駆動手段に対し
て、デューティ比を制御したパルス状の駆動信号を出力
することにより、前記電気負荷に流れる電流を制御する
電気負荷の通電制御装置であって、 所定の演算周期毎に、外部からの情報に基づき前記駆動
信号のデューティ比を算出して、前記駆動信号の1周期
の開始時を起点として該駆動信号の信号レベルを第1レ
ベルから第2レベルに反転させるまでの時間を示すデー
タを、特定の記憶領域に格納する演算部と、 前記演算部の演算周期とは同期せずに前記駆動信号の1
周期を繰り返して計時する計時手段と、前記特定の記憶
領域に格納されたデータを記憶するための記憶手段と、
前記計時手段が前記駆動信号の新たな1周期の計時を開
始する度に、その時点で前記特定の記憶領域に格納され
ているデータを読み出して前記記憶手段に記憶させるデ
ータ転送手段と、前記計時手段にて計時される時間が前
記記憶手段に記憶されたデータの示す時間を経過したか
否かを判定する判定手段と、前記計時手段が前記駆動信
号の新たな1周期の計時を開始する度に、前記駆動信号
の信号レベルを前記第1レベルに設定し、前記判定手段
により肯定判定されると、前記駆動信号の信号レベルを
前記第2レベルに設定する信号レベル設定手段と、該信
号レベル設定手段により設定された信号レベルに応じ
て、前記駆動信号を前記駆動手段に出力する出力手段
と、を有する駆動信号出力部と、 を備え、 更に、前記駆動信号出力部に、 前記計時手段が前記駆動信号の新たな1周期の計時を開
始してから次の1周期の計時を開始するまでの間に、前
記特定の記憶領域に格納されているデータが前記記憶手
段に記憶されているデータから変化したか否かを監視す
る監視手段と、 該監視手段により前記データの変化が検出されると、前
記特定の記憶領域に格納されているデータを読み出し
て、該読み出したデータを前記記憶手段に新たに記憶さ
せるデータ変更手段と、 を設けたことを特徴とする電気負荷の通電制御装置。
1. An electric load energization control device for controlling a current flowing through an electric load by outputting a pulse-shaped driving signal having a controlled duty ratio to a driving means for flowing a current to the electric load. Calculating a duty ratio of the drive signal based on information from outside for each predetermined calculation cycle, and starting from one cycle of the drive signal as a starting point, changing the signal level of the drive signal from the first level to the first level; An arithmetic unit for storing data indicating a time required for inversion to two levels in a specific storage area; and 1 of the drive signal without being synchronized with the arithmetic cycle of the arithmetic unit.
Clocking means for repeating a cycle, and storage means for storing data stored in the specific storage area,
A data transfer unit that reads data stored in the specific storage area at that time and stores the read data in the storage unit each time the timing unit starts timing of a new cycle of the drive signal; Determining means for determining whether or not the time measured by the means has exceeded the time indicated by the data stored in the storage means; and each time the time measuring means starts measuring a new cycle of the drive signal. Signal level setting means for setting the signal level of the drive signal to the first level, and when the determination means makes a positive determination, setting the signal level of the drive signal to the second level; An output unit that outputs the drive signal to the drive unit in accordance with the signal level set by the setting unit; and a drive signal output unit that further comprises: The data stored in the specific storage area is stored in the storage unit during a period from when the timing unit starts measuring a new cycle of the drive signal to when the next one cycle starts counting. Monitoring means for monitoring whether there has been a change from the data being read, and when a change in the data is detected by the monitoring means, the data stored in the specific storage area is read, and the read data is read. And a data changing means for newly storing the data in the storage means.
【請求項2】 請求項1に記載の電気負荷の通電制御装
置において、 前記信号レベル設定手段は、 前記判定手段により否定判定されている間、前記駆動信
号の信号レベルを前記第1レベルに設定するように構成
されていること、 を特徴とする電気負荷の通電制御装置。
2. The control apparatus according to claim 1, wherein the signal level setting unit sets the signal level of the drive signal to the first level while the determination unit makes a negative determination. And a power supply control device for an electric load.
【請求項3】 請求項1又は請求項2に記載の電気負荷
の通電制御装置において、 前記駆動手段は、車両に搭載されたバッテリからの電源
供給を受けて前記電気負荷へ電流を流すように構成さ
れ、 前記演算部は、前記バッテリの電圧を検出する電圧検出
手段と、該電圧検出手段により検出された電圧の値に応
じて、その電圧値が低い場合ほど、前記特定の記憶領域
に格納するデータを前記電気負荷に流れる電流が大きく
なるように補正する補正手段と、を備えており、 更に、前記データ変更手段は、前記特定の記憶領域に格
納されているデータが、前記記憶手段に記憶されている
データに対して、前記電気負荷に流れる電流が大きくな
るように変化した場合にだけ、前記特定の記憶領域に格
納されているデータを前記記憶手段に新たに記憶させる
ように構成されていること、 を特徴とする電気負荷の通電制御装置。
3. The current supply control device for an electric load according to claim 1, wherein the drive unit receives a power supply from a battery mounted on a vehicle and causes a current to flow to the electric load. The arithmetic unit is configured to: store the voltage in the specific storage area as the voltage value is lower according to the voltage value detected by the voltage detecting means, and the voltage value detected by the voltage detecting means. Correction means for correcting the data to be processed so that the current flowing through the electric load is large.The data change means further stores the data stored in the specific storage area in the storage means. Only when the current flowing through the electric load changes with respect to the stored data, the data stored in the specific storage area is newly stored in the storage unit. A power supply control device for an electric load.
JP15571196A 1996-06-17 1996-06-17 Electric load energization control device Expired - Fee Related JP3458602B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP15571196A JP3458602B2 (en) 1996-06-17 1996-06-17 Electric load energization control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP15571196A JP3458602B2 (en) 1996-06-17 1996-06-17 Electric load energization control device

Publications (2)

Publication Number Publication Date
JPH102248A true JPH102248A (en) 1998-01-06
JP3458602B2 JP3458602B2 (en) 2003-10-20

Family

ID=15611839

Family Applications (1)

Application Number Title Priority Date Filing Date
JP15571196A Expired - Fee Related JP3458602B2 (en) 1996-06-17 1996-06-17 Electric load energization control device

Country Status (1)

Country Link
JP (1) JP3458602B2 (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS4895856A (en) * 1972-03-21 1973-12-08
US6687555B1 (en) 1998-04-21 2004-02-03 Denso Corporation Linear solenoid control apparatus and method having increased responsiveness features
JP2006250203A (en) * 2005-03-09 2006-09-21 Denso Corp Control device for solenoid valve
US7489975B2 (en) 2005-05-31 2009-02-10 Kabushiki Kaisha Toshiba Power supply device, information processing apparatus, and power control method
JP2010146258A (en) * 2008-12-18 2010-07-01 Denso Corp Signal processing device
JP2013086742A (en) * 2011-10-21 2013-05-13 Renesas Electronics Corp Debug system, electronic control unit, information processor, semiconductor package, and transceiver circuit
JP2014240638A (en) * 2013-06-12 2014-12-25 株式会社デンソー Actuator drive device
CN113447616A (en) * 2021-06-22 2021-09-28 成都归谷环境科技有限责任公司 PWM output value calculation method of CO2 sensor

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS4895856A (en) * 1972-03-21 1973-12-08
US6687555B1 (en) 1998-04-21 2004-02-03 Denso Corporation Linear solenoid control apparatus and method having increased responsiveness features
US7067941B2 (en) 1998-04-21 2006-06-27 Denso Corporation Linear solenoid control apparatus and method having increased responsiveness features
JP2006250203A (en) * 2005-03-09 2006-09-21 Denso Corp Control device for solenoid valve
US7489975B2 (en) 2005-05-31 2009-02-10 Kabushiki Kaisha Toshiba Power supply device, information processing apparatus, and power control method
JP2010146258A (en) * 2008-12-18 2010-07-01 Denso Corp Signal processing device
JP2013086742A (en) * 2011-10-21 2013-05-13 Renesas Electronics Corp Debug system, electronic control unit, information processor, semiconductor package, and transceiver circuit
US9201479B2 (en) 2011-10-21 2015-12-01 Renesas Electronics Corporation Debug system, electronic control unit, information processing unit, semiconductor package, and transceiver circuit
JP2014240638A (en) * 2013-06-12 2014-12-25 株式会社デンソー Actuator drive device
CN113447616A (en) * 2021-06-22 2021-09-28 成都归谷环境科技有限责任公司 PWM output value calculation method of CO2 sensor

Also Published As

Publication number Publication date
JP3458602B2 (en) 2003-10-20

Similar Documents

Publication Publication Date Title
US8055923B2 (en) Electronic control unit and signal monitoring circuit
US6014749A (en) Data processing circuit with self-timed instruction execution and power regulation
JP3458602B2 (en) Electric load energization control device
JP4158513B2 (en) Vehicle power generation control device
JP4434046B2 (en) Inductive load controller
US10186993B2 (en) Motor control system and motor driving circuit
JP4091163B2 (en) Signal input device, control device, and current control device for inductive load
US6687555B1 (en) Linear solenoid control apparatus and method having increased responsiveness features
US6064252A (en) Clock supply apparatus reducing consumption of power
JP2002262549A (en) Power control device for inductive load
JP2003209975A (en) Semiconductor device for inverter control
JP3438609B2 (en) Pulse width modulation signal generator
JP2003031415A (en) Inductive load controller, shipping inspecting method thereof and a/d converter selecting method
JP2005100682A (en) Battery charge and discharge current detection device
JP2007309751A (en) Gas detector
JP6064747B2 (en) Inductive load controller
JP5729321B2 (en) Linear solenoid control device
JPH0921993A (en) Back light driving device for liquid crystal display and its control method
JP3223884B2 (en) Duty ratio determination circuit and duty ratio determination method
KR930000259B1 (en) Source supplying method for stepping motor
JP3552371B2 (en) Waveform shaping circuit
JP6783714B2 (en) Drive cycle controller
JP2947667B2 (en) Pulse signal output control device
JP3023603B2 (en) Camera ranging device
JPH11297529A (en) Electromagnetic solenoid control device

Legal Events

Date Code Title Description
FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090808

Year of fee payment: 6

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100808

Year of fee payment: 7

FPAY Renewal fee payment (prs date is renewal date of database)

Year of fee payment: 7

Free format text: PAYMENT UNTIL: 20100808

FPAY Renewal fee payment (prs date is renewal date of database)

Year of fee payment: 8

Free format text: PAYMENT UNTIL: 20110808

FPAY Renewal fee payment (prs date is renewal date of database)

Year of fee payment: 9

Free format text: PAYMENT UNTIL: 20120808

LAPS Cancellation because of no payment of annual fees