JPH11243405A - Asynchronous serial communication system - Google Patents

Asynchronous serial communication system

Info

Publication number
JPH11243405A
JPH11243405A JP4562498A JP4562498A JPH11243405A JP H11243405 A JPH11243405 A JP H11243405A JP 4562498 A JP4562498 A JP 4562498A JP 4562498 A JP4562498 A JP 4562498A JP H11243405 A JPH11243405 A JP H11243405A
Authority
JP
Japan
Prior art keywords
transmission
data
master
reception
bus
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
JP4562498A
Other languages
Japanese (ja)
Inventor
Hiroaki Nishimoto
浩秋 西本
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.)
NEC IC Microcomputer Systems Co Ltd
Original Assignee
NEC IC Microcomputer Systems 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 NEC IC Microcomputer Systems Co Ltd filed Critical NEC IC Microcomputer Systems Co Ltd
Priority to JP4562498A priority Critical patent/JPH11243405A/en
Publication of JPH11243405A publication Critical patent/JPH11243405A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To attain miniaturization of chip size of an asynchronous serial communication system by reducing a master and a slave transmission and reception parts into single equipment and making a signal line of a bus format. SOLUTION: This device is composed of a master 1 including a transmission and reception part 1-1, a data processing part 1-2, a master 2 including a transmission and reception part 2-1, a data processing part 2-2, and slaves 3,4 and 5 for communicating with these masters. The slaves 3,4 and 5 are provided with a transmission and reception part 3-1, a peripheral circuit part 3-2, a transmission and reception part 4-1, a peripheral circuit part 4-3 and a transmission and reception part 5-1, a peripheral circuit part 5-2 respectively. Transmission and reception parts in each master and each slave are all constituted of the same functional circuit elements and are incorporated as single structural element respectively, irrespective of the number of corresponding masters or slaves.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は非同期式シリアル通
信方式に関し、特にマスタとスレーブにより形成される
非同期式シリアル通信方式に関する。
The present invention relates to an asynchronous serial communication system, and more particularly, to an asynchronous serial communication system formed by a master and a slave.

【0002】[0002]

【従来の技術】一般に、この種の非同期式シリアル通信
方式としては、上述のように、主として、当該通信方式
を制御する一つ以上のマスタと、複数のスレーブとを含
んで形成されており、2線式を主流にして、前記マスタ
およびスレーブに内蔵されるマイクロコンピュータ等を
含む内部装置相互間におけるデータ通信用として使用さ
れている。通常においては、このように、データの送信
中に、同時にデータ受信をも可能とするために、上記の
2線式による全二重通信ができるように形成されている
が、多くの場合、データ通信運用時においては、データ
送信とデータ受信とを区分けして、半二重通信により運
用しているものが多い。このような従来の非同期式シリ
アル通信方式の1例のシステム構成が図6に示される。
図6に示されるように、当該従来例は、マスタ28およ
び29と、これらのマスタによる通信制御作用を介し
て、対応するマスタとの通信を行うスレーブ30、31
および32とを備えて構成される。
2. Description of the Related Art Generally, as described above, an asynchronous serial communication system of this type mainly includes one or more masters for controlling the communication system and a plurality of slaves. The two-wire system is mainly used for data communication between internal devices including a microcomputer and the like built in the master and the slave. Normally, in order to enable simultaneous data reception during data transmission, the above-described two-wire full-duplex communication is performed. However, in many cases, data is transmitted. In communication operation, data transmission and data reception are often divided and operated by half-duplex communication. FIG. 6 shows a system configuration of an example of such a conventional asynchronous serial communication system.
As shown in FIG. 6, in the conventional example, masters 28 and 29 and slaves 30 and 31 communicating with the corresponding masters through the communication control action of these masters.
And 32.

【0003】マスタ28は、対応するスレーブとの間の
データ送受信を行う送受信部28−1、28−2および
28−3と、制御手段としてのマイクロコンピュータ等
を含むデータ処理部28−4とにより構成されており、
マスタ29は、同様に、対応するスレーブとの間のデー
タ送受信を行う送受信部29−1、29−2および29
−3と、マイクロコンピュータ等を含むデータ処理部2
9−4とにより構成されている。また、スレーブ30
は、対応するマスタとの間のデータ送受信を行う送受信
部30−1および30−2と、制御手段としてのマイク
ロコンピュータを含み、ROM系/RAM系の記憶媒体
が搭載された記憶装置、または受信データを基に他の装
置/システム等を制御する制御部等を含む周辺回路部3
0−3とにより構成されており、同様に、他のスレーブ
31および32においても、それぞれ、同数の送受信部
と周辺回路部により構成されている。なお、非同期式シ
リアル通信方式においては、これらのマスタとスレーブ
との間のデータ送受信は、基本的には、1線式または2
線式の信号線を介して行われているが、上述しているよ
うに、一般的には2線式が主流となっている。しかしな
がら、図6においては、信号線の区別をすることなく簡
略化して単線表示されている。図6より明らかによう
に、本従来例においては、各マスタおよび各スレーブに
は、それぞれ対応するスレーブまたはマスタの数に対応
する数量の送受信部が設けられている。
The master 28 is composed of transmitting / receiving sections 28-1, 28-2 and 28-3 for transmitting and receiving data to and from a corresponding slave, and a data processing section 28-4 including a microcomputer or the like as control means. Is composed of
Similarly, master 29 transmits / receives data to / from a corresponding slave by transmitting / receiving sections 29-1, 29-2 and 29-2
-3 and a data processing unit 2 including a microcomputer and the like
9-4. Also, the slave 30
Includes a transmission / reception unit 30-1 and 30-2 for transmitting and receiving data to and from a corresponding master, and a microcomputer as a control unit, and a storage device having a ROM / RAM storage medium mounted thereon, or a reception device. Peripheral circuit unit 3 including a control unit for controlling other devices / systems based on data
Similarly, each of the other slaves 31 and 32 also includes the same number of transmitting / receiving units and peripheral circuit units. In the asynchronous serial communication system, data transmission and reception between the master and the slave is basically performed by a one-wire system or a two-wire system.
Although this is performed via a wire-type signal line, a two-wire system is generally used as described above. However, in FIG. 6, the signal lines are displayed in a simplified single line without distinction. As is apparent from FIG. 6, in this conventional example, each master and each slave are provided with a corresponding slave or a number of transmitting / receiving units corresponding to the number of masters.

【0004】図6の非同期式シリアル通信方式におい
て、これらのマスタおよびスレーブに含まれる送受信部
の例としては、例えば、特開平05−22261号公報
において、半二重通信に対応する1線式双方向通信と、
全2重通信に対応する2線式双方向通信とを切替えて行
うことのできる双方向通信装置が示されている。なお、
以下においては、当該双方向通信装置を、図6に適合さ
せて名称を送受信部として呼称するものとする。図7
は、当該送受信部の構成を示すブロック図として、マス
タ28に含まれる送受信部28−1を抽出して、その内
部構成を示したブロック図である。なお、他のマスタお
よびスレーブに含まれる送受信部の内部構成も図7のブ
ロック図と同様である。
[0006] In the asynchronous serial communication system shown in FIG. 6, examples of a transmission / reception unit included in the master and the slave are disclosed in, for example, Japanese Patent Application Laid-Open No. 05-22261. Communication and
A bidirectional communication device capable of performing switching between two-wire bidirectional communication and full-duplex communication is shown. In addition,
In the following, the two-way communication device will be referred to as a transmitting / receiving unit in conformity with FIG. FIG.
FIG. 3 is a block diagram showing a configuration of the transmission / reception unit, in which a transmission / reception unit 28-1 included in the master 28 is extracted and an internal configuration thereof is shown. The internal configuration of the transmission / reception unit included in the other masters and slaves is the same as that in the block diagram of FIG.

【0005】図7に示されるように、本従来例の送信部
28−1は、対応するマスタまたはスレーブからのデー
タが受信入力される受信端子48、対応するマスタまた
はスレーブに対するデータが送信出力される送信端子4
9、内部のデータ処理部28−4に対するデータバスが
接続されるデータバス端子50および内部のデータバス
51に対応して、受信データの入力を受けて格納する受
信シフトレジスタ33と、受信シフトレジスタ33に所
定ビット分格納されているデータを、データバス51に
転送出力する受信バッファレジスタ34と、送信端子4
9を介して、格納されている送信データを出力する送信
シフトレジスタ35と、データ処理部28−4より、デ
ータバス51を介して転送されてくる送信用のデータを
受けて、前記送信シフトレジスタ35に出力する送信バ
ッファレジスタ36と、送受信の基本タイミング信号を
生成出力するボーレート・ジェネレータ37と、前記基
本タイミング信号と受信データのスタートビットの入力
を受けて、受信時に受信クロック信号を生成し、受信シ
フトレジスタ33のシフトタイミングを制御する受信ク
ロック制御回路38と、受信クロック制御回路38より
出力される受信クロックの周波数を16分周して、受信
シフトレジスタ33に出力する1/16分周器39と、
送信時に、前記基本タイミング信号の入力を受けて送信
クロックを生成し、送信シフトレジスタ35のシフトタ
イミングを制御する送信クロック制御回路40と、送信
クロック制御回路40より出力される送信クロックの周
波数を16分周して出力する1/16分周器41と、デ
ータ処理部28−4に含まれるマイクロコンピュータ
(図示されない)から、データバス51を介して転送さ
れてくる設定指示により、データの送信要求を指示する
送信要求フラグ42と、受信データの入力を受けて、当
該受信データのスタートビットを検出するスタートビッ
ト検出器43と、前記マイクロコンピュータによる設定
指示により、動作モードをマスタモードまたはスレーブ
モードに切替制御するスレーブ/マスタ切替フラグ44
と、スレーブ/マスタ切替フラグ44によるモード切替
制御に伴ないオン/オフ制御されるスイッチ45と、前
記送信クロック制御回路40より出力される送信クロッ
クの入力を受けて、送信シフトレジスタ35より出力さ
れる送信データに対する、スタートビットまたは当該ス
タートビットの付加または付加禁止を規定する信号を出
力するスタートビット発生器46と、前記マイクロコン
ピュータによる設定指示により、前記スタートビットを
監視し、受信クロック制御回路28および送信クロック
制御回路40を制御する受信許可フラグ47を備えて構
成される。
As shown in FIG. 7, a transmitting section 28-1 of the conventional example has a receiving terminal 48 for receiving and inputting data from a corresponding master or slave, and transmitting and outputting data to the corresponding master or slave. Transmitting terminal 4
9, corresponding to the data bus terminal 50 to which the data bus is connected to the internal data processing unit 28-4 and the internal data bus 51, a reception shift register 33 for receiving and storing received data, A reception buffer register for transferring and outputting predetermined bits of data to the data bus 51;
9, the transmission shift register 35 for outputting the stored transmission data, and the transmission shift register 35 for receiving the transmission data transferred from the data processing unit 28-4 via the data bus 51. 35, a baud rate generator 37 for generating and outputting a basic timing signal for transmission and reception, and receiving the basic timing signal and a start bit of received data to generate a reception clock signal during reception; A reception clock control circuit 38 for controlling the shift timing of the reception shift register 33; and a 1/16 frequency divider for dividing the frequency of the reception clock output from the reception clock control circuit 16 by 16 and outputting to the reception shift register 33 39,
At the time of transmission, a transmission clock is generated in response to the input of the basic timing signal, and a transmission clock control circuit 40 for controlling the shift timing of the transmission shift register 35, and the frequency of the transmission clock output from the transmission clock control circuit 40 is set to 16 A 1/16 frequency divider 41 that divides and outputs the data and a microcomputer (not shown) included in the data processing unit 28-4 issues a data transmission request according to a setting instruction transferred via the data bus 51. , A start bit detector 43 that receives the input of the received data and detects a start bit of the received data, and sets the operation mode to the master mode or the slave mode by the setting instruction by the microcomputer. Slave / master switching flag 44 for switching control
And a switch 45 that is turned on / off in accordance with the mode switching control by the slave / master switching flag 44, and receives a transmission clock output from the transmission clock control circuit 40 and outputs the transmission clock from the transmission shift register 35. A start bit generator 46 for outputting a start bit or a signal for defining the addition or prohibition of the addition of the start bit to the transmission data to be transmitted, and monitoring the start bit in accordance with a setting instruction by the microcomputer; And a reception permission flag 47 for controlling the transmission clock control circuit 40.

【0006】図7において、送受信部28−1の動作モ
ードは、データバス50を介して、スレーブ・マスタ切
替フラグ44に対して転送されてくる、データ処理部2
8−4に含まれる前記マイクロコンピュータからの指示
を受けて設定される。上記のマイクロコンピュータの指
示により、動作モードがマスタモードに設定される場合
には、スタートビット検出器43において検出生成され
るスタートビットの出力が許可されるとともにスイッチ
45がオフとなり、当該スタートビットによる送信クロ
ック制御回路40に対する制御作用は禁止され、受信ク
ロック制御回路38に対する制御作用は許可される動作
状態になる。これにより、マスタモードにおいては、送
信シフトレジスタ35より、送信端子49を介して出力
される送信データは、自身の出力するスタートビットに
同期して出力されるとともに、受信端子47を介して入
力される受信データは、スタートビット検出器43にお
いて検出される受信データのスタートビットに同期し
て、受信シフトレジスタ33に逐次入力される。また、
動作モードがスレーブモードに設定される場合には、ス
イッチ45がオンとなり、前記スタートビットによる送
信クロック制御回路40および受信クロック制御回路3
8に対する制御作用が共に許可されるとともに、スター
トビット発生器46により、送信端子49に対する付加
出力が禁止される状態となる。これにより、スレーブモ
ードにおいては、送信端子49および受信端子48を介
して、それぞれ送信シフトレジスタ35および受信シフ
トレジスタ35にを介して行われるデータの送受信は、
共にスタートビット検出器43より出力される受信デー
タのスタートビットに同期した状態にて行われる。
In FIG. 7, the operation mode of the transmission / reception unit 28-1 is the same as that of the data processing unit 2 transferred to the slave / master switching flag 44 via the data bus 50.
The setting is made in response to an instruction from the microcomputer included in 8-4. When the operation mode is set to the master mode according to the instruction of the microcomputer, the output of the start bit detected and generated by the start bit detector 43 is permitted, and the switch 45 is turned off. The control operation on the transmission clock control circuit 40 is prohibited, and the control operation on the reception clock control circuit 38 is permitted. Thus, in the master mode, the transmission data output from the transmission shift register 35 via the transmission terminal 49 is output in synchronization with the start bit output by the transmission shift register 35, and is also input via the reception terminal 47. The received data is sequentially input to the reception shift register 33 in synchronization with the start bit of the received data detected by the start bit detector 43. Also,
When the operation mode is set to the slave mode, the switch 45 is turned on, and the transmission clock control circuit 40 and the reception clock control circuit 3 based on the start bit are used.
8 and the start bit generator 46 prohibits additional output to the transmission terminal 49. Accordingly, in the slave mode, data transmission and reception performed via the transmission shift register 35 and the reception shift register 35 via the transmission terminal 49 and the reception terminal 48, respectively,
Both are performed in a state synchronized with the start bit of the received data output from the start bit detector 43.

【0007】従って、倒えば、当該マスタ28と、対応
するスレーブ30との間において通信を行う場合におい
て、マスタ28およびスレーブ30の双方において、そ
れぞれマスタモードが設定される場合には、上述の送受
信部における動作機能により、これらのマスタ28とス
レーブ30の間は、2線式双方向シリアル通信が行われ
る動作状態となり、またマスタ28においてマスタモー
ドが設定され、スレーブ30においてスレーブモードが
設定される場合には、1線式双方向シリアル通信が行わ
れる動作状態となる。このことは、マスタ28と、スレ
ーブ31または32との間において通信が行われる場
合、マスタ29と、スレーブ30または31または32
との間において通信が行われる場合においても同様であ
る。
Therefore, if the master 28 and the corresponding slave 30 communicate with each other when the master mode is set in each of the master 28 and the slave 30 when the master 28 and the corresponding slave 30 perform communication, Due to the operation function of the unit, the master 28 and the slave 30 are in an operation state in which two-wire bidirectional serial communication is performed, the master 28 is set in the master mode, and the slave 30 is set in the slave mode. In this case, the operation state is such that one-wire bidirectional serial communication is performed. This means that when communication is performed between the master 28 and the slave 31 or 32, the master 29 and the slave 30 or 31 or 32
The same applies to the case where communication is performed between the server and the server.

【0008】[0008]

【発明が解決しようとする課題】上述した従来の非同期
式シリアル通信方式においては、複数のマスタが存在し
ており、マスタ・スレーブ間において1線式双方向シリ
アル通信を行う場合に、例えば、図6において、マスタ
28とマスタ29の二つのマスタ装置から一つのスレー
ブ30に対して通信が行われる動作状態においては、双
方のマスタのデータ送信要求が競合状態となり、対応す
るスレーブ30においては、当該競合により両マスタか
ら受信されるデータが重畳されて、図8に示されるよう
に、マスタ28より送られてくるデータ(図8(a)参
照)と、マスタ29より送られてくるデータ(図8
(b)参照)は、全く異なるデータ(図8(c)参照)
に変貌する。従って、従来の非同期式シリアル通信方式
においては、マスタ・スレーブ間において、正常な1線
式双方向シリアル通信を保持するためには、1対1の対
応関係にあるマスタとスレーブとの間の通信に限定せざ
る得ないという欠点がある。
In the above-mentioned conventional asynchronous serial communication system, there are a plurality of masters, and when performing one-wire bidirectional serial communication between the master and the slave, for example, as shown in FIG. 6, in an operation state in which communication is performed from the two master devices, the master 28 and the master 29, to one slave 30, the data transmission requests of both masters are in a conflicting state. As shown in FIG. 8, the data received from both masters are superimposed due to contention, and the data sent from master 28 (see FIG. 8A) and the data sent from master 29 (see FIG. 8A). 8
(See (b)) is completely different data (see FIG. 8 (c))
Transform into. Therefore, in the conventional asynchronous serial communication system, in order to maintain normal one-wire bidirectional serial communication between the master and the slave, the communication between the master and the slave in a one-to-one correspondence relationship. However, there is a disadvantage that it must be limited to

【0009】また、各マスタ内には、対応するスレーブ
の数に応じて、同数の送受信部を設けることが必要とな
り、また各スレーブ内においても、対応するマスタの数
に応じて、同数の送受信部を設けることが必要となる。
このために、マスタ内およびスレーブ内の機器構成規模
と、相互間を連結する信号線の数量が徒らに増大し、シ
ステムを形成する半導体チップにおける占有面積が増大
するという欠点がある。
Further, it is necessary to provide the same number of transmitting / receiving units in each master according to the number of corresponding slaves, and the same number of transmitting / receiving units in each slave according to the number of corresponding masters. It is necessary to provide a part.
For this reason, there is a drawback that the device configuration scale in the master and the slave and the number of signal lines connecting them mutually increase, and the occupation area in the semiconductor chip forming the system increases.

【0010】更に、スタートビットを発行する権利がマ
スタに付与されているが、マスタ間に信号線を設けて、
当該マスタ間において非同期式シリアル通信を行う場合
には、相互間において、送受信時におけるデータに対す
る判断基準が明確でないために、通信動作状態として
は、これらのマスタ間における2線式双方向シリアル通
信機能に限定せざるを得ず、従って、マスタ間において
は、1線式双方向シリアル通信を選択して行うことがで
きないという欠点がある。
[0010] Furthermore, although the right to issue a start bit is given to the master, a signal line is provided between the masters.
When asynchronous serial communication is performed between the masters, since the criterion for judging data during transmission and reception is not clear between the masters, the communication operation state is a two-wire bidirectional serial communication function between these masters. Therefore, there is a disadvantage that one-wire bidirectional serial communication cannot be selectively performed between masters.

【0011】[0011]

【課題を解決するための手段】本発明の非同期式シリア
ル通信方式は、少なくとも1つ以上のマスタと、少なく
とも1つ以上のスレーブとを備え、これらのマスタとス
レーブとの間に、データ伝送用として機能する信号線が
連結されて形成される非同期式シリアル通信方式におい
て、前記マスタならびにスレーブに含まれるデータ送受
信手段として、それぞれ同一機能構成の双方向通信機能
を有する単一の送受信手段を、各マスタならびに各スレ
ーブごとに個別に備えることを特徴としている。
According to the present invention, there is provided an asynchronous serial communication system comprising at least one or more masters and at least one or more slaves. In the asynchronous serial communication system formed by connecting signal lines functioning as a single unit, a single transmitting / receiving unit having a bidirectional communication function of the same functional configuration as a data transmitting / receiving unit included in the master and the slave, It is characterized in that it is provided separately for each master and each slave.

【0012】なお、前記信号線としては、前記各マスタ
内の送受信手段および前記各スレーブ内の送受信手段を
相互に連結するデータバス形式により形成し、複数のス
レーブが存在する場合において、当該データバスを介し
て、任意のマスタより前記複数のスレーブに対して、1
線式双方向のデータ送受信を行うことを可能にするとと
もに、複数のマスタが存在する場合において、任意のマ
スタ相互間においても、当該データバスを介して、1線
式双方向のデータ送受信を行うことを可能とするように
してもよい。
The signal line is formed in the form of a data bus for interconnecting the transmitting and receiving means in each of the masters and the transmitting and receiving means in each of the slaves. Via an arbitrary master to the slaves
It is possible to perform line-type bidirectional data transmission and reception, and when there are a plurality of masters, perform one-line bidirectional data transmission and reception between the arbitrary masters via the data bus. May be enabled.

【0013】また、前記送受信手段には、複数のマスタ
より前記データバスに対して送信データが同時に出力さ
れた場合に、自己の送信データと受信されたデータバス
上のデータとを比較照合し、当該比較照合結果を参照し
て、自己からの送信データが、当該データバスを確保す
ることができたか否かを判定するデータビット比較手段
を備えてもよく、また自己の送信データによるデータバ
ス確保が成功した場合には、当該送信成功/失敗設定手
段に「成功」を設定し、当該送信データによるデータバ
ス確保が失敗した場合には、送信成功/失敗保持手段に
「失敗」を設定する送信成功/失敗設定手段を備えるよ
うにしてもよく、また前記データバスの使用状態を検知
することにより当該データバスが使用中であるか否かを
判定し、使用中である場合にはデータ送信を保留し、使
用中でない場合にはデータ送信を開始するように制御作
用を行うバス監視手段を備えておき、データ送信時にお
いては、当該バス監視手段により、送信直前のデータバ
スの使用状態を検知し、その判定結果に応じて、適宜に
データ送信の開始/保留/再送信等を実行するようにし
てもよい。
The transmission / reception means compares and compares own transmission data with data received on the data bus when transmission data is simultaneously output from the plurality of masters to the data bus, Data bit comparing means for determining whether or not the transmission data from itself can secure the data bus with reference to the comparison / collation result may be provided. If the transmission is successful, set “success” in the transmission success / failure setting means. If the data bus reservation by the transmission data fails, set “failure” in the transmission success / failure holding means. A success / failure setting means may be provided, and whether or not the data bus is in use is determined by detecting a use state of the data bus, and Bus monitoring means for suspending data transmission when data transmission is in use and starting data transmission when not in use. The use state of the data bus may be detected, and the start / hold / retransmission of data transmission may be appropriately executed according to the determination result.

【0014】更に、前記送受信手段においては、前記デ
ータバスの使用状態を検知することにより当該データバ
スが使用中であるか否かを判定し、使用中である場合に
はデータ送信を保留し、使用中でない場合にはデータ送
信を開始するように制御作用を行うバス監視手段を備え
ており、データ送信時においては、当該バス監視手段に
より、送信直前のデータバスの使用状態を検知し、その
判定結果に応じて、適宜にデータ送信の開始/保留/再
送信等を実行するとともに、制御手段として機能する所
定のマイクロコンピュータにおいて、プログラムによ
り、データバスが使用中でないことが検知されるまでの
リリース検知時間情報を予め設定しておくことにより、
当該リリース検知時間情報を参照して、自動的にデータ
送信を行うようにしてもよい。
Further, the transmission / reception means determines whether or not the data bus is in use by detecting a use state of the data bus, and suspends data transmission when the data bus is in use, A bus monitoring unit that performs a control operation so as to start data transmission when not in use is provided, and at the time of data transmission, the bus monitoring unit detects the use state of the data bus immediately before transmission, and In accordance with the determination result, the start / hold / retransmission of data transmission is appropriately executed, and a predetermined microcomputer functioning as a control means operates until a program detects that the data bus is not in use by a program. By setting release detection time information in advance,
The data transmission may be automatically performed with reference to the release detection time information.

【0015】[0015]

【発明の実施の形態】次に、本発明について図面を参照
して説明する。
Next, the present invention will be described with reference to the drawings.

【0016】図1は本発明の1実施形態のシステム構成
を示すブロック図であり、図1に示されるように、マス
タ1および2と、これらのマスタによる通信制御作用を
介して、対応するマスタとの通信を行うスレーブ3、4
および5とを備えて構成される。マスタ1は、対応する
スレーブとの間のデータ送受信を行う送受信部1−1
と、制御手段としてのマイクロコンピュータ(図示され
ない)を含むデータ処理部1−2により構成されてお
り、マスタ2は、同様に、対応するスレーブとの間のデ
ータ送受信を行う送受信部2−1と、制御手段としての
マイクロコンピュータ(図示されない)を含むデータ処
理部2−2により構成されている。また、スレーブ3
は、対応するマスタとの間のデータ送受信を行う送受信
部3−1と、制御手段としてのマイクロコンピュータを
含み、ROM系/RAM系の記憶媒体が搭載された記憶
手段、または受信データを基に他の装置/システム等を
制御する制御手段等を含む周辺回路部3−2により構成
され、同様に、他のスレーブ4および5においても、そ
れぞれ、送受信部と周辺回路部により構成されている。
前述の従来例の場合とは異なり、本実施形態において
は、各マスタおよび各スレーブ内の送受信部としては、
相互に対応するマスタおよびスレーブの数に関係なく、
それぞれ単一の送受信部のみを備えて機器構成が簡略化
されており、またマスタとスレーブ間およびマスタ相互
間の信号線もデータバス形式に設定されて、集約化され
ている。1適用例として、例えば、本発明を半導体装置
上において形成される非同期式シリアル通信方式に適用
する場合には、当該半導体チップの小型化を図ることも
可能である。
FIG. 1 is a block diagram showing a system configuration according to an embodiment of the present invention. As shown in FIG. 1, masters 1 and 2 and corresponding masters are controlled through a communication control operation by these masters. Slaves 3 and 4 that communicate with
And 5 are provided. The master 1 transmits and receives data to and from a corresponding slave.
And a data processing unit 1-2 including a microcomputer (not shown) as control means, and the master 2 also has a transmission / reception unit 2-1 for transmitting / receiving data to / from a corresponding slave. , A data processing unit 2-2 including a microcomputer (not shown) as control means. Also, slave 3
Includes a transmission / reception unit 3-1 for transmitting / receiving data to / from a corresponding master, and a microcomputer as a control means, and a storage means having a ROM / RAM storage medium mounted thereon, or based on received data. It is constituted by a peripheral circuit section 3-2 including control means for controlling other devices / systems and the like. Similarly, each of the other slaves 4 and 5 is also constituted by a transmission / reception section and a peripheral circuit section.
Unlike the case of the above-described conventional example, in the present embodiment, the transmitting and receiving units in each master and each slave include:
Regardless of the number of masters and slaves that correspond to each other,
The equipment configuration is simplified by providing only a single transmission / reception unit, and signal lines between the master and the slave and between the masters are also set in a data bus format and integrated. As one application example, for example, when the present invention is applied to an asynchronous serial communication system formed on a semiconductor device, the size of the semiconductor chip can be reduced.

【0017】また、図2は、各マスタおよび各スレーブ
において、共通して設けられている同一構成の送受信部
の1実施例を示すブロック図であり、説明の都合上、図
面表示上は、マスタ1に含まれる送受信部1−1を抽出
して、その内部構成を示したブロック図である。なお、
念のため、他のマスタ2およびスレーブ3−1、4−1
および5−1に含まれる送受信部の内部構成も、図2の
ブロック図と全く同様である。図2に示されるように、
本実施例の送受信部1−1は、受信端子23、送信端子
24、データバス端子25およびデータバス27に対応
して、受信シフトレジスタ6と、受信バッファレジスタ
7と、送信シフトレジスタ8と、送信バッファレジスタ
9と、ポーレート・ジェネレータ10と、受信クロック
制御回路11と、1/16分周器12および14と、送
信クロック制御回路13と、受信許可フラグ15と、送
信要求フラグ16と、スタートビット検出器17と、ス
タートビット発生器18と、スレーブ/マスタ切替フラ
グ19と、ビット比較回路20と、送信成功/失敗フラ
グ21と、バス監視回路22とを備えて構成される。な
お、ビット比較回路20、送信成功/失敗フラグ21お
よびバス監視回路22は、本発明において新たに付加さ
れた回路である。
FIG. 2 is a block diagram showing one embodiment of a transmission / reception unit having the same configuration provided in common for each master and each slave. FIG. 2 is a block diagram illustrating a transmission / reception unit 1-1 included in FIG. In addition,
Just in case, the other master 2 and slaves 3-1 and 4-1
2 and the internal configuration of the transmitting / receiving unit included in 5-1 are exactly the same as those in the block diagram of FIG. As shown in FIG.
The transmission / reception unit 1-1 of this embodiment includes a reception shift register 6, a reception buffer register 7, a transmission shift register 8, and a reception terminal 23, a transmission terminal 24, a data bus terminal 25, and a data bus 27, respectively. A transmission buffer register 9, a rate generator 10, a reception clock control circuit 11, 1/16 frequency dividers 12 and 14, a transmission clock control circuit 13, a reception permission flag 15, a transmission request flag 16, It comprises a bit detector 17, a start bit generator 18, a slave / master switching flag 19, a bit comparison circuit 20, a transmission success / failure flag 21, and a bus monitoring circuit 22. The bit comparison circuit 20, the transmission success / failure flag 21, and the bus monitoring circuit 22 are circuits newly added in the present invention.

【0018】なお、上記の構成内容において、受信シフ
トレジスタ6、受信バッファレジスタ7、送信シフトレ
ジスタ8、送信バッファレジスタ9、ボーレート・ジェ
ネレータ10、受信クロック制御回路11、1/16分
周器12および14、送信クロック制御回路13、受信
許可フラグ15、送信要求フラグ16、スタートビット
検出器17およびスレーブ/マスタ切替フラグ19等の
動作機能は、それぞれ前記従来例の構成内容における、
受信シフトレジスタ33、受信バッファレジスタ34、
送信シフトレジスタ35、送信バッファレジスタ36、
ボーレート・ジェネレータ37、受信クロック制御回路
38、1/16分周器39および41、送信クロック制
御回路40、送信要求フラグ42、スタートビット検出
器43、スレーブ/マスタ切替フラグ44および受信許
可フラグ47等を含む、従来例と同一名称の構成要素の
動作機能については、前述の従来例の場合と同様であ
り、以下においては、前記従来例と共通する各構成要素
の動作機能および関連する動作内容については、重複し
て冗長にわたることを回避するために説明を省略するも
のとし、特に、本発明において新たに付加された特徴の
あるビット比較回路20、送信成功/失敗フラグ21お
よびバス監視回路22に関わる動作内容を主眼として説
明するものとする。
In the above configuration, the reception shift register 6, the reception buffer register 7, the transmission shift register 8, the transmission buffer register 9, the baud rate generator 10, the reception clock control circuit 11, the 1/16 frequency divider 12, The operation functions of a transmission clock control circuit 13, a reception permission flag 15, a transmission request flag 16, a start bit detector 17, a slave / master switching flag 19, and the like are the same as those of the conventional example.
Reception shift register 33, reception buffer register 34,
The transmission shift register 35, the transmission buffer register 36,
Baud rate generator 37, reception clock control circuit 38, 1/16 frequency dividers 39 and 41, transmission clock control circuit 40, transmission request flag 42, start bit detector 43, slave / master switching flag 44, reception permission flag 47, etc. The operation functions of the components having the same names as those of the conventional example are the same as those of the above-described conventional example. In the following, the operation functions of the respective components common to the conventional example and the related operation contents will be described. Are omitted in order to avoid duplication and redundancy. In particular, the bit comparison circuit 20, the transmission success / failure flag 21, and the bus monitoring circuit 22, which are newly added in the present invention, have characteristics. The relevant operation contents will be mainly described.

【0019】本実施形態の動作説明の例としては、始め
に、マスタ1とマスタ2のデータ送信タイミングが一致
しており、スレーブ3に対して、同時にデータが送信出
力される場合について説明するものとする。また、これ
らのマスタ1および2と、スレーブ3に含まれる送受信
部は、前述のように、全て同一構成であるために、当該
送受信部については、全て図2を参照して説明するもの
とする。なお、図3(a)、(b)および(c)、図4
(a)、(b)および(c)、および図5(a)、
(b)および(c)は、それぞれ、上記の動作状態にお
ける8ビットのデータ波形を示す動作タイミング図であ
る。また図3(a)、図4(a)および図5(a)は、
それぞれマスタ1の送信データ、マスタ2の送信データ
およびスレーブ3に受信されるデータを示しており、図
3は、両マスタの送信ビットデータのスタートビットの
タイミングが一致している場合のデータ競合状態を示
し、図4は、両マスタの送信ビットデータのスタートビ
ットのタイミングがずれている場合のデータ競合状態を
示し、図5は、データ競合が回避されている場合の動作
タイミング図を示している。
As an example of the description of the operation of the present embodiment, first, a case will be described in which the data transmission timings of the master 1 and the master 2 match, and data is transmitted and output to the slave 3 at the same time. And Since the transmitting and receiving units included in the masters 1 and 2 and the slave 3 have the same configuration as described above, the transmitting and receiving units will be described with reference to FIG. . 3 (a), 3 (b) and 3 (c), FIG.
(A), (b) and (c), and FIG.
(B) and (c) are operation timing diagrams each showing an 8-bit data waveform in the above operation state. 3 (a), 4 (a) and 5 (a)
FIG. 3 shows transmission data of the master 1, transmission data of the master 2, and data received by the slave 3, respectively. FIG. 3 shows a data race condition when the start bit timings of the transmission bit data of both masters match. FIG. 4 shows a data race condition when the timings of the start bits of the transmission bit data of both masters are shifted, and FIG. 5 shows an operation timing diagram when the data race is avoided. .

【0020】上記のように、マスタ1とマスタ2のデー
タ送信タイミングが一致しているために、マスタ1の送
信データ“11010100”と、マスタ2の送信デー
タ“11101010”のロウレベルのスタートビット
Sのタイミングも一致している(図3(a)および
(b)参照)。マスタ1およびマスタ2において、スレ
ーブ3に対するデータ送信が発生すると、図2におい
て、両マスタのデータのスタートビットSが、それぞれ
スタートビット検出器17において検出されて、マスタ
1およびマスタ2からのスレーブ3に対するデータ送信
が開始され、またスレーブ3においてはデータ受信が開
始される。当該スタートビットSに続いて、両マスタか
らは、図3(a)および(b)に示されるように、送信
シフトジスタ8内のビットデータ#1が送信出力される
が、その際には、受信端子23を介して入力されるデー
タバス上のデータ“1”は、受信シフトレジスタ6に格
納されるとともに、受信シフトレジスタ6を介してビッ
ト比較回路20に入力される。
As described above, since the data transmission timings of the master 1 and the master 2 match, the low-level start bit S of the transmission data “11010100” of the master 1 and the transmission data “111101010” of the master 2 The timings also match (see FIGS. 3A and 3B). When data transmission to the slave 3 occurs in the master 1 and the master 2, the start bit S of the data of both masters is detected by the start bit detector 17 in FIG. , And the slave 3 starts data reception. Following the start bit S, the bit data # 1 in the transmission shift register 8 is transmitted and output from both masters as shown in FIGS. 3A and 3B. The data “1” on the data bus input via the terminal 23 is stored in the reception shift register 6 and is also input to the bit comparison circuit 20 via the reception shift register 6.

【0021】ここにおいて、本発明によるビット比較回
路20および送信成功/失敗フラグ21にかかわる動作
について、その要点を、前記動作例に先行して註釈的に
説明しておくものとする。本発明において、ビット比較
回路20においては、送信シフトレジスタ8より送信出
力されたデータビットと、受信シフトレジスタ6より入
力されたビットデータとがビット単位レベルにおいて比
較照合され、両データが一致しているか否かが判定され
る。当該比較結果において、前記送信データと受信デー
タの全てのビットが相互に一致している場合には、当該
送信データが、対応するデータバスを介して、他のマス
タの送信データと競合することなく、正常状態において
送信することができたものであると判定されて、その判
定結果は、「成功」として送信成功/失敗フラグ21に
設定され、データの送信が継続して行われる。また、比
較結果において、送信データと受信データの全てのビッ
トが一致していない場合には、受信シフトレジスタ6に
受信入力された前記受信データは、他のマスタからの送
信データであるものと判定されて、ビット比較回路20
より、送信クロック制御回路13に対して送信停止の制
御信号が送出され、当該マスタからのデータ送信が停止
されてデータバスはリリースされて、ビット比較回路2
0による判定結果は、「失敗」として送信成功/失敗フ
ラク21に設定される。このことは、マスタ2における
送受信部2−1においても全く同様である。従って、本
実施形態においては、複数のマスタより、同時にデータ
が送信出力される動作状態においても、当該マスタ内の
送受信部内にビット比較回路を設け、当該ビット比較回
路により、送信データと受信されるデータバス上のデー
タ信号とが同一データであるか否かを判定することによ
り、データバスにおける不要のデータ競合状態が回避さ
れ、非同期式シリアル通信を正常に維持することができ
る。
Here, the operation of the bit comparison circuit 20 and the transmission success / failure flag 21 according to the present invention will be briefly described prior to the operation example. In the present invention, in the bit comparison circuit 20, the data bits transmitted and output from the transmission shift register 8 and the bit data input from the reception shift register 6 are compared and collated on a bit-by-bit level. Is determined. In the comparison result, when all bits of the transmission data and the reception data match each other, the transmission data does not compete with the transmission data of another master via the corresponding data bus. Is determined to have been successfully transmitted in the normal state, the determination result is set to the transmission success / failure flag 21 as “success”, and data transmission is continuously performed. When all bits of the transmission data and the reception data do not match in the comparison result, it is determined that the reception data received and input to the reception shift register 6 is transmission data from another master. The bit comparison circuit 20
As a result, a transmission stop control signal is sent to the transmission clock control circuit 13, the data transmission from the master is stopped, the data bus is released, and the bit comparison circuit 2
A determination result of 0 is set in the transmission success / failure flag 21 as “failure”. This is exactly the same in the transmission / reception unit 2-1 in the master 2. Therefore, in the present embodiment, even in an operation state in which data is simultaneously transmitted and output from a plurality of masters, a bit comparison circuit is provided in the transmission / reception unit in the master, and the transmission data is received by the bit comparison circuit. By judging whether or not the data signal on the data bus is the same data, unnecessary data race condition on the data bus is avoided, and the asynchronous serial communication can be normally maintained.

【0022】上述の両スタートビットSが、図3(a)
および(b)に示されるように同一タイミングの動作例
においては、マスタ1および2より送信出力されるビッ
トデータ#1が双方とも“1”であり一致しているの
で、両マスタにおいては、ビット比較回路20において
データバスが確保され、送信成功であるものと判定され
て、送信が継続して行われる。そして、受信動作状態に
あるスレーブ3においては、送受信部3−1の受信端子
23を介して当該ビットデータ“1”が受信入力され、
受信シフトレジスタ6に格納される。なお、この動作状
態においては、受信動作状態にあるスレーブ装置3の送
受信部3−1において、ビット比較回路20は稼働しな
い。このことは、図3(a)および(b)に示されるよ
うに、ビットデータ#2が送信出力されるタイミングに
おいても同様であり、両マスタの送信データのビットが
同一であるために、上記と同様の動作状態となる。しか
し、ビットデータ#3が送信出力されるタイミングにお
いては、マスタ1からは、データビット“0”が送信出
力され、マスタ2からは、データビット“1”が送信出
力される。この場合には、上述のように、両送信データ
が同一のタイミングであるために、データバス上の送信
データのデータビットは論理積がとられて“0”とな
り、これを受けて、マスタ1においては、ビット比較回
路20により送信成功と判定されて送信動作が継続して
行われ、またマスタ2においては、ビット比較回路20
により、送信失敗と判定されて送信が停止されて、マス
タ1の送信データがスレーブ3において受信される動作
状態となる。そして、この動作状態以降においては、マ
スタ1からの送信データが、全てスレーブ3において受
信される動作状態となり、非同期式シリアル通信が正常
に維持されて、スレーブ3においては、図3(c)に示
されるように、マスタ1からの送信データ“11010
100”が正常データとして受信される。
The two start bits S described above correspond to FIG.
As shown in (b) and (b), in the operation example at the same timing, the bit data # 1 transmitted and output from the masters 1 and 2 are both "1" and coincide with each other. The comparison circuit 20 secures the data bus, determines that the transmission was successful, and continues the transmission. Then, in the slave 3 in the reception operation state, the bit data “1” is received and input via the reception terminal 23 of the transmission / reception unit 3-1.
It is stored in the reception shift register 6. In this operation state, the bit comparison circuit 20 does not operate in the transmission / reception unit 3-1 of the slave device 3 in the reception operation state. This is the same as shown in FIGS. 3A and 3B at the timing of transmitting and outputting the bit data # 2. Since the bits of the transmission data of both masters are the same, The operation state is the same as that of. However, at the timing when bit data # 3 is transmitted and output, data bit “0” is transmitted and output from master 1, and data bit “1” is transmitted and output from master 2. In this case, as described above, since both transmission data have the same timing, the data bit of the transmission data on the data bus is logically ANDed to “0”, and in response to this, the master 1 , The transmission is determined to be successful by the bit comparison circuit 20 and the transmission operation is continuously performed.
As a result, the transmission is determined to be unsuccessful, the transmission is stopped, and the slave 3 enters the operation state in which the transmission data of the master 1 is received. After this operation state, all the transmission data from the master 1 is received by the slave 3, and the asynchronous serial communication is normally maintained. As shown, the transmission data “11010” from the master 1
100 "is received as normal data.

【0023】また、本発明においては、バス監視回路2
2により、データ送信直前におけるデータバス上のデー
タ状態を検知することによって、当該データバスが使用
中であるか否かの判定が行われており、データバスが使
用中でない場合にはデータ送信が開始され、また使用中
である場合にはデータの送信は保留される。そして、送
信開始保留後において、信号線監視回路22によりデー
タバスのリリース状態が判定されると、再度データ送信
が再開される。なお、このバス監視回路22による制御
機能としては、例えば、マスタ装置1の場合、送受信部
内のデータバス27を介して、データ処理部1−2に含
まれる制御手段として機能するマイクロコンピュータ
(図示されない)において、プログラムにより信号線リ
リースが検知されるまでの時間を予め設定しておくこと
により、当該信号線監視回路22を介して、自動的に信
号線リリースが検知することが可能となり、これによ
り、自動的にマスタ装置1からのデータ送信を行うよう
にすることができる。このことは、マスタ装置2の送受
信部2−1においても同様であり、またスレーブ装置
3、4および5における送受信部3−1、4−1および
5−1においても同様である。従って、本実施形態にお
いては、1線式非同期通信時において、複数のマスタ装
置が存在する場合においても、任意のスレーブ装置に対
して適宜に通信を行うことが可能な、1線式非同期通信
システムを構成することが可能となる。
In the present invention, the bus monitoring circuit 2
By detecting the state of the data on the data bus immediately before the data transmission, it is determined whether or not the data bus is in use. If the data bus is not in use, the data transmission is stopped. Data transmission is suspended if it is started and in use. Then, after the transmission start is suspended, when the signal line monitoring circuit 22 determines the release state of the data bus, the data transmission is restarted again. As a control function of the bus monitoring circuit 22, for example, in the case of the master device 1, a microcomputer (not shown) functioning as a control unit included in the data processing unit 1-2 via the data bus 27 in the transmission / reception unit In), by setting in advance the time until the signal line release is detected by the program, it is possible to automatically detect the signal line release via the signal line monitoring circuit 22. , The data transmission from the master device 1 can be automatically performed. This is the same in the transmission / reception unit 2-1 of the master device 2 and also in the transmission / reception units 3-1 4-1 and 5-1 of the slave devices 3, 4 and 5. Therefore, in the present embodiment, in the one-wire asynchronous communication, even when there are a plurality of master devices, the one-wire asynchronous communication system can appropriately communicate with any slave device. Can be configured.

【0024】このバス監視回路22の動作機能に関連し
て、各マスタのデータ送信タイミングが、微妙に前後し
ている場合の動作について説明する。動作例としては、
マスタ1においてデータ送信が開始され、続いてマスタ
2よりデータ送信が開始され場合について、当該マスタ
2における動作につき説明するものとする。マスタ2に
おいては、送信開始時に当って、まず送受信部に設けら
れた送信要求フラグ16より所定の送信要求信号がバス
監視回路22に伝達され、これを受けて、バス監視回路
22においては、受信端子23における受信データの状
態が検知され、データバスか使用可能であるか否かが判
定される。この時点においては、受信端子23における
受信状態としては、マスタ1からのロウレベルのスター
トビットSの入力を受けて“0”となっており、これに
より、バス監視回路22によって、対応するデータバス
がバスリリース状態にはなく、マスタ1により占有され
て使用中であるものと判定され、データバスがリリース
状態になるまでの間、データ送信の開始が保留される。
従って、この場合においては、図4(a)、(b)およ
び(c)に示されるように、マスタ1からのデータが、
そのまま送信されてスレーブ3において受信される。そ
して、データバスがリリース状態になった時点におい
て、バス監視回路22より送信クロック回路13に送信
要求信号が入力されて、データ送信が開始される。この
ことは、マスタ2により送信開始が先行される場合にお
いても同様であり、この場合には、マスタ2からの送信
データがスレーブ3に伝達される。従って、本発明にお
いては、送受信部内にバス監視回路22を設けることに
より、データ送信時に当って、受信端子におけるデータ
受信状態を監視することにより、未然にデータバスにお
けるデータ競合状態を回避することが可能となる。
In connection with the operation function of the bus monitoring circuit 22, an operation in the case where the data transmission timing of each master slightly fluctuates will be described. As an operation example,
The operation in the master 2 when data transmission is started in the master 1 and subsequently data transmission is started in the master 2 will be described. At the start of transmission, the master 2 first transmits a predetermined transmission request signal to the bus monitoring circuit 22 from the transmission request flag 16 provided in the transmission / reception unit. The state of the received data at the terminal 23 is detected, and it is determined whether or not the data bus can be used. At this time, the receiving state at the receiving terminal 23 is “0” in response to the input of the low-level start bit S from the master 1, whereby the corresponding data bus is set by the bus monitoring circuit 22. It is determined that the bus is not in the bus release state, but is occupied and in use by the master 1, and the start of data transmission is suspended until the data bus enters the release state.
Accordingly, in this case, as shown in FIGS. 4A, 4B and 4C, the data from the master 1 is
The data is transmitted as it is and received by the slave 3. When the data bus enters the release state, a transmission request signal is input from the bus monitoring circuit 22 to the transmission clock circuit 13, and data transmission is started. The same applies to the case where the transmission start is preceded by the master 2. In this case, the transmission data from the master 2 is transmitted to the slave 3. Therefore, in the present invention, by providing the bus monitoring circuit 22 in the transmission / reception unit, it is possible to avoid a data race condition on the data bus beforehand by monitoring the data reception state at the reception terminal during data transmission. It becomes possible.

【0025】図5(a)、(b)および(c)は、マス
タ1によるデータ送信が開始され、そのスタートビット
Sが送信出力されている状態において、マスタ2におい
て、当該スタートビットの検出後に、データ送信を開始
しようとした場合の動作例に対応するタイミング図であ
る。なお、図5における時間t1 、t2 およびt3 の関
係は、t1 =t2 、t3 =2t1 である。この場合にお
いては、マスタ1よりスタートビットSが送信出力さ
れ、マスタ2においては、前述のように、バス監視回路
22による判定により送信開始は保留され、同時に、マ
スタ1のスタートビットSはスタートビット検出器17
において検出される。そして当該スタートビットの検出
後の時間t1 の間において、マスタ2においては、デー
タ送信を開始するために送信要求フラグ16が設定さ
れ、送信要求フラグ16の設定を受けて、バス監視回路
22においては送信準備が開始される。しかしながら、
引続き、時間t1 経過後における時間t2 の間におい
て、再度マスタ1から送信出力されるスタートビットS
が検出されるために、当該スタートビットSの検出後、
更に時間t3 の間、データ送信の開始が保留される。そ
して、当該時間t3 の経過後において、マスタ2のバス
監視回路22によりバスリリース状態が検知され、デー
タバスに対して、データ送信が開始される。なお、この
際には、データ処理部2−2に含まれる制御用のマイク
ロコンピュータにおいて、プラグラムにより、予めバス
リリースまでの所要時間情報が設定されている場合に
は、送受信部内のデータバス27を介して、データ処理
部2−2より伝達されてくる当該時間情報を参照して、
自動的に効率よくデータ送信の開始を行うことも可能で
ある、
FIGS. 5A, 5B and 5C show a state in which data transmission by the master 1 has been started and the start bit S has been transmitted and output, and the master 2 has detected the start bit. FIG. 7 is a timing chart corresponding to an operation example when data transmission is to be started. Note that the relationship between the times t 1 , t 2 and t 3 in FIG. 5 is t 1 = t 2 and t 3 = 2t 1 . In this case, the start bit S is transmitted and output from the master 1, and the transmission start is suspended in the master 2 according to the determination by the bus monitor circuit 22, as described above. Detector 17
Is detected. Then, during a time t 1 after the detection of the start bit, the master 2 sets the transmission request flag 16 to start data transmission. Is ready for transmission. However,
Subsequently, during the time t 2 at time t 1 after the start bit S to be transmitted output from the master 1 again
Is detected, after the start bit S is detected,
During the addition time t 3, the start of the data transmission is suspended. Then, after the elapse of the time t 3, the bus release state is detected by the bus monitoring circuit 22 of the master 2, and data transmission to the data bus is started. In this case, in the control microcomputer included in the data processing unit 2-2, if the time required until the bus release is set in advance by a program, the data bus 27 in the transmission / reception unit is set. With reference to the time information transmitted from the data processing unit 2-2 via the
It is also possible to start the data transmission automatically and efficiently,

【0026】[0026]

【発明の効果】以上説明したように、本発明は、マスタ
ならびにスレーブのデータ送受信手段に対して、自己の
送信ビットとデータバス上のデータをビットレベルにて
比較照合して、データバスのリリース状態を判定するビ
ット比較手段と、データバスより受信されるデータの状
態を監視して、送信開始の可否を判定するバス監視手段
と、送信データによるデータバス確保の成否を設定する
送信成功/失敗フラグを付加するとともに、マスタ間お
よびマスタ・スレーブ間の信号線をデータバス化するこ
とにより、任意のマスタとスレーブ間において、双方向
シリアル通信を行うことができるという効果が得られる
とともに、マスタおよびスレーブ内の送受信手段の数を
単一化することか可能となり、装置構成規模を縮小化す
ることができるという効果がある。
As described above, according to the present invention, the data transmission / reception means of the master and the slave compare and compare their own transmission bit and data on the data bus at the bit level, and release the data bus. Bit comparison means for judging the state, bus monitoring means for monitoring the state of data received from the data bus to judge whether transmission can be started, and transmission success / failure for setting success or failure of securing the data bus by transmission data By adding a flag and making the signal line between the master and the master-slave a data bus, it is possible to obtain the effect that bidirectional serial communication can be performed between any master and slave. If the number of transmission / reception means in the slave can be unified, it is possible to reduce the device configuration scale There is a cormorant effect.

【0027】また、当該効果に派生して、半導体装置に
より装置構成する場合には、半導チップサイズの小型化
を図ることができるという効果がある。
In addition, when the device is constituted by a semiconductor device, there is an effect that the size of the semiconductor chip can be reduced.

【0028】更に、本発明においては、送受信手段内
に、上記の付加手段を設けることにより、マスタ間にお
いても、非同期式シリアル通信を行うことが可能になる
という効果がある。
Further, in the present invention, by providing the above-mentioned additional means in the transmitting / receiving means, there is an effect that asynchronous serial communication can be performed between masters.

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

【図1】本発明の1実施形態のシステム構成を示すブロ
ック図である。
FIG. 1 is a block diagram showing a system configuration according to an embodiment of the present invention.

【図2】本実施形態のマスタ装置/スレーブ装置に含ま
れる送受信部の1実施例を示すブロック図である。
FIG. 2 is a block diagram illustrating an example of a transmission / reception unit included in a master device / slave device of the present embodiment.

【図3】前記1実施例におけるデータ競合状態を示すタ
イミング図(1)である。
FIG. 3 is a timing chart (1) showing a data race condition in the first embodiment.

【図4】前記1実施例におけるデータ競合状態を示すタ
イミング図(2)である。
FIG. 4 is a timing chart (2) showing a data race condition in the first embodiment.

【図5】前記1実施例におけるデータ競合状態を示すタ
イミング図(3)である。
FIG. 5 is a timing chart (3) showing a data race condition in the first embodiment.

【図6】従来例のシステム構成を示すブロック図であ
る。
FIG. 6 is a block diagram showing a system configuration of a conventional example.

【図7】従来例におけるデータ競合状態を示すタイミン
グ図である。
FIG. 7 is a timing chart showing a data race condition in a conventional example.

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

1、2、28、29 マスタ 1−1、2−1、3−1、4−1、5−1、28−1〜
28−3、29−1〜19−3、30−1、30−2、
31−1、31−2、32−1、32−2送受信部 1−2、2−2、28−4、29−4 データ処理部 3、4、5、30、31、32 スレーブ 3−2、4−2、5−2、30−3、31−3、32−
3 周辺回路部 6、33 受信シフトレジスタ 7、34 受信バッファレジスタ 8、35 送信シフトレジスタ 9、36 送信バッファレジスタ 10、37 ボーレート・ジェネレータ 11、38 受信クロック制御回路 12、14、39、41 1/16分周器 13、40 送信クロック制御回路 15、47 受信許可フラグ 16、42 送信要求フラグ 17、43 スタートビット検出器 18、46 スタートビット発生器 19、44 スレーブ/マスタ切替フラグ 20 ビット比較回路 21 送信成功/失敗フラグ 22 バス監視回路 23、48 受信端子 24、49 送信端子 25、50 データバス端子 27、51 データバス 45 スイッチ
1,2,28,29 Master 1-1,2-1,3-1,4-1,5-1,28-1
28-3, 29-1 to 19-3, 30-1, 30-2,
31-1, 31-2, 32-1, 32-2 transmitting / receiving section 1-2, 2-2, 28-4, 29-4 data processing section 3, 4, 5, 30, 31, 32 slave 3-2 , 4-2, 5-2, 30-3, 31-3, 32-
3 Peripheral circuit section 6, 33 Reception shift register 7, 34 Reception buffer register 8, 35 Reception shift register 9, 36 Transmission buffer register 10, 37 Baud rate generator 11, 38 Reception clock control circuit 12, 14, 39, 411 / 16 frequency divider 13, 40 Transmission clock control circuit 15, 47 Reception permission flag 16, 42 Transmission request flag 17, 43 Start bit detector 18, 46 Start bit generator 19, 44 Slave / master switching flag 20 Bit comparison circuit 21 Transmission success / failure flag 22 Bus monitoring circuit 23, 48 Reception terminal 24, 49 Transmission terminal 25, 50 Data bus terminal 27, 51 Data bus 45 Switch

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 少なくとも1つ以上のマスタと、少なく
とも1つ以上のスレーブとを備え、これらのマスタとス
レーブとの間に、データ伝送用として機能する信号線が
連結されて形成される非同期式シリアル通信方式におい
て、 前記マスタならびにスレーブに含まれるデータ送受信手
段として、それぞれ同一機能構成の双方向通信機能を有
する単一の送受信手段を、各マスタならびに各スレーブ
ごとに個別に備えることを特徴とする非同期式シリアル
通信方式。
1. An asynchronous system comprising at least one or more masters and at least one or more slaves, wherein a signal line functioning as a data transmission is connected between the master and the slaves. In the serial communication system, as the data transmitting / receiving means included in the master and the slave, a single transmitting / receiving means having a bidirectional communication function having the same functional configuration is individually provided for each master and each slave. Asynchronous serial communication method.
【請求項2】 前記信号線が、前記各マスタ内の送受信
手段および前記各スレーブ内の送受信手段を相互に連結
するデータバス形式により形成され、複数のスレーブが
存在する場合において、当該データバスを介して、任意
のマスタより前記複数のスレーブに対して、1線式双方
向のデータ送受信を行うことを可能にするとともに、複
数のマスタが存在する場合において、任意のマスタ相互
間においても、当該データバスを介して、1線式双方向
のデータ送受信を行うことを可能とする請求項1記載の
非同期式シリアル通信方式。
2. The signal line is formed in the form of a data bus for interconnecting transmission / reception means in each of the masters and transmission / reception means in each of the slaves. Through a single-wire bidirectional data transmission / reception from any master to the plurality of slaves, and when there is a plurality of masters, the 2. The asynchronous serial communication system according to claim 1, wherein one-wire bidirectional data transmission / reception can be performed via a data bus.
【請求項3】 前記送受信手段が、複数のマスタより前
記データバスに対して送信データが同時に出力された場
合に、自己の送信データと受信されたデータバス上のデ
ータとを比較照合し、当該比較照合結果を参照して、自
己からの送信データが、当該データバスを確保すること
ができたか否かを判定するデータビット比較手段を備え
ることを特徴とする請求項2記載の非同期式シリアル通
信方式。
3. The transmission / reception means, when transmission data is simultaneously output from a plurality of masters to the data bus, compares and compares its own transmission data with the data on the received data bus. 3. The asynchronous serial communication according to claim 2, further comprising a data bit comparing unit that determines whether or not the transmission data from itself can secure the data bus by referring to the comparison and collation result. method.
【請求項4】 前記送受信手段が、自己の送信データに
よるデータバス確保が成功した場合には、当該送信成功
/失敗設定手段に「成功」を設定し、当該送信データに
よるデータバス確保が失敗した場合には、送信成功/失
敗保持手段に「失敗」を設定する送信成功/失敗設定手
段を備えることを特徴とする請求項2または請求項3記
載の非同期式シリアル通信方式。
4. The transmission / reception means sets "success" in the transmission success / failure setting means when the data bus is secured by its own transmission data, and the data bus securing by the transmission data fails. 4. The asynchronous serial communication system according to claim 2, further comprising a transmission success / failure setting means for setting "failure" in the transmission success / failure holding means in the case.
【請求項5】 前記送受信手段が、前記データバスの使
用状態を検知することにより当該データバスが使用中で
あるか否かを判定し、使用中である場合にはデータ送信
を保留し、使用中でない場合にはデータ送信を開始する
ように制御作用を行うバス監視手段を備えており、デー
タ送信時においては、当該バス監視手段により、送信直
前のデータバスの使用状態を検知し、その判定結果に応
じて、適宜にデータ送信の開始/保留/再送信等を実行
することを特徴とする請求項2または請求項3または請
求項4記載の非同期式シリアル通信方式。
5. The transmission / reception means judges whether or not the data bus is in use by detecting a use state of the data bus. If the data bus is in use, data transmission is suspended, and A bus monitoring unit that performs a control operation so as to start data transmission when the data transmission is not being performed; and when the data is transmitted, the bus monitoring unit detects a use state of the data bus immediately before the transmission, and determines the state. 5. The asynchronous serial communication system according to claim 2, wherein start / hold / retransmission of data transmission is appropriately performed according to a result.
【請求項6】 前記送受信手段が、前記データバスの使
用状態を検知することにより当該データバスが使用中で
あるか否かを判定し、使用中である場合にはデータ送信
を保留し、使用中でない場合にはデータ送信を開始する
ように制御作用を行うバス監視手段を備えており、デー
タ送信時においては、当該バス監視手段により、送信直
前のデータバスの使用状態を検知し、その判定結果に応
じて、適宜にデータ送信の開始/保留/再送信等を実行
するとともに、制御手段として機能する所定のマイクロ
コンピュータにおいて、プログラムにより、データバス
が使用中でないことが検知されるまでのリリース検知時
間情報を予め設定しておくことにより、当該リリース検
知時間情報を参照して、自動的にデータ送信を開始する
ことを特徴とする請求項2または請求項3または請求項
4記載の非同期式シリアル通信方式。
6. The transmission / reception means judges whether or not the data bus is in use by detecting the use state of the data bus. If the data bus is in use, the data transmission is suspended, and A bus monitoring unit that performs a control operation so as to start data transmission when the data transmission is not being performed; and when the data is transmitted, the bus monitoring unit detects a use state of the data bus immediately before the transmission, and determines the state. In accordance with the result, the start / hold / retransmission of data transmission is appropriately executed, and the release until the data bus detects that the data bus is not in use by a predetermined microcomputer which functions as a control means. By setting detection time information in advance, data transmission is automatically started with reference to the release detection time information. 5. The asynchronous serial communication system according to claim 2, claim 3, or claim 4.
JP4562498A 1998-02-26 1998-02-26 Asynchronous serial communication system Pending JPH11243405A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4562498A JPH11243405A (en) 1998-02-26 1998-02-26 Asynchronous serial communication system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4562498A JPH11243405A (en) 1998-02-26 1998-02-26 Asynchronous serial communication system

Publications (1)

Publication Number Publication Date
JPH11243405A true JPH11243405A (en) 1999-09-07

Family

ID=12724537

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4562498A Pending JPH11243405A (en) 1998-02-26 1998-02-26 Asynchronous serial communication system

Country Status (1)

Country Link
JP (1) JPH11243405A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009063853A1 (en) * 2007-11-12 2009-05-22 Nec Corporation Intra/inter chip communication circuit, communication method, and three-dimensional lsi device
US7656826B2 (en) 2004-07-28 2010-02-02 Aisin Seiki Kabushiki Kaisha Terminal control system
KR101045064B1 (en) * 2009-09-30 2011-06-28 남성기전 주식회사 Control system and method of signal transmission thereof
CN115225423A (en) * 2022-07-22 2022-10-21 四川灵通电讯有限公司 Two-wire system inter-device communication method based on polarity Manchester code

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7656826B2 (en) 2004-07-28 2010-02-02 Aisin Seiki Kabushiki Kaisha Terminal control system
WO2009063853A1 (en) * 2007-11-12 2009-05-22 Nec Corporation Intra/inter chip communication circuit, communication method, and three-dimensional lsi device
KR101045064B1 (en) * 2009-09-30 2011-06-28 남성기전 주식회사 Control system and method of signal transmission thereof
CN115225423A (en) * 2022-07-22 2022-10-21 四川灵通电讯有限公司 Two-wire system inter-device communication method based on polarity Manchester code
CN115225423B (en) * 2022-07-22 2023-09-26 四川灵通电讯有限公司 Two-wire system device-to-device communication method based on polar Manchester code

Similar Documents

Publication Publication Date Title
US4739323A (en) Serial data bus for serial communication interface (SCI), serial peripheral interface (SPI) and buffered SPI modes of operation
US5506965A (en) Microcomputer incorporating communication device
US20100067404A1 (en) Cluster coupler unit and method for synchronizing a plurality of clusters in a time-triggered network
EP0246666B1 (en) Serial data bus for different modes of operation (SCI, SPI and buffered SPI) and methods for a serial peripheral interface in a serial data bus
JPH11243405A (en) Asynchronous serial communication system
US5729701A (en) Method and arrangement to control a data network
US6490293B1 (en) Serial data communication bus system
JP3459075B2 (en) Synchronous serial bus method
JP2502030B2 (en) Synchronizer for a synchronous data processing system.
JPS59161956A (en) Transmission controller
JP3154626B2 (en) Serial transmission device
JP2538682B2 (en) Reference clock source automatic switching method
JP2941266B1 (en) Encoder data output method for bus communication type encoder device
JP2508487B2 (en) Data transmission system
US20020163370A1 (en) Operating method for a data bus
JPS61277241A (en) Communication system for radio communication network system
JP3906373B2 (en) Clock synchronous bus board
JPS6074848A (en) Serial data transfer system
JP3133733B2 (en) Data transmission control system
JP2615815B2 (en) Priority control method
JP2002041448A (en) Bus system
JPS6238637A (en) Control system for transmission in multi-drop
JPH07101877B2 (en) Terminal device
JPS62123541A (en) Control system for reception data buffer
JPS6219099B2 (en)

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20010109