JP2018152643A - Data receiving circuit of start-stop synchronization serial data communication device - Google Patents
Data receiving circuit of start-stop synchronization serial data communication device Download PDFInfo
- Publication number
- JP2018152643A JP2018152643A JP2017045833A JP2017045833A JP2018152643A JP 2018152643 A JP2018152643 A JP 2018152643A JP 2017045833 A JP2017045833 A JP 2017045833A JP 2017045833 A JP2017045833 A JP 2017045833A JP 2018152643 A JP2018152643 A JP 2018152643A
- Authority
- JP
- Japan
- Prior art keywords
- serial data
- communication device
- baud rate
- receiving circuit
- data communication
- 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
Images
Landscapes
- Dc Digital Transmission (AREA)
- Synchronisation In Digital Transmission Systems (AREA)
Abstract
Description
この発明は、スタートビット、データビット及びストップビットで構成されるシリアルデータを受信する調歩同期式シリアルデータ通信装置のデータ受信回路に関し、特に、信頼性の高い伝送速度を判定するためのものである。 The present invention relates to a data receiving circuit of an asynchronous serial data communication device that receives serial data composed of a start bit, a data bit, and a stop bit, and particularly for determining a reliable transmission rate. .
一般に、調歩同期式シリアルデータ通信は、通信を始める前に送信側と受信側で互いに伝送速度(以下、ボーレートと称す)を合わせておく必要があったが、ボーレートを装置間で自動判定するものが提案されている(例えば、特許文献1参照)。この提案によるボーレート特定方式は、一連のシリアルデータの先頭に位置する特定キャラクタのスタートビットのビット幅のみを受信クロックを用いて測定することにより、一連のシリアルデータのボーレートを自動的に認識するものである。 In general, asynchronous serial data communication requires the transmission side and the reception side to match the transmission speed (hereinafter referred to as the baud rate) before starting communication, but the baud rate is automatically determined between devices. Has been proposed (see, for example, Patent Document 1). The proposed baud rate identification method automatically recognizes the baud rate of a series of serial data by measuring only the bit width of the start bit of a specific character located at the beginning of the series of serial data using the reception clock. It is.
上述した従来技術におけるボーレート特定方式では、一連のシリアルデータの先頭に位置する特定キャラクタのスタートビットのビット幅のみでボーレートを判定していることから、スタート極性区間にノイズ等の影響を受けたり、スタートビットのビット幅が短かったりすると、特定したボーレートの信頼性が低下する可能性がある。 In the above-described conventional baud rate identification method, the baud rate is determined only by the bit width of the start bit of the specific character located at the beginning of a series of serial data. If the bit width of the start bit is short, the reliability of the specified baud rate may be lowered.
本発明は、上述した従来技術における課題を解決するためになされたもので、特定の同期パターンコードを用いることで信頼性の高いボーレートを判定することができる調歩同期式シリアルデータ通信装置のデータ受信回路を提供することを目的としている。 The present invention has been made to solve the above-described problems in the prior art, and data reception of an asynchronous serial data communication device capable of determining a reliable baud rate by using a specific synchronization pattern code. It aims to provide a circuit.
本発明に係る調歩同期式シリアルデータ通信装置のデータ受信回路は、スタートビット、データビット及びストップビットで構成されるシリアルデータを受信する調歩同期式シリアルデータ通信装置のデータ受信回路において、受信されるシリアルデータの変化点を検出する変化点検出部と、前記変化点検出部により検出される変化点間の時間を測定する計測タイマ部とを備えるものである。 The data receiving circuit of the asynchronous serial data communication apparatus according to the present invention is received by the data receiving circuit of the asynchronous serial data communication apparatus that receives serial data composed of start bits, data bits, and stop bits. A change point detection unit that detects a change point of serial data, and a measurement timer unit that measures a time between change points detected by the change point detection unit.
本発明によれば、LowとHighの区間の長さが等しい同期パターンを用い、同期パターンコードのLowとHigh区間のそれぞれの時間幅を測定し、測定結果から最適なボーレートとして決定することから、判定結果の信頼性向上の効果がある。 According to the present invention, using a synchronization pattern in which the length of the Low and High sections are equal, measuring the time width of each of the Low and High sections of the synchronization pattern code, and determining the optimum baud rate from the measurement result, There is an effect of improving the reliability of the determination result.
本発明においては、同期パターンコードにLowとHighの区間の長さが等しい同期パターン、例えばスタートビット1bit、データ長8bit、ストップビット1bitの合計10bit構成の場合、データ部を0x1Cとしたパターンを用い、同期パターンコードのLowとHigh区間のそれぞれの時間幅を測定し、測定結果から最適なボーレートを特定するものである。 In the present invention, in the case of a synchronization pattern in which the lengths of the Low and High sections are equal to the synchronization pattern code, for example, in the case of a total of 10 bits including a start bit of 1 bit, a data length of 8 bits, and a stop bit of 1 bit, a pattern having a data portion of 0x1C is used. The time width of each of the low and high sections of the synchronization pattern code is measured, and the optimum baud rate is specified from the measurement result.
このボーレートの特定においては、あらかじめ決められたボーレートにおける時間幅の情報を保持しておき、各区間の測定結果と比較して最も多く一致したボーレートを最適なボーレートとして決定する。 In specifying the baud rate, information on the time width at a predetermined baud rate is held, and the baud rate that matches most compared with the measurement result of each section is determined as the optimum baud rate.
このボーレートの判定回路としては、簡単なカウンタ・条件分岐回路・ステートマシン・多数決回路で構成でき、ハードウェアでもソフトウェアでも容易に実装できる。 This baud rate determination circuit can be composed of a simple counter, conditional branch circuit, state machine, and majority circuit, and can be easily implemented by hardware or software.
但し、本発明の実施には、あらかじめ決められたボーレートにおける時間幅の情報を保持しておく必要があるため、対応するボーレートを互いに決めておく必要がある。 However, since it is necessary to hold time width information at a predetermined baud rate in order to implement the present invention, it is necessary to mutually determine corresponding baud rates.
以下、本発明の具体的な実施の形態について説明する。図1は、本発明の実施の形態1における調歩同期式シリアルデータ通信装置のデータ受信回路を示すブロック図である。図1に示すデータ受信回路において、シリアルデータの同期パターンとして、LowとHighの区間の長さが等しい同期パターンを用いる。例えば、図2に示すように、スタートビット1bit・データ長8bit・ストップビット1bitの合計10bitの構成でデータ部を0x1Cとしたパターンを用いることとする。
Hereinafter, specific embodiments of the present invention will be described. FIG. 1 is a block diagram showing a data receiving circuit of an asynchronous serial data communication apparatus according to
図1に示すデータ受信回路は、受信シリアルデータの変化点(立下り・立上り)を検出する変化点検出部1と、変化点検出の度にカウンタをリセットするフリーランカウンタであって、同期パターンの計測区間の時間幅を測定する計測タイマ部2とを備える。
The data reception circuit shown in FIG. 1 includes a change
計測タイマ部2のカウント動作が図3のタイムチャートに示される。受信シリアルデータ(図3のb参照)の変化点が変化点検出部1により検出されて変化点の出力信号が出力される(図3のc参照)。計測タイマ部2は、変化点検出部1からの出力信号(図3のd参照)に基づいて変化点検出の度にカウンタをリセットし、そのカウント値(図3のd参照)を0にする。尚、この計測タイマ部2は、後述する受信制御部7の状態が「SYNC“同期確立モード”」以外の状態のときは、カウント動作をストップさせる。
The counting operation of the
なお、図3において、aはシステムクロック、eは後述する伝送速度判定部3の状態値、fは伝送速度判定部3の判定結果、gは伝送速度判定部3の同期確立通知信号、hは伝送速度判定部3の同期失敗通知信号を示す。
In FIG. 3, a is a system clock, e is a status value of a transmission
また、図1に示すデータ受信回路は、後述する受信制御部7の状態が「SYNC“同期確立モード”」状態のときに動作し、計測タイマ部2による3回の時間幅の計測結果から最も多く一致したボーレートを選択する機能を持つ伝送速度判定部3をさらに備える。
The data reception circuit shown in FIG. 1 operates when the state of the
伝送速度判定部3の動作の詳細を図4に示す状態遷移図に基づき説明する。まず、伝送速度判定部3は、待機状態である「IDLE“待機”」から動作を開始する。変化点検出部1により最初の変化点を検出すると、「SMPL1“測定区間[丸1] 測定”」に遷移し、同期パターンの最初のLow区間の時間幅の測定状態に入る(図2の測定区間[丸1]参照)。変化点検出部1により次の変化点を検出すると、状態「SMPL1 JUDGE“測定区間[丸1] ボーレート判定”」に遷移し、最初のLow区間の時間幅の測定結果(図1の計測タイマ部2の出力)とあらかじめ用意しておいた時間幅の情報とを比較してボーレートを特定する。
Details of the operation of the transmission
引き続き、状態は「SMPL2“測定区間[丸2] 測定”」に遷移し、次のHigh区間の時間幅の測定を行い(図2の測定区間[丸2]参照)、再び変化点を検出すると、状態「SMPL2 JUDGE“測定区間[丸2] ボーレート判定”」に遷移し、前述した「SMPL1 JUDGE“測定区間[丸1] ボーレート判定」と同様の方法で、High区間のボーレートを特定する。 Next, the state transitions to “SMPL2“ measurement interval [circle 2] measurement ””, the time width of the next high interval is measured (see measurement interval [circle 2] in FIG. 2), and the change point is detected again. Then, the state transits to “SMPL2 JUDGE“ measurement interval [circle 2] baud rate determination ””, and the baud rate in the high interval is specified in the same manner as “SMPL1 JUDGE“ measurement interval [circle 1] baud rate determination ”described above.
続く「SMPL3“測定区間[丸3] 測定”」・「SMPL3 JUDGE“測定区間[丸3] ボーレート判定”」でも(図2の測定区間[丸3]参照)、これまでと同様に、最後のLow区間のボーレートを特定し、最後に、状態「SYNC JUDGE“ボーレート決定”」に遷移する。 In the subsequent “SMPL3“ measurement interval [circle 3] measurement ”” and “SMPL3 JUDGE“ measurement interval [circle 3] baud rate determination ”” (see measurement interval [circle 3] in FIG. 2), the last is the same as before. The baud rate in the low interval is specified, and finally, the state transitions to “SYNC JUDGE“ Baud rate determination ””.
「SYNC JUDGE“ボーレート決定”」では、3回の測定結果から最も多く一致したボーレートがあれば、同期確立として受信制御部7に通知し、判定したボーレートをボーレートクロック生成部4に設定する。1回も一致する候補が挙がらなかった場合は、同期失敗として受信制御部7に通知する。後述する受信制御部7の状態が「IDLE“待機”」状態に戻ると「IDLE“待機”」に戻る。
In “SYNC JUDGE“ determination of baud rate ””, if there is a baud rate that most closely matches from the three measurement results, the
また、図1に示すデータ受信回路は、伝送速度判定部3の結果に基づきシステムクロックを分周してボーレートクロックを生成するボーレートクロック生成部4と、後述する受信制御部7の状態が「DATA“データ受信”」状態のときにボーレートクロック生成部4からのボーレートクロックに同期して受信シリアルデータを受信シフトレジスタ部5に取り込み、シリアルデータをパラレルデータに変換する受信シフトレジスタ部5と、後述する受信制御部7の状態が「SYNC JUDGE“同期判定”」状態で、かつ伝送速度判定部3から同期確立の通知を受け取ったときに、ボーレートクロック生成部4のボーレートクロックに同期して応答キャラクタを送信側に送信する送信シフトレジスタ部6と、データ受信回路全体を制御する受信制御部7とを備える。
Further, in the data receiving circuit shown in FIG. 1, the state of the baud rate
受信制御部7の動作の詳細を図5の状態遷移図に基づき説明する。まず、受信制御部7は、待機状態である「IDLE“待機”」から動作を開始する。最初の変化点を検出すると、「SYNC“同期確立モード”」に遷移する。このとき、計測タイマ部2と伝送速度判定部3が有効になり、先述した同期パターンからボーレートを特定する動作を行う。
Details of the operation of the
次に、変化点を3回検出すると、「SYNC JUDGE“同期判定”」状態に遷移し、伝送速度判定部3から通知される結果により、次の動作を実行する。ボーレートが確定し同期確立の通知が来た場合、送信側に対して同期確立したことを示すパターンを送信シフトレジスタ部6から送信させる。一方で同期確立失敗の通知が来た場合は、何もせず「IDLE“待機”」に戻り、送信側からのリトライを待つ。同期が確立すると、データ受信モード「DATA“データ受信モード”」に遷移して通常の通信を行い、通信の終了を示すキャラクタが来ると、「FLAME END“フレーム受信終了”」に遷移し、状態を終了させた後、「IDLE“待機”」に戻り、次のデータ送信を待つ。
Next, when the change point is detected three times, the state transits to the “SYNC JUDGE“ synchronization determination ”” state, and the following operation is executed according to the result notified from the transmission
以上のように、本発明によれば、LowとHighの区間の長さが等しい同期パターンを用い、同期パターンコードのLowとHigh区間のそれぞれの時間幅を測定し、測定結果から最適なボーレートとして決定することから、判定結果の信頼性向上の効果がある。 As described above, according to the present invention, using the synchronization pattern in which the lengths of the Low and High sections are equal, the time widths of the Low and High sections of the synchronization pattern code are measured, and the optimum baud rate is determined from the measurement result. Since it is determined, there is an effect of improving the reliability of the determination result.
1 変化点検出部
2 計測タイマ部
3 伝送速度判定部
4 ボーレートクロック生成部
5 受信シフトレジスタ部
6 送信シフトレジスタ部
7 受信制御部
a システムクロック
b 受信シリアルデータ入力信号
c 変化点検出部1の出力信号
d 計測タイマ部2のカウント値
e 伝送速度判定部3の状態値
f 伝送速度判定部3の判定結果
g 伝送速度判定部3の同期確立通知信号
h 伝送速度判定部3の同期失敗通知信号
DESCRIPTION OF
Claims (5)
受信されるシリアルデータの変化点を検出する変化点検出部と、
前記変化点検出部により検出される変化点間の時間を測定する計測タイマ部と
を備える、調歩同期式シリアルデータ通信装置のデータ受信回路。 In a data receiving circuit of an asynchronous serial data communication device that receives serial data composed of a start bit, a data bit, and a stop bit,
A change point detector for detecting a change point of received serial data;
A data reception circuit of an asynchronous serial data communication device, comprising: a measurement timer unit that measures a time between change points detected by the change point detection unit.
前記シリアルデータの同期パターンコードにLowとHighの区間の長さを等しくしたパターンを用いることを特徴とする、調歩同期式シリアルデータ通信装置のデータ受信回路。 In the data receiving circuit of the asynchronous serial data communication device according to claim 1,
A data receiving circuit of an asynchronous serial data communication device, wherein a pattern in which the lengths of Low and High sections are equal is used for the synchronous pattern code of the serial data.
前記計測タイマ部からの変化点間の時間の測定結果に基づいてボーレートを特定する伝送速度判定部をさらに備える、調歩同期式シリアルデータ通信装置のデータ受信回路。 In the data receiving circuit of the asynchronous serial data communication device according to claim 1 or 2,
A data reception circuit of an asynchronous serial data communication device, further comprising a transmission rate determination unit that specifies a baud rate based on a measurement result of a time between change points from the measurement timer unit.
前記伝送速度判定部は、前記同期パターンコードのLowとHighの各区間の時間幅を測定し、複数回の時間幅の計測結果から最適なボーレートを特定することを特徴とする、調歩同期式シリアルデータ通信装置のデータ受信回路。 In the data receiving circuit of the asynchronous serial data communication device according to claim 3,
The transmission rate determination unit measures the time width of each section of the synchronization pattern code between Low and High, and specifies an optimum baud rate from a plurality of time width measurement results. A data receiving circuit of a data communication device.
前記伝送速度判定部で特定したボーレートに応じて、適切なボーレートクロックを生成するボーレートクロック生成部をさらに備える、調歩同期式シリアルデータ通信装置の伝送速度判定回路。 In the data receiving circuit of the asynchronous serial data communication device according to claim 4,
A transmission rate determination circuit for an asynchronous serial data communication device, further comprising a baud rate clock generation unit that generates an appropriate baud rate clock according to the baud rate specified by the transmission rate determination unit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017045833A JP2018152643A (en) | 2017-03-10 | 2017-03-10 | Data receiving circuit of start-stop synchronization serial data communication device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017045833A JP2018152643A (en) | 2017-03-10 | 2017-03-10 | Data receiving circuit of start-stop synchronization serial data communication device |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2018152643A true JP2018152643A (en) | 2018-09-27 |
Family
ID=63680639
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2017045833A Pending JP2018152643A (en) | 2017-03-10 | 2017-03-10 | Data receiving circuit of start-stop synchronization serial data communication device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2018152643A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114006842A (en) * | 2021-10-29 | 2022-02-01 | 北京中科昊芯科技有限公司 | Method, device, equipment and medium for detecting baud rate |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0440123A (en) * | 1990-06-06 | 1992-02-10 | Nippon Hoso Kyokai <Nhk> | Picture data transmitting system |
JP2001168853A (en) * | 1999-12-14 | 2001-06-22 | Matsushita Electric Ind Co Ltd | Data reception circuit for start-stop synchronization type serial data transfer device |
JP2005020471A (en) * | 2003-06-27 | 2005-01-20 | Matsushita Electric Ind Co Ltd | Start-stop communication circuit |
JP2014033428A (en) * | 2012-07-12 | 2014-02-20 | Denso Corp | Data reception device and data communication system |
JP2014239363A (en) * | 2013-06-10 | 2014-12-18 | 株式会社明電舎 | Received clock extraction circuit |
JP2015008455A (en) * | 2013-05-29 | 2015-01-15 | 株式会社デンソー | Receiver and detection method of number of same value bits in received bit string |
-
2017
- 2017-03-10 JP JP2017045833A patent/JP2018152643A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0440123A (en) * | 1990-06-06 | 1992-02-10 | Nippon Hoso Kyokai <Nhk> | Picture data transmitting system |
JP2001168853A (en) * | 1999-12-14 | 2001-06-22 | Matsushita Electric Ind Co Ltd | Data reception circuit for start-stop synchronization type serial data transfer device |
JP2005020471A (en) * | 2003-06-27 | 2005-01-20 | Matsushita Electric Ind Co Ltd | Start-stop communication circuit |
JP2014033428A (en) * | 2012-07-12 | 2014-02-20 | Denso Corp | Data reception device and data communication system |
JP2015008455A (en) * | 2013-05-29 | 2015-01-15 | 株式会社デンソー | Receiver and detection method of number of same value bits in received bit string |
JP2014239363A (en) * | 2013-06-10 | 2014-12-18 | 株式会社明電舎 | Received clock extraction circuit |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114006842A (en) * | 2021-10-29 | 2022-02-01 | 北京中科昊芯科技有限公司 | Method, device, equipment and medium for detecting baud rate |
CN114006842B (en) * | 2021-10-29 | 2023-03-10 | 北京中科昊芯科技有限公司 | Method, device, equipment and medium for detecting baud rate |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109669899B (en) | Method for adaptively adjusting serial port communication baud rate and serial port device | |
KR101775981B1 (en) | Communication circuit and sampling adjusting method | |
JP5794352B2 (en) | Receiving device and method for detecting number of same-value bits in received bit string | |
JP2006311237A (en) | Data receiver, synchronous signal detection method, and program | |
US20110016232A1 (en) | Time stamping apparatus and method for network timing synchronization | |
JP2018152643A (en) | Data receiving circuit of start-stop synchronization serial data communication device | |
US9660795B2 (en) | Start-stop synchronous type serial data acquisition device and start-stop synchronous type serial data acquisition method | |
KR100438980B1 (en) | Automatic baud rate detection apparatus and method of asynchronous communication | |
JP2015198399A (en) | communication device | |
JP3602233B2 (en) | AT command analyzer | |
JPH07264263A (en) | Serial communication interface device | |
JP6163895B2 (en) | Receive clock extraction circuit | |
JP5383856B2 (en) | Transmitter circuit | |
JP2004247856A (en) | Data receiving apparatus and data transmission/ reception method | |
JP2002271306A (en) | Serial signal receiving circuit | |
JP2715953B2 (en) | Synchronous circuit | |
JP4729768B2 (en) | Synchronization method and apparatus in network | |
JP6729890B2 (en) | Digital communication receiver and bit synchronization establishment method | |
JP2000059446A (en) | Start-stop synchronous data transmission/reception method | |
KR101040270B1 (en) | Apparatus for preventing reception error of data in rs-422 serial communication and method thereof | |
KR101092850B1 (en) | Clock frequency offset compensation method and apparatus for dsrc systems | |
JP5704506B2 (en) | Communication device and field device system | |
JP2005277994A (en) | Synchronization start signal detection device, its detection method, and its program | |
JP2001127744A (en) | Device and method for start-stop synchronous data communication | |
JP2010213204A (en) | Data transmitting/receiving method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20181204 |