JP3019740B2 - Serial interface and serial data transfer system - Google Patents

Serial interface and serial data transfer system

Info

Publication number
JP3019740B2
JP3019740B2 JP6326303A JP32630394A JP3019740B2 JP 3019740 B2 JP3019740 B2 JP 3019740B2 JP 6326303 A JP6326303 A JP 6326303A JP 32630394 A JP32630394 A JP 32630394A JP 3019740 B2 JP3019740 B2 JP 3019740B2
Authority
JP
Japan
Prior art keywords
clock
data
serial
serial data
input terminal
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.)
Expired - Fee Related
Application number
JP6326303A
Other languages
Japanese (ja)
Other versions
JPH08185363A (en
Inventor
昌平 堀井
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 Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP6326303A priority Critical patent/JP3019740B2/en
Publication of JPH08185363A publication Critical patent/JPH08185363A/en
Application granted granted Critical
Publication of JP3019740B2 publication Critical patent/JP3019740B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Computer And Data Communications (AREA)
  • Communication Control (AREA)
  • Debugging And Monitoring (AREA)
  • Information Transfer Systems (AREA)

Description

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

【0001】[0001]

【産業上の利用分野】本発明はシリアルインターフェー
ス回路およびシリアルインターフェースシステムに関
し、特に転送クロックに同期してデータをシリアルに転
送する同期式シリアルインターフェースおよびシリアル
インターフェースシステムに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a serial interface circuit and a serial interface system, and more particularly to a synchronous serial interface and a serial interface system for serially transferring data in synchronization with a transfer clock.

【0002】[0002]

【従来の技術】同期式シリアルインターフェースは、転
送クロックに同期してデータをシリアルに転送するた
め、受信システムにおいては転送クロックを生成する回
路が不要となる。したがって、その分回路規模が非同式
シリアルインターフェースに比べ小さくでき、チップ面
積の制約を受けるワンチップコンピュータ間またはワン
チップマイクロコンピュータと周辺I/Oとのデータ転
送手段として広く用いられている。
2. Description of the Related Art Since a synchronous serial interface transfers data serially in synchronization with a transfer clock, a circuit for generating a transfer clock is not required in a receiving system. Therefore, the circuit scale can be made smaller than that of the non-homogeneous serial interface, and it is widely used as a data transfer means between one-chip computers or a one-chip microcomputer and a peripheral I / O which is restricted in chip area.

【0003】受信システムにおけるシリアルインターフ
ェースは、送信システムから転送されるシリアルデータ
を転送に同期して取り込むが、具体的にはクロックのレ
ベル反転エッジを利用してデータを取り組む。このた
め、送信側および受信側システムをつなぐ伝送線路のレ
ベルがノイズにより変化すると、受信側システムでは、
かかるノイズによるレベル変化を転送クロックのレベル
変化としてみなし、この結果、その時点でのデータを取
り組んでしまう。すなわち、同一のデータを複数回取り
組むことになる。かかるデータにもとづき受信システム
は動作するのであるのから、当然のことながら誤動作を
まねく。
[0003] The serial interface in the receiving system takes in serial data transferred from the transmitting system in synchronization with the transfer. Specifically, the serial interface works on the data by using the level inversion edge of the clock. Therefore, when the level of the transmission line connecting the transmitting side and the receiving side system changes due to noise, the receiving side system:
The level change due to the noise is regarded as the level change of the transfer clock, and as a result, the data at that time is used. That is, the same data is worked on a plurality of times. Since the receiving system operates based on such data, it naturally causes a malfunction.

【0004】したがって、ノイズには、伝送線路のレベ
ル変化を検知することが要求される。この目的のための
手段が特開平2−81246号公報に示されている。
Therefore, noise is required to detect a change in level of a transmission line. A means for this purpose is disclosed in Japanese Patent Application Laid-Open No. 2-81246.

【0005】これは、送信および受信システム間にそれ
らのクロック端子および端子同志をそれぞれ接続するシ
リアルクロック転送線路およびシリアルデータ転送線路
のほかに第3の信号経路を設け、受信システムでクロッ
ク端子レベル変化を示すタイミング信号を第3の信号経
路を経由して送信システムに帰還し、一方、送信システ
ムではシリアルクロックの転送タイミングにもとづいて
基準タイミング信号を作成し、これらを比較するもので
ある。かかる構成によれば、ノイズによりシリアルクロ
ック転送線路にレベル変化が生じると、受信システムで
のタイミング信号と送信システムにおける基準タイミン
グとにズレが生じ、この結果、ノイズの混入を検出する
ことができる。
In this method, a third signal path is provided in addition to a serial clock transfer line and a serial data transfer line for connecting clock terminals and terminals between a transmission system and a reception system, respectively. Is fed back to the transmission system via the third signal path, while the transmission system creates a reference timing signal based on the transfer timing of the serial clock and compares these. According to such a configuration, when a level change occurs in the serial clock transfer line due to noise, a difference occurs between the timing signal in the receiving system and the reference timing in the transmitting system, and as a result, the noise can be detected.

【0006】[0006]

【発明が解決しようとする課題】しかしながら、かかる
構成では、第3の信号転送線を介してクロックタイミン
グ信号を帰還しており、このため、第3の信号転送線路
がノイズによってレベル変化することがある。かかるレ
ベル変化は、送信システムでは受信システムにおけるク
ロックタイミング信号とみなされ、クロック転送線路へ
のノイズ混入として処理される。この結果、データ転送
が最初からやり直されることになり、データ転送効率が
悪化するという問題点がある。
However, in such a configuration, the clock timing signal is fed back via the third signal transfer line, so that the level of the third signal transfer line changes due to noise. is there. Such a level change is regarded as a clock timing signal in the receiving system in the transmitting system, and is processed as noise mixed into the clock transfer line. As a result, data transfer is restarted from the beginning, and there is a problem that data transfer efficiency is deteriorated.

【0007】したがって、本願発明の目的はデータ転送
効率を悪化させることなくシリアルクロック転送線路へ
のノイズ混入の検出手段を備えたシリアルインターフェ
ースおよびシリアルデータ転送システムを提供すること
である。
SUMMARY OF THE INVENTION It is therefore an object of the present invention to provide a serial interface and a serial data transfer system provided with a means for detecting noise mixing in a serial clock transfer line without deteriorating data transfer efficiency.

【0008】[0008]

【課題を解決するための手段】本願発明によるシリアル
インターフェースは、シリアルクロック端子に接続さ
れ、シリアルデータ転送の開始から所定時間経過後にタ
イマ信号を発生するタイマ手段と、シリアルクロック端
子に現われるレベル変化をカウントするカウンタと、前
記タイマ信号に応答して上記カウンタのカウント状態を
検出し所定のカウント状態以外のときにエラー信号を発
生する手段とを備えることを特徴としている。
A serial interface according to the present invention is connected to a serial clock terminal and generates a timer signal after a lapse of a predetermined time from the start of serial data transfer. A counter for counting, and means for detecting a count state of the counter in response to the timer signal and generating an error signal when the count state is not a predetermined count state.

【0009】[0009]

【作用】すなわち、本発明は一回の転送により送られる
データのビット数が例えば8ビットというふうに決めら
れていることに着目し、タイマ手段が発生するタイマ信
号の期間を8ビットのデータを受信するに要する期間よ
り若干短かくしている。したがって、クロック端子にノ
イズが混入しないときはタイマ信号が発生された時点で
のカウンタのカウント値は上記の例では7であるが、ノ
イズが混入したときはその数やノイズの幅に応じて、7
以外の値をとる。よって、かかるカウント状態にもとづ
きエラー通信があったかどうかが判定できる。しかも、
従来例のように、送信側のクロック転送タイミングと受
信側のクロック受信タイミングとを比較するものでない
ので、誤動作は生じない。
That is, the present invention focuses on the fact that the number of bits of data transmitted in one transfer is determined to be, for example, 8 bits, and sets the period of the timer signal generated by the timer means to 8 bits of data. It is slightly shorter than the time required for receiving. Therefore, when noise is not mixed into the clock terminal, the count value of the counter at the time when the timer signal is generated is 7 in the above example. However, when noise is mixed, the counter value depends on the number and the width of the noise. 7
Takes a value other than. Therefore, it can be determined whether or not there has been an error communication based on the count state. Moreover,
Unlike the conventional example, since the clock transfer timing on the transmission side is not compared with the clock reception timing on the reception side, no malfunction occurs.

【0010】[0010]

【実施例】次に図面を用いて本願発明を説明する。BRIEF DESCRIPTION OF THE DRAWINGS FIG.

【0011】図1は、本願発明の一実施例を示す図であ
る。本実施例による同期式シリアルインターフェース
は、送信システム1と受信システム2を有す。
FIG. 1 is a diagram showing an embodiment of the present invention. The synchronous serial interface according to the present embodiment has a transmission system 1 and a reception system 2.

【0012】送信システム1は、内部バス11、8ビッ
トのシフトレジスタ12、インバータ13、プログラマ
ブルにそのカウント値を設定できるカウンタ14、クロ
ックジュネレータ分周回路16から発生するクロックを
カウンタ14、シフトレジスタ12等へ伝達することを
制御するゲート回路15、送信側システム1のデータ処
理を行うデータ処理装置17、出力バッファ21、2
2、シリアルデータ出力端子24、およびシリアルクロ
ック出力端子25を有する。これら出力端子24、25
はそれぞれシリアルデータライン44、シリアルクロッ
クライン45を介して受信システム2に接続されてい
る。
The transmission system 1 includes an internal bus 11, an 8-bit shift register 12, an inverter 13, a counter 14 capable of setting its count value in a programmable manner, a clock generated by a clock generator divider circuit 16, a counter 14, and a shift register. A gate circuit 15 for controlling transmission to the transmission system 12 and the like; a data processing device 17 for performing data processing of the transmission side system 1;
2. It has a serial data output terminal 24 and a serial clock output terminal 25. These output terminals 24, 25
Are connected to the receiving system 2 via a serial data line 44 and a serial clock line 45, respectively.

【0013】一方、受信システム2は、内部バス31、
8ビットのシフトレジスタのシフトレジスタ32、シリ
アルデータの入力端子41、シリアルクロック入力端子
42、入力バッファ38,39、クロック入力端子42
のレベル変化をカウントするプログラム可能なカウンタ
33、およびデータ処理装置37を有する。本受信シス
テム2は、さらに、本発明に従って、Dフリップフロッ
プ34、プログラマブルに出力時間を設定できるタイマ
35、タイマ35の出力によりカウンター33の出力を
ラッチするDフリップフロップ36を有する。このフリ
ップフロップ36の出力は出力バッファ40を介してエ
ラー出力端子43に供給される。この端子43はエラー
転送ライン46を介して送信システム1のエラー入力端
子26に接続されている。送信システム1はさらにエラ
ー信号検出回路27を有し、この回路は、入力バッファ
23、遅延回路20、ANDゲート19およびSRフリ
ップフロップ18を有する。次に、本システム動作につ
き説明する。送信システム1では、データ処理装置17
が全体の制御を司どっている。今、プログラム実行等に
よりデータ処理装置17が受信システム2ヘのシリアル
データ転送要求を受けると、転送すべき8ビットのデー
タをシフトレジスタ12に転送する。さらに、データ処
理装置17は、カウンタ14、ゲート回路15、および
RSフリップフロップ18にSTART信号を出力す
る。START信号によってカウンタ14、RSフリッ
プフロップ18はリセットされ、ゲート回路15は開い
て、クロックジェネレータ分周回路16からの転送クロ
ックを出力する。転送クロックはインバータ13を経由
してシフトレジスタ12にシフトクロックとして入力さ
れる。
On the other hand, the receiving system 2 includes an internal bus 31,
Shift register 32 of an 8-bit shift register, serial data input terminal 41, serial clock input terminal 42, input buffers 38 and 39, clock input terminal 42
And a data processing device 37 for counting the level change of the data. According to the present invention, the receiving system 2 further includes a D flip-flop 34, a timer 35 capable of setting the output time in a programmable manner, and a D flip-flop 36 latching the output of the counter 33 by the output of the timer 35. The output of the flip-flop 36 is supplied to the error output terminal 43 via the output buffer 40. This terminal 43 is connected to the error input terminal 26 of the transmission system 1 via the error transfer line 46. The transmission system 1 further has an error signal detection circuit 27, which has an input buffer 23, a delay circuit 20, an AND gate 19, and an SR flip-flop 18. Next, the operation of the present system will be described. In the transmission system 1, the data processing device 17
Has overall control. When the data processing device 17 receives a serial data transfer request to the receiving system 2 by executing a program or the like, the data processing device 17 transfers 8-bit data to be transferred to the shift register 12. Further, the data processing device 17 outputs a START signal to the counter 14, the gate circuit 15, and the RS flip-flop 18. The counter 14 and the RS flip-flop 18 are reset by the START signal, and the gate circuit 15 is opened to output the transfer clock from the clock generator frequency dividing circuit 16. The transfer clock is input to the shift register 12 via the inverter 13 as a shift clock.

【0014】シフトレジスタ12はそこにストアされた
データをシフトクロックの立上がりエッジ、したがっ
て、転送クロックのたち下りエッジに同期して最上位ビ
ットMSDから順にシフトし出力する。出力されたデー
タにもとづきバッファ21はシリアルデータ出力端子2
4、したがってシリアルデータ転送ライン44をハイレ
ベル又はロウレベルに駆動する。
The shift register 12 shifts the data stored therein in order from the most significant bit MSD in synchronization with the rising edge of the shift clock, that is, the falling edge of the transfer clock. The buffer 21 is connected to the serial data output terminal 2 based on the output data.
4, which drives the serial data transfer line 44 high or low.

【0015】転送クロックはさらに出力バッファ22に
供給され、この結果クロック端子25を介してシリアル
クロックライン45がハイレべる、ロウレベルに駆動さ
れ、同ライン上にシリアル転送クロックSCKが出力さ
れる。なお、転送開始までは、出力バッファ22はクロ
ック端子25(クロックライン45)をハイレベルにし
ている。
The transfer clock is further supplied to the output buffer 22. As a result, the serial clock line 45 is driven to a high level and a low level via the clock terminal 25, and the serial transfer clock SCK is output on the line. Before the start of the transfer, the output buffer 22 keeps the clock terminal 25 (clock line 45) at a high level.

【0016】転送クロックはさらにまたカウンタ14に
供給される。カウンタ14は転送クロックの立ち上がり
毎にその計数値を進め、係数値が8となると送信完了信
号14−1を発生する。この信号14−1はデータ処理
装置17に供給されるとともにゲート回路15に入力さ
れゲート回路15を閉じさせる。
The transfer clock is further supplied to a counter 14. The counter 14 increments the count value at every rise of the transfer clock, and when the coefficient value becomes 8, generates a transmission completion signal 14-1. The signal 14-1 is supplied to the data processing device 17 and is also input to the gate circuit 15 to close the gate circuit 15.

【0017】かくして、転送すべき8ビットのデータ
が、シリアルクロックSCKに同期して1ビットずつ受
信システム2に転送される。
Thus, the 8-bit data to be transferred is transferred to the receiving system 2 bit by bit in synchronization with the serial clock SCK.

【0018】受信システム2において、このタイミング
チャートを図2に示すように、前回のシリアルデータ転
送の終了にもとづきデータ処理装置37から発生される
セット信号SETにより、Dフリップフロップ36およ
びカウンタ33はリセットされており、Dフリップフロ
ップ34をセットされている。タイマ35はDフリップ
フロップ34のセットQ出力を受けてリセットされてい
る。すなわち、初期状態としてカウンタ33の出力はロ
ウレベル、Dフリップフロップ34の出力はハイレベ
ル、Dフリップフロップ36の出力はローレベル、タイ
マー35の出力はローレベルとなっている。
In the receiving system 2, as shown in the timing chart of FIG. 2, the D flip-flop 36 and the counter 33 are reset by the set signal SET generated from the data processing device 37 based on the end of the previous serial data transfer. And the D flip-flop 34 is set. The timer 35 is reset upon receiving the set Q output of the D flip-flop 34. That is, as an initial state, the output of the counter 33 is low, the output of the D flip-flop 34 is high, the output of the D flip-flop 36 is low, and the output of the timer 35 is low.

【0019】かかる状態において、前述のように送信シ
ステム1からのデータ転送が開示されると、シリアルク
ロックライン45の上のシリアルクロックSCKによっ
てクロック入力端子42は図2のようにレベル変化を受
け、同変化は入力バッファ39により波形整形されてシ
フトレジスタ32にシフトクロックとして供給される。
データライン44上に転送されたデータはデータ入力端
子41に転送され入力バッゥァ38により波形整形され
てシフトレジスタ32の入力御に伝達される。シフトレ
ジスタ32は、そのシフトクロックの立上りエンジに同
期して入力後に伝達されたデータを順に取り込みシフト
する。シフトロックはカウンタ33にも供給されてお
り、カウンタ33は同クロックの立ち上がりによりその
カウント値を歩進する。カウント値が8となると、カウ
ンタ33はその出力をハイレベルにし、転送終了信号と
してデータ処理装置37に供給する。
In this state, when the data transfer from the transmission system 1 is disclosed as described above, the clock input terminal 42 receives a level change as shown in FIG. 2 by the serial clock SCK on the serial clock line 45, The change is shaped by the input buffer 39 and supplied to the shift register 32 as a shift clock.
The data transferred on the data line 44 is transferred to the data input terminal 41, shaped by the input buffer 38, and transmitted to the input of the shift register 32. The shift register 32 sequentially takes in and transmits data transmitted after input in synchronization with the rising edge of the shift clock. The shift lock is also supplied to the counter 33, and the counter 33 increments its count value at the rise of the clock. When the count value reaches 8, the counter 33 changes its output to a high level and supplies it to the data processing device 37 as a transfer end signal.

【0020】シフトクロックはさらにフリップフロップ
34にクロック入力として供給されている。したがっ
て、ミフトクロックの最初の立下エッジ、すなわち、シ
リアル転送開始によって、フリップフロップ34の出力
はロウレベルとなる。かかるロウレベルの信号によりタ
イマ35のリセットは解除され、そのタイマ動作が起動
される。タイマ35は所定時間経過後にその出力はハイ
レベルにするが、本実施例では、図2に示すように、シ
リアル転送開始からタイマ出力がハイレベルとなるタイ
マ設定時間t2 は、一回のデータ転送に要する時間t1
よりもシリアルクロックSCKのクロック分だけ短かい
時間に設定されている。したがって、図2のように、シ
リアルクロックライン45にノイズの混入がないとき
は、タイマ35の出力がハイレベルとなった時点のカウ
ンタ33の出力はロウレベルのままである。このロウレ
ベルはフリップフロップ36よりサンプリングされ、そ
のロウレベル出力として保持されるとともにデータ処理
装置37に供給される。なお、タイマ35は基準クロッ
クをカウントするカウンタやマルチバイブレータで構成
できる。
The shift clock is further supplied to a flip-flop 34 as a clock input. Therefore, at the first falling edge of the mift clock, that is, at the start of serial transfer, the output of flip-flop 34 goes low. The reset of the timer 35 is released by the low-level signal, and the timer operation is started. Although the timer 35 is output after a predetermined time has elapsed to a high level, in this embodiment, as shown in FIG. 2, the timer set time t 2 timer output from the serial transfer start becomes high level, one data Time t 1 required for transfer
The time is set to be shorter by the clock of the serial clock SCK. Therefore, as shown in FIG. 2, when there is no noise in the serial clock line 45, the output of the counter 33 at the time when the output of the timer 35 becomes high level remains at low level. This low level is sampled by the flip-flop 36, held as a low level output, and supplied to the data processing device 37. Note that the timer 35 can be configured by a counter that counts a reference clock or a multivibrator.

【0021】データ処理装置37は、カウンタ33から
の転送終了信号を割り込み要求とに受け付け、現在実行
中の処理を一時中断し、割込み処理を起動する。かかる
割込み処理において、データ処理装置37はまずフリッ
プフロップ36の出力レベルをチェックする。図2に示
すDフリップフロップ36の出力はロウレベルであるの
で、データ処理装置37は、シリアルデータ受信が正常
に終了したと判断し、シフトレジスタ32をアクセスし
て、転送された8ビットのデータを内部バスを介して取
り込む。そして、SET信号を発生し、前述した初期状
態を設定する。この後、中断した処理を再開する。ある
いは、シフトレジスタ32から取り込んだデータに対す
る処理を行ってもよい。
The data processing device 37 receives the transfer end signal from the counter 33 as an interrupt request, temporarily suspends the process currently being executed, and activates the interrupt process. In such interrupt processing, the data processing device 37 first checks the output level of the flip-flop 36. Since the output of the D flip-flop 36 shown in FIG. 2 is at a low level, the data processing device 37 determines that serial data reception has been completed normally, accesses the shift register 32, and transfers the transferred 8-bit data. Capture via internal bus. Then, a SET signal is generated to set the above-mentioned initial state. Thereafter, the interrupted processing is resumed. Alternatively, processing on data taken in from the shift register 32 may be performed.

【0022】ところが、図3のように、データ受信中に
シリアルクロックライン45にノイズが混入して、クロ
ック入力端子42にノイズにもとづくレベル変化が生じ
ると、かかるレベル変化によりシフトレジスタは同一の
ビットデータを2回取り込みことになる。すなわち、ノ
イズによりデータ受信エラー生じたことになる。かかる
エラーは次のようにして検出される。
However, as shown in FIG. 3, when noise is mixed in the serial clock line 45 during data reception and a level change based on the noise occurs at the clock input terminal 42, the shift register causes the same bit to be changed by the level change. Data will be acquired twice. That is, a data reception error has occurred due to noise. Such an error is detected as follows.

【0023】すなわち、ノイズにもとずいてクロック入
力端子42のレベル変化によりカウンタ33はその計数
値を一つ進めるので、正規のシリアルクロックSCKに
よる7回目の立上りエッジの到来により、カウンタ33
はその計数値が8となり、その出力をハイレベルとす
る。一方、タイマ35はその出力をハイレベルとするタ
イマ時間t2 は一定であるので、カウンタ33の出力が
ハイレベルとなった後にタイマ出力はハイレベルとな
る。したがって、Dフリップフロップ36はカウンタ3
3からのハイレベル出力をタイマ35の出力の立ち上が
りによりサンプリングしその出力をハイレベルとする。
このハイレベル出力が通信エラー信号としてデータ処理
装置37に供給される。
That is, the counter 33 advances its count value by one according to the level change of the clock input terminal 42 based on the noise, so that the counter 33 increases by the arrival of the seventh rising edge by the normal serial clock SCK.
Has a count value of 8, and sets its output to a high level. On the other hand, the timer 35 since the timer time t 2 to its output to a high level is constant, the timer output after the output of counter 33 becomes high level to the high level. Therefore, the D flip-flop 36 is connected to the counter 3
3 is sampled at the rise of the output of the timer 35, and the output is set to the high level.
This high level output is supplied to the data processing device 37 as a communication error signal.

【0024】前述のように、データ処理装置37は、カ
ウンタ33からのハイレベル出力にもとづく割込み処理
によりフリップフロップ36の出力をチェックするが、
同出力がハイレベルであるので通信エラーが生じたこと
を判別する。したがって、シフトレジスタ32に取り込
まれたデータは破棄し、SET信号を出力してカウンタ
ー33、Dフリップフロップ36をリセット、Dフリッ
プフロップ34をセットし、再転送に備える。通信エラ
ー信号をさらに出力バッファ40に供給される。出力バ
ッファ40はこれによってエラー転送ライン43をハイ
レベルに駆動し受信側システム1にエラーを通知する。
この信号は、供給システム1のエラー入力端子26に供
給され、バッファ23、遅延回路20、ANDゲート1
9を介してフリップフロップ18をセットする。送信シ
ステム4では、前述したように8ビットのデータ転送が
完了すると、カウンタ14が送信終了信号14−1を発
生する。この信号にもとづき、データ処理装置17はフ
リップフロップ18の出力レベルをチェックする。この
出力レベルがハイレベルであることから、通信エラーが
生じたことが判断され、データの再送を開始する。な
お、遅延回路20およびANDゲート19は、エラー転
送ライン46がノイズにより一時的にハイレベルとなっ
てもフリップフロップ18がセットされないようにする
ためのノイズ除去回路を構成している。
As described above, the data processing device 37 checks the output of the flip-flop 36 by the interrupt process based on the high-level output from the counter 33.
Since the output is at the high level, it is determined that a communication error has occurred. Therefore, the data fetched into the shift register 32 is discarded, the SET signal is output, the counter 33 and the D flip-flop 36 are reset, and the D flip-flop 34 is set to prepare for re-transfer. The communication error signal is further supplied to the output buffer 40. The output buffer 40 thereby drives the error transfer line 43 to a high level, and notifies the receiving side system 1 of the error.
This signal is supplied to the error input terminal 26 of the supply system 1 and the buffer 23, the delay circuit 20, the AND gate 1
9, the flip-flop 18 is set. In the transmission system 4, as described above, when the 8-bit data transfer is completed, the counter 14 generates the transmission end signal 14-1. Based on this signal, the data processing device 17 checks the output level of the flip-flop 18. Since the output level is high, it is determined that a communication error has occurred, and data retransmission is started. Note that the delay circuit 20 and the AND gate 19 constitute a noise removing circuit for preventing the flip-flop 18 from being set even when the error transfer line 46 temporarily becomes high level due to noise.

【0025】かくして、本実施例では、通信システム自
身で通信エラーを検出しており、従来例で示したような
問題点は生じない。また、通信エラーはエラー転送ライ
ン46を介して通信システム1に帰還されるが、その動
作はスタティック的なものであり、それ故に前出したノ
イズ除去回路を設けることができて、誤った通信エラー
を送信システム1が判定することもない。
Thus, in this embodiment, the communication error is detected by the communication system itself, and the problem as shown in the conventional example does not occur. Also, the communication error is fed back to the communication system 1 via the error transfer line 46, but the operation is static, and therefore, the above-described noise elimination circuit can be provided, and the erroneous communication error can be provided. Is not determined by the transmission system 1.

【0026】図4は、本願発明の他の実施例を示す図で
ある。図1と同一の部分は同一の番号を付し、その説明
を省略する。
FIG. 4 is a diagram showing another embodiment of the present invention. The same parts as those in FIG. 1 are denoted by the same reference numerals, and description thereof will be omitted.

【0027】本実施例ではオア回路51がさらに設けら
れており、その出力はカウンタ33のリセット端子に接
続され、その二つの入力はDフリップフロップ36とデ
ータ処理装置37の出力がそれぞれ接続されている。こ
の構成によってDフリップフロップ36が転送エラー信
号を検出したときに速やかにカウンター33をリセット
することができる。
In this embodiment, an OR circuit 51 is further provided, the output of which is connected to the reset terminal of the counter 33, and the two inputs of which are connected to the D flip-flop 36 and the output of the data processing device 37, respectively. I have. With this configuration, when the D flip-flop 36 detects a transfer error signal, the counter 33 can be quickly reset.

【0028】このように、図1、図4の実施例では、カ
ウンタ33がそのカウント値が8がなるとその出力をハ
イレベルにすることを利用して、タイマ出力の発生時点
でのカウンタ33の出力をサンプリングすることによ
り、カウンタ33のタイマ出力の発生時点でのカウント
状態を検出し、通信エラーが起ったかどうかの判定を行
っている。
As described above, in the embodiment shown in FIGS. 1 and 4, the counter 33 is set to the high level when the count value reaches 8, and the counter 33 at the time when the timer output occurs is utilized. By sampling the output, the count state at the time when the timer output of the counter 33 occurs is detected, and it is determined whether or not a communication error has occurred.

【0029】以上、図面を用いて本発明の実施例につき
詳述したが、上記の構成に限定されるものではない。た
とえば、送信システムおよび受信シテテムの両方にデー
タ受信および送信両方の回路を設けるとともにモードフ
ラグを設け、このフラグにより送信モードと受信モード
の切り替えを行うようにしてもよい。またフリップフロ
ップ36の出力を出力バッファ40に供給する代わり
に、データ処理装置37がエラー信号を発生するように
することもできる。さらに、8ビット以外のビット数の
データ転送も同様に実行できる。言うまでもないが図
1、図4で示した各ゲート回路やフリップフロップは同
様の機能を有する他のゲート回路等で実現できる。さら
に、ノイズによってタイマー設定時間よりも短い時間で
ノイズ発生回数が多い場合について説明したが、タイマ
出力によってカウンタ33の内容をデコードするように
すれば、転送クロックに生じたノイズが大きく完全にハ
イレベルの信号がなくなるような場合にもエラーは本発
明に従って検出できる。すなわち、エラーのない転送の
場合、タイマ出力が発生したときのカウンタ33の内用
は上記実施例のときは7である。したがって図5に本発
明のさらに他の実施例として示すように、カウンタ33
のカウント値をデコードするデコード50を設け、タイ
マ35からのハイレベルのタイマ出力によりこのデコー
ダ50を活性化させる。つまり、タイマ出力が発生した
時点のカウント値をデコード50はデコードし、カウン
ト値が7であるかどうかを検出する。7のときはその出
力はロウレベルのままであるが、7以外のときはその出
力をハイレベルとしRSフリップフリップ51をセット
する。かくして、混入されるノイズの数やその幅にかか
わらず、通信エラーが検出される。また、ORゲート5
2により、転送終了を装置37に通知している。
Although the embodiment of the present invention has been described in detail with reference to the drawings, the present invention is not limited to the above-described configuration. For example, both the transmission system and the reception system may be provided with circuits for both data reception and transmission, and a mode flag may be provided, and the mode may be switched between the transmission mode and the reception mode. Instead of supplying the output of the flip-flop 36 to the output buffer 40, the data processing device 37 can generate an error signal. Further, data transfer of a bit number other than 8 bits can be similarly performed. Needless to say, each of the gate circuits and flip-flops shown in FIGS. 1 and 4 can be realized by another gate circuit or the like having a similar function. Furthermore, a case has been described where the number of noise occurrences is shorter than the timer set time due to noise. However, if the contents of the counter 33 are decoded by the timer output, the noise generated in the transfer clock is large and completely high level. The error can be detected according to the present invention even in the case where the signal disappears. That is, in the case of the transfer without error, the counter 33 when the timer output is generated is 7 in the above embodiment. Therefore, as shown in FIG. 5 as still another embodiment of the present invention, the counter 33
The decoder 50 is provided for decoding the count value of, and the decoder 50 is activated by a high-level timer output from the timer 35. That is, the decode 50 decodes the count value at the time when the timer output is generated, and detects whether the count value is 7. At 7, the output remains at the low level, but at other than 7, the output is set to the high level and the RS flip flip 51 is set. Thus, a communication error is detected irrespective of the number and width of the noise mixed. OR gate 5
2, the transfer completion is notified to the device 37.

【0030】上記各実施例において、受信終了信号を発
生するカウンタとは別に設けたカウンタを用いてエラー
検出を行ってもよい。
In each of the above embodiments, error detection may be performed using a counter provided separately from the counter that generates the reception end signal.

【0031】[0031]

【発明の効果】以上述べたように本願発明によれば、受
信側のみにてシリアル転送エラー信号を出力できる。し
かも、その転送エラー信号によって送信側システムに再
転送の指示を出すことにより、送信側システムにエラー
検出回路を設けることができ、エラー転送ラインに混入
するノイズの影響が全くない。よって、このエラー転送
ラインに乗るノイズに起因したシリアルデータの再転送
はなくなり転送効率が向上し、かつ信頼生の高いシリア
ルデータ通信が実現できる。
As described above, according to the present invention, a serial transfer error signal can be output only on the receiving side. In addition, by instructing the transmission side system to retransmit by the transmission error signal, an error detection circuit can be provided in the transmission side system, and there is no influence of noise mixed into the error transmission line. Therefore, retransmission of serial data due to noise on the error transfer line is eliminated, so that transfer efficiency is improved and highly reliable serial data communication can be realized.

【0032】この他、本発明は、送信側へ特別な回路の
付加は行わないなめ既存のシステムがそのまま使用で
き、また、受信側システムでは従来回路を比較するとタ
イマー一個、フリップフロップ2個と非常に少ない付加
回路にて実現できる。さらにタイマー部をワンチップマ
イクロコンピュータ内臓の汎用タイマーを流用すればさ
らにしよう回路を減らすことができ、チップサイズの制
約があるワンチップコンピュータでも容易に実現できる
等の特徴を持つ。
In addition, according to the present invention, an existing system can be used as it is without adding a special circuit to the transmitting side, and the receiving side system has one timer and two flip-flops in comparison with the conventional circuit. With few additional circuits. Further, if a general-purpose timer built in a one-chip microcomputer is used for the timer unit, the number of circuits to be used can be further reduced, and a one-chip computer having a chip size restriction can be easily realized.

【0033】実施例2の構成によって通信エラーが発生
したとき、データ処理装置を介することなくカウンタを
リセットでき、データ処理装置の負担を軽くするという
効果を有す。
According to the configuration of the second embodiment, when a communication error occurs, the counter can be reset without the intervention of the data processing device, which has the effect of reducing the load on the data processing device.

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

【図1】本発明の一実施例を示すブロック図。FIG. 1 is a block diagram showing one embodiment of the present invention.

【図2】図に示した受信システムのノイズがない場合の
動作タイミングチャート。
FIG. 2 is an operation timing chart of the receiving system shown in FIG. 2 when there is no noise.

【図3】図1に示した受信システムのノイズ混入時のタ
イミングチャート。
FIG. 3 is a timing chart of the receiving system shown in FIG. 1 when noise is mixed.

【図4】本発明の他の実施例を示すブロック図。FIG. 4 is a block diagram showing another embodiment of the present invention.

【図5】本発明のさらに他の実施例を示すブロック図。FIG. 5 is a block diagram showing still another embodiment of the present invention.

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

1 送信システム 2,3 受信システム 11,31,70,90 内部バス 12,31,72,92 シフトレジスタ 13,99,100,101,105 インバータ 14,33,73,93 カウンタ 24 データ転送ライン出力端子 25 シリアルクロック出力端子 26 エラー転送ライン入力端子 27 エラー転送ライン入力端子 34,36,95,96 Dフリップフロップ 35 タイマ 41 データ転送ライン入力端子 42 シリアルクロックライン入力端子 43 エラー転送ライン出力端子 44 データ転送ライン 45 シリアルクロックライン 46 エラー転送ライン 1 Transmission system 2, 3 Receiving system 11, 31, 70, 90 Internal bus 12, 31, 72, 92 Shift register 13, 99, 100, 101, 105 Inverter 14, 33, 73, 93 Counter 24 Data transfer line output terminal 25 Serial clock output terminal 26 Error transfer line input terminal 27 Error transfer line input terminal 34, 36, 95, 96 D flip-flop 35 Timer 41 Data transfer line input terminal 42 Serial clock line input terminal 43 Error transfer line output terminal 44 Data transfer Line 45 Serial clock line 46 Error transfer line

Claims (3)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 転送クロックに同期してシリアルデータ
を出力する送信ユニットと、前記送信ユニットから送ら
れてくる前記転送クロックに同期して前記シルアルデー
タを受信する受信ユニットとを有するシリアルデータ転
送システムにおいて、前記受信ユニットは前記シリアル
データ受信の開始から所定時間前記転送クロックをカウ
ントしカウント状態を出力するカウント手段と、前記所
定時間後に前記カウント手段が出力したカウント状態を
検出し前記カウント状態が所定のカウント値を超えない
時は第1の論理レベルのエラー信号を発生し所定のカウ
ント値を超える時は第2の論理レベルのエラー信号を発
生する検出手段とを有し、前記エラー信号が第1の論理
レベルの時は前記送信ユニットから転送されてきた前記
シリアルデータを内部のデータ処理装置に取り込み、前
記送信ユニットは前記受信ユニットから送られてきた前
記エラー信号が第2の論理レベルの時は前記シリアルデ
ータを前記受信ユニットに再転送することを特徴とする
シリアルデータ転送システム。
1. A serial data transfer system comprising: a transmission unit that outputs serial data in synchronization with a transfer clock; and a reception unit that receives the serial data in synchronization with the transfer clock sent from the transmission unit. Wherein the receiving unit counts the transfer clock for a predetermined time from the start of the serial data reception and outputs a count state, and detects the count state output by the count means after the predetermined time, and sets the count state to a predetermined value. Cow count does not exceed the value <br/> time is given to generate an error signal of the first logic level
Detecting means for generating an error signal of a second logical level when the error signal exceeds the logical value, and for detecting the serial data transferred from the transmitting unit when the error signal is at the first logical level. A serial data transfer system, wherein the serial data is retransmitted to the receiving unit when the error signal sent from the receiving unit is at a second logical level. .
【請求項2】 前記カウント手段は前記転送クロックの
レベル変化の回数が一回のシリアルデータ受信に必要な
回数だけ生じるとそのカウント状態を第1の論理レベル
から第2の論理レベルに変化させ、前記検出手段は前記
所定時間後に前記カウント状態の論理レベルをサンプリ
ングし、そのサンプリングした論理レベルにもとづき前
記エラー信号を発生する請求項1のシリアルデータ転送
システム。
2. The method according to claim 1, wherein the counting means includes a counter for the transfer clock.
The number of level changes required for one serial data reception
When the number of occurrences occurs, the count state is changed to the first logic level.
To the second logic level, and the detecting means
After a predetermined time, the logic level of the count state is sampled.
Based on the sampled logic level
2. The serial data transfer according to claim 1, wherein the error signal is generated.
system.
【請求項3】 クロック出力端子およびデータ出力端子
を有する送信ユニットと、クロック入力端子およびデー
タ入力端子を有する受信ユニットと、前記送信ユニット
の前記クロック出力端子および前記データ出力端子と前
記受信ユニットの前記クロック入力端子および前記デー
タ入力端子をそれぞれ接続するクロックラインおよびデ
ータラインとを備え、前記送信ユニットは前記クロック
出力端子を介して前記クロックライン上にシリアルクロ
ックを転送しながら前記データ出力端子を介して前記デ
ータラインにシリアルデータを転送し、前記受信ユニッ
トは前記クロック入力端子に現われるレベル変化に応答
して前記データ入力端子のデータを受信してレジスタに
格納するシリアルデータ転送システムにおいて、前記受
信ユニットは、シリアルデータの受信開始から所定時間
後にタイマ信号を発生する手段と、前記クロック入力端
子に現われるレベル変化をカウントするカウンタ手段
と、前記タイマ信号に応答して前記カウント手段のカウ
ント値を検出し所前カウント値が所定の値の時は第1の
論理レベルの受信エラー信号を発生し前記カウント値が
前記所定の値に満たない時または所定の値を超える時は
第2の論理レベルの受信エラー信号を発生するエラー検
出手段と、前記受信エラー信号を出力するエラー出力端
子とを更に有し、前記受信エラー信号が第1の論理レベ
ルの時は前記レジスタの内容をデータ処理回路に取り込
み、前記前記送信ユニットは、前記受信ユニットの前記
エラー出力端子に接続されるエラー入力端子と、前記エ
ラー入力端子に前記第2の論理レベルの受信エラー信号
が供給されたことを検出した時は前記シリアルデータを
再転送する手段とを更に有することを特徴とするシリア
ルデータ転送システム。
3. A transmission unit having a clock output terminal and a data output terminal, a reception unit having a clock input terminal and a data input terminal, and the clock output terminal and the data output terminal of the transmission unit and the reception unit having the data output terminal. A clock line and a data line for connecting the clock input terminal and the data input terminal, respectively, wherein the transmission unit transfers the serial clock onto the clock line via the clock output terminal while transmitting the serial clock via the data output terminal. In a serial data transfer system for transferring serial data to the data line, wherein the receiving unit receives data of the data input terminal in response to a level change appearing at the clock input terminal and stores the data in a register, , Siri Means for generating a timer signal after a predetermined time from the start of receiving the data, counter means for counting a level change appearing at the clock input terminal, and detecting the count value of the counting means in response to the timer signal. When the count value is a predetermined value, a reception error signal of a first logic level is generated. When the count value is less than the predetermined value or exceeds the predetermined value, a reception error signal of a second logic level is generated. And an error output terminal for outputting the reception error signal. When the reception error signal is at the first logic level, the contents of the register are taken into a data processing circuit, and A transmission unit includes an error input terminal connected to the error output terminal of the reception unit, and an error input terminal connected to the error input terminal. Serial data transfer system when the signal error signal is detected that is supplied, characterized by further comprising a means for re-transmitting the serial data.
JP6326303A 1994-12-27 1994-12-27 Serial interface and serial data transfer system Expired - Fee Related JP3019740B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6326303A JP3019740B2 (en) 1994-12-27 1994-12-27 Serial interface and serial data transfer system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6326303A JP3019740B2 (en) 1994-12-27 1994-12-27 Serial interface and serial data transfer system

Publications (2)

Publication Number Publication Date
JPH08185363A JPH08185363A (en) 1996-07-16
JP3019740B2 true JP3019740B2 (en) 2000-03-13

Family

ID=18186265

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6326303A Expired - Fee Related JP3019740B2 (en) 1994-12-27 1994-12-27 Serial interface and serial data transfer system

Country Status (1)

Country Link
JP (1) JP3019740B2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5409025B2 (en) * 2009-01-27 2014-02-05 京楽産業.株式会社 Game machine
JP5350049B2 (en) * 2009-04-03 2013-11-27 セミコンダクター・コンポーネンツ・インダストリーズ・リミテッド・ライアビリティ・カンパニー Interface circuit
JP5629549B2 (en) * 2010-10-27 2014-11-19 京セラドキュメントソリューションズ株式会社 Communication apparatus and image forming apparatus having the same
JP6602579B2 (en) * 2015-07-15 2019-11-06 ルネサスエレクトロニクス株式会社 Semiconductor device and system
JP7269610B2 (en) * 2017-03-03 2023-05-09 株式会社ジャパン・アイディー Slave side device
JP7057990B2 (en) * 2017-03-03 2022-04-21 株式会社ジャパン・アイディー Clock synchronous serial data receiving circuit

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63148737A (en) * 1986-12-11 1988-06-21 Canon Inc Data communication equipment
JPH02128287A (en) * 1988-11-08 1990-05-16 Nec Ic Microcomput Syst Ltd Microcomputer
JPH04101535A (en) * 1990-08-21 1992-04-03 Matsushita Electric Ind Co Ltd Interface circuit
JPH04109762A (en) * 1990-08-30 1992-04-10 Canon Inc Facsimile equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63148737A (en) * 1986-12-11 1988-06-21 Canon Inc Data communication equipment
JPH02128287A (en) * 1988-11-08 1990-05-16 Nec Ic Microcomput Syst Ltd Microcomputer
JPH04101535A (en) * 1990-08-21 1992-04-03 Matsushita Electric Ind Co Ltd Interface circuit
JPH04109762A (en) * 1990-08-30 1992-04-10 Canon Inc Facsimile equipment

Also Published As

Publication number Publication date
JPH08185363A (en) 1996-07-16

Similar Documents

Publication Publication Date Title
US5019966A (en) Dual processors using busy signal for controlling transfer for predetermined length data when receiving processor is processing previously received data
US4984190A (en) Serial data transfer system
US20080086578A1 (en) Integrated circuit device having send/receive macro for serial transfer bus
US5068785A (en) Bus control for small computer system interface with transfer indication preceding final word transfer and buffer empty indication preceding receipt acknowledgement
EP0602667A1 (en) System and method for peripheral data transfer
JPS63296540A (en) Multiprotocol communication controller in single integrated circuit microcontroller
US5461701A (en) System and method for peripheral data transfer
US4980851A (en) Reduced power pipelined static data transfer apparatus
JP3019740B2 (en) Serial interface and serial data transfer system
US5228129A (en) Synchronous communication interface for reducing the effect of data processor latency
US4633489A (en) Interface unit inserted between a data transfer unit and a processor unit
US5617433A (en) Serial data transfer apparatus
JPH103436A (en) Serial input and output circuit with automatic transfer function
WO1997004575A1 (en) Extended chip select reset apparatus and method
EP0285335B1 (en) Data communication system and method
JP2808961B2 (en) Communication control device
JP2994906B2 (en) Data receiving circuit
KR910004692Y1 (en) Circuit for interupting and polling end of line in datafile transmission system
US20020099969A1 (en) Data input and output device using timer function
JP3296905B2 (en) Pattern detection circuit and facsimile machine
KR0148568B1 (en) Data processing device
JP2630077B2 (en) Clock synchronous serial interface
JP2581041B2 (en) Data processing device
JPH0744399A (en) Interruption control circuit
JPH053022B2 (en)

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19991207

LAPS Cancellation because of no payment of annual fees