JPH0746215A - Communication method for pwm data - Google Patents

Communication method for pwm data

Info

Publication number
JPH0746215A
JPH0746215A JP19056393A JP19056393A JPH0746215A JP H0746215 A JPH0746215 A JP H0746215A JP 19056393 A JP19056393 A JP 19056393A JP 19056393 A JP19056393 A JP 19056393A JP H0746215 A JPH0746215 A JP H0746215A
Authority
JP
Japan
Prior art keywords
data
time
pulse
timing
pulses
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP19056393A
Other languages
Japanese (ja)
Other versions
JP3389643B2 (en
Inventor
Hideharu Tsuchiya
英晴 土屋
Noriyuki Suzuki
範幸 鈴木
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 JP19056393A priority Critical patent/JP3389643B2/en
Publication of JPH0746215A publication Critical patent/JPH0746215A/en
Application granted granted Critical
Publication of JP3389643B2 publication Critical patent/JP3389643B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Selective Calling Equipment (AREA)

Abstract

PURPOSE:To realize the excellent communication performance from the standpoint of the utilizing efficiency of a signal line and a CPU input output port, a data transmission efficiency and a communication speed by applying pulse width modulation to plural data, sending the modulated data serially and allowing a receiver side to send two pulses as a pair periodically. CONSTITUTION:A sender side CPU 1 decides a pulse width of a transmission pulse and sets a leading (ON) time A and a trailing (OFF) time B of a 1st pulse in the decided transmission pulse to a timer match output port P10 and sets a leading (ON) time C and a trailing (OFF) time D of a 2nd pulse to the timer coincidence output port P10. Two 1st and 2nd data are subjected to pulse width modulation and the modulated data are sent serially via a signal line 3. A receiver side CPU 2 executes the reception processing of the signal received from an edge interrupt port P20. In the transmission of the 1st and 2nd data, the 1st data are allocated to a time from the ON timing to the ON timing of the two pulses and the 2nd data are allocated to a time from the OFF timing to the OFF timing of the two pulses.

Description

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

【0001】[0001]

【産業上の利用分野】この発明は、例えば複数のCPU
(中央演算処理装置)が並行動作するマルチCPUシス
テムにあってそれら各CPU間で授受されるPWM(パ
ルス幅変調)データの通信方法に関し、特に、複数のP
WMデータをシリアル送信し、受信側でそれらデータを
分離復調するに、それらPWMデータのより効率の高い
授受を実現するデータ通信方法の具現に関する。
BACKGROUND OF THE INVENTION The present invention relates to, for example, a plurality of CPUs.
In a multi-CPU system in which a (central processing unit) operates in parallel, a method of communicating PWM (pulse width modulation) data transmitted and received between the CPUs, and in particular, a plurality of P
The present invention relates to the implementation of a data communication method that realizes efficient transmission and reception of PWM data when serially transmitting WM data and separating and demodulating the data on the receiving side.

【0002】[0002]

【従来の技術】上記マルチCPUシステムとしては例え
ば、自動車の電子制御システムなどがある。すなわちこ
の電子制御システムでは、エンジン制御装置やトランス
ミッション制御装置などの複数の制御装置で各別のCP
Uを搭載し、それら搭載される複数のCPU間で相互に
データの授受等を行いつつ、エンジンやトランスミッシ
ョンなどの各制御対象を複合的に電子制御するようにし
ている。因みに、これらCPU間で授受されるデータと
しては、エンジン制御装置からトランスミッション制御
装置に対して送信されるその都度のスロットル開度を示
すデータ、或いは逆にトランスミッション制御装置から
エンジン制御装置に対して送信される遅角量を示すデー
タなどがある。
2. Description of the Related Art An example of the multi-CPU system is an electronic control system for automobiles. That is, in this electronic control system, a plurality of control devices such as an engine control device and a transmission control device are used to control different CPs.
The U is mounted, and data is transmitted and received between a plurality of CPUs mounted on the U, while electronically controlling each control target such as an engine and a transmission in a complex manner. Incidentally, the data transmitted and received between these CPUs is data indicating the throttle opening at each time transmitted from the engine control device to the transmission control device, or conversely transmitted from the transmission control device to the engine control device. There is data indicating the amount of retardation to be performed.

【0003】ところで、これらCPU間でなされるデー
タの授受には通常、それらデータの内容をパルス幅変調
して通信するPWM通信が利用されることが多い。ただ
し、このPWM通信では基本的に、それら授受するデー
タの種類の数だけ信号線及び入出力ポートを必要とする
ものであることから、これら信号線や入出力ポートの使
用効率という観点から見れば、決して好ましい通信方式
とはいい難い。そこで近年は、例えば特開平3−151
735号公報に見られるように、データの種類を識別す
るためのヘッダパルスを用いることによって、只1つの
信号線を通じて複数種類のデータをシリアル伝送できる
ようにした通信方式なども講じられるに至っている。
By the way, in order to exchange data between these CPUs, PWM communication is generally used in which the content of the data is pulse-width modulated for communication. However, since this PWM communication basically requires as many signal lines and input / output ports as the number of types of data to be exchanged, from the viewpoint of the usage efficiency of these signal lines and input / output ports. It's hard to say that this is the preferred communication method. Therefore, in recent years, for example, Japanese Patent Laid-Open No. 3-151
As seen in Japanese Patent Publication No. 735, a communication system has been adopted in which a plurality of types of data can be serially transmitted through a single signal line by using a header pulse for identifying the type of data. .

【0004】すなわちこの通信方式では、図15に示す
ように、例えばA、B、Cといった3種類のデータをシ
リアル伝送するに、それぞれその前半の1周期(T)を
用いてそれらデータの種類A、B、及びCの別を示すヘ
ッダパルスHA、HB、及びHCをまず送り、同じくそ
の後半の1周期(T)を通じて、実際のデータであるD
A、DB、及びDCをそれぞれ送るようにしている。な
おこの際、上記ヘッダパルスHA、HB、及びHCの各
パルス幅としてはそれぞれユニークな値が送信側と受信
側との間で予め取り決められており、受信側では、それ
ら受信される各ヘッダパルスHA、HB、及びHCのパ
ルス幅を見極めることによって、それに付随して送られ
る各データの種類を判別することが可能となる。
That is, in this communication system, as shown in FIG. 15, in the case of serially transmitting three types of data such as A, B, and C, the first half of the period (T) is used for each type A of the data. , B, and C, which are header data HA, HB, and HC, are sent first, and the actual data D is transmitted through one cycle (T) of the latter half.
A, DB, and DC are sent respectively. At this time, as the pulse widths of the header pulses HA, HB, and HC, unique values are preliminarily agreed between the transmitting side and the receiving side, and the receiving side receives the respective header pulses. By identifying the pulse widths of HA, HB, and HC, it is possible to determine the type of each data that is sent accompanying it.

【0005】[0005]

【発明が解決しようとする課題】このように、ヘッダパ
ルスを用いる上記通信方式によれば、只1つの信号線を
通じて複数種類のデータをシリアル伝送できることか
ら、信号線や入出力ポートの使用効率という点では、確
かに意義のあるデータ通信方式とはなっているものの、
反面、1つのデータを伝送するのに必ず2周期(T+
T)分の時間が必要とされる通信方式でもあり、データ
の伝送効率、或いは通信速度といった面では、なお大き
な問題を残す。
As described above, according to the above communication method using the header pulse, since a plurality of types of data can be serially transmitted through only one signal line, the use efficiency of the signal line and the input / output port is called. In terms of points, although it is certainly a meaningful data communication method,
On the other hand, two cycles (T +
This is also a communication method that requires time T), which still leaves a big problem in terms of data transmission efficiency or communication speed.

【0006】この発明は、こうした実情に鑑みてなされ
たものであり、信号線やCPU入出力ポートの使用効率
はもとより、データの伝送効率、或いは通信速度といっ
た面においても優れた通信性能を実現するPWMデータ
の通信方法を提供することを目的とする。
The present invention has been made in view of such circumstances, and realizes excellent communication performance in terms of not only the use efficiency of signal lines and CPU input / output ports but also data transmission efficiency or communication speed. It is an object to provide a PWM data communication method.

【0007】[0007]

【課題を解決するための手段】こうした目的を達成する
ため、この発明では、複数のデータをパルス幅変調して
シリアル送信し、受信側でそれらデータを分離復調する
PWMデータの通信方法として、2つのパルスのオンタ
イミングからオンタイミングまでの時間に第1のデータ
を割り付け、同2つのパルスのオフタイミングからオフ
タイミングまでの時間に第2のデータを割り付け、これ
ら2つのパルスを組として周期送信するようにする。
In order to achieve these objects, the present invention provides a PWM data communication method in which a plurality of data are pulse-width modulated and serially transmitted, and the receiving side separates and demodulates the data. The first data is assigned to the time from the on timing of one pulse to the on timing, the second data is assigned to the time from the off timing of the two pulses to the off timing, and these two pulses are periodically transmitted as a set. To do so.

【0008】[0008]

【作用】例えば、上記組とする2つのパルスを、ヘッダ
パルスを用いる従来の通信方式でのヘッダパルス及びデ
ータパルスにそれぞれ見立てるものとすると、この方法
により、上記従来の通信方式では1つのデータしか送る
ことのできなかった時間で、上記第1及び第2の2つの
データが送られるようになる。したがって、互いに順序
付けられているとするこれら第1及び第2の少なくとも
2つのデータに関しては、上記従来の通信方式に比べて
少なくとも2倍の通信速度をもってこれを伝送すること
ができるようになる。
For example, assuming that the two pulses in the above set are respectively regarded as a header pulse and a data pulse in the conventional communication method using the header pulse, this method allows only one data in the conventional communication method. At the time when the data could not be sent, the first and second data are sent. Therefore, it is possible to transmit at least two times the communication speed of the first and second at least two data, which are assumed to be ordered with respect to each other, as compared with the above-described conventional communication method.

【0009】また、上記従来の通信方式において定義さ
れている周期時間T(ヘッダパルス及びデータパルスの
各送信周期時間)を上記2つのパルスの組の送信周期時
間とすれば、上記同様、互いに順序付けられているとす
る第1及び第2の少なくとも2つのデータに関しては従
来の4倍、またこれら第1及び第2のデータの何れか一
方をヘッダとして利用する場合でも、従来の2倍の通信
速度をもって、これを伝送することが可能となる。
If the cycle time T (transmission cycle time of each of the header pulse and the data pulse) defined in the above-mentioned conventional communication system is taken as the transmission cycle time of the above-mentioned two pulse sets, they are mutually ordered as in the above case. It is assumed that the first and second at least two data are assumed to be four times faster than the conventional one, and even when either one of the first and second data is used as a header, the communication speed is twice as fast as the conventional one. It becomes possible to transmit this.

【0010】またこのように、周期送信される各第1若
しくは第2のデータを各々対応する第2若しくは第1の
データの種類を識別するためのヘッダとして用いる場合
には加えて、3種類以上のデータについてもこれを只1
つの信号線を通じてシリアル送信することが可能とな
る。
As described above, in addition to the case where each first or second data transmitted cyclically is used as a header for identifying the type of the corresponding second or first data, three or more types are added. This is also true for the data of 1
Serial transmission is possible through one signal line.

【0011】また、上記組とする2つのパルスのうちの
先にオンとなるパルスのパルス幅をT1、後にオンとな
るパルスのパルス幅をT3とすれば、組とする2つのパ
ルスによる第1及び第2のデータのデータ伝送時間は、 ・第1のデータの変調時間(データ時間)+パルス幅T
3 或いは ・パルス幅T1+第2のデータの変調時間(データ時
間) として表されることとなる。したがって、変調対象とす
る第1及び第2のデータの大小関係に基づき、第1のデ
ータ>第2のデータであれば上記パルス幅T3を最小パ
ルス幅に設定し、第1のデータ≦第2のデータであれば
上記パルス幅T1を最小パルス幅に設定するようにする
ことで、同データ伝送時間も、およそ ・第1のデータの変調時間(データ時間) 或いは ・第2のデータの変調時間(データ時間) として表されるようになり、何れか大きい方の1種類の
データを伝送する時間とほぼ同じ時間で、2種類のデー
タを伝送することが可能となる。
If the pulse width of the pulse that is turned on first of the two pulses of the above set is T1 and the pulse width of the pulse that is turned on later is T3, the first pulse of the two pulses to be set And the data transmission time of the second data is: modulation time (data time) of the first data + pulse width T
3 or-Pulse width T1 + modulation time (data time) of the second data. Therefore, based on the magnitude relation between the first and second data to be modulated, if the first data> the second data, the pulse width T3 is set to the minimum pulse width, and the first data ≦ the second data In the case of the data of the above, by setting the pulse width T1 to the minimum pulse width, the data transmission time is also approximately: the modulation time of the first data (data time) or the modulation time of the second data. (Data time), and it becomes possible to transmit two types of data in approximately the same time as the transmission time of one of the larger types of data.

【0012】また、例えば第1のデータについてはその
最上位ビット(MSB)を「1」として変調し、他方の
第2のデータについてはその最上位ビット(MSB)を
「0」として変調するなど、上記第1及び第2のデータ
の変調時に、上記2つのパルスのオンタイミングからオ
ンタイミングまでの時間と、同2つのパルスのオフタイ
ミングからオフタイミングまでの時間とで、常にその長
短関係が維持されるようなオフセット時間をそれら第1
及び第2のデータの少なくとも一方に与え、上記受信側
でのデータの分離復調時、それら時間の長短関係に基づ
いて2つのパルスの識別を行うようにすれば、それら2
つのパルスについてこれを識別するための信号或いは情
報の付加は一切不要となる。
Further, for example, the most significant bit (MSB) of the first data is modulated as "1", and the other most significant data of the most significant bit (MSB) is modulated as "0". During modulation of the first and second data, the length relationship between the on-timing and on-timing of the two pulses and the off-timing and off-timing of the two pulses is always maintained. Those offset times as the first
And at least one of the second data, and when the data is separated and demodulated on the receiving side, the two pulses can be identified based on the relationship between the lengths of the two pulses.
It is not necessary to add any signal or information for identifying one pulse.

【0013】また、伝送するデータが上記第1及び第2
の2種類のデータである場合には、上記シリアル送信さ
れるパルスの各オンタイミングにて出力論理レベルが反
転する論理回路と、同パルスの各オフタイミングにて出
力論理レベルが反転する論理回路とを、受信側でのデー
タの分離復調に用いることもできる。これにより受信側
では、通常のPWMデータ復調手法を用いてそれら2種
類のデータについての受信処理を行うことができるよう
になる。
Further, the data to be transmitted is the above first and second data.
In the case of two types of data, a logic circuit whose output logic level is inverted at each on-timing of the serially transmitted pulse, and a logic circuit whose output logic level is inverted at each off-timing of the same pulse Can also be used for data separation and demodulation on the receiving side. As a result, the receiving side can perform the receiving process for these two types of data by using the normal PWM data demodulation method.

【0014】また、上記の通信方法にあって、上記組と
する2つのパルスに対して更に、それらパルスに割り付
ける第1及び第2のデータの組を識別するためのヘッダ
パルスを別途付加し、これらヘッダパルスと上記2つの
パルスとを組として周期送信するようにすれば、只1つ
の信号線を通じて、2の整数倍の、すなわち使用するヘ
ッダパルス数の2倍の種類のデータをシリアル送信する
ことも可能となる。
In the above communication method, a header pulse for identifying the first and second data sets to be assigned to the two pulses is additionally added to the two pulses forming the set. If these header pulses and the above two pulses are cyclically transmitted as a set, data of an integer multiple of 2, that is, twice the number of header pulses to be used, is serially transmitted through only one signal line. It is also possible.

【0015】[0015]

【実施例】図1に、この発明にかかるPWMデータの通
信方法についてその一実施例を示す。
1 shows an embodiment of a PWM data communication method according to the present invention.

【0016】すなわちこの実施例の通信方法では、同図
1に示されるように、時刻Aで立ち上がり(オンとな
り)時刻Bで立ち下がる(オフとなる)第1のパルス
と、時刻Cで立ち上がり(オンとなり)時刻Dで立ち下
がる(オフとなる)第2のパルスとの2つのパルスに、
送信対象とするデータ1及びデータ2といった異なる2
つのデータを組み込んでこれをシリアル伝送するように
したものである。ここで、データ1は、これら2つのパ
ルスの各立ち上がり時刻(オンタイミング)Aから立ち
上がり時刻(オンタイミング)Cまでの時間に割り付け
られ、データ2は、同パルスの各立ち下がり時刻(オフ
タイミング)Bから立ち下がり時刻(オフタイミング)
Dまでの時間に割り付けられる。こうした態様でデータ
1及びデータ2の割り付けを行うことにより、これら2
つのデータを伝送するのに必要とされる時間は、上記第
1のパルスの立ち上がり時刻(オンタイミング)Aから
第2のパルスの立ち下がり時刻(オフタイミング)Dま
でにかかる時間TAで済むようになる。そしてこの実施
例の通信方法では、該時間TAを構成する上記第1及び
第2の2つのパルスを組としてこれを1周期で送信す
る。また、受信側でこれを復調するためには、これら2
つのパルスの論理レベルが変化するタイミング、すなわ
ち上記時刻A、B、C、及びDを順次捕らえればよく、
データ1については(C−A)時間、データ2について
は(D−B)時間として、各々その復調を行うことがで
きる。
That is, in the communication method of this embodiment, as shown in FIG. 1, a first pulse that rises (turns on) at time A and falls (turns off) at time B and rises at time C ( Two pulses, a second pulse that falls (turns on) and falls (turns off) at time D,
Different 2 such as data 1 and data 2 to be transmitted
It incorporates two data and serially transmits it. Here, the data 1 is assigned to the time from each rising time (on timing) A to the rising time (on timing) C of these two pulses, and the data 2 is each falling time (off timing) of the same pulse. Falling time from B (off timing)
Allotted to time to D. By allocating data 1 and data 2 in this manner, these 2
The time required to transmit one data is the time TA from the rising time (ON timing) A of the first pulse to the falling time (OFF timing) D of the second pulse. Become. Then, in the communication method of this embodiment, the above-mentioned first and second pulses constituting the time TA are paired and transmitted as one cycle. Also, in order to demodulate this on the receiving side, these 2
The timing at which the logic level of one pulse changes, that is, the times A, B, C, and D, may be sequentially captured,
The demodulation can be performed as (CA) time for the data 1 and as (DB) time for the data 2.

【0017】このように、この実施例の通信方法によれ
ば、2つのパルスに対して時間効率よく2つのデータが
組み込まれることから、データ伝送効率の面で、或いは
通信速度の面で、その通信性能が大幅に向上されるよう
になる。
As described above, according to the communication method of this embodiment, two data are incorporated into two pulses in a time-efficient manner, and therefore, in terms of data transmission efficiency or communication speed. Communication performance will be greatly improved.

【0018】因みに、上記組とする2つのパルスを、ヘ
ッダパルスを用いる従来の通信方式でのヘッダパルス及
びデータパルスにそれぞれ見立てるものとすると、この
実施例の通信方法により、上記従来の通信方式では1つ
のデータしか送ることのできなかった時間で、上記デー
タ1及びデータ2の2つのデータが送られるようにな
る。したがって、互いに順序付けられているとするこれ
ら少なくとも2つのデータに関しては、上記従来の通信
方式に比べて少なくとも2倍の通信速度をもってこれを
伝送することができるようになる。
Incidentally, assuming that the two pulses in the above set are respectively regarded as a header pulse and a data pulse in a conventional communication system using a header pulse, the communication method of this embodiment allows At the time when only one piece of data could be sent, the two pieces of data, data 1 and data 2, are sent. Therefore, it is possible to transmit these at least two pieces of data, which are supposed to be ordered with each other, at a communication speed at least twice as high as that of the conventional communication method.

【0019】また、上記従来の通信方式において定義さ
れている周期時間T(ヘッダパルス及びデータパルスの
各送信周期時間)を上記2つのパルスの組の送信周期時
間とすれば、上記同様、互いに順序付けられているとす
る少なくとも2つのデータに関しては、従来の4倍の通
信速度をもってこれを伝送することが可能となる。
If the cycle time T (transmission cycle time of each of the header pulse and the data pulse) defined in the above-mentioned conventional communication system is taken as the transmission cycle time of the above-mentioned two pulse sets, they are mutually ordered as in the above case. It is possible to transmit at least two data that are supposed to be transmitted at a communication speed four times that of the conventional one.

【0020】ところで、上記2つのデータの伝送にかか
る時間TAとは、図1にも付記する通り、第1のパルス
のパルス幅T1(時間A−B)、第2のパルスのパルス
幅T3(時間C−D)、及びこれら第1、第2のパルス
間のオフ時間T2(時間B−C)の和として表される時
間であり、データ伝送効率、或いは通信速度を更に高め
るためには、この時間TAを短縮することが有効とな
る。
By the way, the time TA required to transmit the above two data means the pulse width T1 (time AB) of the first pulse and the pulse width T3 (time T2 of the second pulse, as also shown in FIG. Time C-D) and the off-time T2 between these first and second pulses (time B-C), which is the sum of the data transmission efficiency and the communication speed. It is effective to shorten this time TA.

【0021】図2に、このように時間TAを短縮して、
データ伝送効率、或いは通信速度を更に高めることので
きる送信パルス構築手法を示す。先の図1に付記したよ
うに、上記組とする2つのパルスのうち、第1のパルス
のパルス幅をT1とし、第2のパルスのパルス幅をT3
とすれば、上記データ1及びデータ2の2つのデータの
データ伝送にかかる時間TAは、 TA=データ1の変調時間(時間T1+T2)+パルス
幅T3 或いは TA=パルス幅T1+データ2の変調時間(時間T2+
T3) として表される。
In FIG. 2, the time TA is shortened in this way,
A transmission pulse construction method capable of further increasing data transmission efficiency or communication speed is shown. As shown in FIG. 1 above, the pulse width of the first pulse is T1 and the pulse width of the second pulse is T3 among the two pulses in the above set.
Then, the time TA required for data transmission of the two data of the data 1 and the data 2 is as follows: TA = modulation time of data 1 (time T1 + T2) + pulse width T3 or TA = modulation time of pulse width T1 + data 2 ( Time T2 +
Represented as T3).

【0022】ただしここで、上記データ1或いはデータ
2の変調時間は、それらデータ内容(大きさ)に応じて
所定に時間変換された値であり、その長短を自由に調整
することはできない。
However, the modulation time of the data 1 or the data 2 is a value obtained by time-converting the data 1 or 2 in accordance with the content (size) of the data, and its length cannot be freely adjusted.

【0023】そこでここでは、変調対象とするデータ1
及びデータ2の大小関係に基づき、データ1>データ2
であれば、図2(a)に示されるように、上記パルス幅
T3をパルスとして認識可能な最小のパルス幅(例えば
16μs)に設定し、逆に、データ1≦データ2であれ
ば、図2(b)に示されるように、上記パルス幅T1を
同じくパルスとして認識可能な最小のパルス幅に設定す
る。すなわちこれにより、上記データ伝送時間TAも、
データ1>データ2のときには TA≒データ1の変調時間(時間T1+T2) となり、またデータ1≦データ2のときには TA≒データ2の変調時間(時間T2+T3) となって、何れか大きい方の1種類のデータを伝送する
時間とほぼ同じ時間で、データ1及びデータ2の2種類
のデータを伝送することが可能となる。
Therefore, here, the data 1 to be modulated is
And data 2> data 2 based on the magnitude relation of data 2
If so, as shown in FIG. 2A, the pulse width T3 is set to a minimum pulse width (for example, 16 μs) that can be recognized as a pulse, and conversely, if data 1 ≦ data 2, As shown in FIG. 2 (b), the pulse width T1 is set to the minimum pulse width that can also be recognized as a pulse. That is, as a result, the data transmission time TA also becomes
When data 1> data 2, TA≈data 1 modulation time (time T1 + T2), and when data 1 ≦ data 2 TA≈data 2 modulation time (time T2 + T3), whichever is larger It is possible to transmit two types of data, that is, the data 1 and the data 2, in almost the same time as the data transmission time.

【0024】図3は、これら図1或いは図2に示した実
施例の通信方法を実現するマルチCPUシステムの構成
例を示したものである。すなわちこのシステムは、送信
側CPU1と受信側CPU2との2つのCPUを具える
とともに、送信側CPU1のタイマ一致出力ポートP1
0から受信側CPU2のエッジ割り込みポートP20に
かけて信号線3が敷設され、また送信側CPU1の汎用
出力ポートP11から受信側CPU2の汎用入力ポート
P22にかけて信号線4が敷設されて構成される。上記
信号線3は、図3に付記するように、上述した図1或い
は図2に例示した通信方法に基づいてデータ1及びデー
タ2が伝送される信号線であり、上記信号線4は、信号
線3に出力されるそれらデータに同期してその1周期中
の第1のパルス位置を示す補助信号(以下これを1パル
ス目判別信号という)が伝送される信号線である。
FIG. 3 shows an example of the structure of a multi-CPU system for realizing the communication method of the embodiment shown in FIG. 1 or FIG. That is, this system is provided with two CPUs, that is, the sending side CPU 1 and the receiving side CPU 2, and the timer matching output port P1 of the sending side CPU 1 is provided.
The signal line 3 is laid from 0 to the edge interrupt port P20 of the receiving CPU 2, and the signal line 4 is laid from the general output port P11 of the transmitting CPU 1 to the general input port P22 of the receiving CPU 2. As shown in FIG. 3, the signal line 3 is a signal line through which data 1 and data 2 are transmitted based on the communication method illustrated in FIG. 1 or 2, and the signal line 4 is a signal line. This is a signal line through which an auxiliary signal (hereinafter referred to as a first pulse determination signal) indicating the first pulse position in one cycle is transmitted in synchronization with the data output to the line 3.

【0025】図4〜図6は、上記送信側CPU1におい
て実行されるデータ送信手順を、また図7〜図8は、上
記受信側CPU2において実行されるデータ受信手順を
それぞれ示したものであり、以下、これら図4〜図8を
併せ参照して、該システムを通じて実行される上記実施
例の通信方法を更に詳述する。
FIGS. 4 to 6 show a data transmission procedure executed by the transmission side CPU 1, and FIGS. 7 to 8 show a data reception procedure executed by the reception side CPU 2, respectively. Hereinafter, the communication method of the above-described embodiment executed through the system will be described in more detail with reference to FIGS.

【0026】図4は、図2に示したパルス構築手法をも
とにした送信パルスのパルス幅決定手順を示すものであ
り、上記送信側CPU1は、この図4に示される手順に
基づき、以下の態様で送信パルスのパルス幅を決定す
る。
FIG. 4 shows a procedure for determining the pulse width of a transmission pulse based on the pulse construction method shown in FIG. 2. The transmission side CPU 1 is based on the procedure shown in FIG. The pulse width of the transmission pulse is determined in this manner.

【0027】すなわち、送信側CPU1はまず、ステッ
プ400において、送信対象とするデータ1及びデータ
2の大小を比較し、データ1>データ2であれば、ステ
ップ410を通じて上記第2のパルスのパルス幅T3を
認識可能な最小のパルス幅に設定する。ここでは例え
ば、T3=16μsに設定するものとする。
That is, the transmitting CPU 1 first compares the sizes of data 1 and data 2 to be transmitted in step 400, and if data 1> data 2, the pulse width of the second pulse is passed through step 410. Set T3 to the minimum recognizable pulse width. Here, for example, T3 = 16 μs is set.

【0028】こうしてパルス幅T3を設定した送信側C
PU1は次いで、ステップ411を通じて上記第1及び
第2のパルス間のオフ時間T2を求め、更にこの求めた
時間T2をもとにステップ412を実行して、上記第1
のパルスのパルス幅T1を求める。図1及び図2から明
らかなように、上記オフ時間T2は、 T2=データ2の時間−パルス幅T3 によって求めることができ、上記パルス幅T1は、 T1=データ1の時間−オフ時間T2 によって求めることができる。またここで、上記データ
1及びデータ2は、それぞれ次の態様で時間情報に変換
されるものとする。
The transmitting side C having the pulse width T3 thus set
PU1 then determines the off time T2 between the first and second pulses through step 411, and further executes step 412 based on the determined time T2 to perform the first
The pulse width T1 of the pulse is calculated. As is apparent from FIGS. 1 and 2, the off time T2 can be obtained by T2 = time of data 2−pulse width T3, and the pulse width T1 can be calculated by T1 = time of data 1−off time T2. You can ask. Here, it is assumed that the data 1 and the data 2 are converted into time information in the following manners.

【0029】すなわちいま、データ1として値「32」
が与えられ、データ2として値「10」が与えられてい
るものとし、また当該システムでのデータ通信が、例え
ば 1LSB(最下位ビット長)=32μs OFFSET(0パルス長)=32μs をもとになされるものとすると、データ1の時間は、 32(値)×32μs(1LSB)+32μs(OFF
SET)=1056μs となり、データ2の時間は、 10(値)×32μs(1LSB)+32μs(OFF
SET)=352μs となる。したがって、上記時間T2は、 T2=352μs−16μs(T3)=336μs として求められ、同様に上記パルス幅T1も、 T1=1056μs−336(T2)=720μs として求められるようになる。
That is, now, the value “32” is set as the data 1.
Is given and the value “10” is given as the data 2, and the data communication in the system is based on, for example, 1 LSB (least significant bit length) = 32 μs and OFFSET (0 pulse length) = 32 μs. Assuming that this is done, the time for data 1 is 32 (value) × 32 μs (1 LSB) +32 μs (OFF
SET) = 1056 μs, and the time for data 2 is 10 (value) × 32 μs (1 LSB) +32 μs (OFF
SET) = 352 μs. Therefore, the time T2 is calculated as T2 = 352 μs−16 μs (T3) = 336 μs, and similarly, the pulse width T1 is also calculated as T1 = 1056 μs-336 (T2) = 720 μs.

【0030】一方、上記ステップ400において、送信
対象とするデータ1及びデータ2の大小関係が、データ
1≦データ2である旨判断される場合には、同送信側C
PU1は、ステップ420を通じて上記第1のパルスの
パルス幅T1を認識可能な最小のパルス幅に設定する。
すなわちこの例では、T1=16μsに設定する。そし
てその後は、ステップ421及びステップ422を通
じ、上記に準じた態様でオフ時間T2及びパルス幅T3
を順次求める。
On the other hand, when it is judged in the above step 400 that the magnitude relationship between the data 1 and the data 2 to be transmitted is data 1 ≦ data 2, the transmitting side C
PU1 sets the pulse width T1 of the first pulse to the minimum recognizable pulse width through step 420.
That is, in this example, T1 = 16 μs is set. Then, after that, through steps 421 and 422, the off time T2 and the pulse width T3 are changed in a manner similar to the above.
Are sequentially requested.

【0031】こうしてパルス幅T1、オフ時間T2、及
びパルス幅T3をそれぞれ決定した送信側CPU1は次
に、図5に示される手順に従って、信号線4に出力する
上記1パルス目判別信号の論理レベルを反転するととも
に(ステップ500)、上記決定した送信パルスにおけ
る第1のパルスの立ち上がり(オン)時刻A、並びに同
立ち下がり(オフ)時刻Bを上記タイマ一致出力ポート
P10にセットし(ステップ501)、更にその後、こ
の時刻Bでの割り込み処理として、図6に示される手順
に従って、同決定した送信パルスにおける第2のパルス
の立ち上がり(オン)時刻C、並びに同立ち下がり(オ
フ)時刻Dを上記タイマ一致出力ポートP10にセット
する(ステップ600)。
The transmitting-side CPU 1 having determined the pulse width T1, the off-time T2, and the pulse width T3, respectively, next, according to the procedure shown in FIG. 5, outputs the logical level of the first pulse discrimination signal to the signal line 4. (Step 500), the rising (ON) time A and the falling (OFF) time B of the first pulse in the determined transmission pulse are set in the timer coincidence output port P10 (step 501). After that, as the interrupt processing at the time B, the rising (on) time C and the falling (off) time D of the second pulse in the determined transmission pulse are set as described above according to the procedure shown in FIG. The timer coincidence output port P10 is set (step 600).

【0032】なお、この送信側CPU1がデータ蓄積容
量の大きなCPUであって、1周期の時間内に上記4つ
の時刻A、B、C、及びDの全てをタイマ一致出力ポー
トP10にセットできるものである場合には、図6に示
される時刻B割り込み処理は省略される。
Incidentally, the transmitting side CPU 1 is a CPU having a large data storage capacity and is capable of setting all of the above four times A, B, C and D in the timer coincidence output port P10 within one cycle time. If it is, the time B interrupt processing shown in FIG. 6 is omitted.

【0033】他方、こうして送信されるデータが入力さ
れる受信側CPU2では、図7及び図8に示される手順
に基づき、以下の態様で、該入力されるデータの受信処
理を実行する。
On the other hand, the receiving side CPU 2 to which the data thus transmitted is inputted executes the receiving process of the inputted data in the following manner based on the procedure shown in FIGS. 7 and 8.

【0034】受信側CPU2ではまず、そのエッジ割り
込みポートP20を通じた立ち下がりエッジ割り込み処
理として、入力されたパルスの立ち下がりエッジ、すな
わち図3に付記した送信パルスの時刻(タイミング)
B、或いは時刻(タイミング)Dにおいて、図7に示さ
れる割り込み処理を実行する。
In the receiving side CPU 2, first, as the falling edge interrupt processing through the edge interrupt port P20, the falling edge of the input pulse, that is, the time (timing) of the transmission pulse added to FIG.
At B or time (timing) D, the interrupt process shown in FIG. 7 is executed.

【0035】すなわち受信側CPU2は、上記時刻B、
或いは時刻Dに対応して該割り込み処理が起動される毎
に、信号線4上に出力されている上記1パルス目判別信
号の論理レベル反転の有無に基づいて、当該入力パルス
が1パルス目(第1のパルス)であるか否かをまず判定
する(ステップ700)。そしてその結果、1パルス目
である旨判定される場合には、そのパルスの立ち上がり
(オン)時刻並びに立ち下がり(オフ)時刻である時刻
A及び時刻Bの履歴を取り込み(ステップ710)、1
パルス目ではない旨判定される場合には、そのパルスの
立ち上がり(オン)時刻並びに立ち下がり(オフ)時刻
である時刻C及び時刻Dの履歴を取り込む(ステップ7
20)。
That is, the CPU 2 on the receiving side receives the time B,
Alternatively, each time the interrupt process is started corresponding to time D, the input pulse is the first pulse ( First, it is determined whether it is the first pulse) (step 700). As a result, if it is determined that the pulse is the first pulse, the history of time A and time B, which are the rising (on) time and the falling (off) time of the pulse, is fetched (step 710), 1
If it is determined that the pulse is not the pulse, the history of time C and time D that is the rising (on) time and the falling (off) time of the pulse is taken in (step 7).
20).

【0036】こうして、組となる2つのパルスについて
の全時刻情報を取り込んだ受信側CPU2は次いで、デ
ータ受信処理として、図8に示される手順に従い、 データ1=時刻A−時刻C としてデータ1の時間を確定し(ステップ800)、同
様に データ2=時刻B−時刻D としてデータ2の時間を確定する(ステップ801)。
In this way, the receiving-side CPU 2 that has fetched all the time information about the two pulses forming a set then follows the procedure shown in FIG. 8 as a data receiving process, and sets data 1 = time A-time C as data 1 The time is settled (step 800), and similarly, the time of data 2 is set as data 2 = time B−time D (step 801).

【0037】因みに、こうして確定した時間情報から上
記データ1、及びデータ2の各値への復調は、 データの値=(時間値−OFFSET)/LSB によって行うことができる。すなわち、上記確定された
データ1の時間が「1056μs」であり、またデータ
2の時間が「352μs」であるとすれば、当該システ
ムでの上記通信条件 1LSB(最下位ビット長)=32μs OFFSET(0パルス長)=32μs により、それぞれ データ1の値=(1056μs−32μs)/32μs
=32 データ2の値=(352μs−32μs)/32μs=
10 として復調されるようになる。
Incidentally, the demodulation from the thus determined time information to each value of the data 1 and the data 2 can be performed by the value of data = (time value-OFFSET) / LSB. That is, assuming that the time of the determined data 1 is “1056 μs” and the time of the data 2 is “352 μs”, the communication condition 1LSB (least significant bit length) = 32 μs OFFSET ( 0 pulse length) = 32 μs, so the value of data 1 = (1056 μs−32 μs) / 32 μs
= 32 Data 2 value = (352 μs−32 μs) / 32 μs =
It will be demodulated as 10.

【0038】図9に示すシステムも、図3に示したシス
テムと同様、図1或いは図2に示した実施例の通信方法
を実現するマルチCPUシステムである。この図9に示
すシステムでは、送信側CPU1と受信側CPU2との
2つのCPUに加え、2つのフリップフロップ5及び6
と、信号線7から導出されてその信号(パルス)の論理
レベルを反転した信号(パルス)をフリップフロップ6
のクロック端子CLに与えるインバータ8とからなるハ
ードウェア(論理回路)を具えて構成される。信号線7
は、送信側CPU1のタイマ一致出力ポートP10から
フリップフロップ5のクロック端子CLにかけて敷設さ
れた信号線であり、信号線9及び10はそれぞれ、2つ
のフリップフロップ5及び6の各出力端子Qから受信側
CPU2のエッジ割り込みポートP20及びP21にか
けて敷設された信号線である。また、信号線11は、送
信側CPU1の汎用出力ポートP12から上記2つのフ
リップフロップ5及び6の各リセット端子Rにかけて敷
設されている。因みに、上記2つのフリップフロップ5
及び6は何れも、それらクロック端子CLに加わる信号
(パルス)の立ち上がりエッジによってそれらQ端子か
ら出力されている信号の論理レベルを反転する構成とな
っている。また、リセット端子Rに加わる信号がオン
(論理ハイレベル)状態にあれば、それらQ端子出力も
オフ(論理ローレベル)状態にリセットされる。
The system shown in FIG. 9 is also a multi-CPU system which realizes the communication method of the embodiment shown in FIG. 1 or 2 like the system shown in FIG. In the system shown in FIG. 9, in addition to the two CPUs of the transmitting side CPU 1 and the receiving side CPU 2, two flip-flops 5 and 6 are provided.
And a signal (pulse) derived from the signal line 7 and having the logical level of the signal (pulse) inverted,
It is configured by including hardware (logic circuit) including an inverter 8 applied to the clock terminal CL. Signal line 7
Is a signal line laid from the timer coincidence output port P10 of the transmission side CPU 1 to the clock terminal CL of the flip-flop 5, and the signal lines 9 and 10 are respectively received from the output terminals Q of the two flip-flops 5 and 6. It is a signal line laid across the edge interrupt ports P20 and P21 of the side CPU2. The signal line 11 is laid from the general-purpose output port P12 of the transmission side CPU 1 to the reset terminals R of the two flip-flops 5 and 6. Incidentally, the above two flip-flops 5
6 and 6 are configured to invert the logical level of the signal output from the Q terminal at the rising edge of the signal (pulse) applied to the clock terminal CL. Also, if the signal applied to the reset terminal R is in the on (logical high level) state, those Q terminal outputs are also reset to the off (logical low level) state.

【0039】図10は、この図9に示したシステムの動
作例を、また図11は、上記送信側CPU1において実
行されるデータ送信手順をそれぞれ示したものであり、
以下、これら図10及び図11を併せ参照して、同シス
テムを通じて実行される上記実施例の通信方法を詳述す
る。なお、送信側CPU1において実行されるデータ送
信手順は、そのほとんどが、先の図4〜図6に示した手
順に共通するものとなっており、ここでは、1周期のデ
ータ伝送タイミング設定にかかる処理のみを、先の図5
に代わるものとして図11に示すにとどめ、それら共通
する処理についての重複する説明は割愛する。
FIG. 10 shows an example of operation of the system shown in FIG. 9, and FIG. 11 shows a data transmission procedure executed by the transmission side CPU 1.
Hereinafter, the communication method of the above-described embodiment executed through the system will be described in detail with reference to FIGS. 10 and 11. It should be noted that most of the data transmission procedure executed in the transmission side CPU 1 is common to the procedures shown in FIGS. 4 to 6 above, and here, one cycle of data transmission timing setting is involved. Only the processing is shown in FIG.
11 as an alternative to the above, and redundant description of the common processing will be omitted.

【0040】さて、この図9に示すシステムにあって
も、送信側CPU1はまず、先の図4に示される手順に
て送信パルスのパルス幅を決定し、しかる後、図11に
示される手順に従って、その決定した送信パルスにおけ
る第1のパルスの立ち上がり(オン)時刻A、並びに同
立ち下がり(オフ)時刻Bを上記タイマ一致出力ポート
P10にセットする(ステップ1103)。ただし、同
図9に示すシステムにあっては、該タイマ一致出力ポー
トP10への時刻セットに先立って、上記信号線11に
出力するフリップフロップ5及び6のリセット信号をオ
ン(論理ハイレベル)とし(ステップ1100)、それ
らフリップフロップ5及び6が確実にリセットされ得る
所定時間の経過の後(ステップ1101)、同リセット
信号を解除する処理が実行される(ステップ110
2)。なお、上記時刻A及びBのタイマ一致出力ポート
P10へのセット後に、図6に示されるような時刻Bで
の割り込み処理が行われること、またこの送信側CPU
1がデータ蓄積容量の大きなCPUであって、1周期の
時間内に上記4つの時刻A、B、C、及びDの全てをタ
イマ一致出力ポートP10にセットできるものである場
合には、こうした時刻Bでの割り込み処理が省略できる
こと、等々は先の図3に示したシステムの場合と同様で
ある。
In the system shown in FIG. 9, the transmitting CPU 1 first determines the pulse width of the transmitting pulse by the procedure shown in FIG. 4, and then the procedure shown in FIG. Accordingly, the rising (on) time A and the falling (off) time B of the first pulse in the determined transmission pulse are set in the timer coincidence output port P10 (step 1103). However, in the system shown in FIG. 9, the reset signals of the flip-flops 5 and 6 output to the signal line 11 are turned on (logic high level) prior to the time setting to the timer coincidence output port P10. (Step 1100), after a lapse of a predetermined time in which the flip-flops 5 and 6 can be reliably reset (step 1101), a process of releasing the reset signal is executed (step 110).
2). It should be noted that, after the timer coincidence output port P10 is set at the times A and B, the interrupt processing at the time B as shown in FIG.
If the CPU 1 has a large data storage capacity and is capable of setting all of the four times A, B, C, and D in the timer coincidence output port P10 within the time of one cycle, such times are set. The fact that the interrupt processing at B can be omitted is the same as in the case of the system shown in FIG.

【0041】図10(d)は、上記リセット信号のオン
/オフ態様を示し、同図10(a)は、送信側CPU1
の上記タイマ一致出力ポートP10にセットされて信号
線7に出力されるとする送信データの出力態様を示す。
こうした送信データ、及び上記インバータ8によってそ
の論理レベルが反転されたデータの立ち上がりエッジに
基づいて論理レベルが反転される上記フリップフロップ
5及び6からの各出力、すなわち信号線9及び10を通
じて受信側CPU2に入力される信号は、それぞれ図1
0(b)及び(c)に示されるように、上記リセット信
号によって一旦オフ(論理ロー)レベルにリセットされ
た後、それら論理ハイレベル時間がそのまま上記データ
1の時間、或いはデータ2の時間を示す信号として受信
側CPU2に取り込まれるようになる。したがって、受
信側CPU2では、先の図7及び図8に示したようなデ
ータ受信処理は不要となり、単に上記ポートP20及び
P21に取り込まれる信号の論理ハイレベル時間をデー
タ1、或いはデータ2の値に復調する処理のみを行えば
よいことになる。
FIG. 10D shows an ON / OFF mode of the reset signal, and FIG. 10A shows the CPU 1 on the transmitting side.
The output mode of the transmission data which is set to the timer coincidence output port P10 and output to the signal line 7 will be described.
Through the output data from the flip-flops 5 and 6 whose logic level is inverted based on the rising edge of the transmission data and the data whose logic level is inverted by the inverter 8, that is, the receiving side CPU 2 through the signal lines 9 and 10. The signals input to the
As shown in 0 (b) and (c), after being once reset to the off (logical low) level by the reset signal, the logic high level time is the same as the data 1 time or the data 2 time. The received signal is taken in by the receiving CPU 2. Therefore, the receiving side CPU 2 does not need the data receiving process as shown in FIG. 7 and FIG. 8, and simply sets the logical high level time of the signal taken in the ports P20 and P21 to the value of the data 1 or the value of the data 2. It suffices to perform only the process of demodulating.

【0042】このように、図9に示したシステムによれ
ば、受信側CPU自身の負荷は大幅に軽減されるように
なる。また同システムの場合、信号線9及び10を2つ
の各別の受信側CPUの入力ポート(エッジ割り込みポ
ート)に接続し、上記データ1及びデータ2の各々をこ
れら2つの各別の受信側CPUに伝送することも可能と
なる。
As described above, according to the system shown in FIG. 9, the load on the receiving CPU itself is significantly reduced. Further, in the case of the same system, the signal lines 9 and 10 are connected to the input ports (edge interrupt ports) of the two separate receiving CPUs, and the data 1 and the data 2 are connected to these two separate receiving CPUs. It is also possible to transmit to.

【0043】なお、この図9に示したシステムにおい
て、上記信号線9及び10の信号電位が、その初期状
態、常にオフ(上記の例では論理ロー)レベルに確定さ
れるものとすれば、上述したリセット信号並びにその送
出にかかる処理は不要となる。
In the system shown in FIG. 9, assuming that the signal potentials of the signal lines 9 and 10 are always set to the off (logic low) level in the initial state, The reset signal and the processing related to its transmission are unnecessary.

【0044】図12に、この発明にかかるPWMデータ
の通信方法の他の実施例を示す。この図12に示す実施
例にあっても、第1及び第2の2つのパルスのオンタイ
ミングからオンタイミングまでの時間にデータ1を割り
付け、同2つのパルスのオフタイミングからオフタイミ
ングまでの時間にデータ2を割り付け、これら2つのパ
ルスを組として周期送信する通信方法自体は、先の図1
或いは図2に示した実施例の場合と同様である。ここで
は、データ1及びデータ2の変調方法、すなわちそれら
データ値を時間の長短に変換する方法を変更することに
よって、それら各データ(パルス)の判別を可能にして
いる。
FIG. 12 shows another embodiment of the PWM data communication method according to the present invention. Also in the embodiment shown in FIG. 12, the data 1 is assigned to the time from the on timing of the first and second pulses to the on timing, and the data 1 is assigned to the time from the off timing of the two pulses to the off timing. The communication method itself of allocating data 2 and periodically transmitting these two pulses as a set is the same as in FIG.
Alternatively, it is similar to the case of the embodiment shown in FIG. Here, by changing the modulation method of the data 1 and the data 2, that is, the method of converting those data values into the length of time, it is possible to determine each of these data (pulses).

【0045】すなわちこの図12に示す実施例にあって
は、データ1についてはその最上位ビット(MSB)を
「1」として変調し、他方のデータ2についてはその最
上位ビット(MSB)を「0」として変調するなど、こ
れら2つのデータの変調時に、第1及び第2の2つのパ
ルスのオンタイミングAからオンタイミングCまでの時
間(データ1の時間)と、同2つのパルスのオフタイミ
ングBからオフタイミングDまでの時間(データ2の時
間)とで、常にその長短関係が データ1の時間 > データ2の時間 といった関係に維持されるようなオフセット時間をそれ
らデータに与えるようにしている。簡単のため、例えば
4ビットの値を例にとれば、データ1については、最上
位ビット(MSB)を「1」とした「1、X、X、X」
といったかたちで、そのデータ値「X、X、X」を表現
し、他方のデータ2については、最上位ビット(MS
B)を「0」とした「0、X、X、X」といったかたち
で、そのデータ値「X、X、X」を表現するようにす
る。これにより、データ1が最小の値をとった場合で
も、その変調時間は4ビット値「1、0、0、0」に対
応した時間となり、データ2が最大の値をとったときの
同4ビット値「0、1、1、1」に対応した時間よりも
確実に長い時間となる。
That is, in the embodiment shown in FIG. 12, the most significant bit (MSB) of data 1 is modulated as "1", and the other most significant bit (MSB) of data 2 is set to "1". When these two data are modulated such as "0", the time from the on-timing A of the first and second pulses to the on-timing C (time of data 1) and the off-timing of the two pulses are the same. The time from B to the off-timing D (time of data 2) is always given to those data such that the length relation is maintained in the relationship of time of data 1> time of data 2. . For the sake of simplicity, taking a 4-bit value as an example, for data 1, the most significant bit (MSB) is set to “1”, “1, X, X, X”.
The data value “X, X, X” is expressed in the form such as, and the other data 2 has the most significant bit (MS
The data value "X, X, X" is expressed in the form of "0, X, X, X" where B) is "0". As a result, even when the data 1 takes the minimum value, the modulation time becomes the time corresponding to the 4-bit value “1, 0, 0, 0”, and the same as when the data 2 takes the maximum value. The time is definitely longer than the time corresponding to the bit values “0, 1, 1, 1”.

【0046】図12は、データ1及びデータ2のこのよ
うな関係をイメージしたものである。受信側が、1周期
として正常にこれを認識している状態においては、上記 データ1の時間 > データ2の時間 といった関係が維持され、ひいては第1及び第2のパル
スの前後関係、或いはそれらデータの別も正常に認識さ
れるようになる。また、もし受信側が上記1周期の認識
を誤り、第2のパルス(時刻Cでオンとなり、時刻Dで
オフとなるパルス)からその1周期が開始されるが如く
そのデータを取り込んだとしても、その際には、 データ1(NG)の時間 < データ2(NG)の時間 となってしまうことから、こうした1周期の認識が誤り
であったことを受信側自らが容易に判断できるようにな
る。
FIG. 12 is an image of such a relationship between data 1 and data 2. In the state where the receiving side normally recognizes this as one cycle, the relationship of time of data 1> time of data 2 is maintained, and thus the front-back relationship of the first and second pulses, or the relationship between those data. Others will be recognized normally. Further, even if the receiving side erroneously recognizes the above one cycle and fetches the data so that the one cycle is started from the second pulse (a pulse that turns on at time C and turns off at time D), In that case, the time of data 1 (NG) becomes less than the time of data 2 (NG), so that the receiving side can easily judge that the recognition of one cycle is incorrect. .

【0047】このように、この図12に示す実施例の通
信方法によれば、受信側でのデータの分離、復調時に、
それらデータ時間の長短関係のみに基づいて1パルス目
の判別、ひいてはデータ1及びデータ2の識別を行うこ
とができるようになるため、それらデータ或いは1パル
ス目についてこれを判別するための信号或いは情報の付
加は一切不要となる。
As described above, according to the communication method of the embodiment shown in FIG. 12, when separating and demodulating data on the receiving side,
Since it becomes possible to discriminate the first pulse and further discriminate the data 1 and the data 2 based only on the length relation of the data time, a signal or information for discriminating the data or the first pulse. No need to add.

【0048】またこのため、先の図3に例示したシステ
ムにあっても、この図12に示した実施例の通信方法を
採用することで、前記1パルス目判別信号はもとより、
前記信号線4そのものを排除することができるようにな
る。
Therefore, even in the system illustrated in FIG. 3, the communication method of the embodiment shown in FIG.
The signal line 4 itself can be eliminated.

【0049】なお、図12に示した実施例において、デ
ータ1及びデータ2の何れのMSBを「1」とするかは
任意である。送信側と受信側とで、それらデータの変/
復調に関する同一のアルゴリズムが用いられさえすれば
よい。
In the embodiment shown in FIG. 12, which MSB of data 1 or data 2 is set to "1" is arbitrary. Change of the data between the sender and the receiver
The same algorithm for demodulation need only be used.

【0050】また、データの判別を可能とする同実施例
の通信方法が、それらMSBの設定のみによって実現さ
れるとも限らない。要は、データ1及びデータ2の変調
時に、第1及び第2の2つのパルスのオンタイミングか
らオンタイミングまでの時間と、同2つのパルスのオフ
タイミングからオフタイミングまでの時間とで、常にそ
の長短関係が維持されるようなオフセット時間をそれら
データ1及びデータ2の少なくとも一方に与える通信方
法であればよい。
Further, the communication method of the same embodiment which enables the discrimination of data is not always realized only by setting those MSBs. The point is that when modulating data 1 and data 2, the time from the on timing of the first and second pulses to the on timing and the time from the off timing of the two pulses to the off timing are always Any communication method may be used as long as it provides the offset time for at least one of the data 1 and the data 2 such that the long-short relationship is maintained.

【0051】ところで、上述した各実施例は、送信対象
となるデータがデータ1及びデータ2の2つである場合
について述べたものであるが、例えば図13に示すよう
に、各周期のデータ1を、それに対応するデータ2の種
類を識別するためのヘッダとして用いるようにすれば、
3種類以上のデータについてもこれを只1つの信号線を
通じてシリアル送信することが可能となる。
In each of the above embodiments, the data to be transmitted is the data 1 and the data 2, but the data 1 of each cycle is, for example, as shown in FIG. Is used as a header for identifying the type of data 2 corresponding to it,
It is possible to serially transmit data of three or more types through only one signal line.

【0052】すなわち、図13は、ヘッダパルスを用い
る従来の通信方法(図13(a)=図15)と対比し
て、この発明のこうした通信方法(図13(b))を例
示したものであり、図13(b)に示されるように、ヘ
ッダAをデータAの種類を示すためのヘッダデータとし
て用い、ヘッダBをデータBの種類を示すためのヘッダ
データとして用い、ヘッダCをデータCの種類を示すた
めのヘッダデータとして用いるようにすれば、従来の
(1/2)の時間で、A、B、及びCといった異なる3
種類のデータを、しかもそれらデータを互いに識別でき
るかたちでシリアル伝送できるようになる。
That is, FIG. 13 exemplifies such a communication method (FIG. 13B) of the present invention in comparison with a conventional communication method using a header pulse (FIG. 13A = FIG. 15). As shown in FIG. 13B, the header A is used as the header data for indicating the type of the data A, the header B is used as the header data for indicating the type of the data B, and the header C is used as the data C. If it is used as header data to indicate the type of, the time required for the conventional method is (1/2).
It becomes possible to serially transmit various types of data, and in a manner in which the data can be distinguished from each other.

【0053】また、図14は、これもヘッダパルスを用
いる上記従来の通信方法(図14(a)=図15)と対
比して、この発明にかかる通信方法の更に他の実施例を
示したものである。
Further, FIG. 14 shows still another embodiment of the communication method according to the present invention in comparison with the conventional communication method (FIG. 14 (a) = FIG. 15) which also uses a header pulse. It is a thing.

【0054】すなわち該実施例の通信方法では、図14
(b)に示されるように、前記組とする2つのパルスに
対して更に、それらパルスに割り付けるデータ1及びデ
ータ2の組を識別するためのヘッダパルスを別途付加
し、これらヘッダパルスと上記2つのパルスとを組とし
て周期送信するようにしている。同図14(b)におい
て、DA1及びDA2はそれぞれ、Aグループのデータ
1及びデータ2を示し、DB1及びDB2はそれぞれ、
Bグループのデータ1及びデータ2を示し、DC1及び
DC2はそれぞれ、Cグループのデータ1及びデータ2
を示す。なお、各ヘッダパルスHA、HB、及びHCに
ついては、従来の通信方法と同様のものを用いることが
できる。
That is, according to the communication method of the embodiment, FIG.
As shown in (b), a header pulse for identifying a set of data 1 and data 2 to be assigned to these pulses is further added to the two pulses forming the set, and these header pulse and the above 2 are added. Periodically transmitted as a set of two pulses. In FIG. 14B, DA1 and DA2 respectively indicate data 1 and data 2 of the A group, and DB1 and DB2 respectively indicate
Data 1 and data 2 of group B are shown, where DC1 and DC2 are data 1 and data 2 of group C, respectively.
Indicates. The header pulses HA, HB, and HC may be the same as the conventional communication method.

【0055】このように、この図14(b)に示す実施
例の通信方法によれば、従来の通信方法と同じ時間で、
従来の2倍の種類のデータをシリアル伝送することがで
きるようになる。より一般的には、只1つの信号線を通
じて、従来の2の整数倍の、すなわち使用するヘッダパ
ルス数の2倍の種類のデータをシリアル伝送することが
可能となる。
As described above, according to the communication method of the embodiment shown in FIG. 14B, at the same time as the conventional communication method,
It becomes possible to serially transmit twice as many kinds of data as the conventional one. More generally, it becomes possible to serially transmit the data of an integer multiple of 2, that is, twice the number of header pulses to be used, which is the conventional data, through only one signal line.

【0056】なお、上述した各実施例の通信方法が適用
されるシステムは、必ずしも図3、或いは図9に例示し
たようなマルチCPUシステムには限られない。この発
明の通信方法は、PWMデータを用いる全てのシリアル
通信システムへの適用が可能であり、それら適用される
通信システムに対し、その最小限のデータ伝送媒体を介
して最大限のデータ伝送効率、或いは通信速度を保証す
ることができるようになる。
The system to which the communication method of each of the above-described embodiments is applied is not necessarily limited to the multi-CPU system as illustrated in FIG. 3 or FIG. INDUSTRIAL APPLICABILITY The communication method of the present invention can be applied to all serial communication systems using PWM data, and for the communication systems to which they are applied, the maximum data transmission efficiency via the minimum data transmission medium, Alternatively, the communication speed can be guaranteed.

【0057】[0057]

【発明の効果】以上説明したように、この発明にかかる
PWMデータの通信方法よれば、信号線やCPU入出力
ポートの使用効率はもとより、データの伝送効率、或い
は通信速度といった面においても優れた通信性能が得ら
れるようになる。
As described above, according to the PWM data communication method of the present invention, not only the use efficiency of the signal line and the CPU input / output port but also the data transmission efficiency or the communication speed is excellent. Communication performance can be obtained.

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

【図1】この発明にかかるPWMデータの通信方法につ
いてその一実施例を示すタイムチャートである。
FIG. 1 is a time chart showing an embodiment of a PWM data communication method according to the present invention.

【図2】図1に示される実施例の通信方法においてその
データ伝送時間を更に短縮するための送信パルス構築手
法を示すタイムチャートである。
FIG. 2 is a time chart showing a transmission pulse constructing method for further shortening the data transmission time in the communication method of the embodiment shown in FIG.

【図3】図1に示される実施例の通信方法を実現するた
めのシステム構成例を示すブロック図である。
FIG. 3 is a block diagram showing a system configuration example for realizing the communication method of the embodiment shown in FIG.

【図4】図3に示されるシステムの送信側CPUにおい
て実行される送信パルスのパルス幅決定手順を示すフロ
ーチャートである。
4 is a flowchart showing a pulse width determination procedure of a transmission pulse executed by a transmission side CPU of the system shown in FIG.

【図5】図3に示されるシステムの送信側CPUにおい
て実行される送信パルス前半部の構築手順を示すフロー
チャートである。
5 is a flowchart showing a procedure for constructing a first half of a transmission pulse, which is executed by a transmission side CPU of the system shown in FIG.

【図6】図3に示されるシステムの送信側CPUにおい
て実行される送信パルス後半部の構築手順を示すフロー
チャートである。
6 is a flowchart showing a procedure for constructing a latter half of a transmission pulse executed by a transmission side CPU of the system shown in FIG.

【図7】図3に示されるシステムの受信側CPUにおい
て実行される受信パルスによる割り込み処理手順を示す
フローチャートである。
FIG. 7 is a flowchart showing an interrupt processing procedure by a reception pulse, which is executed in the reception side CPU of the system shown in FIG.

【図8】図3に示されるシステムの受信側CPUにおい
て実行されるデータ受信手順を示すフローチャートであ
る。
8 is a flowchart showing a data receiving procedure executed by a receiving side CPU of the system shown in FIG.

【図9】図1に示される実施例の通信方法を実現するた
めの他のシステム構成例を示すブロック図である。
FIG. 9 is a block diagram showing another system configuration example for realizing the communication method of the embodiment shown in FIG.

【図10】図9に示されるシステムの動作例を示すタイ
ムチャートである。
FIG. 10 is a time chart showing an operation example of the system shown in FIG.

【図11】図9に示されるシステムの送信側CPUにお
いて実行される送信パルス前半部の構築手順を示すフロ
ーチャートである。
11 is a flowchart showing a procedure for constructing a first half of a transmission pulse, which is executed by a transmission side CPU of the system shown in FIG.

【図12】この発明にかかるPWMデータの通信方法の
他の実施例を示すタイムチャートである。
FIG. 12 is a time chart showing another embodiment of the PWM data communication method according to the present invention.

【図13】この発明にかかるPWMデータの通信方法と
ヘッダパルスを用いる従来の通信方法とを対比して示す
タイムチャートである。
FIG. 13 is a time chart showing a PWM data communication method according to the present invention and a conventional communication method using a header pulse for comparison.

【図14】この発明にかかるPWMデータの通信方法の
更に他の実施例を示すタイムチャートである。
FIG. 14 is a time chart showing still another embodiment of the PWM data communication method according to the present invention.

【図15】ヘッダパルスを用いる従来の通信方法につい
てその一例を示すタイムチャートである。
FIG. 15 is a time chart showing an example of a conventional communication method using a header pulse.

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

1…送信側CPU、2…受信側CPU、3、4…信号
線、5、6…フリップフロップ、7…信号線、8…イン
バータ、9、10、11…信号線。
1 ... Transmission side CPU, 2 ... Reception side CPU, 3, 4 ... Signal line, 5, 6 ... Flip-flop, 7 ... Signal line, 8 ... Inverter, 9, 10, 11 ... Signal line.

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】複数のデータをパルス幅変調してシリアル
送信し、受信側でそれらデータを分離復調するPWMデ
ータの通信方法であって、 2つのパルスのオンタイミングからオンタイミングまで
の時間に第1のデータを割り付け、同2つのパルスのオ
フタイミングからオフタイミングまでの時間に第2のデ
ータを割り付け、これら2つのパルスを組として周期送
信することを特徴とするPWMデータの通信方法。
1. A PWM data communication method in which a plurality of pieces of data are pulse-width modulated and serially transmitted, and the pieces of data are separated and demodulated on the receiving side, the method being the first from the ON timing of two pulses to the ON timing. 1. A PWM data communication method comprising: allocating 1 data, allocating 2nd data in the time from the off timing of the same two pulses to the off timing, and periodically transmitting these 2 pulses as a set.
【請求項2】前記組とする2つのパルスの先にオンとな
るパルスのパルス幅をT1、後にオンとなるパルスのパ
ルス幅をT3とするとき、前記変調対象とする第1及び
第2のデータの大小関係に基づき、第1のデータ>第2
のデータであれば、前記パルス幅T3を最小パルス幅に
設定し、第1のデータ≦第2のデータであれば、前記パ
ルス幅T1を最小パルス幅に設定する請求項1に記載の
PWMデータの通信方法。
2. When the pulse width of a pulse that is turned on first of the two pulses of the set is T1 and the pulse width of a pulse that is turned on later is T3, the first and second modulation targets are set. 1st data> 2nd based on the magnitude relationship of the data
2. The PWM data according to claim 1, wherein the pulse width T3 is set to the minimum pulse width when the data is the above data, and the pulse width T1 is set to the minimum pulse width when the first data ≦ the second data. Communication method.
【請求項3】前記第1及び第2のデータの変調時に、前
記2つのパルスのオンタイミングからオンタイミングま
での時間と、同2つのパルスのオフタイミングからオフ
タイミングまでの時間とで、常にその長短関係が維持さ
れるようなオフセット時間をそれら第1及び第2のデー
タの少なくとも一方に与え、前記受信側でのデータの分
離復調時、それら時間の長短関係に基づいて前記組とす
る2つのパルスの識別を行う請求項1に記載のPWMデ
ータの通信方法。
3. When modulating the first and second data, the time from the on-timing to the on-timing of the two pulses and the time from the off-timing to the off-timing of the two pulses are always the same. At least one of the first and second data is provided with an offset time such that the length relationship is maintained, and when the data is separated and demodulated on the receiving side, two sets are formed based on the time relationship. The PWM data communication method according to claim 1, wherein the pulse is identified.
【請求項4】前記受信側でのデータの分離復調に、前記
シリアル送信されるパルスの各オンタイミングにて出力
論理レベルが反転する論理回路と、同パルスの各オフタ
イミングにて出力論理レベルが反転する論理回路とを用
いる請求項1に記載のPWMデータの通信方法。
4. A logic circuit in which an output logic level is inverted at each on-timing of the serially transmitted pulse and a output logic level at each off-timing of the same pulse for separating and demodulating data on the receiving side. The PWM data communication method according to claim 1, wherein a logic circuit for inverting is used.
【請求項5】前記周期送信される各第1若しくは第2の
データを各々対応する第2若しくは第1のデータの種類
を識別するためのヘッダとして用いる請求項1に記載の
PWMデータの通信方法。
5. The PWM data communication method according to claim 1, wherein each of the first or second data transmitted cyclically is used as a header for identifying a type of the corresponding second or first data. .
【請求項6】請求項1に記載のPWMデータの通信方法
において、 前記組とする2つのパルスに更に、それらパルスに割り
付ける第1及び第2のデータの組を識別するためのヘッ
ダパルスを別途付加し、これらヘッダパルスと前記2つ
のパルスとを組として周期送信することを特徴とするP
WMデータの通信方法。
6. The PWM data communication method according to claim 1, further comprising a header pulse for identifying the first and second data sets to be assigned to the two pulses, which are included in the set. P is characterized in that the header pulse and the two pulses are periodically transmitted as a set.
Communication method of WM data.
JP19056393A 1993-07-30 1993-07-30 Communication method of PWM data Expired - Fee Related JP3389643B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP19056393A JP3389643B2 (en) 1993-07-30 1993-07-30 Communication method of PWM data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP19056393A JP3389643B2 (en) 1993-07-30 1993-07-30 Communication method of PWM data

Publications (2)

Publication Number Publication Date
JPH0746215A true JPH0746215A (en) 1995-02-14
JP3389643B2 JP3389643B2 (en) 2003-03-24

Family

ID=16260151

Family Applications (1)

Application Number Title Priority Date Filing Date
JP19056393A Expired - Fee Related JP3389643B2 (en) 1993-07-30 1993-07-30 Communication method of PWM data

Country Status (1)

Country Link
JP (1) JP3389643B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101779062A (en) * 2007-06-13 2010-07-14 Sc2N公司 Gearbox position detection
JP2018049451A (en) * 2016-09-21 2018-03-29 株式会社デンソー Time calculation device

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4441871B2 (en) 2005-01-19 2010-03-31 株式会社デンソー Distributed control system and control device thereof

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101779062A (en) * 2007-06-13 2010-07-14 Sc2N公司 Gearbox position detection
JP2010530942A (en) * 2007-06-13 2010-09-16 エッセ・セ2エヌ Transmission position sensor
US8803511B2 (en) 2007-06-13 2014-08-12 Sc2N Gearbox position detection
JP2018049451A (en) * 2016-09-21 2018-03-29 株式会社デンソー Time calculation device

Also Published As

Publication number Publication date
JP3389643B2 (en) 2003-03-24

Similar Documents

Publication Publication Date Title
US4750176A (en) Single-channel communication bus system and station for use in such system
JP3486990B2 (en) Serial communication device
EP0196870B1 (en) Interface circuit for transmitting and receiving data
JP2753915B2 (en) Communication control device
EP0621709A1 (en) Message communication system
JP3389643B2 (en) Communication method of PWM data
JPH0439929B2 (en)
EP0866401B1 (en) Information identification system for identifying response units by a control unit
JPH08256193A (en) Method for automatically matching parameter of interface
JPH0381862A (en) Equipment and method for communication of vehicle-mounted network
US5187720A (en) Synchronous serial communication circuit
US6026094A (en) Digital data bus system including arbitration
JPS61208331A (en) Serial data communication system
US5384778A (en) Communication control apparatus
JPS61270952A (en) Data transmitting system
JPH09116988A (en) In-vehicle communication method
JPH0311701B2 (en)
JPH02260934A (en) Information communication processor
JP2000059403A (en) Data destruction preventing method in multiplex communication device
JP2591452B2 (en) Data receiving circuit
JP2679648B2 (en) Transmission system
JPH06202908A (en) Microcomputer monitoring device
JPS623626B2 (en)
JPH03181246A (en) Multiplex transmission system
JPH01243743A (en) Interface

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees