JPH01259643A - Serial communication circuit - Google Patents

Serial communication circuit

Info

Publication number
JPH01259643A
JPH01259643A JP63086600A JP8660088A JPH01259643A JP H01259643 A JPH01259643 A JP H01259643A JP 63086600 A JP63086600 A JP 63086600A JP 8660088 A JP8660088 A JP 8660088A JP H01259643 A JPH01259643 A JP H01259643A
Authority
JP
Japan
Prior art keywords
circuit
clock
serial
serial transfer
data
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
JP63086600A
Other languages
Japanese (ja)
Other versions
JPH0671254B2 (en
Inventor
Makoto Izume
井爪 誠
Makoto Shinohara
誠 篠原
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.)
Toshiba Corp
Original Assignee
Toshiba Corp
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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP63086600A priority Critical patent/JPH0671254B2/en
Publication of JPH01259643A publication Critical patent/JPH01259643A/en
Publication of JPH0671254B2 publication Critical patent/JPH0671254B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Abstract

PURPOSE:To enhance reliability of transfer data and to transfer them at high speed by so constructing the title circuit that it can perform a transmitting and receiving operation based on either a serial transfer synchronizing clock generated inside or a serial transfer synchronizing clock inputted from the outside. CONSTITUTION:A communication circuit F on the left side of the figure operators in accordance with a control signal generated based on a serial transfer synchronizing clock SCK generated inside a clock generator control circuit 6F of the circuit itself and a communication circuit F on the right side operates in accordance with a control signal generated in a synchronous circuit control logic circuit 7F of the circuit itself based on a serial transfer synchronizing clock SCK inputted from the left-side circuit F. Since the right and left communication circuits F and F operate synchronously and transmit and receive the serial data mutually, serial communication between microcomputers can be made and the functions of a microcomputer system can be strengthened.

Description

【発明の詳細な説明】 〔発明の目的〕 (産業上の利用分野) 本発明は、シリアルにデータを送受信するシリアルコミ
ュニケーション回路に関する。
DETAILED DESCRIPTION OF THE INVENTION [Object of the Invention] (Industrial Application Field) The present invention relates to a serial communication circuit that serially transmits and receives data.

(従来の技術) 従来のシリアルコミュニケーション回路として、次の3
種の方式が知られている。
(Conventional technology) As a conventional serial communication circuit, the following three
Seed methods are known.

(1)  転送時にのみシフトクロックを入力又は出力
する方式 これは、第5図(a)に示すように、送受信用シフトレ
ジスタIAとこれにシフトクロックSCKを与えるクロ
ックジェネレータ2Aとを備えたコミュニケーション回
路Aと、この回路AからシフトクロックSCKを受けて
動作する送受信用シフトレジスタIBを備えたコミュニ
ケーション回路Bとの組合わせにより成る。この方式で
は、第5図(b)に示すように、シフトクロックSCK
はデータを転送しようとする時だけ出力され、その出力
時にのみ回路Aと回路B間でデータDI、 D2.・・
・、D7が転送される。
(1) A method of inputting or outputting a shift clock only during transfer. As shown in FIG. 5(a), this is a communication circuit equipped with a transmission/reception shift register IA and a clock generator 2A that supplies a shift clock SCK to it. A and a communication circuit B including a transmission/reception shift register IB which operates upon receiving a shift clock SCK from the circuit A. In this method, as shown in FIG. 5(b), the shift clock SCK
are output only when data is to be transferred, and only at that time data DI, D2 .・・・
, D7 is transferred.

この方式は、例えばマイクロコンピュータシステムのマ
イクロコンピュータと周辺回路間のインタフェースとし
てこのコミュニケーション回路A。
This method uses the communication circuit A as an interface between the microcomputer and peripheral circuits of a microcomputer system, for example.

Bを用いた場合、マイクロコンピュータ側に回路Aを使
用し、周辺回路側に回路Bを使用して、マイクロコンピ
ュータのクロックに基づいてシフトクロックSCKを生
成するように構成すれば、インタフェースにはシフトレ
ジスタだけあればよいので非常に構成が簡単になると共
に、データ転送を高速に行なえるという利点がある。
If you use circuit A on the microcomputer side and circuit B on the peripheral circuit side to generate the shift clock SCK based on the microcomputer clock, the interface will have a shift clock SCK. Since only registers are required, the configuration is extremely simple, and there are advantages in that data transfer can be performed at high speed.

しかし、転送データを特別のフォーマットに構成せず、
単にシフトクロックのみに従ってデータ転送を行うため
、ノイズ等により誤転送が生じ易く転送データの信頼性
に問題がある。
However, without configuring the transferred data into a special format,
Since data is transferred solely in accordance with the shift clock, erroneous transfers are likely to occur due to noise and the like, resulting in problems with the reliability of the transferred data.

(2)  調歩同期方式 これは、第6図(a)に示すように、内部サンプリング
クロックを発生するクロックジェネレー92C,データ
を受信する受信用シフトレジスタ3C,データを送信す
る送信用シフトレジスタ4C及びそれらシフトレジスタ
3C,4Cに上記内部サンプリングクロックを8分周ま
たは16分周して生成したシフトクロックを与えるコン
トロールロジック回路5Cとを備えた同構成のコミユニ
ケージジン回路C2Cの組合わせにより成る。
(2) Start-stop synchronization method As shown in FIG. 6(a), this method consists of a clock generator 92C that generates an internal sampling clock, a reception shift register 3C that receives data, a transmission shift register 4C that transmits data, and It is made up of a combination of a community circuit C2C having the same configuration and a control logic circuit 5C which provides a shift clock generated by frequency-dividing the internal sampling clock by 8 or 16 to the shift registers 3C and 4C.

この方式では、第6図(b)に示すように、転送データ
Do、D1.・・・、D7の前後に所定のスタートビッ
トとストップビットを付して転送するようデータフォー
マットが定められており、コントロールロジック回路5
Cは、受信信号SINからスタートビットを検出してデ
ータ受信開始を確認し、またストップビットを検出して
データ受信完了を確認し、これらの確認に基づいて受信
シフトレジスタ3Cの動作タイミングの制御や転送デー
タのエラーチエツク等を行うようになっている。
In this method, as shown in FIG. 6(b), the transfer data Do, D1 . . . . The data format is determined to be transferred with predetermined start bits and stop bits before and after D7, and the control logic circuit 5
C detects the start bit from the reception signal SIN to confirm the start of data reception, detects the stop bit and confirms the completion of data reception, and controls the operation timing of the reception shift register 3C based on these confirmations. It is designed to check for errors in transferred data.

この方式は、転送データのフォーマットが定まっている
ので、これに基づいて受信開始や受信終了が確認できる
ため回路C9C間の同期をとる必要がなく、またストッ
プビットやスタートビットの有無に基づいて転送データ
のエラーチエツクができるため転送データの信頼性が高
く、シリアルコミュニケーション回路の基本構成となっ
ている。
In this method, since the format of the transfer data is fixed, it is possible to confirm the start and end of reception based on this, so there is no need to synchronize between circuits C9C, and transfer is based on the presence or absence of stop bits and start bits. Since data errors can be checked, the reliability of transferred data is high, and it is the basic configuration of serial communication circuits.

さらに、それらのチエツクを行うためのスタートビット
やストップビットの検出方式には、それらビットを転送
レートの通常8倍または16倍のレートを持つ内部サン
プリングクロックを使用してサンプリングし、そのサン
プリング値の多数決により判断する多数決方式が採用で
きるため、耐ノイズ性を高めることができる。
Furthermore, the start bit and stop bit detection method used to perform these checks involves sampling these bits using an internal sampling clock that normally has a rate of 8 or 16 times the transfer rate. Since a majority decision method that makes decisions based on majority decision can be adopted, noise resistance can be improved.

しかし、この方式は、転送レートが内部サンプリングク
ロックの1/8または1/16に制限されてしまうため
、比較的低速の転送レートしか実現できない。
However, in this method, the transfer rate is limited to 1/8 or 1/16 of the internal sampling clock, so only a relatively low transfer rate can be achieved.

(3)  同期方式 これは、第7図(a)に示すように、受信用シフトレジ
スタ3D、送信用シフトレジスタ4D及びこれらシフト
レジスタ3D、4Dにシフトクロックを与えると共にシ
フトクロックを生成する基準信号たるシリアル転送同期
クロックSCKを外部へ出力するクロックジェネレータ
・コントロールロジック回路6Dを備えたコミュニケー
ション回路りと、受信用シフトレジスタ3E、送信用シ
フトレジスタ4E、および回路りからのシリアル転送同
期クロックSCKを受けて自回路のシフトレジスタ3E
、4Eに対するシフトクロックを生成するコントロール
ロジック回路5Eを備えたコミュニケーション回路Eと
の組合わせにより成る。
(3) Synchronization method As shown in FIG. 7(a), this synchronization method uses a reception shift register 3D, a transmission shift register 4D, and a reference signal that provides a shift clock to these shift registers 3D and 4D and generates a shift clock. A communication circuit includes a clock generator/control logic circuit 6D that outputs a serial transfer synchronization clock SCK to the outside, a reception shift register 3E, a transmission shift register 4E, and a communication circuit that receives the serial transfer synchronization clock SCK from the circuit. shift register 3E of own circuit
, 4E in combination with a communication circuit E provided with a control logic circuit 5E that generates shift clocks for 4E.

この方式でも、第7図(b)に示すように、転送データ
DO,DI、・・・、D7の前後にスタートビットとス
トップビットを付して転送するようフォ−マットが定ま
っており、クロックジェネレータ・コントロールロジッ
ク回路6Dおよびコントロールロジック回路5Eは夫々
、スタートビットの検出によりデータ受信開始の確認を
し、ストップビットの検出によりデータ受信完了を確認
する。
Even in this method, as shown in FIG. 7(b), the format is determined so that the transfer data DO, DI, . . . Generator control logic circuit 6D and control logic circuit 5E each confirm the start of data reception by detecting a start bit, and confirm the completion of data reception by detecting a stop bit.

この方式は、転送データのフォーマットが定まっている
ので、送受信のエラーチエツクが出来るためデータの信
頼性が高く、また転送レートの高速化も可能であるとい
う、上記(1) 、 (2)の方式の各長所を兼備えて
いる。
In this method, since the format of the transferred data is fixed, it is possible to check for errors in sending and receiving, so the data reliability is high, and the transfer rate can be increased, which is the method described in (1) and (2) above. It combines the advantages of each.

しかし、内部発生のクロックにより能動的に動作する回
路りと、外部から与えられるクロックにより受動的に動
作する回路Eとを組合わせる必要があり、能動的な回路
り同士の組合わせや受動的な回路E同士の組合わせは出
来ない。従って、例えばマイクロコンピュータシステム
のマイクロコンピュータと周辺回路間のインタフェース
としてこの方式を適用する場合には、クロック発生手段
を持つマイクロコンピュータ側に能動的回路りを使用し
、クロック発生手段を持たない周辺回路側に受動的回路
Eを使用することが出来るが、それぞれ固有の内部クロ
ックを持つマイクロコンピュータ同士のインターフェー
スにはこの方式は適用できない。
However, it is necessary to combine a circuit that operates actively using an internally generated clock and a circuit E that operates passively using an externally supplied clock. Circuits E cannot be combined. Therefore, when applying this method as an interface between a microcomputer and a peripheral circuit in a microcomputer system, for example, an active circuit is used on the microcomputer side that has a clock generation means, and an active circuit is used in the peripheral circuit that does not have a clock generation means. Although a passive circuit E can be used on the side, this method cannot be applied to interfaces between microcomputers each having its own internal clock.

(発明が解決しようとする課8) 以上のように、従来のシリアルコミュニケーション回路
は、<1)の方式によれば転送データの高速化が可能で
あるが信頼性に欠け、(2)の方式によれば転送データ
の信頼性は向上できるが高速性に欠け、また(3)の方
式によれば転送データの信頼性及び高速性を共に向上で
きるが、マイクロコンピュータのように固有の内部クロ
ックを持つ回路同士のインタフェースには適用できない
(Issue 8 to be solved by the invention) As described above, conventional serial communication circuits are capable of increasing the speed of transfer data using method <1), but lack reliability, and method (2) According to the method (3), the reliability of the transferred data can be improved, but the high speed is lacking.Also, the method (3) can improve both the reliability and the high speed of the transferred data, but it is not possible to improve the reliability and high speed of the transferred data. It cannot be applied to interfaces between circuits that have

本発明は、上記に鑑み成されたもので、転送データの信
頼性及び高速性を共に向上させ得ると共に、マイクロコ
ンピュータのような固有の内部クロックを持った回路同
士のインタフェースも可能なシリアルコミュニケーショ
ン回路を提供することを目的とする。
The present invention has been made in view of the above, and provides a serial communication circuit that can improve both the reliability and high speed of transferred data, and can also interface between circuits that have their own internal clocks, such as microcomputers. The purpose is to provide

〔発明の構成〕[Structure of the invention]

(課題を解決するための手段) 上記目的の達成のため、本発明は、シリアルデータを所
定のフォーマットで送受信するシリアルコミュニケーシ
ョン回路において、シリアル転送同期クロックを内部生
成しこれを外部に出力すると共に、前記内部生成のシリ
アル転送同期クロックと送受信したデータのフォーマッ
トの検出結果とに基づいて前記送受信動作をコントロー
ルするためのコントロール信号を生成する内部コントロ
ール回路と、外部人力したシリアル転送同期クロックと
送受信したデータのフォーマットの検出結果とに基づい
て前記送受信動作をコントロールするためのコントロー
ル信号を生成する外部同期コントロール回路と、前記内
部コントロール回路と前記外部同期コントロール回路の
一方を選択して選択した回路からのコントロール信号に
より前記送受信動作をコントロールする選択回路とを備
え、前記外部同期コントロール回路は、前記外部入力の
シリアル転送同期クロックとこれに基づき生成したコン
トロール信号との位相関係が、前記内部コントロール回
路にて生成したシリアル転送同期クロックとコントロー
ル信号との位相関係とほぼ同一となるように、前記コン
トロール信号の生成を行うことを特徴とするシリアルコ
ミュニケーション回路を提供するものである。
(Means for Solving the Problems) To achieve the above object, the present invention provides a serial communication circuit that transmits and receives serial data in a predetermined format, internally generates a serial transfer synchronization clock and outputs it to the outside. an internal control circuit that generates a control signal for controlling the transmission/reception operation based on the internally generated serial transfer synchronization clock and a detection result of the format of the transmitted/received data; and an externally generated serial transfer synchronization clock and the transmitted/received data. an external synchronization control circuit that generates a control signal for controlling the transmission/reception operation based on the detection result of the format; and control from a circuit selected by selecting one of the internal control circuit and the external synchronization control circuit. a selection circuit that controls the transmission/reception operation based on a signal, and the external synchronization control circuit is configured such that the phase relationship between the externally input serial transfer synchronization clock and the control signal generated based thereon is determined by the internal control circuit. The present invention provides a serial communication circuit characterized in that the control signal is generated so that the phase relationship between the serial transfer synchronization clock and the control signal is substantially the same as that of the control signal.

(作 用) 上記構成のコミュニケーション回路をマイクロコンピュ
ータ同士の交信インタフェースに用いた場合、一方のコ
ンピュータ側のコミュニケーション回路では、選択回路
により内部コントロール回路を選択し、内部生成したシ
リアル転送同期クロックに基づくコントロール信号によ
り送受信を行う。他方のコンピュータ側のコミュニケー
ション回路では、選択回路により外部同期コントロール
回路を選択し、相手側コミュニケーション回路から外部
人力したシリアル転送同期クロックに基づくコントロー
ル信号により送受信を行う。内部コントロール回路にて
生成したシリアル転送同期クロックとコントロール信号
の位相関係は、外部入力のシリアル転送同期クロックと
これに基づき外部同期コントロール回路にて生成したコ
ントロール信号との位相関係とほぼ同一であるから、両
コンピュータのコミュニケーション回路は同期して送受
信動作を行い、マイクロコンピュータ同士のコミュニケ
ーションが実現される。
(Function) When the communication circuit with the above configuration is used as a communication interface between microcomputers, the communication circuit on one computer side selects the internal control circuit using the selection circuit and performs control based on the internally generated serial transfer synchronization clock. Sends and receives signals. In the communication circuit on the other computer side, a selection circuit selects an external synchronization control circuit, and transmission and reception are performed using a control signal based on a serial transfer synchronization clock externally inputted from the communication circuit on the other side. The phase relationship between the serial transfer synchronization clock generated by the internal control circuit and the control signal is almost the same as the phase relationship between the externally input serial transfer synchronization clock and the control signal generated by the external synchronization control circuit based on this clock. The communication circuits of both computers perform transmission and reception operations in synchronization, and communication between the microcomputers is realized.

また、転送データは所定のフォーマットで送受信され、
そのフォーマットの検出に基づいて送受信がコントロー
ルされるため、転送データの信頼性が高い。また、転送
の高速化も可能である。
In addition, the transferred data is sent and received in a predetermined format,
Since transmission and reception are controlled based on the detection of the format, the reliability of transferred data is high. It is also possible to speed up the transfer.

(実施例) 以下、実施例により説明する。(Example) Examples will be explained below.

第1図は本発明に係るシリアルコミュニケション回路の
一実施例の構成を示すブロック図、第2図は本実施例の
同期回路・コントロール信号・ツク回路の構成を示すブ
ロック図、第3図及び第4図は本実施例の動作を示すタ
イミングチャートである。
FIG. 1 is a block diagram showing the configuration of an embodiment of the serial communication circuit according to the present invention, FIG. FIG. 4 is a timing chart showing the operation of this embodiment.

第1図に示すように、本実施例は、受信用シフトレジス
タ3F、送信用シフトレジスタ4F、シリアル転送同期
クロックSCKを内部発生しこれに基づき送受信をコン
トロールするための各種コントロール信号を生成するク
ロックジェネレータ・コントロールロジック回路6F、
外部から与えられるシリアル転送同期クロックSCKに
基づき上記各種コントロール信号を生成する同期回路・
コントロールロジック回路7F及び回路6Fと7Fの一
方を選択する選択回路8Fを備えた同構成のコミュニケ
ーション回路F、Fの組合わせにより構成される。そし
て、図面左側の回路Fは、選択回路8Fによりクロック
ジェネレータやコントロールロジック回路6Fが選択さ
れて、内部発生のシリアル転送同期クロックSCKに従
って動作しており、一方、右側の回路Fは、同期回路・
コントロールロジック回路7Fが選択されて、外部入力
のシリアル転送同期クロックSCKに従って動作してい
る。
As shown in FIG. 1, this embodiment includes a reception shift register 3F, a transmission shift register 4F, and a clock that internally generates a serial transfer synchronization clock SCK and generates various control signals for controlling transmission and reception based on the serial transfer synchronization clock SCK. Generator control logic circuit 6F,
A synchronization circuit that generates the various control signals mentioned above based on the serial transfer synchronization clock SCK given from the outside.
It is constituted by a combination of communication circuits F and F having the same configuration, each including a control logic circuit 7F and a selection circuit 8F for selecting one of the circuits 6F and 7F. In the circuit F on the left side of the drawing, the clock generator and control logic circuit 6F are selected by the selection circuit 8F, and the circuit F operates according to the internally generated serial transfer synchronization clock SCK.
The control logic circuit 7F is selected and operates according to the externally input serial transfer synchronization clock SCK.

クロックジェネレータ・コントロールロジック回路6F
は、第3図に示すように、内部発生のサンプリングクロ
ックX OUTに基づいて基本タイミングクロックΦ1
.Φ2を生成し、これに基づいてシリアル転送同期クロ
ックSCKを生成する。
Clock generator/control logic circuit 6F
As shown in FIG. 3, the basic timing clock Φ1 is based on the internally generated sampling clock
.. Φ2 is generated, and based on this, a serial transfer synchronization clock SCK is generated.

このシリアル転送同期クロックSCKは上述のように外
部出力できるように成っている。さらに、この回路6F
は、基本タイミングクロックΦ1゜Φ2とシリアル転送
同期クロックSCKとに基づいて、送受信をコントロー
ルするための各種のコントロール信号、例えば、受信レ
ジスタシフト信号、送信レジスタシフト信号、受信完了
要求信号、送信開始要求信号等を生成する。尚、本実施
例はマイクロコンピュータ同士のインタフェースとして
用いる場合を想定しており、サンプリングクロックX 
OUTにはマイクロコンピュータの水晶発振クロックの
1/n(n−1又は2)分周信号を用いることが出来る
。受信レジスタシフト信号及び送信レジスタシフト信号
は夫々、選択回路8Fを介して、受信用シフトレジスタ
3F及び送信用シフトレジスタ4Fに与えられ、これに
より受信動作及び送信動作が行われる。尚、送受信され
る転送データにはその前後にスタートビット及びストッ
プビットを付すようフォーマットが定められており、そ
のスタートビット、ストップビットの検出により受信開
始確認、受信完了確認が行われ、それが上記コントロー
ル信号の生成に関与することは従来方式と同様である。
This serial transfer synchronization clock SCK can be output externally as described above. Furthermore, this circuit 6F
are various control signals for controlling transmission and reception based on the basic timing clock Φ1゜Φ2 and the serial transfer synchronization clock SCK, such as a reception register shift signal, a transmission register shift signal, a reception completion request signal, and a transmission start request. Generate signals etc. Note that this embodiment is assumed to be used as an interface between microcomputers, and the sampling clock
A signal divided by 1/n (n-1 or 2) of the crystal oscillation clock of the microcomputer can be used for OUT. The receiving register shift signal and the transmitting register shift signal are respectively applied to the receiving shift register 3F and the transmitting shift register 4F via the selection circuit 8F, thereby performing a receiving operation and a transmitting operation. Furthermore, the format is defined so that a start bit and a stop bit are added before and after the transfer data to be sent and received, and the detection of the start bit and stop bit confirms the start of reception and the confirmation of completion of reception. The components involved in the generation of control signals are the same as in the conventional method.

受信完了要求信号及び送信開始要求信号は夫々、受信の
際のストップビット検出時及び送信の際のスタートビッ
ト送信後の次ビット送信時に出力されるものであり、選
択回路8Fを介してマイクロコンピュータに送られる。
The reception completion request signal and the transmission start request signal are output when a stop bit is detected during reception and when the next bit is transmitted after the start bit is transmitted during transmission, respectively, and are sent to the microcomputer via the selection circuit 8F. Sent.

このマイクロコンピュータに送られる受信完了信号及び
送信開始信号はマイクロコンピュータの動作と密接な関
係があり、従ってマイクロコンピュータの動作に対応し
た要件が課されるのが通常である。例えば、本実施例で
は、マイクロコンピュータ基本動作サイクルと同じパル
ス幅を持つことが要求されている。
The reception completion signal and transmission start signal sent to the microcomputer are closely related to the operation of the microcomputer, and therefore requirements corresponding to the operation of the microcomputer are usually imposed. For example, in this embodiment, it is required to have the same pulse width as the basic operating cycle of the microcomputer.

同期回路・コントロールロジック回路7Fは、第4図に
示すように、外部入力のシリアル転送同期クロックSC
Kに基づいて、外部基本タイミングチャートEXTO1
,EXTO2,EXTΦ2′を生成し、これと外部入力
のシリアル転送同期クロックSCKとに基づいて受信レ
ジスタシフト信号、送信レジスタシフト信号、受信完了
要求信号、送信開始要求信号等の各種コントロール信号
を生成するものである。その際、外部入力のシリアル転
送同期クロックSCKと外部基本タイミングクロックE
XTΦ1.EXTΦ2との位相関係が、第3図に示す内
部発生のシリアル転送同期クロックSCKと基本タイミ
ングクロックΦ1゜Φ2との位相関係と同一になるよう
に、基本タイミングクロックΦ1.Φ2の生成に用いた
サンプリングクロックX 01lTと外部人力のシリア
ル転送同期クロックSCKとに基づいて、外部基本タイ
ミングクロックEXTΦ1.EXTΦ2.EXTΦ2′
を生成する。つまり、外部人力シリアル転送同期クロッ
クSCKの立上がり後、最初のサンプリングクロックX
 OUTの立下がりで外部基本タイミングクロックEX
TΦ1を発生させ、これをサンプリングクロックX O
UTの3クロック分シフトして外部基本タイミングクロ
ックEXTΦ2を生成し、これをさらに3クロック分シ
フトして外部基本タイミングクロックEXTΦ2′を生
成している。尚、外部基本タイミングクロックEXTΦ
2′は、外部入力シリアル転送同期クロックSCKの転
送レートが遅いときにマイクロコンピュータ基本動作サ
イクルのパルス幅信号を生成するために使用するもので
ある。このような信号生成方法を採ることにより、外部
入力のシリアル転送同期クロックSCKとそれに基づく
各種コントロール信号との位相関係は、サンプリングク
ロックx ourのパルス幅範囲内での誤差はあるもの
のそれは無視できるため、第3図に示す内部発生のシリ
アル転送同期クロックSCKとそれに基づく各種コント
ロール信号との位相関係と実質的に同一となる。従って
、外部入力のシリアル転送同期クロックSCKに従がい
、内部発生のシリアル転送同期クロックSCKに従う場
合と同様の送受信動作が行なえる。その場合、外部入力
のシリアル転送同期クロックSCKは内部発生のシリア
ル転送同期クロックSCKと同じタイミングで発生する
とは限らず、両者は位相が異なっているのが通常である
が、そのような位相の違いはマイクロコンピュータに受
信データを伝送する際及びマイクロコンピュータから送
信データを受取る際の時間調整で克服されるので全く問
題にならない。
As shown in FIG. 4, the synchronization circuit/control logic circuit 7F receives an externally input serial transfer synchronization clock SC.
Based on K, external basic timing chart EXTO1
, EXTO2, and EXTΦ2', and generates various control signals such as a reception register shift signal, a transmission register shift signal, a reception completion request signal, and a transmission start request signal based on this and an externally input serial transfer synchronization clock SCK. It is something. At that time, the external input serial transfer synchronization clock SCK and the external basic timing clock E
XTΦ1. The basic timing clocks Φ1. The external basic timing clock EXTΦ1. EXTΦ2. EXTΦ2′
generate. In other words, after the external manual serial transfer synchronization clock SCK rises, the first sampling clock
External basic timing clock EX at the falling edge of OUT
Generate TΦ1 and use it as the sampling clock
The external basic timing clock EXTΦ2 is generated by shifting the UT by three clocks, and this is further shifted by three clocks to generate the external basic timing clock EXTΦ2'. In addition, external basic timing clock EXTΦ
2' is used to generate a pulse width signal for the basic operation cycle of the microcomputer when the transfer rate of the external input serial transfer synchronization clock SCK is slow. By adopting this signal generation method, the phase relationship between the externally input serial transfer synchronization clock SCK and various control signals based on it can be ignored, although there is an error within the pulse width range of the sampling clock x our. , is substantially the same as the phase relationship between the internally generated serial transfer synchronization clock SCK and various control signals based thereon, as shown in FIG. Therefore, it is possible to perform the same transmission and reception operations as in the case of following the externally input serial transfer synchronizing clock SCK and following the internally generated serial transfer synchronizing clock SCK. In that case, the externally input serial transfer synchronization clock SCK does not necessarily occur at the same timing as the internally generated serial transfer synchronization clock SCK, and the two normally have different phases. This is not a problem at all because it can be overcome by adjusting the time when transmitting received data to the microcomputer and when receiving transmitted data from the microcomputer.

上記の説明から、外部基本タイミングクロックEXTΦ
1.EXTΦ2.EXTΦ2′は、外部入力のシリアル
転送同期クロックSCKをサンプリングクロックX O
UTにより順次シフトして行った信号の組合わせにより
形成できることが分る。
From the above explanation, external basic timing clock EXTΦ
1. EXTΦ2. EXTΦ2' is an externally input serial transfer synchronization clock SCK as a sampling clock
It can be seen that the signal can be formed by combining signals sequentially shifted by the UT.

従って、同期回路・コントロールロジック回路7Fには
、第2図に示すように、例えばDタイプフリップフロッ
プ9を多段に接続して成るシフトレジスタ10に、入力
として外部入力のシリアル転送同期クロックSCKを加
え、シフト信号としてサンプリングクロックX OUT
を加え、このシフトレジスタ10の各段の出力信号をコ
ントロールロジック回路11にて組合わせて所望の外部
基本タイミングクロックEXTΦ1.EXTΦ21EX
TΦ2′を生成するという、極めて簡単な構成が採用で
きる。尚、本実施例の場合には、EXTΦ1の立上がり
からEXTΦ2′の立下がりまでの時間幅がサンプリン
グクロックX OUTの11クロック分に相当するため
フリップフロップ9を11段接続している。上記時間幅
が上記と異なる場合にはフリップフロップ9の段数を変
えることで容易に対応することができる。
Therefore, as shown in FIG. 2, the synchronization circuit/control logic circuit 7F includes, for example, a shift register 10 formed by connecting D-type flip-flops 9 in multiple stages, and an externally input serial transfer synchronization clock SCK as an input. , the sampling clock X OUT as a shift signal
, and the output signals of each stage of the shift register 10 are combined in the control logic circuit 11 to generate a desired external basic timing clock EXTΦ1. EXTΦ21EX
An extremely simple configuration can be adopted in which TΦ2' is generated. In the case of this embodiment, since the time width from the rise of EXTΦ1 to the fall of EXTΦ2' corresponds to 11 clocks of the sampling clock X OUT, 11 stages of flip-flops 9 are connected. If the above-mentioned time width is different from the above, it can be easily handled by changing the number of stages of the flip-flops 9.

上述のように、第1図左側のコミュニケーション回路F
は自回路のクロックジェネレーターコントロールロジッ
ク回路6Fにて内部生成したシリアル転送同期クロック
SCKに基づき生成したコントロール信号に従って動作
し、右側のコミュニケーション回路Fは左側回路Fから
外部入力したシリアル転送同期クロックSCKに基づき
自回路の同期回路令コントロールロジック回路7Fにて
生成したコントロール信号に従って動作している。
As mentioned above, the communication circuit F on the left side of Figure 1
operates according to the control signal generated based on the serial transfer synchronization clock SCK internally generated by the clock generator control logic circuit 6F of its own circuit, and the communication circuit F on the right side operates based on the serial transfer synchronization clock SCK externally input from the left circuit F. It operates according to a control signal generated by the synchronous circuit command control logic circuit 7F of its own circuit.

外部入力したシリアル転送同期クロックSCKと同期回
路・コントロール回路7Fにて生成したコントロール信
号との位相関係は、クロックジェネレータ・コントロー
ルロジック回路6Fにて内部生成したシリアル転送同期
クロックSCKとコントロール信号との位相関係とほぼ
同一であるから、第1図の左右のコミュニケーション回
路F、  Fは同期して動作して相互にシリアルデータ
を送受信する。従って、マイクロコンピュータ間のシリ
アルコミュニケーションが可能になり、マイクロコンピ
ュータシステムの大幅な機能強化を図ることが可能にな
る。
The phase relationship between the externally input serial transfer synchronization clock SCK and the control signal generated by the synchronization circuit/control circuit 7F is the phase relationship between the serial transfer synchronization clock SCK internally generated by the clock generator/control logic circuit 6F and the control signal. Since the relationship is almost the same, the left and right communication circuits F and F in FIG. 1 operate synchronously and mutually transmit and receive serial data. Therefore, serial communication between microcomputers becomes possible, and the functionality of the microcomputer system can be greatly enhanced.

〔発明の効果〕〔Effect of the invention〕

以上説明したように、本発明によれば、内部発生のシリ
アル転送同期クロックまたは外部入力のシリアル転送同
期クロックのいずれに基づいても送受信動作ができるよ
うに構成したので、マイクロコンピュータ同士の交信イ
ンタフェースとして使用できると共に、転送データのフ
ォーマットに基づいて送受信動作をコントロールするよ
うに構成しているので、転送データの信頼性が高く、さ
らに、高速転送も可能である。
As explained above, according to the present invention, the configuration is such that transmission and reception operations can be performed based on either an internally generated serial transfer synchronization clock or an externally input serial transfer synchronization clock, so that it can be used as a communication interface between microcomputers. Since it is configured to control transmission and reception operations based on the format of the transferred data, the reliability of the transferred data is high, and high-speed transfer is also possible.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明に係るシリアルコミュニケション回路の
一実施例を示すブロック構成図、第2図は同実施例の同
期回路・コントロールロジック回路を示すブロック構成
図、第3図は同実施例が内部発生のシリアル転送同期ク
ロックに従い動作する場合の信号タイミングを示すタイ
ムチャート、第4図は同実施例が外部入力のシリアル転
送同期クロックに従い動作する場合の信号タイミングを
示すタイムチャート、第5図、第6図及び第7図は従来
のシリアルコミュニケーション回路の構成及び動作を示
す説明図である。 F・・・シリアルコミユニケージ32回路、3F・・・
受信用シフトレジスタ、4F・・・送信用シフトレジス
タ、6F・・・クロックジェネレータやコントロールロ
ジック回路、7F・・・同期回路やコントロールロジッ
ク回路、8F・・・選択回路、9・・・Dタイプフリッ
プフロップ、10・・・シフトレジスタ、11・・・コ
ントロールロジック回路。 手続ン市正書 昭和63年5月130 ] 事件の表示 昭和63年 特許願 第86600号 2 発明の名称 シリアルコミュニケーション回路 3 補正をする者 事件との関係  特許出願人 (307)  株式会社東芝 4代理人 7 補正の対象1′・−′二J 滅り 図面 8 補正の内容
FIG. 1 is a block diagram showing an embodiment of a serial communication circuit according to the present invention, FIG. 2 is a block diagram showing a synchronization circuit/control logic circuit of the embodiment, and FIG. FIG. 4 is a time chart showing signal timing when the same embodiment operates according to an internally generated serial transfer synchronization clock; FIG. 5 is a time chart showing signal timing when the same embodiment operates according to an externally input serial transfer synchronization clock; FIGS. 6 and 7 are explanatory diagrams showing the configuration and operation of a conventional serial communication circuit. F...Serial communication 32 circuits, 3F...
Shift register for reception, 4F...Shift register for transmission, 6F...Clock generator or control logic circuit, 7F...Synchronization circuit or control logic circuit, 8F...Selection circuit, 9...D type flip-flop 10...shift register, 11...control logic circuit. Procedural City Official Book May 130, 1988] Indication of the case 1986 Patent Application No. 86600 2 Name of the invention Serial Communication Circuit 3 Relationship with the amendment person case Patent applicant (307) Toshiba Corporation 4 representative Person 7 Subject of amendment 1'・-'2J Destroyed drawing 8 Contents of amendment

Claims (1)

【特許請求の範囲】[Claims] 1、シリアルデータを所定のフォーマットで送受信する
シリアルコミュニケーション回路において、シリアル転
送同期クロックを内部生成しこれを外部に出力すると共
に、前記内部生成のシリアル転送同期クロックと送受信
したデータのフォーマットの検出結果とに基づいて前記
送受信動作をコントロールするためのコントロール信号
を生成する内部コントロール回路と、外部入力したシリ
アル転送同期クロックと送受信したデータのフォーマッ
トの検出結果とに基づいて前記送受信動作をコントロー
ルするためのコントロール信号を生成する外部同期コン
トロール回路と、前記内部コントロール回路と前記外部
同期コントロール回路の一方を選択して選択した回路か
らのコントロール信号により前記送受信動作をコントロ
ールする選択回路とを備え、前記外部同期コントロール
回路は、前記外部入力のシリアル転送同期クロックとこ
れに基づき生成したコントロール信号との位相関係が、
前記内部コントロール回路にて生成したシリアル転送同
期クロックとコントロール信号との位相関係とほぼ同一
となるように、前記コントロール信号の生成を行うこと
を特徴とするシリアルコミュニケーション回路。
1. In a serial communication circuit that transmits and receives serial data in a predetermined format, a serial transfer synchronization clock is internally generated and outputted to the outside, and the internally generated serial transfer synchronization clock and the detection result of the format of the transmitted and received data are an internal control circuit that generates a control signal for controlling the transmitting/receiving operation based on an externally input serial transfer synchronization clock and a detection result of the format of the transmitted/receiving data. an external synchronization control circuit that generates a signal; and a selection circuit that selects one of the internal control circuit and the external synchronization control circuit and controls the transmission and reception operation by a control signal from the selected circuit, and the external synchronization control circuit The circuit has a phase relationship between the externally input serial transfer synchronization clock and the control signal generated based on the clock.
A serial communication circuit characterized in that the control signal is generated so that the phase relationship between the control signal and the serial transfer synchronization clock generated by the internal control circuit is substantially the same.
JP63086600A 1988-04-08 1988-04-08 Serial communication circuit Expired - Lifetime JPH0671254B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63086600A JPH0671254B2 (en) 1988-04-08 1988-04-08 Serial communication circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63086600A JPH0671254B2 (en) 1988-04-08 1988-04-08 Serial communication circuit

Publications (2)

Publication Number Publication Date
JPH01259643A true JPH01259643A (en) 1989-10-17
JPH0671254B2 JPH0671254B2 (en) 1994-09-07

Family

ID=13891504

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63086600A Expired - Lifetime JPH0671254B2 (en) 1988-04-08 1988-04-08 Serial communication circuit

Country Status (1)

Country Link
JP (1) JPH0671254B2 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6361533A (en) * 1986-09-01 1988-03-17 Nec Corp Serial data transfer device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6361533A (en) * 1986-09-01 1988-03-17 Nec Corp Serial data transfer device

Also Published As

Publication number Publication date
JPH0671254B2 (en) 1994-09-07

Similar Documents

Publication Publication Date Title
JPS62155651A (en) Method and apparatus for creating synchronous handshake
JPH0220184B2 (en)
JPH03157030A (en) Data processor
US5335337A (en) Programmable data transfer timing
KR100817270B1 (en) Interface device and method for synchronizing data
JPH01259643A (en) Serial communication circuit
US5222107A (en) Transmission and reception synchronization device for a communication network station particularly for automotive vehicles
JPS6361533A (en) Serial data transfer device
JPH03171945A (en) Digital system
JPH0258454A (en) Serial transfer system
JPH04170830A (en) Clock synchronizing type serial data transmitter
Harirajkumar et al. Design and Implementation of an SPI to I2C Bridge for Seamless Communication and Interoperability Between Devices
JP2006173689A (en) Asynchronous signal transmission system, asynchronous signal transmitter, and asynchronous signal transmission method used therefor
JPS63237157A (en) Data processing system
JPS6024497B2 (en) Data transfer method
JPS6256041A (en) Clock matching circuit
JP5243218B2 (en) Data transmission method and system
JP4730051B2 (en) Semiconductor digital circuit, FIFO buffer circuit, and data transfer method used therefor
JPS59138147A (en) Data transmitter
JPH0668691A (en) Shift register circuit
JPH02162860A (en) Communication method between master station versus plural slave stations
JPH0293831A (en) Duplex system
JPS6129026B2 (en)
JPS63237158A (en) Data processing system
JP2009141561A (en) Differential transmission system using differential transmission method

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20070907

Year of fee payment: 13

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080907

Year of fee payment: 14

EXPY Cancellation because of completion of term
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080907

Year of fee payment: 14