JPH08328745A - Analog/digital converter - Google Patents
Analog/digital converterInfo
- Publication number
- JPH08328745A JPH08328745A JP7138124A JP13812495A JPH08328745A JP H08328745 A JPH08328745 A JP H08328745A JP 7138124 A JP7138124 A JP 7138124A JP 13812495 A JP13812495 A JP 13812495A JP H08328745 A JPH08328745 A JP H08328745A
- Authority
- JP
- Japan
- Prior art keywords
- conversion
- signal
- microcomputer
- analog
- digital
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000006243 chemical reaction Methods 0.000 claims abstract description 136
- 230000005856 abnormality Effects 0.000 claims abstract description 22
- 230000008054 signal transmission Effects 0.000 claims abstract description 6
- 238000000034 method Methods 0.000 claims description 31
- 230000006854 communication Effects 0.000 claims description 30
- 238000001514 detection method Methods 0.000 claims description 4
- 230000006866 deterioration Effects 0.000 abstract description 2
- 230000005540 biological transmission Effects 0.000 description 28
- 238000010586 diagram Methods 0.000 description 10
- 230000002159 abnormal effect Effects 0.000 description 9
- QVGXLLKOCUKJST-UHFFFAOYSA-N atomic oxygen Chemical compound [O] QVGXLLKOCUKJST-UHFFFAOYSA-N 0.000 description 2
- 230000003139 buffering effect Effects 0.000 description 2
- 239000007789 gas Substances 0.000 description 2
- WABPQHHGFIMREM-UHFFFAOYSA-N lead(0) Chemical compound [Pb] WABPQHHGFIMREM-UHFFFAOYSA-N 0.000 description 2
- 239000001301 oxygen Substances 0.000 description 2
- 229910052760 oxygen Inorganic materials 0.000 description 2
- 239000000758 substrate Substances 0.000 description 2
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 2
- 230000007175 bidirectional communication Effects 0.000 description 1
- 239000004020 conductor Substances 0.000 description 1
- 239000000446 fuel Substances 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
Landscapes
- Analogue/Digital Conversion (AREA)
- Combined Controls Of Internal Combustion Engines (AREA)
Abstract
Description
【0001】[0001]
【産業上の利用分野】本発明はアナログ/デジタル変換
装置に係り、アナログ/デジタル変換を行う変換部と、
変換されたデジタル値を取り込んで処理する処理部とが
通信する型のデジタル変換装置に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an analog / digital converter, and a converter for performing analog / digital conversion,
The present invention relates to a digital conversion device of a type that communicates with a processing unit that takes in and processes a converted digital value.
【0002】[0002]
【従来の技術】近年、電子機器の制御、例えば自動車用
エンジンの制御システムでは、エンジンの状態や走行状
態を各種センサで検出し、これらセンサからの情報をマ
イクロコンピュータで処理して、最適の状態で車両走行
を行うための制御が行われている。そして、これら各種
センサからの情報はその殆どが電気的な信号であり、デ
ジタル信号とアナログ信号が使用されている。マイクロ
コンピュータで、これらの信号を処理する場合は、デジ
タル信号はそのままマイクロコンピュータに入力して処
理できるが、アナログ信号の場合にはマイクロコンピュ
ータに入力する前にデジタル信号に変換する必要があ
る。2. Description of the Related Art In recent years, in electronic equipment control systems such as automobile engine control systems, various sensors detect the state of the engine and the running state, and the information from these sensors is processed by a microcomputer to obtain the optimum state. The control for driving the vehicle is performed. Most of the information from these various sensors is an electrical signal, and a digital signal and an analog signal are used. When a microcomputer processes these signals, the digital signal can be directly input to the microcomputer for processing, but in the case of an analog signal, it must be converted into a digital signal before being input to the microcomputer.
【0003】アナログ信号をデジタル信号に変換するに
は、アナログ/デジタル変換器が用いられるが、構成を
簡単にするため複数種類のアナログ信号を1個のアナロ
グ/デジタル変換器で順次デジタル信号に変換するマル
チチャンネル型のアナログ/デジタル変換器が多く用い
られている。又、アナログ/デジタル変換器とマイクロ
コンピュータ間にはデータ等を伝達するための通信ライ
ン(プリント配線基板の配線パターンや、フレキシブル
基板、導線〔リード線〕)が設けられているが、用途に
応じて各種通信方式がとられており、自動車のエンジン
等の制御には、同期エラー等の通信異常が発生しにくい
SPI(シリアル・ペリフェラル・インターフェイス)
方式の通信方式がよく用いられている。An analog / digital converter is used to convert an analog signal into a digital signal, but a plurality of types of analog signals are sequentially converted into digital signals by one analog / digital converter in order to simplify the configuration. A multi-channel type analog / digital converter is often used. A communication line (wiring pattern of printed wiring board, flexible board, conducting wire [lead wire]) for transmitting data etc. is provided between the analog / digital converter and the microcomputer. Various communication systems have been adopted, and SPI (Serial Peripheral Interface) is less likely to cause communication errors such as synchronization errors when controlling automobile engines.
The communication method of the method is often used.
【0004】次ぎに図7を用いてSPI通信を用いたア
ナログ/デジタル変換器について説明する。51はアナ
ログ/デジタル変換器で、複数(本例においては24チ
ャンネル)のセンサと接続され、それらのセンサからの
アナログ信号を入力している。又、アナログ/デジタル
変換器1にはマイクロコンピュータ2との通信のため、
クロック入力端子A1、データ入力端子A2、データ出
力端子A3、変換終了信号出力端子A4が設けられてお
り、それぞれマイクロコンピュータ2側のクロック出力
端子B1、データ出力端子B2、データ入力端子B3、
外部割込端子B4に接続されている。Next, an analog / digital converter using SPI communication will be described with reference to FIG. An analog / digital converter 51 is connected to a plurality of (24 channels in this example) sensors and inputs analog signals from these sensors. Also, since the analog / digital converter 1 communicates with the microcomputer 2,
A clock input terminal A1, a data input terminal A2, a data output terminal A3, and a conversion end signal output terminal A4 are provided, and a clock output terminal B1, a data output terminal B2, a data input terminal B3 on the microcomputer 2 side, respectively.
It is connected to the external interrupt terminal B4.
【0005】そして、クロック入力端子A1にはクロッ
ク出力端子B1からデータ通信のための同期信号となる
クロック信号(パルス信号)が入力される。又、データ
入力端子A2にはデータ出力端子B2からの変換命令信
号(シリアル信号)が入力され、データ入力端子B3に
はデータ出力端子A3からの変換結果信号(シリアル信
号)が入力され、そして外部割込端子B4には変換終了
信号出力端子A4からアナログ/デジタル変換(アナロ
グ/デジタル変換)が終了した旨の信号が入力される。A clock signal (pulse signal) serving as a synchronizing signal for data communication is input from the clock output terminal B1 to the clock input terminal A1. Further, the conversion command signal (serial signal) from the data output terminal B2 is input to the data input terminal A2, the conversion result signal (serial signal) from the data output terminal A3 is input to the data input terminal B3, and the external A signal indicating that the analog / digital conversion (analog / digital conversion) is completed is input to the interrupt terminal B4 from the conversion end signal output terminal A4.
【0006】図8はアナログ/デジタル変換及び通信の
タイミングを示す図であり、次ぎにアナログ/デジタル
変換及び通信のタイミングについて説明する。マイクロ
コンピュータ52は、センサの出力信号データが必要な
場合、先ず変換命令を示すコマンドデータと対象センサ
を示すチャンネルデータをアナログ/デジタル変換器5
1に送信するための送信レジスタに書き込み、これらの
データをクロック信号に同期させてクロック信号と共に
出力する(u1)。FIG. 8 is a diagram showing the timings of analog / digital conversion and communication. Next, the timings of analog / digital conversion and communication will be described. When the output signal data of the sensor is required, the microcomputer 52 first converts the command data indicating the conversion instruction and the channel data indicating the target sensor into the analog / digital converter 5.
1 is written into the transmission register for transmission, and these data are output together with the clock signal in synchronization with the clock signal (u1).
【0007】アナログ/デジタル変換器51は、入力さ
れたクロック信号に同期してコマンドデータと対象セン
サを示すチャンネルデータを読み込んで解読し、指定さ
れたセンサ(チャンネル)の信号をアナログ/デジタル
変換する。そして、アナログ/デジタル変換が終了する
とアナログ/デジタル変換器51は、変換終了出力端子
A4からマイクロコンピュータ52の外部割込端子B4
にアナログ/デジタル変換が終了した旨の変換終了信号
を出力すると共に、マイクロコンピュータ52にデータ
を送信するための送信レジスタに変換結果を書き込む
(u2)。The analog / digital converter 51 reads command data and channel data indicating a target sensor in synchronization with an input clock signal, decodes the same, and converts the signal of a designated sensor (channel) into an analog signal. . When the analog / digital conversion is completed, the analog / digital converter 51 outputs the conversion end output terminal A4 to the external interrupt terminal B4 of the microcomputer 52.
A conversion end signal indicating that the analog / digital conversion is completed is output to and the conversion result is written in a transmission register for transmitting data to the microcomputer 52 (u2).
【0008】マイクロコンピュータ52は、変換終了信
号を受信すると、割込処理によりクロック信号を送信す
る(u3)。すると、該クロック信号に同期してアナロ
グ/デジタル変換器1側の送信レジスタに書き込まれた
変換結果が送信されるので、該クロック信号に同期して
変換結果を読み込み、1回のアナログ/デジタル変換及
び通信の処理が完了する(u4)。Upon receiving the conversion end signal, the microcomputer 52 transmits a clock signal by interrupt processing (u3). Then, since the conversion result written in the transmission register on the analog / digital converter 1 side is transmitted in synchronization with the clock signal, the conversion result is read in synchronization with the clock signal, and the analog / digital conversion is performed once. And the communication processing is completed (u4).
【0009】[0009]
【発明が解決しようとする課題】この様なデジタル変換
装置に於いて、従来は前記変換終了信号伝達用の信号ラ
インが断線し、終了割込が発生しなくなった(変換終了
信号を入力しなくなった)場合、マイクロコンピュータ
52はアナログ/デジタル変換部51の異常とみなし、
アナログ/デジタル変換装置のシステムリセット等の処
置を行っていたが、信号ラインの断線であればシステム
リセットでは正常状態に復帰しないため、マイクロコン
ピュータ52はセンサからの信号無しでエンジン制御を
行うフェイルセーフ制御を行うことになる。従って、こ
の様な場合フェイルセーフ制御により走行は可能である
が、性能(燃費、排気ガス、走行能力、乗り心地)等が
悪化する。本発明はこの様な場合に於ける、例えばエン
ジン等の性能面悪化を抑える事を目的とする。In such a digital converting apparatus, the signal line for transmitting the conversion end signal is conventionally broken, and the end interrupt does not occur (the conversion end signal is not input). In this case, the microcomputer 52 considers that the analog / digital conversion unit 51 is abnormal,
Although the system reset of the analog / digital converter was performed, the system reset does not restore the normal state if the signal line is broken. Therefore, the microcomputer 52 is a fail-safe that controls the engine without a signal from the sensor. Will be controlled. Therefore, in such a case, the vehicle can be driven by the fail-safe control, but the performance (fuel consumption, exhaust gas, traveling ability, riding comfort) and the like deteriorate. An object of the present invention is to prevent the deterioration of the performance of an engine or the like in such a case.
【0010】[0010]
【課題を解決するための手段】本発明はこの様な問題を
解決するために、アナログ信号をデジタル信号に変換す
る変換部と、前記変換部と通信ラインで接続され該変換
部から出力される出力デジタル信号を取り込み処理する
処理部とからなり、前記変換部は前記処理部からの変換
要求信号により変換を行うとともに変換が完了後に変換
完了信号を前記処理部に出力し、前記処理部は前記変換
部からの前記変換完了信号を入力した後に前記変換部か
らのデジタル値を取り込むアナログ/デジタル変換装置
に於いて、 前記変換完了信号の完了信号伝達系の異常
を検出する異常検出手段と、前記異常検出手段により前
記完了信号伝達系の異常が検出されたとき、前記処理部
が変換要求信号を出力してから所定時間後に、前記変換
部の出力デジタル信号を取り込む補助取り込み手段とを
備えたことを特徴とする。In order to solve such a problem, the present invention solves such a problem by converting an analog signal into a digital signal, and connecting the converter with a communication line and outputting from the converter. The conversion unit performs conversion by a conversion request signal from the processing unit and outputs a conversion completion signal to the processing unit after conversion is completed, and the processing unit In an analog / digital conversion device that takes in the digital value from the conversion unit after the conversion completion signal from the conversion unit is input, an abnormality detection unit that detects an abnormality in the completion signal transmission system of the conversion completion signal; When an abnormality of the completion signal transmission system is detected by the abnormality detecting means, a predetermined time after the processing unit outputs the conversion request signal, the output digital signal of the conversion unit is output. And an auxiliary capturing means for capturing the signal.
【0011】又、前記異常検出手段は、前記変換要求信
号と、該変換要求信号に対応する前記変換部からのデジ
タル値とを比較し、該比較結果により異常を判断する事
を特徴とする。Further, the abnormality detecting means is characterized in that the conversion request signal is compared with a digital value from the conversion section corresponding to the conversion request signal, and an abnormality is judged based on the comparison result.
【0012】[0012]
【作用】以上のような手段により本発明においては、変
換終了信号伝達用の変換終了信号伝達ラインが異常の場
合には、処理部側の判断によりアナログ/デジタル変換
値を読み込むので、変換終了信号伝達ラインの異常によ
るアナログ/デジタル値の入力不能状態を回避できる。According to the present invention, when the conversion end signal transmission line for transmitting the conversion end signal is abnormal in the present invention, the analog / digital conversion value is read according to the judgment of the processing section. It is possible to avoid a state where analog / digital values cannot be input due to an abnormality in the transmission line.
【0013】[0013]
【実施例】以下、本発明の一実施例を図面を用いて説明
する。尚、本実施例では自動車のエンジンを制御するエ
ンジン制御装置を例に挙げて説明するが、本発明は、エ
ンジン制御装置以外のアナログ/デジタル変換装置を用
いる装置に適用できる。図1は自動車のエンジン制御装
置の構成を示す構成図である。エンジン制御装置5に
は、各種のセンサが接続されており、これらのセンサか
らの信号を入力して処理し、そして各種アクチュエータ
を制御し、エンジンを適切な状態で動作させる。センサ
には、パルス等によるデジタル信号を出力するデジタル
系センサと、電圧値等によるアナログ信号を出力するア
ナログ系センサがある。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings. In the present embodiment, an engine control device for controlling the engine of an automobile will be described as an example, but the present invention can be applied to a device using an analog / digital conversion device other than the engine control device. FIG. 1 is a configuration diagram showing a configuration of an engine control device for an automobile. Various sensors are connected to the engine control device 5, and signals from these sensors are input and processed, and various actuators are controlled to operate the engine in an appropriate state. The sensor includes a digital sensor that outputs a digital signal such as a pulse and an analog sensor that outputs an analog signal such as a voltage value.
【0014】そして、デジタル系センサには、エンジン
の回転角(上死点等)を示すTDC信号等を出力する回
転角センサ、エンジン回転数を示すNE信号を出力する
回転数センサ、車輪の回転数を示す車速信号を出力する
車速センサ等がある。又、アナログ系センサには、エン
ジンの吸気管内の圧力を検出する吸気管圧力センサ、ラ
ジエータの水温を検出する水温センサ、吸入空気の温度
を検出する吸気温センサ、排気ガス中の酸素濃度を検出
する酸素濃度(O2 )センサ、スロットルバルブの開度
を検出するスロットルバルブセンサ等がある。The digital sensor includes a rotation angle sensor that outputs a TDC signal indicating the rotation angle of the engine (such as top dead center), a rotation speed sensor that outputs an NE signal indicating the engine rotation speed, and a wheel rotation. There is a vehicle speed sensor that outputs a vehicle speed signal indicating the number. The analog sensors include an intake pipe pressure sensor that detects the pressure in the intake pipe of the engine, a water temperature sensor that detects the water temperature of the radiator, an intake temperature sensor that detects the temperature of intake air, and an oxygen concentration in the exhaust gas. There is an oxygen concentration (O2) sensor, a throttle valve sensor that detects the opening of the throttle valve, and the like.
【0015】3はセンサを接続するために緩衝動作等を
行う入力インターフェイスで、デジタル系のセンサとマ
イクロコンピュータ(マイコン)2とを接続し、又アナ
ログ系のセンサとアナログ/デジタル変換器(A/D変
換器)1とを接続している。1はA/D変換器で、入力
インターフェイス3を介して入力されたアナログ系セン
サからのアナログ信号をデジタル信号に変換してマイコ
ン2に出力する。Reference numeral 3 denotes an input interface for performing a buffering operation or the like for connecting a sensor, which connects a digital sensor and a microcomputer 2 and also an analog sensor and an analog / digital converter (A / D converter) 1 is connected. Reference numeral 1 denotes an A / D converter, which converts an analog signal from the analog system sensor input via the input interface 3 into a digital signal and outputs the digital signal to the microcomputer 2.
【0016】2はマイコンで、センサからの信号を入力
して処理し、エンジンの各所に設けられたアクチュエー
タを制御してエンジンが状況に応じた状態で動作するよ
う制御する。4はマイコン2とアクチュエータを接続す
るための出力インターフェイスで、緩衝動作等を行う。
又、アクチュエータには、例えばエンジンの点火を行う
点火プラグ、ガソリンを噴射するインジェクタ、スロッ
トルバルブと並列的に設けられスロットルバルブ閉鎖時
(アイドル回転時)に於ける空気量を制御して、アイド
ル回転数を制御するアイドルスピードコントロールバル
ブ(ISCバルブ)等があり、必要に応じてマイコン2
からのデジタル信号をアナログ信号に変化するデジタル
アナログ信号変換器、電圧を昇圧する昇圧回路、デジタ
ル信号に対応するデューティ値を持つパルス信号に変換
するデューティ変換回路等の駆動回路が設けられてい
る。Reference numeral 2 denotes a microcomputer, which receives and processes a signal from a sensor and controls actuators provided at various places of the engine to control the engine to operate in a state according to the situation. Reference numeral 4 denotes an output interface for connecting the microcomputer 2 and the actuator, which performs a buffering operation and the like.
The actuator is equipped with, for example, a spark plug for igniting the engine, an injector for injecting gasoline, and a throttle valve in parallel with the throttle valve to control the air amount when the throttle valve is closed (idle rotation). There is an idle speed control valve (ISC valve) etc. to control the number, and if necessary, the microcomputer 2
There are provided drive circuits such as a digital-analog signal converter for converting the digital signal from the above into an analog signal, a booster circuit for boosting the voltage, and a duty conversion circuit for converting the digital signal into a pulse signal having a duty value corresponding to the digital signal.
【0017】次に図2を用いてSPI通信を用いたアナ
ログ/デジタル変換装置に付いてその詳細を説明する。
A/D変換器1には、複数の(本例では24チャンネル
〔ch〕)のアナログ系センサと接続され、それらセン
サからのアナログ信号を入力している。又、A/D変換
器1にはマイコン2との通信のため、クロック入力端子
A1、データ入力端子A2、データ出力端子A3、変換
終了信号出力端子A4が設けられており、それぞれマイ
コン2側のクロック出力端子B1、データ出力端子B
2、データ入力端子B3、外部割込端子B4に接続され
ている。尚、これらの端子間の接続は、マイコン2とA
/D変換器1が同一プリント基板上に搭載されたもので
あればプリント基板の配線パターンにより接続され、
又、同一基板上に搭載されたものでなければ、フレキシ
ブル基板や導線(リード線)等によって接続されてい
る。Next, the details of the analog / digital converter using SPI communication will be described with reference to FIG.
The A / D converter 1 is connected to a plurality of (24 channels [ch] in this example) analog type sensors, and inputs analog signals from these sensors. Further, the A / D converter 1 is provided with a clock input terminal A1, a data input terminal A2, a data output terminal A3, and a conversion end signal output terminal A4 for communication with the microcomputer 2. Clock output terminal B1, data output terminal B
2, connected to the data input terminal B3 and the external interrupt terminal B4. The connection between these terminals should be
If the D / D converters 1 are mounted on the same printed circuit board, they are connected by the wiring pattern of the printed circuit board,
If they are not mounted on the same substrate, they are connected by a flexible substrate or a conductor (lead wire).
【0018】そして、クロック端子A1にはクロック出
力端子B1からデータ通信のための同期信号となるクロ
ック信号(パルス信号)が入力される。又、データ入力
端子A2にはデータ出力端子B2からの変換命令信号
(シリアル信号)が入力され、データ入力端子B3には
データ出力端子A3からの変換結果信号(シリアル信
号)が入力され、そして、外部割込端子B4には変換終
了信号出力端子A4からアナログ/デジタル変換(A/
D変換)が終了した旨の信号が入力される。A clock signal (pulse signal) which is a synchronizing signal for data communication is input to the clock terminal A1 from the clock output terminal B1. Further, the conversion command signal (serial signal) from the data output terminal B2 is input to the data input terminal A2, the conversion result signal (serial signal) from the data output terminal A3 is input to the data input terminal B3, and From the conversion end signal output terminal A4 to the analog / digital conversion (A /
A signal indicating that the (D conversion) is completed is input.
【0019】次に変換及び通信動作について説明する。
SPI通信はデータの伝送が行われるときのみクロック
信号が送信されるもので、換言すればマイコン2がクロ
ック信号を出力すれば、同時にデータ入力端子A2とデ
ータ出力端子B2間のデータ通信及びデータ入力端子B
3とデータ出力端子A3間のデータ通信がクロック信号
を同期信号として行われる。具体的には、クロック信号
の立ち下がり時における通信ラインの信号レベル(Hレ
ベル:高電圧レベル、Lレベル:低電圧レベル)を1ビ
ット分の通信データとし、送信するもので、送信側では
送りたいデータに応じて通信ラインの信号レベルをクロ
ック信号に同期させて順次切り換え、受信側ではクロッ
ク信号の立ち下がり時の通信ラインの信号レベルを読み
込み受信データに組み立てるものである。Next, the conversion and communication operation will be described.
In SPI communication, a clock signal is transmitted only when data is transmitted. In other words, if the microcomputer 2 outputs a clock signal, data communication between the data input terminal A2 and the data output terminal B2 and data input are performed at the same time. Terminal B
Data communication between the data output terminal 3 and the data output terminal A3 is performed by using the clock signal as a synchronization signal. Specifically, the signal level (H level: high voltage level, L level: low voltage level) of the communication line at the time of the fall of the clock signal is set as 1 bit of communication data and is transmitted. According to the desired data, the signal level of the communication line is sequentially switched in synchronization with the clock signal, and the receiving side reads the signal level of the communication line at the falling edge of the clock signal and assembles it into the received data.
【0020】例えば、『1101』と言う4ビットの信
号をマイコン2側からA/D変換器1側に送信する場合
を図3を用いて説明する。はクロック信号を示し、マ
イコン2側は、通信時に一定周期で状態(Hレベル、L
レベル)が変化するパルス信号をA/D変換器1側に送
信する。尚、パルス数は送信するデータのビット長分だ
けあり、予め定められている(本例では4パルス)。
又、マイコン2はクロック信号の立ち下がり時(t1、
t2、t3、t4)に、順次データ通信ラインの信号レ
ベルが通信データ『1101』に対応する信号レベル
『HHLH』()となるように制御する。A/D変換
器1側では、クロック信号の立ち下がり時(t1、t
2、t3、t4)に於ける通信ラインの信号レベル『H
HLH』を入力し、対応するデータ『1101』の通信
と判断する。For example, a case of transmitting a 4-bit signal "1101" from the microcomputer 2 side to the A / D converter 1 side will be described with reference to FIG. Indicates a clock signal, and the microcomputer 2 side is in a state (H level, L
A pulse signal whose level is changed is transmitted to the A / D converter 1 side. The number of pulses is the same as the bit length of the data to be transmitted, and is predetermined (4 pulses in this example).
In addition, the microcomputer 2 uses the falling edge of the clock signal (t1,
At t2, t3, and t4), the signal level of the data communication line is sequentially controlled to be the signal level “HHLH” () corresponding to the communication data “1101”. On the A / D converter 1 side, when the clock signal falls (t1, t
2, t3, t4) signal level of communication line "H
HLH ”is input, and it is determined that the corresponding data“ 1101 ”is communicated.
【0021】尚、上記記載ではマイコン2側からA/D
変換器1側に送信する場合を説明したが、A/D変換器
1側からマイコン2側に送信する場合は、マイコン2か
らのクロック信号に同期して同様の動作が行われる。
又、マイコン2側からA/D変換器1側への送信ライン
と、A/D変換器1側からマイコン2側への送信ライン
とが別々のラインであるので、マイコン2からのクロッ
ク信号に同期してそれぞれがデータの送信を行えば、同
じタイミングで双方向の通信が可能となる。In the above description, the A / D from the microcomputer 2 side
Although the case of transmitting to the converter 1 side has been described, when transmitting from the A / D converter 1 side to the microcomputer 2 side, the same operation is performed in synchronization with the clock signal from the microcomputer 2.
Further, since the transmission line from the microcomputer 2 side to the A / D converter 1 side and the transmission line from the A / D converter 1 side to the microcomputer 2 side are separate lines, the clock signal from the microcomputer 2 is If each transmits data in synchronization, bidirectional communication is possible at the same timing.
【0022】次に、送信データの形式について説明す
る。図4は送信データの形式(16ビット)を示すもの
で、(a)はマイコン2側からA/D変換器1側への送
信データの形式、(b)はA/D変換器1側からマイコ
ン2側への送信データの形式を示す。マイコン2側から
A/D変換器1側への送信データは、基本的にA/D変
換器1に対してどの様な動作を行わせるかのコマンドデ
ータD1と、どのセンサ(どのチャンネル)の信号をA
/D変換するのかを指定するチャンネルデータD2とか
ら構成される。Next, the format of transmission data will be described. FIG. 4 shows the format of transmission data (16 bits). (A) is the format of transmission data from the microcomputer 2 side to the A / D converter 1 side, and (b) is from the A / D converter 1 side. The format of the transmission data to the microcomputer 2 side is shown. The transmission data from the microcomputer 2 side to the A / D converter 1 side basically includes command data D1 indicating what kind of operation the A / D converter 1 is to perform and which sensor (which channel). Signal A
It is composed of channel data D2 that specifies whether to perform D / D conversion.
【0023】又、A/D変換器1側からマイコン2側へ
の送信データは、基本的にA/D変換の変換結果を示す
変換結果データD3と、A/D変換の完了を示すチェッ
クコードD4と、どの入力端子のA/D変換結果か、つ
まりどのセンサ(どのチャンネル)のA/D変換結果か
を示す変換端子データD5とから構成される。次にマイ
コン2の行うデータ送受信処理に付いて説明する。図5
はマイコン2の行う送受信処理を示すフローチャートで
ある。この送受信処理は、自動車のエンジンが駆動状態
である場合に、一定時間毎に割り込みにより実行され
る。The transmission data from the A / D converter 1 side to the microcomputer 2 side are basically conversion result data D3 indicating the conversion result of the A / D conversion and a check code indicating the completion of the A / D conversion. D4 and conversion terminal data D5 indicating which input terminal has the A / D conversion result, that is, which sensor (which channel) has the A / D conversion result. Next, the data transmission / reception processing performed by the microcomputer 2 will be described. Figure 5
3 is a flowchart showing a transmission / reception process performed by the microcomputer 2. This transmission / reception process is executed by interruption at regular time intervals when the vehicle engine is in a driving state.
【0024】ステップS1では、A/D変換器1への前
回の変換指示に対してA/D変換完了信号を受信してい
るかどうかを判断し、受信していればステップS6に移
り、受信していなければステップS2に移る。この判断
は外部割込端子B4への変換終了信号の割込入力の有無
(割込があった時にセットされる変換終了フラグの状
態)により行われる。ステップS2では前回の送受信処
理により受信したA/D変換値をメモリに記憶しステッ
プS3に移る。又、ステップS3では前回の送受信処理
により受信した変換端子データをメモリに記憶してステ
ップS4に移る。In step S1, it is judged whether or not the A / D conversion completion signal is received in response to the previous conversion instruction to the A / D converter 1, and if it is received, the process proceeds to step S6 and is received. If not, the process proceeds to step S2. This determination is made based on the presence / absence of an interrupt input of the conversion end signal to the external interrupt terminal B4 (the state of the conversion end flag set when there is an interrupt). In step S2, the A / D conversion value received by the previous transmission / reception process is stored in the memory, and the process proceeds to step S3. In step S3, the conversion terminal data received by the previous transmission / reception process is stored in the memory, and the process proceeds to step S4.
【0025】ステップS4では、前々回の送受信処理時
に指定したチャンネルデータと前回の送受信処理時に入
力した変換端子データを比較し、一致していればステッ
プS6に移り、一致していなければステップS5に移
る。即ち、変換終了信号系統、つまり変換終了信号出力
端子A4と外部割込端子B4間の通信ラインである終了
割込ライン等の異常があれば、マイコン2側では、変換
終了信号の入力は無いが、指示したA/D変換値は入力
された状態となる。In step S4, the channel data designated in the transmission / reception process two times before is compared with the conversion terminal data input in the previous transmission / reception process. If they match, the process proceeds to step S6. . That is, if there is an abnormality in the conversion end signal system, that is, the end interrupt line which is the communication line between the conversion end signal output terminal A4 and the external interrupt terminal B4, the conversion end signal is not input on the microcomputer 2 side. The designated A / D conversion value is in the input state.
【0026】本実施例では、この状態を変換終了信号の
割込入力の有無及び指示したチャンネルデータと、これ
に対するA/D変換結果と共に入力される変換端子デー
タの一致(データの送信系統及びA/D変換器1が正常
であれば、同じセンサを示すデータであるので、これら
のデータは一致する)により判断している。そして、ス
テップS5では、変換終了信号系統の異常であることを
示す終了信号異常フラグをセットしてステップS6に移
る。In the present embodiment, this state is matched with the presence / absence of the interrupt input of the conversion end signal and the channel data instructed, and the conversion terminal data input together with the A / D conversion result (data transmission system and A). If the / D converter 1 is normal, the data indicates the same sensor, so these data are in agreement). Then, in step S5, an end signal abnormality flag indicating that the conversion end signal system is abnormal is set, and the process proceeds to step S6.
【0027】このステップS1からステップS5の処理
により、変換終了信号系統の異常検出処理を行ってい
る。ステップS6では、A/D変換のチャンネルを選択
してステップS7に移る。この選択はエンジン制御に必
要なデータを出力するセンサを指定するためのものであ
る。ステップS7ではステップS6で選択されたチャン
ネルを送信用メモリに記憶し、ステップS8に移る。ス
テップS8ではA/D変換器1に行わせる動作を指示す
るコマンドを選択し送信用メモリに記憶してステップS
9に移る。これらセンサのチャンネルの選択及びコマン
ドの選択は、予めメモリに記憶されたエンジン制御用の
プログラムに従って選択される。そして、ステップS9
で、これら選択されたチャンネルとコマンドをA/D変
換器1に送信し、A/D変換器1にA/D変換等の動作
を行わせ、ステップS10に移る。これらステップS6
からステップS9の処理により、A/D変換器1に対す
るA/D変換動作等の指示処理を行っている。By the processes of steps S1 to S5, the abnormality detection process of the conversion end signal system is performed. In step S6, an A / D conversion channel is selected, and the process proceeds to step S7. This selection is for designating the sensor that outputs the data required for engine control. In step S7, the channel selected in step S6 is stored in the transmission memory, and the process proceeds to step S8. In step S8, a command instructing the operation to be performed by the A / D converter 1 is selected and stored in the transmission memory, and then the step S8
Go to 9. The channel selection and command selection of these sensors are selected according to an engine control program stored in advance in a memory. Then, step S9
Then, the selected channel and command are transmitted to the A / D converter 1 to cause the A / D converter 1 to perform operations such as A / D conversion, and the process proceeds to step S10. These steps S6
From step S9 to step S9, instruction processing such as A / D conversion operation for the A / D converter 1 is performed.
【0028】ステップS10では、変換終了信号系統の
異常かどうかを判断し、変換終了信号系統の異常であれ
ばステップS11に移り、異常で無ければステップS1
2に移る。この判断はステップS5でセットされる終了
信号異常フラグにより行われる。ステップS11では、
現在の時刻から一定時間後にA/D変換器1のA/D変
換値を読み込む処理を行わせるタイマー一致割込動作を
起動し、ステップS12に移る。つまり、一定時間後
(A/D変換器1のA/D変換処理が確実に終了してい
ると考えられる時間後)にA/D変換器1のA/D変換
値を読み込むように割込処理が設定される。ステップS
13では変換終了フラグをリセットして送受信処理を終
える。In step S10, it is determined whether the conversion end signal system is abnormal. If the conversion end signal system is abnormal, the process proceeds to step S11. If not, step S1.
Move to 2. This determination is made based on the end signal abnormality flag set in step S5. In step S11,
After a certain time from the current time, the timer coincidence interrupt operation for performing the process of reading the A / D converted value of the A / D converter 1 is started, and the process proceeds to step S12. In other words, an interrupt is made so that the A / D conversion value of the A / D converter 1 is read after a fixed time (after the time when the A / D conversion process of the A / D converter 1 is considered to have surely completed). Processing is set. Step S
At 13, the conversion end flag is reset and the transmission / reception process ends.
【0029】図6はA/D変換及び通信のタイミングを
示す図であり、次に変換終了信号系統の異常時における
本実施例のA/D変換装置の動作状態について説明す
る。尚、正常時におけるA/D変換装置の動作状態は図
8に示した状態と同様である。マイコン1は、センサの
出力信号データが必要な場合、先ず変換命令を示すコマ
ンドデータD1と対象センサを示すチャンネルデータD
2とを、A/D変換器1に送信するため、送信レジスタ
に書き込む。そして、これらのデータをクロック信号に
同期させクロック信号と共に出力する(w1)。FIG. 6 is a diagram showing the timing of A / D conversion and communication. Next, the operating state of the A / D converter of this embodiment when the conversion end signal system is abnormal will be described. The operating state of the A / D converter in the normal state is the same as the state shown in FIG. When sensor output signal data is required, the microcomputer 1 first sends command data D1 indicating a conversion command and channel data D indicating a target sensor.
2 and 2 are transmitted to the A / D converter 1, so they are written in the transmission register. Then, these data are synchronized with the clock signal and output together with the clock signal (w1).
【0030】A/D変換器1は、入力されたクロック信
号に同期してコマンドデータD1と対象センサを示すチ
ャンネルデータD2を読み込んで解読し、指定されたセ
ンサの信号をA/D変換する。そして、A/D変換が終
了すると、A/D変換器1は、変換終了信号出力端子A
4からマイコン2の外部割込端子B4にA/D変換が終
了した旨の変換終了信号を出力すると共に、マイコン2
にデータを送信するため、送信レジスタに変換結果を書
き込む(w2)。The A / D converter 1 reads and decodes the command data D1 and the channel data D2 indicating the target sensor in synchronization with the input clock signal, and A / D converts the signal of the designated sensor. When the A / D conversion is completed, the A / D converter 1 outputs the conversion end signal output terminal A
4 outputs a conversion end signal indicating that the A / D conversion is completed to the external interrupt terminal B4 of the microcomputer 2 and the microcomputer 2
In order to transmit the data to, the conversion result is written in the transmission register (w2).
【0031】ここで正常の場合、マイコン2は変換終了
信号の受信によりA/D変換値を読み込む処理を開始す
るが、変換終了信号系統の異常の場合には、この変換終
了信号が受信できないので、A/D変換値を読み込む処
理を開始できない。しかし、本実施例の場合、マイコン
2が前回のデータ受信(w1時にその前に指定したA/
D変換要求に対するA/D変換結果を入力している。)
の結果により変換終了信号系統の異常を検出しているの
で、マイコン2は、その時刻から所定時間経過後(w3
〜w4)にタイマー一致割込によりA/D変換値を取り
込む。If the conversion end signal is normal, the microcomputer 2 starts the process of reading the A / D conversion value by receiving the conversion end signal. However, if the conversion end signal system is abnormal, the conversion end signal cannot be received. , The process of reading the A / D converted value cannot be started. However, in the case of the present embodiment, the microcomputer 2 receives the previous data (A /
The A / D conversion result for the D conversion request is input. )
Since the abnormality of the conversion end signal system is detected from the result of, the microcomputer 2 waits for a predetermined time from that time (w3
Up to w4) fetch the A / D converted value by the timer coincidence interrupt.
【0032】以上詳細に説明したように、本実施例によ
れば、変換終了信号系統の異常の場合、マイコン2はA
/D変換器1からの変換終了信号によらず、自らの判断
によりA/D変換値を読み込み処理を行う。従って、本
実施例によれば、A/D変換自体は正常に行われている
が、変換終了信号系統の異常の場合に、A/D変換値を
用いた制御を行うことができる。As described in detail above, according to the present embodiment, when the conversion end signal system is abnormal, the microcomputer 2 is
The A / D conversion value is read and processed by its own judgment regardless of the conversion end signal from the / D converter 1. Therefore, according to this embodiment, although the A / D conversion itself is normally performed, the control using the A / D converted value can be performed when the conversion end signal system is abnormal.
【0033】[0033]
【発明の効果】以上詳細に説明した様に本発明によれ
ば、A/D変換自体が正常に行われている場合には、A
/D変換値に影響のない部分に異常が発生しても、正常
なA/D変換値をできるだけ制御等に使用できるように
しているので、可能な限りA/D変換値を使用した適切
な制御を行うことができる。As described in detail above, according to the present invention, when A / D conversion itself is normally performed, A
Even if an abnormality occurs in the part that does not affect the A / D converted value, the normal A / D converted value can be used for control as much as possible. Control can be performed.
【図1】エンジン制御システムの構成図FIG. 1 is a block diagram of an engine control system
【図2】A/D変換部の詳細を示すブロック図FIG. 2 is a block diagram showing details of an A / D conversion unit.
【図3】信号の状態を示す状態図FIG. 3 is a state diagram showing states of signals.
【図4】送信データの形式を示す図FIG. 4 is a diagram showing a format of transmission data.
【図5】マイコン2の行う送受信処理を示すフローチャ
ートFIG. 5 is a flowchart showing a transmission / reception process performed by the microcomputer 2.
【図6】A/D変換及び通信のタイミングを示す図FIG. 6 is a diagram showing timings of A / D conversion and communication.
【図7】SPI通信によるA/D変換器のブロック図FIG. 7 is a block diagram of an A / D converter using SPI communication.
【図8】A/D変換及び通信のタイミングを示す図FIG. 8 is a diagram showing timings of A / D conversion and communication.
1・・・・・・・A/D変換器 2・・・・・・・マイクロコンピュータ 3・・・・・・・入力インタフェイス 4・・・・・・・出力インタフェイス 5・・・・・・・エンジン制御装置 1 ... A / D converter 2 ... Microcomputer 3 ... Input interface 4 ... Output interface 5 ... ... Engine control devices
Claims (2)
変換部と、前記変換部と通信ラインで接続され該変換部
から出力される出力デジタル信号を取り込み処理する処
理部とからなり、前記変換部は前記処理部からの変換要
求信号により変換を行うとともに変換が終了後に変換終
了信号を前記処理部に出力し、前記処理部は前記変換部
からの前記変換終了信号を入力した後に前記変換部から
のデジタル値を取り込むアナログ/デジタル変換装置に
於いて、 前記変換終了信号の終了信号伝達系の異常を検出する異
常検出手段と、 前記異常検出手段により前記終了信号伝達系の異常が検
出されたとき、前記処理部が変換要求信号を出力してか
ら所定時間後に、前記変換部の出力デジタル信号を取り
込む補助取り込み手段とを備えたことを特徴とするアナ
ログ/デジタル変換装置。1. A conversion unit which converts an analog signal into a digital signal, and a processing unit which is connected to the conversion unit by a communication line and takes in and processes an output digital signal output from the conversion unit. The conversion request signal from the processing unit performs conversion and outputs a conversion end signal to the processing unit after the conversion ends, and the processing unit inputs the conversion end signal from the conversion unit and then outputs from the conversion unit. In an analog / digital conversion device that takes in a digital value, abnormality detection means for detecting an abnormality in the end signal transmission system of the conversion end signal, and when the abnormality detection means detects an abnormality in the end signal transmission system, And a supplementary capturing means for capturing an output digital signal of the conversion unit after a predetermined time has elapsed after the processing unit outputs the conversion request signal. Analog / digital converter.
と、該変換要求信号に対応する前記変換部からのデジタ
ル値とを比較し、該比較結果により異常を判断する事を
特徴とする請求項1記載のアナログ/デジタル変換装
置。2. The abnormality detecting means compares the conversion request signal with a digital value from the conversion section corresponding to the conversion request signal, and judges an abnormality based on the comparison result. Item 1. The analog / digital conversion device according to item 1.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP13812495A JP3339763B2 (en) | 1995-06-05 | 1995-06-05 | Analog / digital converter |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP13812495A JP3339763B2 (en) | 1995-06-05 | 1995-06-05 | Analog / digital converter |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH08328745A true JPH08328745A (en) | 1996-12-13 |
| JP3339763B2 JP3339763B2 (en) | 2002-10-28 |
Family
ID=15214539
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP13812495A Expired - Fee Related JP3339763B2 (en) | 1995-06-05 | 1995-06-05 | Analog / digital converter |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3339763B2 (en) |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR100308167B1 (en) * | 1997-10-13 | 2001-11-15 | 박상록 | Method for handling data of input sensor of electronic fuel injection unit for diesel engine |
| JP2011228996A (en) * | 2010-04-21 | 2011-11-10 | Hitachi Automotive Systems Ltd | On-vehicle control device and inspection method of on-vehicle control device |
| JP2013036354A (en) * | 2011-08-04 | 2013-02-21 | Denso Corp | Fault determination device for fuel pressure detection command |
| CN110988605A (en) * | 2019-12-31 | 2020-04-10 | 深圳友讯达科技股份有限公司 | Fault recording sampling system and sampling method |
-
1995
- 1995-06-05 JP JP13812495A patent/JP3339763B2/en not_active Expired - Fee Related
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR100308167B1 (en) * | 1997-10-13 | 2001-11-15 | 박상록 | Method for handling data of input sensor of electronic fuel injection unit for diesel engine |
| JP2011228996A (en) * | 2010-04-21 | 2011-11-10 | Hitachi Automotive Systems Ltd | On-vehicle control device and inspection method of on-vehicle control device |
| JP2013036354A (en) * | 2011-08-04 | 2013-02-21 | Denso Corp | Fault determination device for fuel pressure detection command |
| CN110988605A (en) * | 2019-12-31 | 2020-04-10 | 深圳友讯达科技股份有限公司 | Fault recording sampling system and sampling method |
| CN110988605B (en) * | 2019-12-31 | 2023-03-21 | 深圳友讯达科技股份有限公司 | Fault recording sampling system and sampling method |
Also Published As
| Publication number | Publication date |
|---|---|
| JP3339763B2 (en) | 2002-10-28 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JPH0510201A (en) | Car controlling method | |
| JPH06217373A (en) | Integrated wiring system | |
| US5991686A (en) | Vehicle electronic control using one A/D converter for time-synchronous and time-asynchronous A/D converter | |
| JP3538867B2 (en) | A / D conversion control device for internal combustion engine | |
| JP3486990B2 (en) | Serial communication device | |
| EP0615885B1 (en) | Electrical equipment control system | |
| JP3339763B2 (en) | Analog / digital converter | |
| JPH06236352A (en) | Data communication device | |
| JP3249710B2 (en) | Analog / digital converter | |
| US4752959A (en) | Wiring state detecting device for vehicle | |
| US5737630A (en) | Communication device for synchronized serial communication | |
| US5734920A (en) | Input/output processing IC | |
| JPH0577874B2 (en) | ||
| JPH03230229A (en) | Abnormality detection system of microcomputer | |
| US7437448B1 (en) | Method and device for function selection of a control unit | |
| JPH05128065A (en) | Data communication equipment | |
| JPH0719104A (en) | Input/output processing ic and input/output processing method | |
| JPH0851671A (en) | Data communication equipment for engine control | |
| JPH07312627A (en) | Data transfer method for serial communication between two cpus | |
| JPH08153052A (en) | Data communication equipment | |
| JPS60154935A (en) | Signal i/o device | |
| JP2534836B2 (en) | Data transmission system | |
| JPH04362437A (en) | Control method of vehicle | |
| JPH09252267A (en) | Electronic controller for vehicle | |
| JPH01194599A (en) | Method and device for communicating control data |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20020730 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090816 Year of fee payment: 7 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100816 Year of fee payment: 8 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100816 Year of fee payment: 8 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110816 Year of fee payment: 9 |
|
| LAPS | Cancellation because of no payment of annual fees |