JPH08328744A - Analog/digital converter - Google Patents
Analog/digital converterInfo
- Publication number
- JPH08328744A JPH08328744A JP13812395A JP13812395A JPH08328744A JP H08328744 A JPH08328744 A JP H08328744A JP 13812395 A JP13812395 A JP 13812395A JP 13812395 A JP13812395 A JP 13812395A JP H08328744 A JPH08328744 A JP H08328744A
- Authority
- JP
- Japan
- Prior art keywords
- signal
- analog
- conversion
- data
- 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
Landscapes
- Combined Controls Of Internal Combustion Engines (AREA)
- Analogue/Digital Conversion (AREA)
Abstract
Description
【0001】[0001]
【産業上の利用分野】本発明は、アナログ信号をデジタ
ル信号に変換するアナログ/デジタル(A/D)変換装
置に係り、特にマイクロコンピュータとの通信異常時に
おけるノイズの異常に対して強いアナログ/デジタル変
換装置に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an analog / digital (A / D) converter for converting an analog signal into a digital signal, and particularly to an analog / digital (A / D) converter which is strong against noise abnormalities when communication with a microcomputer is abnormal. The present invention relates to a digital conversion device.
【0002】[0002]
【従来の技術】近年、電子機器の制御、例えば図4に示
す自動車用エンジンのEFIシステムでは、エンジンの
状態や走行状態を各種センサで検出し、これらセンサか
らの情報をマイクロコンピュータ22で処理して、最適
の状態で車両走行を行うための制御が行われている。そ
して、これら各種センサからの情報はその殆どが電気的
な信号であり、デジタル信号とアナログ信号が使用され
ている。マイクロコンピュータ22で、これらの信号を
処理する場合は、デジタル信号はそのままマイクロコン
ピュータ22に入力して処理できるが、アナログ信号の
場合にはマイクロコンピュータ2に入力する前にデジタ
ル信号に変換する必要がある。2. Description of the Related Art In recent years, in electronic equipment control, for example, in the EFI system for an automobile engine shown in FIG. 4, various sensors detect the state of the engine and the running state, and the microcomputer 22 processes the information from these sensors. Thus, control is performed to drive the vehicle in an optimal state. Most of the information from these various sensors is an electrical signal, and a digital signal and an analog signal are used. When these signals are processed by the microcomputer 22, the digital signals can be directly input to the microcomputer 22 for processing, but in the case of analog signals, it is necessary to convert them into digital signals before being input to the microcomputer 2. is there.
【0003】アナログ信号をデジタル信号に変換するに
は、アナログ/デジタル変換器21が用いられるが、構
成を簡単にするため複数種類のアナログ信号を1個のア
ナログ/デジタル変換器で順次デジタル信号に変換する
マルチチャンネル型のアナログ/デジタル変換器が多く
用いられている。又、アナログ/デジタル変換器21と
マイクロコンピュータ22間にはデータ等を伝達するた
めの通信路が設けられているが、用途に応じて各種通信
方式がとられており、自動車のエンジン等の制御には、
同期エラー等の通信異常が発生しにくいSPI方式の通
信方式がよく用いられている。An analog / digital converter 21 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 for conversion is often used. Further, a communication path for transmitting data and the like is provided between the analog / digital converter 21 and the microcomputer 22, but various communication systems are adopted depending on the application, and control of the engine of the automobile is performed. Has
An SPI communication method is often used in which a communication error such as a synchronization error is unlikely to occur.
【0004】次ぎに図5を用いてSPI通信を用いたア
ナログ/デジタル変換器について説明する。21はアナ
ログ/デジタル変換器で、複数(本例においては24チ
ャンネル)のセンサと接続され、それらのセンサからの
アナログ信号を入力している。又、アナログ/デジタル
変換器21にはマイクロコンピュータ22との通信のた
め、クロック入力端子A1、データ入力端子A2、デー
タ出力端子A3、変換終了信号出力端子A4が設けられ
ており、それぞれマイクロコンピュータ2側のクロック
出力端子B1、データ出力端子B2、データ入力端子B
3、外部割込端子B4に接続されている。Next, an analog / digital converter using SPI communication will be described with reference to FIG. Reference numeral 21 denotes an analog / digital converter, which is connected to a plurality of (24 channels in this example) sensors and inputs analog signals from these sensors. Further, the analog / digital converter 21 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 22. Side clock output terminal B1, data output terminal B2, data input terminal B
3, 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 is completed is input to the interrupt terminal B4 from the conversion end signal output terminal A4.
【0006】次ぎに変換及び通信動作について説明す
る。図6は信号の状態を示す状態図である。SPI通信
はデータの伝送が行われる時のみクロック信号が送信さ
れるもので、言い換えればマイクロコンピュータ22が
クロック信号を出力すれば、同時にデータ入力端子A2
とデータ出力端子B2間のデータ通信及びデータ入力端
子B3にはデータ出力端子A3間のデータ通信がクロッ
ク信号を同期信号として行われる。具体的には、クロッ
ク信号時の立ち下がり時における通信ラインの信号のレ
ベル(Hレベル:高電圧レベル、Lレベル:低電圧レベ
ル)を1ビット分の通信データとし、送信するもので、
送信側では送りたいデータに応じて通信ラインの信号レ
ベルをクロック信号に同期させて順次切換え、受信側で
はクロック信号の立ち下がり時の通信ラインの信号レベ
ルを読み込み受信データに組み立てるものである。Next, the conversion and communication operations will be described. FIG. 6 is a state diagram showing states of signals. In SPI communication, a clock signal is transmitted only when data is transmitted. In other words, if the microcomputer 22 outputs a clock signal, the data input terminal A2 is simultaneously transmitted.
The data communication between the data output terminal B2 and the data input terminal B3 and the data communication between the data output terminal A3 at the data input terminal B3 are performed by using the clock signal as a synchronization signal. Specifically, the level (H level: high voltage level, L level: low voltage level) of the signal on the communication line at the time of the fall of the clock signal is set as 1 bit of communication data and is transmitted.
The transmitting side sequentially switches the signal level of the communication line in synchronization with the clock signal according to the data to be sent, 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.
【0007】例えば、「1101」という4ビットの信
号をマイクロコンピュータ22側からアナログ/デジタ
ル変換器21側に送信する場合を、図5を用いて説明す
る。はクロック信号を示し、マイクロコンピュータ2
2側は、通信時に一定周期で変化するパルス信号をアナ
ログ/デジタル変換器21側に送信する。尚、パルス数
は送信するデータのビット長分だけあり、予め定められ
ている(本例では4パルス)。又、マイクロコンピュー
タ22はクロック信号の立ち下がり時(t1、t2、t
3、t4)に、順次データ通信ラインの信号レベルが通
信データ「1101」に対応する信号レベル「HHL
H」()となるように制御する。アナログ/デジタル
変換器1側では、クロック信号の立ち下がり時(t1、
t2、t3、t4)における通信ラインの信号レベル
「HHLH」を入力し、対応するデータ「1101」の
通信と判断する。For example, a case of transmitting a 4-bit signal "1101" from the microcomputer 22 side to the analog / digital converter 21 side will be described with reference to FIG. Indicates a clock signal, and the microcomputer 2
The second side transmits a pulse signal that changes at a constant cycle during communication to the analog / digital converter 21 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). Also, the microcomputer 22 uses the falling edge of the clock signal (t1, t2, t
3 and t4), the signal level of the signal line “HHL” corresponding to the communication data “1101” sequentially in the data communication line
H ”(). On the analog / digital converter 1 side, when the clock signal falls (t1,
At t2, t3, t4), the signal level “HHLH” of the communication line is input, and it is determined that the corresponding data “1101” is communicated.
【0008】尚、本例ではマイクロコンピュータ22側
からアナログ/デジタル変換器21側に送信する場合を
説明したが、アナログ/デジタル変換器21側からマイ
クロコンピュータ22側に送信する場合は、マイクロコ
ンピュータ22からのクロック信号に同期して同様の動
作が行われる。又、マイクロコンピュータ22側からア
ナログ/デジタル変換器21側への送信ラインと、アナ
ログ/デジタル変換器21側からマイクロコンピュータ
22側への送信ラインとが別のラインであるので、マイ
クロコンピュータ22からのクロック信号に同期して、
それぞれがデータの送受信を行えば、同じタイミングで
双方向の通信が可能となる。In this example, the case of transmitting from the microcomputer 22 side to the analog / digital converter 21 side has been described, but in the case of transmitting from the analog / digital converter 21 side to the microcomputer 22 side, the microcomputer 22 The same operation is performed in synchronization with the clock signal from. Further, since the transmission line from the microcomputer 22 side to the analog / digital converter 21 side and the transmission line from the analog / digital converter 21 side to the microcomputer 22 side are different lines, the transmission line from the microcomputer 22 In sync with the clock signal,
If each transmits and receives data, bidirectional communication is possible at the same timing.
【0009】次ぎに、送信データの一般的な形式につい
て説明する。図7は送信データの形式(16ビット)を
示すもので、(a)はマイクロコンピュータ22側から
アナログ/デジタル変換器21側への送信データの形
式、(b)はアナログ/デジタル変換器21側からマイ
クロコンピュータ22側への送信データの形式を示す。
マイクロコンピュータ22側からアナログ/デジタル変
換器21側への送信データは、基本的にアナログ/デジ
タル変換器21に対してどの様な動作を行わせるかのコ
マンドデータD1と、どのセンサ(どのチャンネル)の
信号をアナログ/デジタル変換するのかを指定するチャ
ンネルデータD2とから構成される。Next, a general format of transmission data will be described. FIG. 7 shows a format of transmission data (16 bits). (A) is a format of transmission data from the microcomputer 22 side to the analog / digital converter 21 side, and (b) is an analog / digital converter 21 side. Shows the format of data transmitted from the computer to the microcomputer 22 side.
The transmission data from the microcomputer 22 side to the analog / digital converter 21 side is basically command data D1 indicating what kind of operation the analog / digital converter 21 is to perform, and which sensor (which channel). Channel data D2 that specifies whether the signal of (4) is analog-to-digital converted.
【0010】又、アナログ/デジタル変換器21側から
マイクロコンピュータ22側への送信データは、基本的
にアナログ/デジタル変換の変換結果を示す変換結果デ
ータD3と、アナログ/デジタル変換の完了を示すチェ
ックコードD4と、どの入力端子のアナログ/デジタル
変換結果か、つまり、どのセンサ(どのチャンネル)の
アナログ/デジタル変換結果を示す変換端子データD5
とから構成される。The transmission data from the analog / digital converter 21 side to the microcomputer 22 side are basically conversion result data D3 indicating the conversion result of the analog / digital conversion and a check indicating the completion of the analog / digital conversion. Code D4 and conversion terminal data D5 indicating which input terminal has the analog / digital conversion result, that is, which sensor (which channel) has the analog / digital conversion result.
Composed of and.
【0011】図8はアナログ/デジタル変換及び通信の
タイミングを示す図であり、次ぎにアナログ/デジタル
変換及び通信のタイミングについて説明する。マイクロ
コンピュータ22は、センサの出力信号データが必要な
場合、先ず変換命令を示すコマンドデータD1と対象セ
ンサを示すチャンネルデータD2をアナログ/デジタル
変換器21に送信するための送信レジスタに書き込み、
これらのデータをクロック信号に同期させてクロック信
号と共に出力する(u1)。尚、送信するクロックのパ
ルス数はデータのビット長分でありマイクロコンピュー
タ22、アナログ/デジタル変換器21間で予め定めら
れたパルス数である。FIG. 8 is a diagram showing the timing of analog / digital conversion and communication. Next, the timing of analog / digital conversion and communication will be described. When the output signal data of the sensor is required, the microcomputer 22 first writes the command data D1 indicating the conversion command and the channel data D2 indicating the target sensor into the transmission register for transmitting to the analog / digital converter 21,
These data are output together with the clock signal in synchronization with the clock signal (u1). The number of pulses of the clock to be transmitted is the bit length of the data, and is the number of pulses determined in advance between the microcomputer 22 and the analog / digital converter 21.
【0012】アナログ/デジタル変換器21は、入力さ
れたクロック信号に同期してコマンドデータD1と対象
センサを示すチャンネルデータD2を読み込んで解読
し、指定されたセンサの信号をアナログ/デジタル変換
する。そして、アナログ/デジタル変換が終了するとア
ナログ/デジタル変換器21は、変換終了出力端子A4
からマイクロコンピュータ22の外部割込端子B4にア
ナログ/デジタル変換が終了した旨の変換終了信号を出
力すると共に、マイクロコンピュータ22にデータを送
信するための送信レジスタに変換結果を書き込む(u
2)。 マイクロコンピュータ22は、変換終了信号を
受信すると、割込処理によりクロック信号を送信する
(u3)。すると、該クロック信号に同期してアナログ
/デジタル変換器21側の送信レジスタに書き込まれた
変換結果が送信されるので、該クロック信号に同期して
変換結果を読み込み、1回のアナログ/デジタル変換及
び通信の処理が完了する(u4)。The analog / digital converter 21 reads and decodes the command data D1 and the channel data D2 indicating the target sensor in synchronization with the input clock signal, and performs analog / digital conversion on the signal of the designated sensor. When the analog / digital conversion is completed, the analog / digital converter 21 outputs the conversion end output terminal A4.
Outputs a conversion end signal indicating that the analog / digital conversion is completed to the external interrupt terminal B4 of the microcomputer 22 and writes the conversion result in a transmission register for transmitting data to the microcomputer 22 (u
2). Upon receiving the conversion end signal, the microcomputer 22 transmits a clock signal by interrupt processing (u3). Then, since the conversion result written in the transmission register on the analog / digital converter 21 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).
【0013】[0013]
【発明が解決しようとする課題】しかし、マイコン22
とA/D変換器21の通信中にノイズ等が混信した場合
には、次のような問題が発生する。図6に示すようにA
/D変換の通信中(マイコン22からA/D変換器21
への変換命令信号等の送信中)にノイズが重塁した場
合、クロック信号はに示すように、あたかもクロック
(パルス)数が増加したようになる。However, the microcomputer 22
When noise or the like is interfered with during communication between the A / D converter 21 and the A / D converter 21, the following problems occur. As shown in FIG.
During communication of A / D conversion (from the microcomputer 22 to the A / D converter 21
When the noise is in the background during the transmission of the conversion command signal etc.) to the clock signal, the clock signal is as if the number of clocks (pulses) has increased, as shown in.
【0014】A/D変換器21が読み込む信号は、クロ
ック信号の立ち下がり時の信号レベルであるためにノイ
ズによって増えたクロックの立ち下がり時(t5)の信
号レベルもデジタル信号として読み取る。従って、本例
のように1単位4ビットのデータ構成の場合、ノイズに
よる異常な1ビット(z1)がデータとして含まれ、正
常である最後の1ビット(z2)がデータから除かれて
しまう。そして、この除かれたデータ(z2)が、次の
データの最初の1ビットとして取り入れられてしまい、
更にその後のデータも同様となる(本例では異常データ
は1ビットであるが、1ビットに限らず複数のビットと
なる場合もある)。Since the signal read by the A / D converter 21 is the signal level at the falling edge of the clock signal, the signal level at the falling edge (t5) of the clock increased by noise is also read as a digital signal. Therefore, in the case of a data structure of 4 bits per unit as in this example, an abnormal 1 bit (z1) due to noise is included as data, and the last normal 1 bit (z2) is excluded from the data. Then, this removed data (z2) is taken in as the first 1 bit of the next data,
Further, the subsequent data is also the same (the abnormal data is 1 bit in this example, but it is not limited to 1 bit and may be a plurality of bits).
【0015】従って、一旦ノイズによりデータが狂って
しまうと、その後のデータにも悪影響が残り、A/D変
換器21はマイコン22が送る制御信号を正常に受信で
きず、その動作が無茶苦茶になってしまい、その結果マ
イコン22は正常なセンサの出力データが得られず、エ
ンジン制御等が適切に行えなくなってしまう問題があ
る。Therefore, once the data is corrupted due to noise, the subsequent data is also adversely affected, and the A / D converter 21 cannot normally receive the control signal sent from the microcomputer 22 and its operation is messy. As a result, the microcomputer 22 cannot obtain normal sensor output data, and engine control and the like cannot be performed properly.
【0016】この様に従来のA/D変換装置では、アナ
ログ/デジタル変換器とマイクロコンピュータとの間で
一旦通信異常が発生した場合は、その後のアナログ/デ
ジタル変換値にも影響が残り、例えばエンジン等の制御
が適切に行えないという問題がある。As described above, in the conventional A / D converter, when a communication error occurs between the analog / digital converter and the microcomputer, the analog / digital conversion value thereafter is also affected, and for example, There is a problem that the engine cannot be properly controlled.
【0017】[0017]
【課題を解決するための手段】本発明は上記課題を解決
するために、アナログ信号をデジタル信号に変換する変
換部と、前記変換部と通信ラインで接続され該変換部か
ら出力される出力デジタル信号を取り込み処理すると共
に前記変換部を制御する制御信号を前記変換部に送信す
る処理部とからなり、前記変換部は前記処理部からの変
換要求信号によりクロック信号に同期して変換値をシリ
アル送信するアナログ/デシタル変換装置に於いて、前
記変換部は、所定数のクロック信号を受信した後は所定
時間入力が禁止され、前記処理部は、通信の異常を検出
した時に前記変換部に悪影響のない制御信号である無影
響制御信号を前記変換部に所定回送信することを特徴と
する。In order to solve the above-mentioned problems, the present invention provides a conversion unit for converting an analog signal into a digital signal, and an output digital connected to the conversion unit via a communication line and output from the conversion unit. The conversion unit serially converts the conversion value in synchronization with the clock signal in response to the conversion request signal from the processing unit, the processing unit receiving the signal and transmitting the control signal for controlling the conversion unit to the conversion unit. In the analog-to-digital conversion device that transmits, the conversion unit is prohibited from inputting for a predetermined time after receiving a predetermined number of clock signals, and the processing unit adversely affects the conversion unit when detecting a communication abnormality. A non-influenced control signal, which is a control signal without a signal, is transmitted to the conversion unit a predetermined number of times.
【0018】又、前記無影響制御信号は、前記変換部を
初期状態にするリセット信号であることを特徴とする。Further, the non-influenced control signal is a reset signal for initializing the converter.
【0019】[0019]
【作用】以上の様な手段により、前記変換部の異常時に
前記変換部に保持されたノイズ等による不要な信号が、
前記処理部からの無影響制御信号により除去されるた
め、前記変換部は正常状態に復帰する。With the above means, an unnecessary signal due to noise or the like held in the conversion unit when the conversion unit is abnormal is
Since it is removed by the non-influenced control signal from the processing unit, the conversion unit returns to the normal state.
【0020】[0020]
【実施例】以下、図面を用いて本発明の一実施例を説明
する。尚、本実施例では、自動車のエンジンを制御する
エンジン制御装置を例に挙げて説明するが、本発明はエ
ンジン制御装置以外のアナログ/デジタル変換装置を用
いる装置に適用できる。図1は自動車のエンジン制御装
置の構成を示す構成図である。エンジン制御装置5に
は、各種のセンサが接続されており、これらセンサから
の信号を入力して処理し、そして各種アクチュエータを
制御し、エンジンを適切な状態で動作させる。センサに
は、パルス等によるデジタル信号を出力するデジタル系
センサと、電圧値等によるアナログ信号を出力するアナ
ログ系センサがある。An embodiment of the present invention will be described below with reference to the drawings. In the present embodiment, the engine control device for controlling the engine of the 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.
【0021】そして、デジタル系センサには、エンジン
の回転角(上死点等)を示すTDC信号等を出力する回
転角センサ、エンジンの回転数を示すNE信号を出力す
る回転数センサ、車輪の回転数を示す車速信号を出力す
る車速センサ等がある。又、アナログ系センサには、エ
ンジンの吸気管内の圧力を検出する吸気管センサ、ラジ
エータの水温を検出する水温センサ、吸入空気の温度を
検出する吸気温センサ、排気ガス中の酸素濃度を検出す
る酸素濃度(O2)センサ、スロットルバルブの開度を
検出するスロットルバルブセンサ等がある。The digital sensor includes a rotation angle sensor that outputs a TDC signal indicating the rotation angle of the engine (top dead center, etc.), a rotation speed sensor that outputs an NE signal indicating the engine rotation speed, and a wheel There is a vehicle speed sensor or the like that outputs a vehicle speed signal indicating the number of revolutions. Further, the analog type sensor detects an intake pipe 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 are an oxygen concentration (O2) sensor, a throttle valve sensor that detects the opening of a throttle valve, and the like.
【0022】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 an analog sensor input via the input interface 3 into a digital signal and outputs the digital signal to the microcomputer 2.
【0023】2はマイコンでセンサからの信号を入力し
て処理し、エンジンの各所に設けられたアクチュエータ
を制御してエンジンが状況に応じた状態で動作するよう
制御する。4はマイコン2とアクチュエータを接続する
ための出力インターフェイスで緩衝動作等を行う。又、
アクチュエータには、例えばエンジンの点火を行う点火
プラグ、ガソリンを噴射するインジェクタ、スロットル
バルブと並列的に設けられスロットルバルブ閉鎖時(ア
イドル回転時)における空気量を制御して、アイドル回
転数を制御するアイドルスピードコントロールバルブ
(ISCバルブ)等があり、必要に応じてマイコン2か
らのデジタル信号をアナログ信号に変化するデジタル/
アナログ変換器、電圧を昇圧する昇圧回路、デシタル信
号に対応するデューティ値を持つパルス信号に変化する
デューティ変換回路等の駆動回路が設けられている。A microcomputer 2 inputs and processes signals from the 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. or,
The actuator includes, for example, a spark plug for igniting the engine, an injector for injecting gasoline, and a throttle valve that is provided in parallel with the throttle valve and controls the air amount when the throttle valve is closed (idle rotation) to control the idle speed. There is an idle speed control valve (ISC valve), etc., and a digital signal that changes the digital signal from the microcomputer 2 into an analog signal as needed.
Drive circuits such as an analog converter, a booster circuit for boosting a voltage, and a duty converter circuit that changes into a pulse signal having a duty value corresponding to a digital signal are provided.
【0024】次に図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 conversion device 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 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,
Also, if it is not mounted on the same printed circuit board,
It is connected by a flexible substrate, a conducting wire (lead wire), or the like.
【0025】そして、クロック入力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 input 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 the external A signal indicating that the A / D conversion is completed is input to the interrupt terminal B4 from the conversion end signal output terminal A4.
【0026】次に変換及び通信動作について説明する。
SPI通信はデータの伝送が行われる時のみクロック信
号が送信されるもので、換言すればマイコン2がクロッ
ク信号を出力すれば、同時にデータ入力端子A2とデー
タ出力端子B2間のデータ通信及びデータ入力端子B3
とデータ出力端子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 B3
Data communication between the data output terminal A3 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 falling edge of the clock signal is set as 1 bit of communication data and is transmitted. According to the data to be sent, 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.
【0027】又、A/D変換器1は所定ビット(1回の
通信で受信できるデータ長分)のデータを受信すると、
その後一定時間は入力を禁止する(入力データを無視す
る)もので、例えばクロック数をカウントするカウンタ
と、A/D変換器1への入力データ及びクロックを導
通、遮断するゲートと、カウンタが所定値計数した時に
起動し、カウンタをリセットすると共に所定時間ゲート
を遮断状態にするタイマから構成される。When the A / D converter 1 receives data of a predetermined bit (data length that can be received in one communication),
After that, input is prohibited for a certain period of time (input data is ignored). For example, a counter that counts the number of clocks, a gate that connects and disconnects the input data and the clock to the A / D converter 1, and a counter are predetermined. It is composed of a timer which is activated when the value is counted, resets the counter and turns off the gate for a predetermined time.
【0028】次にマイコン2の行うデータ送受信処理に
ついて説明する。図3はマイコン2の行う送受信処理を
示すフローチャートである。この送受信処理は、A/D
変換器1からの変換終了信号を受信した場合に、割り込
みにより実行される。つまり、A/D変換値を取り込む
処理として行われる。尚、SPI通信のデータ伝送方式
及び送信データの形式については『従来の技術』の項で
説明した内容と同様のため説明を省略する。Next, the data transmission / reception process performed by the microcomputer 2 will be described. FIG. 3 is a flowchart showing a transmission / reception process performed by the microcomputer 2. This transmission / reception processing is A / D
When the conversion end signal from the converter 1 is received, it is executed by an interrupt. That is, it is performed as a process of fetching the A / D converted value. Since the data transmission method and the format of the transmission data of SPI communication are the same as the contents described in the section "Prior Art", the description thereof will be omitted.
【0029】ステップS1では、A/D変換器1の動作
が異常かどうかを判断し、異常で有ればステップ2に移
り、異常で無ければステップS5に移る。この判断は、
前々回の送受信処理時に指定したチャンネルデータ(A
/D変換対象のセンサを示すデータ)と前回の送受信処
理時に入力した変換端子データ(A/D変換の対象セン
サ)を比較することにより行う。つまり、A/D変換器
1が正常であれば、マイコン2が指定したセンサと、A
/D変換器1が選択したセンサが同一であり、これらチ
ャンネルデータと変換端子データは一致するため、この
データの比較によりA/D変換器1の異常が検出でき
る。In step S1, it is determined whether or not the operation of the A / D converter 1 is abnormal. If it is abnormal, the process proceeds to step 2, and if it is not abnormal, the process proceeds to step S5. This decision is
The channel data (A
/ D conversion target sensor) and the conversion terminal data (target sensor for A / D conversion) input during the previous transmission / reception processing. That is, if the A / D converter 1 is normal, the sensor specified by the microcomputer 2 and the A
Since the sensors selected by the / D converter 1 are the same and the channel data and the conversion terminal data match, the abnormality of the A / D converter 1 can be detected by comparing the data.
【0030】ステップS2ではA/D変換器1を初期化
するリセット信号を送信する。このリセット信号を送信
し、ステップS3に移る。尚、A/D変換器1が前回送
信分のデータの一部を保持しているので、リセットコマ
ンドは3ビットのコマンドD1(図6図示)が全てHレ
ベル、或いはLレベル信号として、A/D変換器1異常
時の送信データとしては16ビット全てをリセットコマ
ンドと同様のレベル(Hレベル或いはLレベル)とする
のが望ましい。又、リセットコマンドではなく、何ら意
味を持たない無命令データを送信するようにしてもよい
(この場合も上記リセットコマンドと同様のデータ形状
としておく必要がある)。又、送信データを任意データ
とし、マイコン2側でA/D変換器1の動作及びA/D
変換器1からの入力データを無視する様にしてもよい。In step S2, a reset signal for initializing the A / D converter 1 is transmitted. This reset signal is transmitted, and the process proceeds to step S3. Incidentally, since the A / D converter 1 holds a part of the data for the previous transmission, the reset command is a 3-bit command D1 (shown in FIG. 6) which is an H level signal or an L level signal. It is desirable that all 16 bits of the transmission data when the D converter 1 is abnormal have the same level (H level or L level) as the reset command. Further, instead of the reset command, non-command data having no meaning may be transmitted (in this case, it is necessary to have the same data shape as the reset command). In addition, the transmission data is arbitrary data, and the operation of the A / D converter 1 and the A / D conversion are performed on the microcomputer 2 side.
The input data from the converter 1 may be ignored.
【0031】ステップS3でA/D変換器1異常時に於
けるリセット信号送信回数を計数するカウンタを1加算
し、ステップS4に移る。ステップS4ではカウンタの
計数値が所定値に達したかどうか判断し、所定値に達し
ていれば処理を終え(カウンタはリセット)、所定値に
達していなければステップS2に戻る。このステップS
2からステップS4の処理により、A/D変換器1異常
時にリセット信号送信を所定回行う処理が行われる。
又、ステップS5では通常のA/D変換値を取り込む処
理を行い処理を終える。In step S3, the counter for counting the number of reset signal transmissions when the A / D converter 1 is abnormal is incremented by 1, and the process proceeds to step S4. In step S4, it is determined whether or not the count value of the counter has reached a predetermined value. If the count value has reached the predetermined value, the process ends (the counter is reset), and if it has not reached the predetermined value, the process returns to step S2. This step S
By the processing from 2 to step S4, processing for transmitting the reset signal a predetermined number of times when the A / D converter 1 is abnormal is performed.
Further, in step S5, a process for fetching a normal A / D converted value is performed, and the process ends.
【0032】以上のような処理を行うことにより、A/
D変換器1異常時にはA/D変換器1にリセット信号が
所定回送信される。そして、A/D変換器1はリセット
信号の受信毎に、正確には所定ビット数データを受信す
る毎に所定時間入力を禁止するので、リセット信号の受
信毎に後のデータ受信に悪影響を与える不要な保持デー
タが減ってゆき、所定回のリセット信号の受信により無
くなる。従って、本実施例によれば、A/D変換器1を
素早く正常状態に復帰することができる。By performing the above processing, A /
When the D converter 1 is abnormal, a reset signal is transmitted to the A / D converter 1 a predetermined number of times. Since the A / D converter 1 prohibits input for a predetermined time each time a reset signal is received, or more precisely, a predetermined number of bits of data is received, each reception of the reset signal adversely affects subsequent data reception. Unnecessary retained data decreases and disappears when the reset signal is received a predetermined number of times. Therefore, according to this embodiment, the A / D converter 1 can be quickly returned to the normal state.
【0033】[0033]
【発明の効果】以上詳細に説明したように本発明によれ
ば、ノイズ等により変換部の動作が異常となっても、早
期にA/D変換部を正常状態に復帰させることが可能と
なる。As described above in detail, according to the present invention, even if the operation of the conversion unit becomes abnormal due to noise or the like, the A / D conversion unit can be quickly returned to the normal state. .
【図1】エンジン制御装置の構成図FIG. 1 is a configuration diagram of an engine control device.
【図2】A/D変換部の詳細を示すブロック図FIG. 2 is a block diagram showing details of an A / D conversion unit.
【図3】マイコン2の行う処理を示すフローチャートFIG. 3 is a flowchart showing a process performed by the microcomputer 2.
【図4】エンジンのEFIシステムの構成図FIG. 4 is a block diagram of an engine EFI system.
【図5】A/D変換部の詳細を示すブロック図FIG. 5 is a block diagram showing details of an A / D conversion unit.
【図6】信号の状態を示す状態図FIG. 6 is a state diagram showing states of signals.
【図7】送信データの形式を示す図FIG. 7 is a diagram showing a format of transmission data.
【図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 converter for converting an analog signal into a digital signal, and a control signal connected to the converter by a communication line for processing an output digital signal output from the converter and controlling the converter. In the analog / digital conversion device, which comprises a processing unit for transmitting to the conversion unit, the conversion unit serially transmits a conversion value in synchronization with a clock signal in response to a conversion request signal from the processing unit. , After inputting a predetermined number of clock signals, input is prohibited for a predetermined time, and the processing unit sends a non-influenced control signal to the conversion unit, which is a control signal that does not adversely affect the conversion unit when a communication abnormality is detected. An analog / digital conversion device characterized by transmitting a predetermined number of times.
期状態にするリセット信号であることを特徴とする請求
項1記載のアナログ/デシタル変換装置。2. The analog / digital conversion apparatus according to claim 1, wherein the non-influenced control signal is a reset signal for initializing the conversion unit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP13812395A JP3249710B2 (en) | 1995-06-05 | 1995-06-05 | Analog / digital converter |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP13812395A JP3249710B2 (en) | 1995-06-05 | 1995-06-05 | Analog / digital converter |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH08328744A true JPH08328744A (en) | 1996-12-13 |
JP3249710B2 JP3249710B2 (en) | 2002-01-21 |
Family
ID=15214514
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP13812395A Expired - Fee Related JP3249710B2 (en) | 1995-06-05 | 1995-06-05 | Analog / digital converter |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3249710B2 (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8117360B2 (en) | 2006-09-15 | 2012-02-14 | Mitsubishi Electric Corporation | On-vehicle electronic control device |
US8131455B2 (en) | 2008-06-17 | 2012-03-06 | Denso Corporation | Engine control apparatus including computing section and A/D converting section |
JP2016128967A (en) * | 2015-01-09 | 2016-07-14 | 住友電気工業株式会社 | Electronic apparatus |
-
1995
- 1995-06-05 JP JP13812395A patent/JP3249710B2/en not_active Expired - Fee Related
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8117360B2 (en) | 2006-09-15 | 2012-02-14 | Mitsubishi Electric Corporation | On-vehicle electronic control device |
US8131455B2 (en) | 2008-06-17 | 2012-03-06 | Denso Corporation | Engine control apparatus including computing section and A/D converting section |
JP2016128967A (en) * | 2015-01-09 | 2016-07-14 | 住友電気工業株式会社 | Electronic apparatus |
Also Published As
Publication number | Publication date |
---|---|
JP3249710B2 (en) | 2002-01-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2005228336A (en) | Sensor with multiple data output | |
JPH06217373A (en) | Integrated wiring system | |
JPH08163151A (en) | Serial communication device | |
EP0615885B1 (en) | Electrical equipment control system | |
JPH08328744A (en) | Analog/digital converter | |
JP3339763B2 (en) | Analog / digital converter | |
US5737630A (en) | Communication device for synchronized serial communication | |
KR100306349B1 (en) | Data communication systems and devices for them | |
SE516580C2 (en) | Methods and apparatus for data communication | |
JPH0577874B2 (en) | ||
US5229770A (en) | Analog/digital converter with advanced conversion termination notice | |
JP4525799B2 (en) | Engine control device | |
JP3267646B2 (en) | Data communication device | |
JP2502491B2 (en) | Communication processing circuit | |
JPH03230229A (en) | Abnormality detection system of microcomputer | |
JP3916024B2 (en) | Data destruction prevention method in multiplex communication device | |
JPH08153052A (en) | Data communication equipment | |
JPS63164639A (en) | Serial data transmission method | |
JPH07312627A (en) | Data transfer method for serial communication between two cpus | |
JP3255957B2 (en) | Automotive electronic control unit | |
JPH05134982A (en) | Data transmission equipment | |
Beaurenaut et al. | Single-edge nibble transmission: challenges and evolutions | |
SU1197090A2 (en) | Device for determining rank of number | |
JPH1127300A (en) | Car control system | |
JPH08314513A (en) | Serial communication equipment |
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: 20011030 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20081109 Year of fee payment: 7 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20091109 Year of fee payment: 8 |
|
LAPS | Cancellation because of no payment of annual fees |