JPH04319756A - Start-stop synchronization type serial interface - Google Patents

Start-stop synchronization type serial interface

Info

Publication number
JPH04319756A
JPH04319756A JP8802091A JP8802091A JPH04319756A JP H04319756 A JPH04319756 A JP H04319756A JP 8802091 A JP8802091 A JP 8802091A JP 8802091 A JP8802091 A JP 8802091A JP H04319756 A JPH04319756 A JP H04319756A
Authority
JP
Japan
Prior art keywords
transfer data
shift clock
shift
register
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.)
Pending
Application number
JP8802091A
Other languages
Japanese (ja)
Inventor
Yasuhiro Ono
大野 恭宏
Yoshinaga Hamaguchi
善永 濱口
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electronics 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 Matsushita Electronics Corp filed Critical Matsushita Electronics Corp
Priority to JP8802091A priority Critical patent/JPH04319756A/en
Publication of JPH04319756A publication Critical patent/JPH04319756A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Transfer Systems (AREA)

Abstract

PURPOSE:To make it unnecessary to previously set up the data bit width of transfer data on the receiving side and to occasionally transmit/receive the transfer data by providing this serial interface with a register for setting up a value measured by a pulse width measuring counter in a shift clock counter. CONSTITUTION:Transfer data are inputted from a receiving terminal 1, the data bit width of the transfer data is measued and correct transfer data are transmitted/received by generating shift clocks having the same width to a shift register 3. At that time, equality between start bit width and data bit width in the transfer data is remarked. The start bit widt is measued by detecting the level change of the start bit by an edge detecting circuit 4 and measuring an interval between the start edge and stop edge of a start bit pulse width measuring counter 5 and the measured value is set up in a register 7. A shift clock for the shift register 3 is generated from a shift clock counter 6.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】この発明は、随時転送データの送
受信を行うことのできる調歩同期式シリアルインターフ
ェースに関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an asynchronous serial interface capable of transmitting and receiving transfer data at any time.

【0002】0002

【従来の技術】近年、1チップマイクロコンピュータの
高集積化・高機能化が進み、1つの制御用マイクロコン
ピュータがその応用機器上で関与する割合が増すにつれ
て、周辺とのデータのやりとりのために直列インターフ
ェースを用いることは不可欠となってきている。
[Background 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, it has become necessary to The use of serial interfaces has become essential.

【0003】以下に従来の調歩同期式シリアルインター
フェースについて説明する。図3は従来の調歩同期式シ
リアルインターフェースの構成を示すものである。図3
において、1は転送データを受信するための受信端子、
2は転送データの受信開始を検知するためのスタート検
出回路、3は直列に受信した転送データを並列に変換す
るためのシフトレジスタ、14はシフトレジスタ3のシ
フトクロックを発生するためのシフトクロック生成回路
である。
A conventional asynchronous serial interface will be explained below. FIG. 3 shows the configuration of a conventional asynchronous serial interface. Figure 3
, 1 is a receiving terminal for receiving transfer data,
2 is a start detection circuit for detecting the start of reception of transfer data; 3 is a shift register for converting serially received transfer data into parallel; 14 is a shift clock generator for generating a shift clock for shift register 3. It is a circuit.

【0004】図4(A)は受信端子1から受信される転
送データのタイミングチャートであり、15はスタート
ビット、16はデータビットである。また、図4(B)
はシフトクロック生成回路14によって発生されたシフ
トクロックのタイミングチャートである。以上のように
構成された調歩同期式シリアルインターフェースについ
て、以下その動作について説明する。
FIG. 4A is a timing chart of transfer data received from the receiving terminal 1, where 15 is a start bit and 16 is a data bit. Also, Figure 4(B)
is a timing chart of the shift clock generated by the shift clock generation circuit 14. The operation of the asynchronous serial interface configured as described above will be described below.

【0005】まず、図4(A)に示すような転送データ
を図3上の受信端子1から入力し、転送データのスター
トビット15をスタート検出回路2によって検出するこ
とで受信を開始し、シフトレジスタ3に転送データを格
納する。その際、転送データのデータビット16の幅t
6 を、あらかじめ転送データの情報としてシフトクロ
ック生成回路14に設定することでシフトレジスタ3の
シフトクロックが発生され、調歩同期式シリアルインタ
ーフェースを用いての正しいデータ転送が可能となる。
First, transfer data as shown in FIG. 4(A) is input from the reception terminal 1 in FIG. 3, and reception is started by detecting the start bit 15 of the transfer data by the start detection circuit 2. Store the transfer data in register 3. At that time, the width t of data bit 16 of the transfer data
6 is set in advance in the shift clock generation circuit 14 as transfer data information, a shift clock for the shift register 3 is generated, and correct data transfer using an asynchronous serial interface becomes possible.

【0006】[0006]

【発明が解決しようとする課題】しかしながら上記従来
の構成では、転送データを正しく受信する場合、転送デ
ータのデータビット16の幅t6 をあらかじめ受信側
に設定しなければならない、という欠点を有していた。 この発明の目的は、上記従来の問題点を解決するもので
、転送データのデータビットの幅をあらかじめ受信側に
設定する必要がなく、随時転送データの送受信が可能と
なる調歩同期式シリアルインターフェースを提供するこ
とである。
[Problems to be Solved by the Invention] However, the conventional configuration described above has a drawback in that, in order to correctly receive the transfer data, the width t6 of the data bit 16 of the transfer data must be set in advance on the receiving side. Ta. An object of the present invention is to solve the above-mentioned conventional problems, and to provide an asynchronous serial interface that does not require setting the data bit width of transfer data on the receiving side in advance and allows transfer data to be sent and received at any time. It is to provide.

【0007】[0007]

【課題を解決するための手段】この発明の調歩同期式シ
リアルインターフェースは、転送データを受信する受信
端子と、転送データの受信開始を検知するスタート検出
回路と、直列に受信した転送データを並列に変換するシ
フトレジスタと、転送データのレベル変化を検出するエ
ッジ検出回路と、このエッジ検出回路によって検出され
たエッジの間隔を測定するパルス幅測定用カウンタと、
シフトレジスタのシフトクロックを発生するシフトクロ
ック用カウンタと、パルス幅測定用カウンタによって測
定された値をシフトクロック用カウンタに設定するレジ
スタとを備えている。
[Means for Solving the Problems] The asynchronous serial interface of the present invention includes a reception terminal for receiving transfer data, a start detection circuit for detecting the start of reception of transfer data, and a parallel connection for serially received transfer data. a shift register for conversion, an edge detection circuit for detecting a level change in transfer data, a pulse width measurement counter for measuring an interval between edges detected by the edge detection circuit;
It includes a shift clock counter that generates a shift clock for the shift register, and a register that sets the value measured by the pulse width measurement counter in the shift clock counter.

【0008】[0008]

【作用】この発明の構成によれば、受信端子から受信す
る転送データの受信開始をスタート検出回路により検知
し、エッジ検出回路とパルス幅測定用カウンタとで転送
データのデータビットの幅を測定し、この測定された値
をレジスタでシフトクロック用カウンタに設定し、この
シフトクロック用カウンタによりシフトレジスタのシフ
トクロックを発生することによって、転送データのデー
タビットの幅をあらかじめ受信側に設定する必要がなく
なる。
[Operation] According to the configuration of the present invention, the start detection circuit detects the start of reception of transfer data received from the reception terminal, and the width of the data bit of the transfer data is measured by the edge detection circuit and the pulse width measurement counter. By setting this measured value in a shift clock counter using a register and generating a shift clock for the shift register using this shift clock counter, it is necessary to set the data bit width of the transfer data on the receiving side in advance. It disappears.

【0009】[0009]

【実施例】以下この発明の一実施例について、図面を参
照しながら説明する。図1はこの発明の一実施例の調歩
同期式シリアルインターフェースの構成を示すものであ
る。図1において、1は転送データを受信するための受
信端子、2は転送データの受信開始を検知するためのス
タート検出回路、3は直列に受信した転送データを並列
に変換するためのシフトレジスタ、4は転送データのレ
ベル変化を検出するためのエッジ検出回路、5はエッジ
検出回路4によって検出されたエッジの間隔を測定する
ためのパルス幅測定用カウンタ、6はシフトレジスタ3
にシフトクロックを提供するためのシフトクロック用カ
ウンタ、7はパルス幅測定用カウンタ5によって測定さ
れた値をシフトクロック用カウンタ6に設定するための
レジスタである。
DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 shows the configuration of an asynchronous serial interface according to an embodiment of the present invention. In FIG. 1, 1 is a reception terminal for receiving transfer data, 2 is a start detection circuit for detecting the start of reception of transfer data, 3 is a shift register for converting serially received transfer data into parallel, Reference numeral 4 denotes an edge detection circuit for detecting level changes in transfer data, 5 a pulse width measurement counter for measuring the interval between edges detected by the edge detection circuit 4, and 6 a shift register 3.
A shift clock counter 7 is a register for setting the value measured by the pulse width measuring counter 5 in the shift clock counter 6.

【0010】図2(A)は受信端子1から受信される転
送データのタイミングチャートであり、8はスタートビ
ット、9はデータビットである。図2(B)の11はエ
ッジ検出回路4によって検出されたスタートエッジ、図
2(C)の12はエッジ検出回路4によって検出された
ストップエッジ、図2(D)はシフトクロック用カウン
タ6によって発生されたシフトクロックのタイミングチ
ャートである。
FIG. 2A is a timing chart of transfer data received from the receiving terminal 1, where 8 is a start bit and 9 is a data bit. 2(B) is a start edge detected by the edge detection circuit 4, 12 in FIG. 2(C) is a stop edge detected by the edge detection circuit 4, and FIG. 2(D) is a start edge detected by the shift clock counter 6. 5 is a timing chart of generated shift clocks.

【0011】以上のように構成された調歩同期式シリア
ルインターフェースについて、以下その動作を説明する
。まず、図2(A)に示すような転送データを図1上の
受信端子1から入力し、転送データのデータビット9の
幅t2を測定し、同じ幅のシフトレジスタ3のシフトク
ロックを発生することで正しい転送データの送受信を行
なう。その際、転送データのスタートビット8の幅t1
 とデータビット9の幅t2 とが等しいことに注目し
、スタートビット8のレベル変化をエッジ検出回路4に
よって検出し、スタートビット8のスタートエッジ11
とストップエッジ12との間隔をパルス幅測定用カウン
タ5によって測定することでスタートビット8の幅t1
 を測定し、その値をレジスタ7に設定し、シフトレジ
スタ3のシフトクロックをシフトクロック用カウンタ6
によって発生させる。
The operation of the asynchronous serial interface configured as described above will be explained below. First, transfer data as shown in FIG. 2(A) is input from the receiving terminal 1 in FIG. 1, the width t2 of data bit 9 of the transfer data is measured, and a shift clock of the same width for the shift register 3 is generated. This allows correct transmission and reception of transfer data. At this time, the width t1 of the start bit 8 of the transfer data
Noting that the width t2 of data bit 9 is equal to the width t2 of data bit 9, the level change of start bit 8 is detected by edge detection circuit 4, and the start edge 11 of start bit 8 is detected.
The width t1 of the start bit 8 is determined by measuring the interval between the start bit 8 and the stop edge 12 using the pulse width measurement counter 5.
is measured, the value is set in register 7, and the shift clock of shift register 3 is transferred to shift clock counter 6.
generated by.

【0012】この場合、例えば図4(A)のような転送
データでは、データビット16が“L(ローレベル)”
のとき、スタートビット15とデータビット16との境
が決定されないためスタートビット15の幅t5 は測
定できない。したがってこの実施例では、転送データを
図2(A)に示すように、スタートビット8とデータビ
ット9との間に、スタートビット8の測定値をレジスタ
7に設定し、シフトレジスタ3のシフトクロックに変換
するだけの期間t3 を設けることによって、スタート
ビット8の幅t1 の測定が可能となり、測定されたも
のをシフトクロック用カウンタ6によってシフトレジス
タ3のシフトクロックを発生することで、調歩同期式シ
リアルインターフェースを用いて正しいデータ転送の送
受信を可能とすることができる。
In this case, for example, in the transfer data as shown in FIG. 4(A), data bit 16 is "L (low level)".
In this case, the width t5 of the start bit 15 cannot be measured because the boundary between the start bit 15 and the data bit 16 is not determined. Therefore, in this embodiment, as shown in FIG. 2A, the measured value of start bit 8 is set in register 7 between start bit 8 and data bit 9, and the shift clock of shift register 3 is By providing a period t3 long enough to convert the start bit 8 into a width t1, it is possible to measure the width t1 of the start bit 8, and by using the measured value to generate a shift clock for the shift register 3 using the shift clock counter 6, the asynchronous type A serial interface can be used to enable correct data transfers to be sent and received.

【0013】なお、この実施例では、2つのカウンタ5
,6を用いたが、これらの代わりにパルス幅測定機能と
シフトクロック発生機能とを有した1つのカウンタを使
用することにより、この実施例と同等の動作可能な調歩
同期式シリアルインターフェースを実現することができ
る。また、以上の実施例は従来の調歩同期式シリアルイ
ンターフェースにエッジ検出回路4、パルス幅測定用カ
ウンタ5、およびシフトクロックを提供する機能を有し
たカウンタ6とを追加するだけで実現でき、かつ追加す
る部分は他の回路から流用できるため、比較的小規模な
ハードの増加で実現できるものである。
Note that in this embodiment, two counters 5
, 6 are used, but by using a single counter having a pulse width measurement function and a shift clock generation function instead of these, an asynchronous serial interface that can operate equivalent to this embodiment can be realized. be able to. Furthermore, the above embodiment can be realized by simply adding an edge detection circuit 4, a pulse width measurement counter 5, and a counter 6 having a function of providing a shift clock to a conventional asynchronous serial interface. Since the parts that can be used can be used from other circuits, it can be realized with a relatively small increase in hardware.

【0014】[0014]

【発明の効果】この発明の調歩同期式シリアルインター
フェースは、エッジ検出回路とパルス幅測定用カウンタ
とで転送データのデータビットの幅を測定し、この測定
された値をレジスタでシフトクロック用カウンタに設定
し、このシフトクロック用カウンタによりシフトレジス
タのシフトクロックを発生することによって、転送デー
タのデータビットの幅をあらかじめ受信側に設定する必
要がなく、随時転送データの送受信を行うことができる
[Effects of the Invention] The asynchronous serial interface of the present invention measures the data bit width of transfer data using an edge detection circuit and a pulse width measurement counter, and uses a register to input this measured value to a shift clock counter. By setting the shift clock and generating a shift clock for the shift register using this shift clock counter, it is not necessary to set the data bit width of the transfer data on the receiving side in advance, and the transfer data can be transmitted and received at any time.

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

【図1】この発明の一実施例の調歩同期式シリアルイン
ターフェースの構成図である。
FIG. 1 is a configuration diagram of an asynchronous serial interface according to an embodiment of the present invention.

【図2】(A)は同実施例における転送データのタイミ
ングチャートである。(B)はエッジ検出回路によって
検出されたスタートエッジである。(C)はエッジ検出
回路によって検出されたストップエッジである。(D)
はシフトクロック用カウンタによって発生されたシフト
クロックのタイミングチャートである。
FIG. 2(A) is a timing chart of transfer data in the same embodiment. (B) is the start edge detected by the edge detection circuit. (C) is a stop edge detected by the edge detection circuit. (D)
is a timing chart of a shift clock generated by a shift clock counter.

【図3】従来の調歩同期式シリアルインターフェースの
構成図である。
FIG. 3 is a configuration diagram of a conventional asynchronous serial interface.

【図4】(A)は従来の転送データのタイミングチャー
トである。(B)はシフトクロック生成回路によって発
生されたシフトクロックのタイミングチャートである。
FIG. 4A is a timing chart of conventional transfer data. (B) is a timing chart of the shift clock generated by the shift clock generation circuit.

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

1    受信端子 2    スタート検出回路 3    シフトレジスタ 4    エッジ検出回路 5    パルス幅測定用カウンタ 6    シフトクロック用カウンタ 7    レジスタ 1 Receiving terminal 2 Start detection circuit 3 Shift register 4 Edge detection circuit 5 Pulse width measurement counter 6 Shift clock counter 7 Register

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】  転送データを受信する受信端子と、転
送データの受信開始を検知するスタート検出回路と、直
列に受信した転送データを並列に変換するシフトレジス
タと、転送データのレベル変化を検出するエッジ検出回
路と、このエッジ検出回路によって検出されたエッジの
間隔を測定するパルス幅測定用カウンタと、前記シフト
レジスタのシフトクロックを発生するシフトクロック用
カウンタと、前記パルス幅測定用カウンタによって測定
された値を前記シフトクロック用カウンタに設定するレ
ジスタとを備えた調歩同期式シリアルインターフェース
[Claim 1] A reception terminal that receives transfer data, a start detection circuit that detects the start of reception of transfer data, a shift register that converts serially received transfer data into parallel data, and a shift register that detects level changes in transfer data. an edge detection circuit, a pulse width measurement counter that measures the interval between edges detected by the edge detection circuit, a shift clock counter that generates a shift clock for the shift register, and a pulse width measurement counter that measures the interval between edges detected by the edge detection circuit; and a register for setting a value in the shift clock counter.
JP8802091A 1991-04-19 1991-04-19 Start-stop synchronization type serial interface Pending JPH04319756A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8802091A JPH04319756A (en) 1991-04-19 1991-04-19 Start-stop synchronization type serial interface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8802091A JPH04319756A (en) 1991-04-19 1991-04-19 Start-stop synchronization type serial interface

Publications (1)

Publication Number Publication Date
JPH04319756A true JPH04319756A (en) 1992-11-10

Family

ID=13931154

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8802091A Pending JPH04319756A (en) 1991-04-19 1991-04-19 Start-stop synchronization type serial interface

Country Status (1)

Country Link
JP (1) JPH04319756A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1998057288A1 (en) * 1997-06-12 1998-12-17 Scm Schneider Microsysteme-Microsystemes Schneider Entwicklungs Und Vertriebs Gmbh S.A.R.L. Developpement Et Vente Method for automatically measuring elementary time unit for communication peripherals dedicated to smart cards
US7870318B2 (en) 2006-11-02 2011-01-11 Seiko Epson Corporation Asynchronous serial communication method and asynchronous serial communication device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1998057288A1 (en) * 1997-06-12 1998-12-17 Scm Schneider Microsysteme-Microsystemes Schneider Entwicklungs Und Vertriebs Gmbh S.A.R.L. Developpement Et Vente Method for automatically measuring elementary time unit for communication peripherals dedicated to smart cards
FR2764758A1 (en) * 1997-06-12 1998-12-18 Scm Schneider Microsysteme Mic METHOD FOR AUTOMATIC MEASUREMENT OF THE TIME UNIT FOR COMMUNICATION DEVICES DEDICATED TO CHIP CARDS
US6431442B1 (en) 1997-06-12 2002-08-13 Scm Schneider Microsysteme- Microsystemes, Schneider Entwicklungs Und Vertriers Gmbh S.A.R.L. Developpement Et Ventes Method for automatically measuring elementary time unit for communication peripherals dedicated to smart cards
US7870318B2 (en) 2006-11-02 2011-01-11 Seiko Epson Corporation Asynchronous serial communication method and asynchronous serial communication device

Similar Documents

Publication Publication Date Title
JPH09172415A (en) Measurement device of signal propagating time of digital transmitting device
JPH03191633A (en) Data transfer system
JP2002252606A (en) Synchronization correction circuit
JPH04319756A (en) Start-stop synchronization type serial interface
JP2559237Y2 (en) Serial data sampling signal generator
JPH04178047A (en) Skew compensation system
JP3529568B2 (en) Synchronous circuit, receiving device, and non-contact moving object identification device
JPH0510435Y2 (en)
JPS60224346A (en) Synchronizing clock generating circuit
JP2645197B2 (en) Flow measurement device
JP2602350B2 (en) Communication device
JPH0629752Y2 (en) Counting circuit
KR100435558B1 (en) Data carrier detection circuit, especially using a series of pulses with several bytes to detect a start point
KR0137059B1 (en) Alarm generating appartus in high speed transmission system
KR930000975B1 (en) Discrete phase difference sensing circuit
JP2003309542A (en) Interface converting apparatus
KR960012470B1 (en) Programmable time-out timer
JP2844567B2 (en) Signal level measuring device
JPS6239509Y2 (en)
JPS62110315A (en) Pulse generating circuit
JPH0421231A (en) Serial input and output communication method
JPS63144284A (en) Pulse period measuring circuit
JPS62241448A (en) Data transmission system
JPH03228444A (en) Frame synchronization detecting circuit
JPS63310246A (en) Error inserting circuit