[go: up one dir, main page]

JPH08307478A - Serial communication equipment - Google Patents

Serial communication equipment

Info

Publication number
JPH08307478A
JPH08307478A JP7106230A JP10623095A JPH08307478A JP H08307478 A JPH08307478 A JP H08307478A JP 7106230 A JP7106230 A JP 7106230A JP 10623095 A JP10623095 A JP 10623095A JP H08307478 A JPH08307478 A JP H08307478A
Authority
JP
Japan
Prior art keywords
serial communication
signal
serial
input
control circuit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP7106230A
Other languages
Japanese (ja)
Inventor
Koichi Kaneko
康一 金子
Kazuo Iwase
一夫 岩瀬
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
NipponDenso Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NipponDenso Co Ltd filed Critical NipponDenso Co Ltd
Priority to JP7106230A priority Critical patent/JPH08307478A/en
Publication of JPH08307478A publication Critical patent/JPH08307478A/en
Pending legal-status Critical Current

Links

Landscapes

  • Combined Controls Of Internal Combustion Engines (AREA)
  • Communication Control (AREA)

Abstract

PURPOSE: To communicate with not only serial communication equipments having a prescribed signal voltage level but also serial communication equipments having different signal voltage levels. CONSTITUTION: An engine controller 1 is provided with a control circuit 2 consisting of a microcomputer and performs the processing or engine control by a program and performs serial communication with diagnostic devices 3 and 4 connected to terminals 5a and 5b. Diagnostic devices 3 and 4 transmit and receive serial signals with 5V and 12V voltage levels respectively in accordance with communication protocol different from each other. An interface circuit 7 converts the voltage level from 12V to 5V to connect the terminal 5b and the control circuit 2. The capture input terminal of the control circuit 2 is connected to the interface circuit 7 to detect the connection of the diagnostic device 4. Thus, the connected diagnostic device 3 or 4 is automatically detected to realize the serial communication by the corresponding communication protocol whichever diagnostic device is connected.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、所定の通信形式のシリ
アル通信機器が外部から接続されるとこれとの間でシリ
アル通信を行うようにしたシリアル通信装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a serial communication device for serially communicating with a serial communication device having a predetermined communication format when the serial communication device is externally connected.

【0002】[0002]

【従来の技術】近年、車両制御のエレクトロニクス化が
進み、各種機能がマイクロコンピュータを用いた電子機
器により制御されるようになってきている。これに伴
い、本来の目的である車両制御機能以外にも、マイクロ
コンピュータが持つ機能を利用した制御システムの自己
診断機能、他の制御装置,外部診断装置との通信機能な
どが開発され、利用されてきている。
2. Description of the Related Art In recent years, electronic control of vehicles has progressed, and various functions have come to be controlled by electronic devices using microcomputers. Along with this, in addition to the original vehicle control function, a self-diagnosis function of the control system using the functions of the microcomputer, a communication function with other control devices and external diagnosis devices, etc. have been developed and used. Is coming.

【0003】このような状況下においては、いくら高度
な機能を有するマイクロコンピュータといえどもハード
ウェアの制限は否めず、使用するマイクロコンピュータ
に備えられたシリアル通信ポートの数により、接続でき
る通信機器の数に制限を受けるという事態も生じてい
る。
Under such circumstances, no matter how high-level the microcomputer is, hardware restrictions are unavoidable. Depending on the number of serial communication ports provided in the microcomputer to be used, it is possible to connect the communication devices. There is also a situation where the number is limited.

【0004】このような場合の解決策としては、例え
ば、特開平4−203343号公報に示されるようなシ
リアル信号切替方法がある。すなわち、このものは、シ
リアル通信を行う場合の信号に外部通信機器を切り替え
るためのコード信号を含めるようにしており、これによ
って複数の外部通信機器に対応してシリアル通信が行え
るようにしている。
As a solution in such a case, for example, there is a serial signal switching method as disclosed in Japanese Patent Laid-Open No. 4-203343. That is, in this device, a code signal for switching external communication devices is included in a signal for performing serial communication, whereby serial communication can be performed corresponding to a plurality of external communication devices.

【0005】[0005]

【発明が解決しようとする課題】しかしながら、上述の
ような従来構成のものでは、例えば、接続する外部通信
機器のそれぞれが同一の通信プロトコルを有している必
要があると共に、信号形態も統一されている必要がある
ため、異なる仕様の通信プロトコルや信号形態を有する
外部通信機器を利用することができず、使用者が必ずそ
れに対応する外部通信機器を準備する必要があり、非常
に不便なものであった。
However, in the conventional configuration as described above, for example, each of the external communication devices to be connected must have the same communication protocol, and the signal form is unified. Since it is necessary to use an external communication device having a communication protocol and a signal form with different specifications, the user must prepare an external communication device corresponding to it, which is very inconvenient. Met.

【0006】本発明は、上記事情に鑑みてなされたもの
で、その目的は、所定信号電圧レベルのシリアル通信装
置以外にも、信号電圧レベルが異なるシリアル通信装置
との間の通信を可能としたシリアル通信装置を提供する
ことにある。
The present invention has been made in view of the above circumstances, and an object thereof is to enable communication with serial communication devices having different signal voltage levels in addition to serial communication devices having a predetermined signal voltage level. It is to provide a serial communication device.

【0007】[0007]

【課題を解決するための手段】本発明は、所定の通信形
式のシリアル通信機器が外部から接続されるとこれとの
間でシリアル通信を行うようにしたシリアル通信装置を
対象としており、前記シリアル通信機器と異なる形式の
シリアル通信を行うシリアル通信機器を接続可能な入力
部と、この入力部を介して入力されるシリアル通信信号
の入力レベルを所定レベルに変換する信号レベル変換手
段と、前記入力部を介してシリアル通信信号が入力され
たときにこれを検出する検出手段と、この検出手段から
検出信号が与えられると、対応する形式のシリアル通信
を行う通信制御手段とを設けて構成したところに特徴を
有する(請求項1)。
SUMMARY OF THE INVENTION The present invention is directed to a serial communication device configured to perform serial communication with a serial communication device having a predetermined communication format when the serial communication device is connected from the outside. An input unit to which a serial communication device that performs serial communication of a different format from the communication device can be connected, a signal level conversion unit that converts an input level of a serial communication signal input via the input unit to a predetermined level, and the input. A serial communication signal is inputted through the unit, and a detecting means for detecting the serial communication signal and a communication control means for performing serial communication of a corresponding format when the detecting signal is given from the detecting means are provided. (Claim 1).

【0008】また、前記通信制御手段を、シリアル通信
可能な一組の入出力ポートを備えたマイクロコンピュー
タから構成することができる(請求項2)。
Further, the communication control means may be composed of a microcomputer having a set of input / output ports capable of serial communication (claim 2).

【0009】[0009]

【作用および発明の効果】請求項1記載のシリアル通信
装置によれば、外部に接続するシリアル通信機器が同じ
形式のシリアル通信を行うものであるときにはそのまま
シリアル通信を実行し、入力部にシリアル通信の形式が
異なるシリアル通信機器が接続された場合には、変換手
段によりそのシリアル通信信号の入力レベルが所定レベ
ルに変換された状態で通信制御手段に入力されるように
なり、通信制御手段は、検出手段からの検出信号に基づ
いてこれに対応した通信形式でシリアル通信を行うよう
になる。これにより、異なる形式のシリアル通信機器が
接続された場合でも確実にシリアル通信を行うことがで
きるようになる。
According to the serial communication device of the first aspect, when the serial communication device connected to the outside performs serial communication of the same format, the serial communication is executed as it is, and the serial communication is performed on the input section. When serial communication devices of different formats are connected, the conversion means converts the input level of the serial communication signal into a predetermined level, and the input signal is input to the communication control means. Based on the detection signal from the detection means, serial communication is performed in a communication format corresponding to this. As a result, even if serial communication devices of different formats are connected, it becomes possible to reliably perform serial communication.

【0010】請求項2記載のシリアル通信装置によれ
ば、外部から接続されるシリアル通信機器が同時に複数
個接続されることがないので、シリアル通信のための一
組の入出力ポートを備えたマイクロコンピュータにより
構成する場合でも簡単に実施できるようになる。
According to the serial communication device of the second aspect, since a plurality of serial communication devices connected from the outside are not connected at the same time, the micro communication device having a set of input / output ports for serial communication. Even if it is configured by a computer, it can be easily implemented.

【0011】[0011]

【実施例】以下、本発明を自動車のエンジン制御装置に
適用した場合の一実施例について図面を参照しながら説
明する。このものは、例えば、自動車のエンジン制御装
置の制御状態を診断するために、テスタを接続してシリ
アル通信を行うことによりデータの授受を行うようにし
たものであり、この場合に、テスタはユーザーによって
異なる通信形式のものを使用する場合があるので、それ
らに対応してシリアル通信が可能となるように構成され
たものである。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment in which the present invention is applied to an automobile engine control device will be described below with reference to the drawings. For example, in order to diagnose the control state of the engine control device of the automobile, data is transmitted and received by connecting a tester and performing serial communication. In this case, the tester is a user. Since different communication formats may be used depending on the case, it is configured to enable serial communication corresponding to them.

【0012】エンジン制御装置1は、マイクロコンピュ
ータ,ROM,RAMなどから構成される通信制御手段
としての制御回路2を備えるもので、この制御回路2に
は図示しないエンジンの駆動制御を行うためのプログラ
ムが内部に記憶され、各種センサなどからの入力データ
に基づいてエンジンの駆動制御を行うようになってい
る。そして、制御回路2は、シリアル通信用の入出力端
子RXD,TXDを備えると共に、キャプチャ入力端子
ICを備えた構成とされている。
The engine control device 1 comprises a control circuit 2 as a communication control means composed of a microcomputer, a ROM, a RAM, etc., and a program for controlling the drive of an engine (not shown) is provided in the control circuit 2. Is stored inside, and drive control of the engine is performed based on input data from various sensors. The control circuit 2 is configured to include input / output terminals RXD and TXD for serial communication and a capture input terminal IC.

【0013】外部から接続される診断装置としては、例
えば、信号レベルが5Vに設定されたシリアル通信信号
(図5参照)を用いる診断装置3と、信号レベルが12
Vに設定されたシリアル通信信号(図6(a)参照)を
用いる診断装置4とが想定されており、エンジン制御装
置1は、これら診断装置3,4が接続可能な端子5a,
5bを備えている。なお、エンジン制御装置1の制御回
路2は、内部において信号レベルが5Vに設定された信
号を用いるように構成されている。
As the diagnostic device connected from the outside, for example, a diagnostic device 3 using a serial communication signal (see FIG. 5) whose signal level is set to 5V and a signal level of 12 are used.
It is assumed that the diagnostic device 4 uses a serial communication signal set to V (see FIG. 6A), and the engine control device 1 has a terminal 5a to which these diagnostic devices 3 and 4 can be connected.
5b is provided. The control circuit 2 of the engine control device 1 is configured to use a signal whose signal level is internally set to 5V.

【0014】この場合、シリアル通信信号は、通常はマ
イクロコンピュータ内部でパラレルに処理される信号を
所定の変換操作を行うことにより通信用に生成するもの
で、例えば、図5,図6(a)に示すものでは、8ビッ
トのデータD0〜D7をスタートビットを先頭としてデ
ータD0〜D7を順次並べたシリアルな信号として生成
したものである。
In this case, the serial communication signal is generated for communication by performing a predetermined conversion operation on a signal which is normally processed in parallel inside the microcomputer. For example, FIG. 5 and FIG. 6A. In the example shown in (1), the 8-bit data D0 to D7 are generated as a serial signal in which the data D0 to D7 are sequentially arranged with the start bit as the head.

【0015】また、エンジン制御装置1には、端子5
a,5bとの間に介在されるインターフェイス回路6お
よび7が設けられている。すなわち、インターフェイス
回路6において、端子5aは、バッファアンプ6a,6
bの直列回路を介してエンジン制御装置1の入力端子R
XDに接続され、バッファアンプ6c,6dの直列回路
を介して出力端子TXDに接続されている。また、イン
ターフェイス回路7において、端子5bは、バッファア
ンプ7a,7bの直列回路を介してエンジン制御装置1
の入力端子RXDに接続され、バッファアンプ7c,7
dの直列回路を介して出力端子TXDに接続されてい
る。
Further, the engine control unit 1 has a terminal 5
Interface circuits 6 and 7 are provided between a and 5b. That is, in the interface circuit 6, the terminal 5a is connected to the buffer amplifiers 6a and 6a.
Input terminal R of the engine control device 1 via the series circuit of b
It is connected to XD and is connected to the output terminal TXD via a series circuit of buffer amplifiers 6c and 6d. Further, in the interface circuit 7, the terminal 5b is connected to the engine control device 1 via the series circuit of the buffer amplifiers 7a and 7b.
Connected to the input terminal RXD of the buffer amplifiers 7c, 7
It is connected to the output terminal TXD via the series circuit of d.

【0016】そして、インターフェイス回路6は、端子
5aと入出力端子RXD,TXDとの間の信号の授受を
5Vの電圧レベルで行うようになっており、インターフ
ェイス回路7は、端子5bから12Vの信号が入力され
ると、図6(b)に示すように、バッファアンプ7a,
7bを介して5Vの電圧レベルの信号に変換してエンジ
ン制御装置1の入力端子RXDに与え、出力端子TXD
からの5Vの電圧レベルの信号をバッファアンプ7c,
7dにより12Vの電圧レベルの信号に変換して端子5
bに出力するようになっている。
The interface circuit 6 sends and receives signals between the terminal 5a and the input / output terminals RXD and TXD at a voltage level of 5V, and the interface circuit 7 receives signals from the terminals 5b and 12V. Is input, as shown in FIG. 6B, the buffer amplifiers 7a,
The signal having the voltage level of 5V is converted through 7b and applied to the input terminal RXD of the engine control device 1, and the output terminal TXD.
The signal of the voltage level of 5V from the buffer amplifier 7c,
7d converts the signal to a voltage level of 12V and the terminal 5
It is designed to output to b.

【0017】また、インターフェイス回路7のバッファ
アンプ7aおよび7bの共通接続点は制御回路2のキャ
プチャ入力端子ICに接続されている。制御回路2は、
キャプチャ入力端子ICから信号が入力されると、後述
するように、プログラムにしたがって、端子5bに診断
装置4が接続されてシリアル通信を開始したことを検出
するようになっている。
The common connection point of the buffer amplifiers 7a and 7b of the interface circuit 7 is connected to the capture input terminal IC of the control circuit 2. The control circuit 2 is
When a signal is input from the capture input terminal IC, as will be described later, according to a program, it is detected that the diagnostic device 4 is connected to the terminal 5b and the serial communication is started.

【0018】次に本実施例の作用について図2ないし図
6をも参照して説明する。図2ないし図4はシリアル通
信を行うためのプログラムのフローチャートを示すもの
である。エンジン制御装置1において、制御回路2は、
電源が投入されて制御プログラムをスタートすると、種
々の初期設定動作を行う(ステップS1)。この場合、
制御回路2は、エンジン制御のための初期設定動作に加
えて、シリアル通信機能開始の許可,キャプチャ入力に
よる割り込みの許可,フラグのクリアなどの初期設定動
作を行うようになっている。
Next, the operation of this embodiment will be described with reference to FIGS. 2 to 4 are flowcharts of programs for performing serial communication. In the engine control device 1, the control circuit 2 is
When the power is turned on and the control program is started, various initial setting operations are performed (step S1). in this case,
In addition to the initial setting operation for engine control, the control circuit 2 performs initial setting operations such as permitting the start of serial communication function, permitting interrupt by capture input, and clearing flags.

【0019】この後、シリアル通信の割り込みがなけれ
ば、制御回路2は、続くステップS2にて通常のエンジ
ン制御処理を実行するようになる。このとき、制御回路
2は、エンジン制御の起動を行うため、タイマをスター
トさせてそのタイマ時間が5秒を経過するまでの間はシ
リアル通信の割り込みを禁止した状態としている。
After that, if there is no serial communication interrupt, the control circuit 2 executes the normal engine control process in the following step S2. At this time, the control circuit 2 activates the engine control, so that the interrupt of the serial communication is prohibited until the timer is started and the timer time exceeds 5 seconds.

【0020】そして、タイマ時間が5秒経過すると、制
御回路2は、ステップS3にて「YES」と判断してス
テップS4に移行し、シリアル通信関係のフラグを再ク
リアすると共に、キャプチャ入力による割り込みを受け
付けるようになり、以後は、ステップS2ないしS4を
繰り返し実行して、シリアル通信の割り込みを受け付け
ながらエンジン制御処理を行うようになる。
When the timer time has elapsed for 5 seconds, the control circuit 2 determines "YES" in step S3 and moves to step S4 to reclear the serial communication related flags and interrupt by capture input. After that, the steps S2 to S4 are repeatedly executed, and the engine control process is performed while accepting the interrupt of the serial communication.

【0021】さて、このような状態で、例えば端子5b
に診断装置4が接続されてシリアル通信の割り込みが発
生した場合には、制御回路2は次のように動作する。す
なわち、まず、診断装置4が端子5bに接続されること
により、制御回路2にはキャプチャ入力端子ICから検
出信号が入力されるようになる。
Now, in such a state, for example, the terminal 5b
When the diagnostic device 4 is connected to and the serial communication interrupt occurs, the control circuit 2 operates as follows. That is, first, by connecting the diagnostic device 4 to the terminal 5b, the detection signal is input to the control circuit 2 from the capture input terminal IC.

【0022】すると、制御回路2は、図3に示すキャプ
チャ入力割り込みプログラムを実行するようになる。制
御回路2は、入力された検出信号が立ち下がるタイミン
グを検出して(ステップT1)、フラグFの値を「1」
にセットすると共に(ステップT2)、他の割り込み処
理を禁止して(ステップT3)メインプログラムにリタ
ーンするようになる。
Then, the control circuit 2 comes to execute the capture input interrupt program shown in FIG. The control circuit 2 detects the timing when the input detection signal falls (step T1) and sets the value of the flag F to "1".
(Step T2), other interrupt processing is prohibited (step T3), and the process returns to the main program.

【0023】そして、診断装置4が端子5bに接続され
てシリアル通信信号が入力される状態となっているの
で、制御回路2は、この後、シリアル信号入力端子RX
Dからシリアル通信信号が入力されると、これに応じ
て、図4に示すシリアル通信処理のプログラムを実行す
るようになる。この場合、制御回路2のシリアル信号入
力端子RXDに入力されるシリアル信号の電圧レベル
は、インターフェイス回路7を介して5Vに変換されて
いる(図6(b)参照)が、通信プロトコルは診断装置
3のものとは異なる形式となっている。
Since the diagnostic device 4 is connected to the terminal 5b and the serial communication signal is input, the control circuit 2 thereafter receives the serial signal input terminal RX.
When a serial communication signal is input from D, the serial communication processing program shown in FIG. 4 is executed in response to this. In this case, the voltage level of the serial signal input to the serial signal input terminal RXD of the control circuit 2 is converted to 5V through the interface circuit 7 (see FIG. 6B), but the communication protocol is the diagnostic device. The format is different from the one in No. 3.

【0024】制御回路2は、まず、通信信号のエラーの
有無を確認する(ステップP1)。ここで、エラーが発
生している場合にはプログラムを終了してメインプログ
ラムにリターンし、再びシリアル通信の割り込みがかか
るまでエンジン制御処理を実行するようになる。そし
て、エラーが発生していない場合には、制御回路2は、
ステップP2に移行して受信か送信かの判定を行い、受
信であることを判定した場合には、ステップP3に進み
フラグFの値が「1」であるか否かを判断するようにな
る。
The control circuit 2 first confirms the presence or absence of an error in the communication signal (step P1). If an error has occurred, the program is terminated, the process returns to the main program, and the engine control process is executed until the serial communication interrupt occurs again. If no error has occurred, the control circuit 2
When it is determined that the reception is the reception, the process proceeds to step P2, and when it is determined that the reception is the reception, the process proceeds to step P3 to determine whether the value of the flag F is "1".

【0025】この場合、キャプチャ入力割り込みによ
り、前述の割り込みプログラムでフラグFの値を「1」
に設定しているので、制御回路2は、ここで「YES」
と判断して診断装置4が接続されているとしてステップ
P4に移行するようになる。ステップP4では、制御回
路2は、あらかじめ制御装置4に対応して設定されてい
る通信プロトコルにしたがってシリアル通信信号を受け
付けるようになる。シリアル信号の受信が終了すると
(ステップP5)、制御回路2は、続いて送信を行うた
めに、ステップP6,P2を経てステップP7に移行す
るようになる。
In this case, the value of the flag F is set to "1" by the above-mentioned interrupt program by the capture input interrupt.
Since it is set to, the control circuit 2 is set to "YES" here.
If it is determined that the diagnostic device 4 is connected, the process proceeds to step P4. In Step P4, the control circuit 2 comes to accept the serial communication signal according to the communication protocol set in advance corresponding to the control device 4. When the reception of the serial signal is completed (step P5), the control circuit 2 shifts to step P7 via steps P6 and P2 for subsequent transmission.

【0026】制御回路2は、同様にしてフラグFが
「1」であることを判断して(ステップP7)、診断装
置4に対応してシリアル信号の送信のための処理を行い
(ステップP8)、送信が終了すると(ステップP
9)、動作中であったタイマをクリアして(ステップP
10)メインプログラムにリターンするようになる。こ
れにより、制御回路2は、診断装置4から入力されたシ
リアル通信信号に対応してシリアル信号出力端子TXD
から送信用のシリアル信号を出力して通信処理を終了す
ることになる。シリアル信号出力端子TXDから出力さ
れた5Vの電圧レベルのシリアル信号は、インターフェ
イス回路7を介して12Vの電圧レベルに上昇されたシ
リアル信号として端子5bから診断装置4に送信される
ようになる。
Similarly, the control circuit 2 determines that the flag F is "1" (step P7), and performs the process for transmitting the serial signal corresponding to the diagnostic device 4 (step P8). , When the transmission is completed (Step P
9) Clear the timer that was running (step P
10) Return to the main program. Thereby, the control circuit 2 corresponds to the serial communication signal input from the diagnostic device 4 and outputs the serial signal output terminal TXD.
Then, the serial signal for transmission is output from and the communication processing is ended. The serial signal having a voltage level of 5V output from the serial signal output terminal TXD is transmitted from the terminal 5b to the diagnostic device 4 as a serial signal increased to a voltage level of 12V via the interface circuit 7.

【0027】なお、上述の場合で、診断装置4に代え
て、診断装置3が接続された場合には、制御回路2は、
キャプチャ入力割り込みがないので、図3のキャプチャ
入力割り込みのプログラムを実行しない。したがって、
フラグFの値は「0」のままとなっているので、制御回
路2は、シリアル信号が入力されるようになってシリア
ル通信処理のプログラムを実行したときに、ステップP
3で「NO」と判断してステップP11に移行するよう
になる。そして、このステップP11では、制御回路2
は、診断装置3に対応する通信プロトコルでシリアル信
号の受信処理を行い、また、送信になると、ステップP
7でも「NO」と判断してステップP12に移行して診
断装置3に対応するシリアル信号の送信処理を行うよう
になる。
In the above case, when the diagnostic device 3 is connected instead of the diagnostic device 4, the control circuit 2 operates as follows.
Since there is no capture input interrupt, the capture input interrupt program of FIG. 3 is not executed. Therefore,
Since the value of the flag F remains "0", the control circuit 2 executes step P when the serial signal is input and the program of the serial communication process is executed.
When it is determined to be "NO" in step 3, the process proceeds to step P11. Then, in step P11, the control circuit 2
Performs the reception processing of the serial signal by the communication protocol corresponding to the diagnostic device 3, and when it is transmitted, the step P
Even in No. 7, it is determined to be "NO", and the process proceeds to Step P12 to perform the serial signal transmission process corresponding to the diagnostic device 3.

【0028】さて、制御回路2は、メインプログラムに
戻ってステップS4を実行すると、フラグFの値をクリ
ア(F←「0」)して再びシリアル通信の割り込みを許
可するようになる。これにより、診断装置3あるいは診
断装置4によるシリアル通信を受け付けるようになる。
この結果、いずれの診断装置3あるいは4が接続された
場合でもエンジン制御装置1はそれらの診断装置3,4
とシリアル通信を行うことができるようになる。
When the control circuit 2 returns to the main program and executes step S4, the value of the flag F is cleared (F ← “0”) and the interrupt of serial communication is permitted again. Thereby, the serial communication by the diagnostic device 3 or the diagnostic device 4 is accepted.
As a result, regardless of which diagnostic device 3 or 4 is connected, the engine control device 1 is
Will be able to do serial communication with.

【0029】このような本実施例によれば、通信プロト
コルおよびシリアル通信信号の電圧レベルが12Vと異
なるレベルに設定されている診断装置4が接続可能とな
るように、インターフェイス回路7を設けて電圧レベル
を変換すると共に、キャプチャ入力割り込み処理を行う
ことによりこれを判断するようにしたので、異なる通信
プロトコルで且つシリアル通信信号の電圧レベルが12
Vの診断装置3を用いても、自動的にこれを検出してシ
リアル通信を行うことができるので、自己診断データの
授受を行うための診断装置2,3のいずれでも使用する
ことができて、使い勝手が向上する。
According to the present embodiment as described above, the interface circuit 7 is provided so that the diagnostic device 4 whose voltage level of the communication protocol and the serial communication signal is set to a level different from 12 V can be connected. Since this is determined by converting the level and performing the capture input interrupt process, the voltage level of the serial communication signal is 12 with different communication protocols.
Even if the V diagnostic device 3 is used, this can be automatically detected and serial communication can be performed, so that any of the diagnostic devices 2 and 3 for exchanging self-diagnosis data can be used. , The usability is improved.

【0030】また、本実施例によれば、通信制御手段と
しての制御回路2を構成しているマイクロコンピュータ
には、シリアル信号の入出力端子として1組設けられた
ものを使用することができるので、上述した効果を得る
ための構成を新たな構成のものを用いることなく、簡単
且つ安価に実現することができる。
Further, according to the present embodiment, the microcomputer constituting the control circuit 2 as the communication control means can be provided with one set as a serial signal input / output terminal. The configuration for obtaining the above-mentioned effects can be realized easily and inexpensively without using a new configuration.

【0031】本発明は、上記実施例にのみ限定されるも
のではなく、次のように変形また拡張できる。制御回路
2は、キャプチャ入力に代えて、エッジ検出レベル判定
を行う構成のものとしても良い。
The present invention is not limited to the above embodiment, but can be modified or expanded as follows. The control circuit 2 may be configured to perform edge detection level determination instead of capture input.

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

【図1】本発明の一実施例を示す電気的構成図FIG. 1 is an electrical configuration diagram showing an embodiment of the present invention.

【図2】メインプログラムのフローチャート[Figure 2] Flow chart of the main program

【図3】キャプチャ入力割り込みプログラムのフローチ
ャート
FIG. 3 is a flowchart of a capture input interrupt program.

【図4】シリアル通信処理プログラムのフローチャートFIG. 4 is a flowchart of a serial communication processing program.

【図5】診断装置のシリアル信号のタイムチャートFIG. 5 is a time chart of a serial signal of the diagnostic device.

【図6】異なる診断装置のシリアル信号のタイムチャー
トと電圧レベルを変換した後のタイムチャート
FIG. 6 is a time chart of serial signals of different diagnostic devices and a time chart after voltage level conversion.

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

1はエンジン制御装置、2は制御回路(通信制御手
段)、3は診断装置(シリアル通信機器)、4は診断装
置(異なるシリアル通信機器)、5bは端子(入力
部)、6はインターフェイス回路、7はインターフェイ
ス回路(変換手段)である。
1 is an engine control device, 2 is a control circuit (communication control means), 3 is a diagnostic device (serial communication device), 4 is a diagnostic device (different serial communication device), 5b is a terminal (input unit), 6 is an interface circuit, Reference numeral 7 is an interface circuit (conversion means).

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 所定の通信形式のシリアル通信機器が外
部から接続されるとこれとの間でシリアル通信を行うよ
うにしたシリアル通信装置において、 前記シリアル通信機器と異なる形式のシリアル通信を行
うシリアル通信機器を接続可能な入力部と、 この入力部を介して入力されるシリアル通信信号の入力
レベルを所定レベルに変換する信号レベル変換手段と、 前記入力部を介してシリアル通信信号が入力されたとき
にこれを検出する検出手段と、 この検出手段から検出信号が与えられると、対応する形
式のシリアル通信を行う通信制御手段とを具備したこと
を特徴とするシリアル通信装置。
1. A serial communication device configured to perform serial communication with a serial communication device of a predetermined communication format when the serial communication device is externally connected, wherein the serial communication device performs serial communication of a different format from the serial communication device. An input section to which a communication device can be connected, a signal level conversion means for converting an input level of a serial communication signal input through the input section to a predetermined level, and a serial communication signal input through the input section A serial communication device comprising: detection means for sometimes detecting this; and communication control means for performing serial communication in a corresponding format when a detection signal is given from the detection means.
【請求項2】 前記通信制御手段は、シリアル通信可能
な一組の入出力ポートを備えたマイクロコンピュータか
ら構成されていることを特徴とする請求項1記載のシリ
アル通信装置。
2. The serial communication device according to claim 1, wherein the communication control means is composed of a microcomputer having a set of input / output ports capable of serial communication.
JP7106230A 1995-04-28 1995-04-28 Serial communication equipment Pending JPH08307478A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7106230A JPH08307478A (en) 1995-04-28 1995-04-28 Serial communication equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7106230A JPH08307478A (en) 1995-04-28 1995-04-28 Serial communication equipment

Publications (1)

Publication Number Publication Date
JPH08307478A true JPH08307478A (en) 1996-11-22

Family

ID=14428330

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7106230A Pending JPH08307478A (en) 1995-04-28 1995-04-28 Serial communication equipment

Country Status (1)

Country Link
JP (1) JPH08307478A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100651967B1 (en) * 2000-10-11 2006-11-30 엘지전자 주식회사 Data Transceiver of Home Automation System
US7578282B2 (en) 2006-01-27 2009-08-25 Denso Corporation Apparatus for processing sensor signal from knock sensor of internal combustion engine

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100651967B1 (en) * 2000-10-11 2006-11-30 엘지전자 주식회사 Data Transceiver of Home Automation System
US7578282B2 (en) 2006-01-27 2009-08-25 Denso Corporation Apparatus for processing sensor signal from knock sensor of internal combustion engine

Similar Documents

Publication Publication Date Title
JP3486990B2 (en) Serial communication device
US20080159188A1 (en) Serial interface apparatus performing asynchronous serial data transfer using asynchronous serial communication method
JPH08307478A (en) Serial communication equipment
US20020194541A1 (en) Method for checking an interface module
JP2002101147A (en) Communications system
JP3473951B2 (en) Data processing device and system
KR20090030765A (en) How to send CAN message during vehicle network communication
US7437448B1 (en) Method and device for function selection of a control unit
JPH03124141A (en) On-vehicle communication equipment
US20250055726A1 (en) On-board device, connection switching method, and connection switching program
JP3085403B2 (en) Programmable controller
JP3472891B2 (en) Control communication system
JP2006033730A (en) Transmission signal discrimination device
JPH06296294A (en) Communication control equipment
JP3452187B2 (en) Communication initialization method for failure diagnosis device
JP3066094U (en) Remote key continuous press judgment device for electronic equipment
JPH05216793A (en) Device and method for communication control
JPH11205229A (en) Optical communication equipment, its self-diagnostic method, information storage medium
JP4257995B2 (en) Half-duplex communication control method
JPH05292146A (en) Discrimination method for communication protocol
JP2679648B2 (en) Transmission system
JP2002204280A (en) Device and method for processing information and device capable of utilizing serial communication
JP2001325216A (en) Communication system switching device and communication system switching method
JPH0795222A (en) Communication equipment
JPH05183605A (en) Hardware control system for serial interface