JPH0482444A - serial interface - Google Patents
serial interfaceInfo
- Publication number
- JPH0482444A JPH0482444A JP2197228A JP19722890A JPH0482444A JP H0482444 A JPH0482444 A JP H0482444A JP 2197228 A JP2197228 A JP 2197228A JP 19722890 A JP19722890 A JP 19722890A JP H0482444 A JPH0482444 A JP H0482444A
- Authority
- JP
- Japan
- Prior art keywords
- data
- clock
- error
- shift
- shift clock
- 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
Links
Landscapes
- Dc Digital Transmission (AREA)
- Maintenance And Management Of Digital Transmission (AREA)
Abstract
Description
【発明の詳細な説明】
産業上の利用分野
本発明は一定周期のクロックに基づいて直列にデータを
伝送するシリアルインターフェース回路に関する。DETAILED DESCRIPTION OF THE INVENTION Field of the Invention The present invention relates to a serial interface circuit that serially transmits data based on a clock having a constant period.
従来の技術
近年、1チツプマイクロコンピユータの高集積化・高機
能化が進み、1つの制御用マイクロコンピュータがその
応用機器上で関与する割合か増すにつれて、周辺とのデ
ータのやりとりのためにシリアルインターフェースを用
いることは不可欠となってきている。このシリアルイン
ターフェースを介してのデータのやりとりの際に送信側
か送信シタデータを受信側が正しく受信できたかとうか
を確認することが、マイクロコンピュータの応用機器か
正常に動作するためには重要となる。2. Description of the Related Art In recent years, single-chip microcomputers have become highly integrated and highly functional, and as the proportion of a single control microcomputer being involved in the application equipment has increased, serial interfaces have become increasingly popular for exchanging data with peripheral devices. It has become essential to use When exchanging data via this serial interface, it is important for the microcomputer application equipment to operate normally to check whether the transmitting side or the receiving side can correctly receive the transmitted data.
従来この種の回路は第6図に示すような構成であった。Conventionally, this type of circuit has had a configuration as shown in FIG.
第6図に示すように、構成要素として、1はnビットの
データを直列データとして外部とやりとりする中央演算
処理装置(以降CPUと記す)、2はnビットの並列デ
ータを直列に変換して1ビットずつ送り出すため、ある
いは直列に受入れたnビットのデータを並列に変換する
ためのシフトレジスタ、3はシフトレジスタ2のソフト
クロックを生成するためのカウンタ、4はカウンタ3で
生成されたシフトクロック、5は/ブトレジスタ2から
送り出される直列データを遠方まで送信するためのデー
タ送信バッファ、6はシフトクロックを遠方まで送信す
るためのクロック送信バッファ、7は遠方より受信した
直列受信データ、8はデータ送信端子、9はクロック送
信端子、10はデータ受信端子である。As shown in Figure 6, the components are: 1 is a central processing unit (hereinafter referred to as CPU) that exchanges n-bit data with the outside as serial data, and 2 is a central processing unit (hereinafter referred to as CPU) that converts n-bit parallel data into serial data. A shift register for sending out one bit at a time or converting serially received n-bit data into parallel; 3 is a counter for generating a soft clock for shift register 2; 4 is a shift clock generated by counter 3; , 5 is a data transmission buffer for transmitting serial data sent from the /button register 2 to a long distance, 6 is a clock transmission buffer for transmitting a shift clock to a long distance, 7 is a serial reception data received from a long distance, 8 is data A transmitting terminal, 9 is a clock transmitting terminal, and 10 is a data receiving terminal.
第6図のように構成されたシリアルインターフェースに
ついて、以下その構成要素のお互いの関連動作を説明す
る。第6図に示した回路を用いてnビットのデータを直
列に送信するためには、まずCPUIからnビットの並
列データをシフトレジスタ2へ転送・格納する。つぎに
カウンタ3で一定周期のパルスを発生し、これをシフト
クロック4とすることにより、このnビットのデータを
格納済のシフトレジスタ2にシフト動作をさせる。以上
によりデータ送信バッファ5を通った送信データがデー
タ送信端子8から、クロック送F バッファ6を通った
シフトクロツタかクロック送信端子9から送信される。Regarding the serial interface configured as shown in FIG. 6, the relative operations of its constituent elements will be explained below. In order to serially transmit n-bit data using the circuit shown in FIG. 6, first transfer and store n-bit parallel data from the CPUI to the shift register 2. Next, the counter 3 generates a pulse with a constant period, and this is used as the shift clock 4 to cause the n-bit data to be shifted into the stored shift register 2. As described above, the transmission data that has passed through the data transmission buffer 5 is transmitted from the data transmission terminal 8, the shift clock that has passed through the clock transmission F buffer 6, or the clock transmission terminal 9.
以上、送信側の動作について説明したか、受信側の動作
についても簡単に説明する。The operation on the transmitting side has been explained above, and the operation on the receiving side will also be briefly explained.
ます調歩同期方式で受信する場合には、送信されてきた
直列データを第6図上のデータ受信端子10から入力し
、受信データ7をシフトレジスタ2に順次シフトして取
り込むためのシフトクロックを、あらかじめ送信側と申
し合わせた周期でカウンタ3を動作させることによって
生成することによりnビットのデータをシフトレジスタ
2に格納スる。この時点で受信側のCPUIがシフトレ
ジスタ2からnビットのデータを取り込むことによって
調歩同期式によるデータの受信は完了する。When receiving data using the start-stop synchronization method, input the transmitted serial data from the data receiving terminal 10 shown in FIG. The n-bit data is stored in the shift register 2 by generating it by operating the counter 3 at a period agreed upon in advance with the transmitting side. At this point, the reception-side CPUI takes in n-bit data from the shift register 2, thereby completing the asynchronous data reception.
つぎにクロック同期式で受信する場合には、送信されて
きた直列データを第6図のデータ受信端子10から入力
し、受信データ7をシフトレジスタ2に順次シフトして
取り込むためのシフトクロックを、第6図には示してい
ないか送信側から送られてきたシフトクロックをクロッ
ク受信端子から入力することによりnビットのデータを
シフトレジスタ2に格納する。この時点で受信側のCP
UIがシフトレジスタ2からnビットのデータを取り込
むことによってクロック同期式によるデータの受信は完
了する。Next, when receiving in a clock synchronous manner, input the transmitted serial data from the data reception terminal 10 in FIG. By inputting a shift clock not shown in FIG. 6 or sent from the transmitting side from the clock receiving terminal, n-bit data is stored in the shift register 2. At this point, the receiving side's CP
When the UI takes in n-bit data from the shift register 2, the clock-synchronous data reception is completed.
発明が解決しようとする課題
しかしながら上記のような構成では送信側から送り出さ
れたデータに、受信側のシフトレジスタ2のシフトタイ
ミングに同期したノイズか乗った場合つまり何らかの外
因によってレベル変動か生じた場合には、本来伝送され
るべきであった正しいnビットデータの内の一部あるい
は全部のビットが間違って伝送されてしまったり、また
、クロック同期式の場合にシフトクロックの伝送線上に
ノイズが乗った場合には受信側において間違ったタイミ
ングでシフトレジスタ2かシフト動作をしてしまう可能
性かあるために、nビットのデータが正しく受信された
かとうかをチエツクするためにCPUIを動作させる必
要があり、ソフトウェアプログラミング上の負担の増大
、ひいてはCPUIの処理能力の低減を引き起こすとい
う問題があった。たとえばnビットのデータ送信か終了
した後に、受信側が受は取ったnビットのデータを受信
側から送信側へ送り返すことによって、送信側において
当初送信する予定であったデータと比較チエツクする方
法や、nビットのデータをm組連続して送信した後また
は送信する前にそれらmuのデータから一意的に定まる
データ(たとえばチエツクサム)を送信することによっ
て、受信側において独自にm組のデータから実際に前記
一意的に定まるデータを算出しチエツクする方法がある
が、上記どちらの方法においても送信データをやりとり
するときとチエツク用のデータをやりとりするときのノ
イスの乗り方によっテハ、送受信時の誤りが検出されな
いことも起こり得る。Problems to be Solved by the Invention However, with the above configuration, if noise synchronized with the shift timing of the shift register 2 on the receiving side is added to the data sent from the transmitting side, that is, if a level fluctuation occurs due to some external factor. In some cases, part or all of the correct n-bit data that should have been transmitted may be incorrectly transmitted, or in the case of a clock synchronous system, noise may be added to the shift clock transmission line. In this case, there is a possibility that shift register 2 will be shifted at the wrong timing on the receiving side, so it is necessary to run the CPUI to check whether the n-bit data has been received correctly. However, there has been a problem in that it increases the burden on software programming and further reduces the processing capacity of the CPUI. For example, after completing the transmission of n bits of data, the receiving side sends the received n bits of data back to the transmitting side, so that the transmitting side can check the data and compare it with the data that was originally scheduled to be transmitted. After or before continuously transmitting m sets of n-bit data, by transmitting data (for example, a checksum) that is uniquely determined from the mu data, the receiving side can independently calculate the actual value from the m sets of data. There is a method of calculating and checking the uniquely determined data, but in both of the above methods, errors may occur during transmission and reception depending on how noise is affected when transmitting data and when transmitting check data. may not be detected.
本発明は上記問題に留意し、CPUに与える負担を最小
限にとどめつつ、送受信時に生した誤りを検出すること
ができるシリアルインターフェースを提供することを目
的とする。The present invention has been made with the above-mentioned problems in mind, and an object of the present invention is to provide a serial interface that can detect errors that occur during transmission and reception while minimizing the burden on the CPU.
課題を解決するための手段
本発明の上記目的を達成するために、ソフトクロックの
あるいはシフトクロックの一周期ごとのレベル変動期間
を少なくとも除く期間をパルス出力とするエラー検出許
可信号を発生するカウンタと、このエラー検出許可信号
のパルスIA間に送受信シフトクロック、あるいは送受
信データのレベル変動を検出するエツジ検出回路とを具
備し、エツジ検出回路でレベル変動を検出したときは、
エラーフラグによりエラーが検出された表示か行われる
シリアルインターフェースの構成としたものである。Means for Solving the Problems In order to achieve the above object of the present invention, a counter is provided which generates an error detection enable signal whose pulse output is a period excluding at least a level fluctuation period for each cycle of a soft clock or a shift clock. , is provided with a transmission/reception shift clock or an edge detection circuit for detecting level fluctuations in transmission/reception data between pulses IA of this error detection permission signal, and when a level fluctuation is detected by the edge detection circuit,
This is a serial interface configuration in which an error flag indicates that an error has been detected.
作用
上記構成の本発明のシリアルインターフェースは、ソフ
トクロックに同期し、データレベル変動があった場合エ
ラーと見なされる期間を、エラー検出許可信号のパルス
期間として抜き出すため、CPUに負荷をあまりかけず
に、エツジ検出回路により、信号のエラーを容易に検出
することかできる。そしてエラー表示か確実にエラーフ
ラグにより表示される。The serial interface of the present invention having the above configuration is synchronized with the soft clock, and extracts the period considered to be an error when there is a data level fluctuation as the pulse period of the error detection enable signal, so it can be used without placing much load on the CPU. , an edge detection circuit can easily detect errors in the signal. Then, an error message is definitely displayed using an error flag.
実施例
本発明の一実施例のシリアルインターフェースの構成を
第1図に示す。第1図に示すように、構成要素として1
はnビットのデータを直列データとして外部とやりとり
を制御するCPU、、2はnビットの並列データを直列
に変換して1ビットずつ送り出すため、あるいは直列に
受は入れたnビットのデータを並列に変換するためのシ
フトレジスタ、3は前記シフトレジスタの周期2Tのシ
フトクロックを出力する第1のクロック端子と、持続時
間T−ΔTのエラー検出許可信号を出力する第2のクロ
ック端子を有するカウンタ、4はカウンタ3の第1のク
ロック端子から出力されたシフトクロック、5はシフト
レジスタ2から送り出される直列データを遠方まで送信
するためのデータ送信バッファ、6はシフトクロックを
遠方まで送信するためのクロック送信バッファ、7は遠
方より受信した直列受信データ、8はデータ送信端子、
9.はクロック送信端子、10はデータ受信端子、11
はクロック送信端子9から送信されるシフトクロック、
つまり受信側が受信するシフトクロックルベル変化を検
知するためのエツジ検出回路、12はエラー検出期間内
にシフトクロックのエツジが検出された場合“の情報を
保持するためのエラーフラグ、13はカウンタ3の第2
のクロック端子から出力される持続時間T−ΔTのエラ
ー検出許可信号、14はクロック送信バッファ6を通過
後の実際に受信側が受けとるシフトクロック、15はエ
ツジ検出信号である。Embodiment FIG. 1 shows the configuration of a serial interface according to an embodiment of the present invention. As shown in Figure 1, as a component 1
2 is a CPU that converts n-bit parallel data into serial data and controls the exchange with the outside, 3 is a counter having a first clock terminal that outputs a shift clock of the shift register with a period of 2T, and a second clock terminal that outputs an error detection permission signal with a duration of T-ΔT. , 4 is a shift clock output from the first clock terminal of the counter 3, 5 is a data transmission buffer for transmitting the serial data sent out from the shift register 2 to a long distance, and 6 is a shift clock for transmitting the shift clock to a long distance. Clock transmission buffer, 7 is serial reception data received from a distance, 8 is data transmission terminal,
9. is a clock transmission terminal, 10 is a data reception terminal, 11
is the shift clock transmitted from the clock transmission terminal 9,
In other words, an edge detection circuit for detecting a change in the shift clock level received by the receiving side; 12 is an error flag for holding information "if the edge of the shift clock is detected within the error detection period; 13 is an error flag for the counter 3; Second
14 is a shift clock actually received by the receiving side after passing through the clock transmission buffer 6, and 15 is an edge detection signal.
以上のように構成された本実施例について、以下その各
構成要素のお互いの関連と動作を説明する。Regarding this embodiment configured as above, the mutual relationship and operation of each component will be explained below.
この回路を用いてnビットのデータを送信する方法は従
来例で説明した方法と基本的には同一であるため、ここ
ではこの回路を用いたnヒツトのデータ送信時に通信に
エラーを検出する方法たけに限って説明する。The method of transmitting n bits of data using this circuit is basically the same as the method explained in the conventional example, so here we will explain how to detect errors in communication when transmitting n bits of data using this circuit. I will explain only the bamboo shoots.
第1図はクロック同期式の場合の回路構成であり、nビ
ットのデータ送信に使用するシフトクロックはカウンタ
3によって生成される。ここではシフトクロックの周期
は2T、 デユーティ50%とする。ここで、時間間
隔Tを発生するカウンタ3から、持続時間T−ΔTでシ
フトクロックの立上り、立下り部分を除いたエラー検出
許可信号をも出力させる。一般にTの周期を発生するの
に必要なビット数のカウンタがあれば、Tより小さいT
−ΔTの時間間隔をつくるためにはその内の一部のビッ
トを使えば可能になるから、シフトクロツタの立上り、
立下り部分、すなわちレベル変動のある部分を少なくと
も除いてカウンタ3の第2のクロック端子よりT−ΔT
のエラー検出許可信号のパルスを発生させることは困難
ではない。FIG. 1 shows a circuit configuration in the case of a clock synchronous type, in which a shift clock used for data transmission of n bits is generated by a counter 3. Here, the cycle of the shift clock is 2T and the duty is 50%. Here, the counter 3 which generates the time interval T also outputs an error detection permission signal excluding the rising and falling portions of the shift clock with a duration T-ΔT. In general, if you have a counter with the number of bits required to generate a period of T, then
Since it is possible to create a time interval of -ΔT by using some of the bits, the rise of the shift clock,
T-ΔT from the second clock terminal of the counter 3 excluding at least the falling part, that is, the part with level fluctuation.
It is not difficult to generate a pulse of the error detection enable signal.
つぎに本実施例特有のものとしてエツジ検出回路11が
ある。これはカウンタ3の第1のクロック端子より発生
した周期2Tのシフトクロックのレベル変化を検知する
ためのものであるか、ココで重要なのはクロック送信バ
ッファ6の出力側のレベル変化を検知しようとしている
点である。Next, there is an edge detection circuit 11 that is unique to this embodiment. This is to detect the level change of the shift clock with a period of 2T generated from the first clock terminal of the counter 3, or what is important here is to detect the level change on the output side of the clock transmission buffer 6. It is a point.
バッファ通過前のシフトクロック4はカウンタ3の出力
そのものであり、このシリアルインターフェースを構成
するLSIの外部には出ていないためこのシフトクロッ
ク4にノイズが乗ることは生しにくい。それよりもクロ
ック送信バッファ6、クロック送信端子9を通ってLS
Iの外部ニ出力された後、ノイズの影響でレベル変化が
生しる可能性が高く、これを検知することか目的である
ため、第1図のようにクロック送信端子9から直接、エ
ツジ検出回路11ヘシフトクロツクを導くことが重要と
なる。したかってこのエツジ検出回路11はバッファ6
通過後のシフトクロック14に生じるレベル変化を検知
して、エツジ検出信号15を出力する。このエツジ検出
信号15か、前記エラー検出許可信号が許可状態を示す
パルス期間に生した場合はその旨の情報をエラーフラグ
12が保持し、シフトクロックにノイズが乗ってデータ
のミスシフトか生したことを表す。The shift clock 4 before passing through the buffer is the output of the counter 3 itself, and is not output to the outside of the LSI constituting this serial interface, so it is difficult for noise to be added to the shift clock 4. Rather, the LS is passed through the clock transmission buffer 6 and the clock transmission terminal 9.
After I is output to the outside, there is a high possibility that a level change will occur due to the influence of noise, and the purpose is to detect this, so edge detection is performed directly from the clock transmission terminal 9 as shown in Figure 1. It is important to route the shift clock to circuit 11. Therefore, this edge detection circuit 11 is connected to the buffer 6.
A level change occurring in the shift clock 14 after passing is detected and an edge detection signal 15 is output. If this edge detection signal 15 or the error detection permission signal is generated during the pulse period indicating the permission state, the error flag 12 holds information to that effect, indicating that noise has been added to the shift clock and data has been misshifted. represents.
以上説明した本実施例の動作を、各信号のタイミングチ
ャートを用いて表現したのか第2図および第3図である
。第2図は全2ビットのデータをシフトミスなしで送信
した場合、第3図は同しく全2ビットのデータを送信す
る際に7フトクロノクにノイズが乗ることによりシフト
ミスか生し、エラーフラグ12が立った場合をそれぞれ
表す。The operation of this embodiment described above is expressed using timing charts of each signal in FIGS. 2 and 3. Figure 2 shows the case where all 2 bits of data are transmitted without a shift error, and Figure 3 shows that when transmitting all 2 bits of data, a shift error occurs due to noise on the 7-foot clock, and error flag 12 is raised. This represents each case when standing.
第2図1a)はデータ送信端子8の出力データ信号を示
し、第2図(blはカウンタ3より出力されたシフトク
ロック4を示し、第2図(C1はバッファ6を介して、
クロック送信端子9におけるシフトクロック14を示す
。第2図1d)はシフトクロック14のレベル変動をエ
ツジ検出回路11により検出したエツジ検出信号15で
あり、第2図(elは、少なくともシフトクロック14
のレベル変動部分、すなわちこの場合はエツジ検出信号
15の部分を除いた期間のパルス出力を有するエラー検
出許可信号13である。第2図ではこのエラー検出許可
信号13のパルス期間内にはシフトクロック14のレベ
ル変動がないため、第2図げ)のエラーフラグ12の出
力がないことになる。FIG. 2 (1a) shows the output data signal of the data transmission terminal 8, FIG. 2 (bl shows the shift clock 4 output from the counter 3, and FIG.
Shift clock 14 at clock transmission terminal 9 is shown. FIG. 2 1d) shows an edge detection signal 15 obtained by detecting the level fluctuation of the shift clock 14 by the edge detection circuit 11.
The error detection enable signal 13 has a pulse output for a period excluding the level fluctuation portion of the signal, that is, the edge detection signal 15 in this case. In FIG. 2, since there is no level fluctuation of the shift clock 14 within the pulse period of the error detection permission signal 13, there is no output of the error flag 12 in FIG.
第3図は、第3図fclのシフトクロック14に、第3
図telのエラー検出許可信号13のパルス期間にレベ
ル変動があるため、第3図fdlのエツジ検出信号15
か出力され、第3図(flのエラーフラグ12の出力が
、これ以降ハイレベルに変化し、エラーがあったことを
表示している。FIG. 3 shows a third shift clock 14 in FIG. 3 fcl.
Since there is a level fluctuation in the pulse period of the error detection permission signal 13 in Figure tel, the edge detection signal 15 in Figure 3 fdl
The output of the error flag 12 in FIG. 3 (fl) changes to high level from then on, indicating that an error has occurred.
このように本発明によればシフトクロックにノイズが乗
ることによって受信側でシフトミスが生じていることを
、受信側からデータを送り返したり、受信側でチエツク
サムを計算したりすることなく、送信側で検知すること
ができる。As described above, according to the present invention, it is possible to detect that a shift error has occurred on the receiving side due to noise on the shift clock on the transmitting side without sending data back from the receiving side or calculating a checksum on the receiving side. Can be detected.
なお、第1図〜第3図ではクロック同期式のシリアルイ
ンターフェースのシフトクロック端子に本発明を適用し
た一実施例構成について説明したが、第1図においてエ
ツジ検出回路11に、ンフトクロソク14の代わりに送
信データ8を入力し、カウンタ3から出力されるエラー
検出許可信号をT−ΔTから2T−ΔTへと変更する。Although FIGS. 1 to 3 describe an embodiment in which the present invention is applied to the shift clock terminal of a clock-synchronous serial interface, in FIG. Transmission data 8 is input, and the error detection permission signal output from counter 3 is changed from T-ΔT to 2T-ΔT.
すなわち、シフトクロック4の1周期ごとのレベル変動
部分を除く、パルス出力で構成することによす、容易に
調歩同期式のシリアルインターフェースのデータの信号
線に乗るノイズを検出するための回路構成をとることが
できる。その場合の各信号のタイミングチャートを第4
図および第5図に示す。第4図は全2ビットのデータを
調歩同期式によってエラーなしで送信した場合を表し、
第5図は同じく調歩同期式による全2ビットのデータ送
信中にデータ信号線にノイズか乗ったことによってエラ
ーフラグ12か立った場合を表す。In other words, a circuit configuration for easily detecting noise on the data signal line of an asynchronous serial interface is created by configuring the pulse output, excluding the level fluctuation part for each period of the shift clock 4. You can take it. The timing chart of each signal in that case is shown in the fourth section.
As shown in FIG. Figure 4 shows the case where all 2 bits of data are transmitted without error using the asynchronous method.
FIG. 5 shows a case where error flag 12 is raised due to noise on the data signal line during data transmission of all 2 bits using the asynchronous method.
第4図fatはデータ送信端子8のデータであり、第4
図fblのシフトクロック4の1周期の2Tのタイミン
グごとにデータ出力されている。第4図(C1はエツジ
検出回路11によるエツジ検出信号15であり、データ
の2Tの周期でのレベル変動を検出しており、シフトク
ロック4の1周期ごとのレベル変動部分に相当している
。第4図fdlはそのレベル変動部分を少なくとも除い
たパルス出力を有するカウンタ3からのエラー検出許可
信号13を示す。第4図(elはこのエラー検出許可信
号13のパルス期間内のエラーか、エツジ検出回路11
によりレベル変動として検出されるとエラーを表示する
エラーフラグ12の出力を示し、この場合、レベル変動
がないため、無信号となる。第5図は第5図(a)に示
すデータ送信端子8のデータのレベル変動がある場合で
、第5図telのエラーフラグ12の出力がエラー表示
信号として出力されている。FIG. 4 fat is the data of the data transmission terminal 8;
Data is output every 2T timing of one cycle of shift clock 4 in FIG. fbl. FIG. 4 (C1 is an edge detection signal 15 from the edge detection circuit 11, which detects level fluctuations in data cycles of 2T, which corresponds to level fluctuations in each cycle of the shift clock 4. FIG. 4 fdl shows the error detection permission signal 13 from the counter 3 having a pulse output excluding at least the level fluctuation part. Detection circuit 11
It shows the output of the error flag 12 which indicates an error when a level change is detected by the above, and in this case, there is no level change, so there is no signal. FIG. 5 shows a case where there is a level fluctuation of the data at the data transmission terminal 8 shown in FIG. 5(a), and the output of the error flag 12 of tel in FIG. 5 is output as an error display signal.
以上、送信側でのエラー検出として説明したが、受信信
号のエラー検出もシフトクロックの同期をとることによ
り、同様にエラー検出ができることは言うまでもない。Although the above description has been made regarding error detection on the transmitting side, it goes without saying that error detection of received signals can be similarly performed by synchronizing the shift clock.
発明の効果
以上の説明より明らかなように、シフトクロックあるい
はシフトクロックの1周期ごとのレベル変動期間を少な
くとも除く期間のパルス出力を有するエラー検出許可信
号を発生するカウンタと、このエラー検出許可信号のパ
ルス期間に送受信/フトクロソクあるいは送受信データ
のレベル変動を検出するエツジ検出回路を備え、レベル
変動を検出することによりエラーフラグにエラーか検出
された表示を行うことにより、送信側において送信した
信号のエラーの有無か事前に確認できるとともに受信信
号におけるエラーの有無を容易に検出できるシリアルイ
ンターフェースである。Effects of the Invention As is clear from the above explanation, there is provided a counter that generates an error detection permission signal having a pulse output for a period excluding at least a shift clock or a level fluctuation period for each period of the shift clock, and a counter for generating an error detection permission signal. Equipped with an edge detection circuit that detects transmission/reception/crossovers or level fluctuations in the transmission/reception data during the pulse period, and when level fluctuations are detected, an error flag is displayed indicating that an error has been detected, thereby detecting errors in the transmitted signal on the transmitting side. This is a serial interface that allows you to check in advance whether there is an error in the received signal and easily detect the presence or absence of an error in the received signal.
第1図は本発明の一実施例のシリアルインタフェースの
構成を示すブロック図、第2図および第3図はそれぞれ
同実施例のクロック同期式のシリアルインターフェース
に適用した場合のタイミングチャート、第4図および第
5図はそれぞれ同実施例の調歩同期式のシリアルインタ
ーフェースに適用した場合のタイミングチャート、第6
図は従来例のシリアルインターフェースの構成を示すブ
ロック図である。
1・・・・・・CPU、2・・・・・・シフトレジスタ
、3・・・・・・カウンタ、5・・・・・・データ送信
バッファ、6・・・・・・クロック送信バッファ、8・
・・・・・データ送信端子、911813.クロック送
信端子、10・・・・・・データ受信端子、11・・・
・・・エツジ検出回路、12・・・・・・エラーフラグ
。
代理人の氏名 弁理士 粟野重孝 はか1名(6)エラ
ーフラ7
?−=
シフトレヅスタ
データ」イ8バッファ
クロ・/フ迫信ハブ77
子−フ、送イL疼子
クロ、ツク瀞ノtが顆と
(α)データム14蝉5
(b)し7トクロ、り
T
エラーフラク
(α)チ―り通イざ欠1左
<b)シフトクロックFIG. 1 is a block diagram showing the configuration of a serial interface according to an embodiment of the present invention, FIGS. 2 and 3 are timing charts when the same embodiment is applied to a clock-synchronous serial interface, and FIG. 4 and FIG. 5 are timing charts when applied to the asynchronous serial interface of the same embodiment, and FIG.
The figure is a block diagram showing the configuration of a conventional serial interface. 1...CPU, 2...Shift register, 3...Counter, 5...Data transmission buffer, 6...Clock transmission buffer, 8・
...Data transmission terminal, 911813. Clock transmission terminal, 10...Data reception terminal, 11...
...Edge detection circuit, 12...Error flag. Name of agent: Patent attorney Shigetaka Awano Haka 1 (6) Error 7? -= Shift Resuta Data'' I8 Buffalo Cloth/Futsushin Hub 77 Child-Fu, Send-I L Aging Child Kuro, Tsuku Tono T is condyle and (α) Datum 14 Cicada 5 (b) Shi7 Tokuro , riT Error flux (α) Chee - ri passing error 1 left <b) Shift clock
Claims (2)
すため、および直列に受入れた直列データを並列に変換
するためのシフトレジスタと、前記シフトレジスタのシ
フトクロックを発生する第1のクロック端子と、前記シ
フトクロックのレベル変動期間を少なくとも除く期間を
パルス出力とするエラー検出許可信号を発生する第2の
クロック端子を有するカウンタと、前記カウンタからの
シフトクロックを入力とし、出力をクロックの出力端子
に接続したバッファと、前記クロックの出力端子のレベ
ル変動を検出するエッジ検出回路と、前記クロックの出
力端子のシフトクロックのエラーを表示するエラーフラ
グと、前記データおよびシフトクロックの信号のやりと
りを制御する中央演算処理装置とを具備し、前記中央演
算処理装置により前記エラー検出許可信号のパルス期間
に、前記エッジ検出回路がレベル変動を検出したときは
、前記エラーフラグにエラーが検出された表示が行われ
るようにしてなるシリアルインターフェース。(1) A shift register for converting parallel data into serial data and sending it out one bit at a time, and for converting serial data received in series into parallel data, and a first clock terminal for generating a shift clock for the shift register; , a counter having a second clock terminal that generates an error detection enable signal whose pulse output is a period excluding at least a period of level fluctuation of the shift clock, and a clock output terminal that receives the shift clock from the counter as an input and outputs an output. an edge detection circuit that detects level fluctuations at the output terminal of the clock, an error flag that displays an error in the shift clock at the output terminal of the clock, and controls the exchange of the data and shift clock signals. and a central processing unit, when the edge detection circuit detects a level fluctuation during the pulse period of the error detection permission signal by the central processing unit, an indication that an error has been detected is displayed on the error flag. Serial interface that becomes implemented.
すため、および直列に受入れた直列データを並列に変換
するためのシフトレジスタと、前記シフトレジスタのシ
フトクロックを発生する第1のクロック端子と、前出シ
フトクロックの1周期ごとのレベル変動期間を少なくと
も除く期間をパルス出力とするエラー検出許可信号を発
生する第2のクロック端子を有するカウンタと、前記シ
フトレジスタの出力直列データを入力とし、出力をデー
タ出力端子に接続したバッファと、前記データ出力端子
のレベル変動を検出するエッジ検出回路と、前記データ
出力端子のデータのエラーを表示するエラーフラグと、
前記データおよびシフトクロックの信号のやりとりを制
御する中央演算処理装置とを具備し、前記中央演算処理
装置により、前記エラー検出許可信号のパルス期間に、
前記エッジ検出回路がレベル変動を検出したときは、前
記エラーフラグにエラーが検出された表示が行われるよ
うにしてなるシリアルインターフェース。(2) a shift register for converting parallel data into serial data and sending it out one bit at a time, and for converting serial data received in series into parallel data; and a first clock terminal for generating a shift clock for the shift register; , a counter having a second clock terminal that generates an error detection enable signal whose pulse output is a period excluding at least a level fluctuation period for each cycle of the shift clock, and inputting the output serial data of the shift register, a buffer whose output is connected to a data output terminal; an edge detection circuit that detects level fluctuations at the data output terminal; and an error flag that indicates an error in data at the data output terminal;
and a central processing unit that controls the exchange of the data and shift clock signals, and the central processing unit controls, during the pulse period of the error detection permission signal,
In the serial interface, when the edge detection circuit detects a level fluctuation, an indication that an error has been detected is displayed on the error flag.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2197228A JPH0482444A (en) | 1990-07-25 | 1990-07-25 | serial interface |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2197228A JPH0482444A (en) | 1990-07-25 | 1990-07-25 | serial interface |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH0482444A true JPH0482444A (en) | 1992-03-16 |
Family
ID=16370975
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2197228A Pending JPH0482444A (en) | 1990-07-25 | 1990-07-25 | serial interface |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH0482444A (en) |
-
1990
- 1990-07-25 JP JP2197228A patent/JPH0482444A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR100235842B1 (en) | Data transmission/receipt circuit and method thereof | |
| EP0043432B1 (en) | Error detecting device for synchronous data transmission system | |
| JPH03191633A (en) | Data transfer system | |
| JPH0482444A (en) | serial interface | |
| EP1946475A1 (en) | Data interface and method of seeking synchronization | |
| US7158599B2 (en) | Elastic store circuit | |
| JPH0510435Y2 (en) | ||
| JP2001177583A (en) | Asynchronous serial data communication method | |
| JPH04329721A (en) | Data reception method | |
| KR100240248B1 (en) | Serial data transceiver and data transmission and reception method | |
| JPH06243052A (en) | Serial communication error processing method | |
| JP2005354158A (en) | Error detection circuit | |
| JPH067385Y2 (en) | Interface circuit | |
| JP3978898B2 (en) | Multiframe synchronization detection method and apparatus | |
| JPS63312754A (en) | Error generation circuit | |
| JPH04319756A (en) | Start-stop synchronization type serial interface | |
| JP2876747B2 (en) | Frame synchronization circuit | |
| JPH11306096A (en) | Serial communication device and method, and recording medium recording serial communication control program | |
| JPH04267631A (en) | Parity bit addition system | |
| JPH04220031A (en) | Serial data transmitting system and serial data receiving system | |
| JPH0374932A (en) | Biphase code signal demodulation circuit | |
| JPH0556699B2 (en) | ||
| KR20000013037A (en) | Data transmitting-receiving circuit and method thereof | |
| JPH0451715A (en) | Clock generating circuit | |
| JPH05191393A (en) | Bit synchronization circuit |