JP3048866B2 - Automatic data rate recognition circuit - Google Patents

Automatic data rate recognition circuit

Info

Publication number
JP3048866B2
JP3048866B2 JP6316977A JP31697794A JP3048866B2 JP 3048866 B2 JP3048866 B2 JP 3048866B2 JP 6316977 A JP6316977 A JP 6316977A JP 31697794 A JP31697794 A JP 31697794A JP 3048866 B2 JP3048866 B2 JP 3048866B2
Authority
JP
Japan
Prior art keywords
data
data transmission
transmission rate
rate
counter
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 - Lifetime
Application number
JP6316977A
Other languages
Japanese (ja)
Other versions
JPH08172431A (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.)
Sanyo Electric Co Ltd
Original Assignee
Sanyo Electric Co Ltd
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 Sanyo Electric Co Ltd filed Critical Sanyo Electric Co Ltd
Priority to JP6316977A priority Critical patent/JP3048866B2/en
Publication of JPH08172431A publication Critical patent/JPH08172431A/en
Application granted granted Critical
Publication of JP3048866B2 publication Critical patent/JP3048866B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、相手端末から送られて
くるデータの調歩速度を自動的に検出するデータ速度自
動認識回路に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data speed automatic recognition circuit for automatically detecting the start speed of data sent from a partner terminal.

【0002】[0002]

【従来の技術】モデムや端末等に接続される相手端末の
データ調歩速度は様々であるためデータを受信する側で
相手端末のデータ調歩速度を検出する必要がある。この
ための方法として、“AT”コマンド方式と呼ばれる転
送方式が知られている。
2. Description of the Related Art Since the data start speed of a partner terminal connected to a modem or a terminal is various, it is necessary to detect the data start speed of the partner terminal on the data receiving side. As a method for this, a transfer method called an "AT" command method is known.

【0003】“AT”コマンド方式とは調歩同期のコマ
ンド体系であり、全てのコマンドの前に“AT”を付け
るようにした方式である。相手端末から送られるATコ
マンドの“A”の文字によって相手端末の伝送速度を検
出し、“T”の文字でキャラクタ長、パリテイの有無、
及びストップビット長を検出できる。
The "AT" command system is a command system for start-stop synchronization, and is a system in which "AT" is added before all commands. The transmission rate of the other terminal is detected by the letter "A" of the AT command sent from the other terminal, and the character length, presence / absence of parity,
And the stop bit length can be detected.

【0004】図7は“A”(41H)のシリアルデータ
を示すタイムチャートである。このシリアルデータのス
タートビットの次には必ずビット幅分のHighがく
る。従って、スタートビット幅を計測することでデータ
伝送速度が検出できる。
FIG. 7 is a time chart showing serial data of "A" (41H). After the start bit of the serial data, High corresponding to the bit width always comes. Therefore, the data transmission speed can be detected by measuring the start bit width.

【0005】このような自動検出回路としては、例え
ば、特開平3−259638号公報に開示された調歩デ
ータ速度自動認識回路が知られている。この回路では、
相手端末からデータ速度に関するキャラクタ“A”(文
字コードは41H)或いはキャラクタ“a”(文字コー
ド61H)を受信する場合、装置側で設定されているボ
ーレイトより高速なデータか或いは同じスピードのデー
タが送られてきたときにデータ伝送速度を自動認識でき
るようになっている。
As an example of such an automatic detection circuit, there is known an automatic start data speed recognition circuit disclosed in Japanese Patent Application Laid-Open No. Hei 3-259638. In this circuit,
When a character "A" (character code is 41H) or a character "a" (character code 61H) relating to the data speed is received from the partner terminal, data faster than the baud rate set on the device side or data of the same speed is received. The data transmission speed can be automatically recognized when sent.

【0006】具体的には、設定した速度のN倍のクロッ
クを基準にNの1/2乗のビット幅のカウンターでクロ
ック分周を行い、N分周したクロックでシリアルデータ
をシフトレジスタによってシフトさせ、このシフトレジ
スタの出力パターンによって設定した速度検出を行う。
設定したスピードよりも高速である例えば2倍のスピー
ドを検出させる場合には、N/2分周のクロックでシリ
アルデータをシフトレジスタによってシフトさせ、この
シフトレジスタの出力パターンによって速度検出を行
う。
More specifically, clock division is performed by a counter having a bit width of 1/2 N based on a clock N times the set speed, and serial data is shifted by a shift register using the N-divided clock. Then, speed detection set by the output pattern of the shift register is performed.
To detect a speed, for example, twice as high as the set speed, serial data is shifted by a shift register with a clock of N / 2 and the speed is detected based on the output pattern of the shift register.

【0007】また、相手端末よりデータ速度に関する特
定のキャラクタを、受信側では設定されているレイトで
サンプリングし、その受信結果から伝送速度を検出し、
ソフトウエアプログラム等でその検出した速度に従って
正しいデータに補正する方法も知られている。
[0007] In addition, a specific character relating to the data rate is sampled from the partner terminal at a set rate on the receiving side, and the transmission rate is detected from the reception result.
There is also known a method of correcting data to correct data according to the detected speed by a software program or the like.

【0008】[0008]

【発明が解決しようとする課題】しかしながら、上記従
来のデータ速度自動認識回路では、多種類のデータ速度
を検出するために、前記シフトレジスタや判定結果をラ
ッチするためのフリップフロップを、データ速度の種類
だけ持っておく必要がある。更に、大文字の“A”か小
文字の“a”なのかを区別するには、シフトレジスタと
識別回路が2倍必要になる。
However, in the above-mentioned conventional data rate automatic recognition circuit, in order to detect various types of data rates, the shift register and the flip-flop for latching the judgment result are replaced by the data rate. You only need to have the kind. Further, in order to distinguish between uppercase "A" and lowercase "a", a shift register and an identification circuit are required twice.

【0009】また、データ速度に関する特定のキャラク
タの受信は、いずれかの識別回路(フラグ)の結果が真
になることによって行うため、一つの識別回路の結果が
出力された時点で、受信バッファに前述した特定のキャ
ラクタを書き込む処理が必要となる。
The reception of a specific character relating to the data rate is performed when the result of any one of the identification circuits (flag) becomes true. The above-described process of writing the specific character is required.

【0010】更に、以下のような問題もある。Further, there are the following problems.

【0011】38.4K、19.2K、9600、48
00、2400、1200、600、及び300BPS
の8通りの速度を自動検出する必要がある場合を想定
し、例えば検出すべき最高速度(38.4KHz)の1
6倍のクロックを基準にカウントさせた場合、単純に考
えると、図8に示すように、スタートビット期間におい
て、16個カウントすれば38.4KBPS、32個カ
ウントすれば19.2KBPS、64個カウントすれば
9600BPS、というように、カウント結果で速度を
自動判定することができるが、伝送路のノイズや相手端
末の基準クロックの周波数遷移などにより、正確に検出
速度に対応するパルス幅を受信できるとは限らない。
38.4K, 19.2K, 9600, 48
00, 2400, 1200, 600, and 300 BPS
It is assumed that it is necessary to automatically detect eight different speeds. For example, one of the maximum speeds (38.4 KHz) to be detected is 1
When counting based on a 6-times clock, as a simple consideration, as shown in FIG. 8, in the start bit period, 38.4 KBPS for 16 counts, 19.2 KBPS for 32 counts, 64 counts in the start bit period In this case, the speed can be automatically determined based on the count result, such as 9600 BPS. Not necessarily.

【0012】前記従来例では、データ速度検出のため
に、シリアルデータを、検出すべき速度の種類毎にシフ
トレジスタによってパラレルデータに変換し、変換した
データが、送信側が送ったデータと一致するシフトレジ
スタのクロックレイトを検出スピードとするため、例え
ば図9のように、シリアルデータラインにノイズが送ら
れてきた場合、このノイズによってスピード自動認識が
動作し、シフトレジスタのクロックの位相がこのノイズ
に合わされてしまうため、その後は正しくスピード検出
が行えないことになる。
In the above-mentioned conventional example, in order to detect the data speed, serial data is converted into parallel data by a shift register for each type of speed to be detected, and the converted data matches the data sent by the transmission side. In order to detect the clock rate of the register as the detection speed, for example, when noise is sent to the serial data line as shown in FIG. 9, the automatic speed recognition is activated by this noise, and the phase of the clock of the shift register is affected by this noise. Therefore, the speed cannot be correctly detected thereafter.

【0013】また、相手端末から送られるデータ速度に
関する特定のキャラクタを、受信側で設定されているレ
イトでサンプリングし、その受信データから、データ伝
送速度を検出し、ソフトウエアプログラム等でその検出
した速度に従って正しいデータに補正する方法は、プロ
グラムが非常に複雑になると考えられる。
Also, a specific character relating to the data rate sent from the partner terminal is sampled at a rate set on the receiving side, and the data transmission rate is detected from the received data, and the data transmission rate is detected by a software program or the like. Correcting the data to the correct data according to the speed would be very complicated.

【0014】本発明はこのような問題点に鑑みてなされ
たものであって、シフトレジスタや判定結果をラッチす
るためのフリップフロップをデータ速度の種類だけ持っ
ておく必要がなく、また、調歩データ速度をノイズ等に
影響されることなく正確に検出できるデータ速度自動認
識回路を提供することを目的とする。
The present invention has been made in view of such a problem, and it is not necessary to have a shift register or a flip-flop for latching a determination result only for the type of data speed. An object of the present invention is to provide a data rate automatic recognition circuit capable of accurately detecting a speed without being affected by noise or the like.

【0015】[0015]

【課題を解決するための手段】本発明のデータ速度自動
認識回路は、接続される相手端末より受信側でデータ伝
送速度を特定可能なキャラクタを調歩同期式でシリアル
転送してもらい、そのキャラクタの先頭に付加されるス
タートビットに基づいてデータ伝送速度を自動認識する
ようにしたデータ速度自動認識回路において、検出可能
な最高のデータ伝送速度のN倍のクロックで前記キャラ
クタのスタートビット時間をカウントするカウンター
と、そのカウンター出力に含まれる部分的なビット列で
ある、部分的nビット(但し、n<カウンタ出力のビッ
ト数)に基づいてデータ伝送速度を判定する手段とを備
えたことを特徴とする。
A data rate automatic recognition circuit according to the present invention has a receiving terminal connected to a terminal capable of receiving a serial transmission of a character capable of specifying a data transmission speed on a receiving side in a start-stop synchronous manner. In a data rate automatic recognizing circuit which automatically recognizes a data transmission rate based on a start bit added to the head, the start bit time of the character is counted by a clock which is N times the maximum detectable data transmission rate. The counter and the partial bit string included in the counter output
Some, partially n bits (where n <the bit of the counter output)
And a means for determining the data transmission rate based on the number of data transmissions .

【0016】また、本発明のデータ速度自動認識回路
は、接続される相手端末より受信側でデータ伝送速度を
特定可能なキャラクタを調歩同期式でシリアル転送して
もらい、そのキャラクタの先頭に付加されるスタートビ
ットに基づいてデータ伝送速度を自動認識するようにし
たデータ速度自動認識回路において、検出可能な最高の
データ伝送速度のN倍のクロックで前記キャラクタのス
タートビット時間をカウントするカウンターと、そのカ
ウンター出力に含まれる部分的なビット列である、部分
的nビット(但し、n<カウンタ出力のビット数)に基
づいてデータ伝送速度を仮判定する手段と、仮判定した
データ伝送速度のN倍のクロック信号を発生する手段
と、この仮判定したデータ伝送速度のN倍のクロック信
号に基づいて前記仮判定したデータ伝送速度の真偽を判
定する手段とを備えたことを特徴とする。
Further, the automatic data rate recognition circuit of the present invention has a character which can specify a data transmission rate on the receiving side serially transferred by a start-stop synchronization system from a connected terminal, and is added to the head of the character. a counter in the data rate automatic recognition circuit which is adapted to automatically recognize, that counts the start bit time of the character at N times the clock detectable maximum data transmission rate the data transmission rate based on the start bit that, the Mosquito
Part, which is a partial bit string included in the counter output
N bits (where n <the number of bits of the counter output)
Means for temporarily determining the data transmission rate based on the data transmission rate, means for generating a clock signal N times the temporarily determined data transmission rate, and the temporary determination based on the clock signal N times the temporarily determined data transmission rate. Means for determining whether the data transmission rate is true or false.

【0017】また、上記いずれの構成において、前記部
分的nビットは検出するデータ伝送速度に応じて変更す
るように構成できる。
[0017] In either configuration described above, the portion
The fractional n bits are changed according to the data transmission rate to be detected.
It can be configured as follows.

【0018】上記第1の構成によれば、カウンター出力
に含まれる部分的なビット列である、部分的nビット
(但し、n<カウンタ出力のビット数)に基づいてデー
タ伝送速度を判定するため、多種類のデータ速度を検出
するために、シフトレジスタや判定結果をラッチするた
めのフリップフロップ等をデータ伝送速度の種類だけ持
つ必要はなく、回路の簡素化を図ることができる。
According to the first configuration, the counter output
Is a partial bit string included in
(Where n <number of bits of the counter output)
In order to determine the data transmission speed, it is not necessary to have a shift register, a flip-flop for latching the determination result, etc. only for the type of data transmission speed in order to detect various types of data speeds, and to simplify the circuit. be able to.

【0019】上記第2の構成によれば、仮判定したデー
タ伝送速度のN倍のクロック信号を発生し、このN倍の
クロック信号に基づいて前記仮判定したデータ伝送速度
の真偽を判定するため、データ伝送速度をノイズ等に影
響されることなく正確に検出することができる。
According to the second configuration, a clock signal of N times the temporarily determined data transmission speed is generated, and the authenticity of the temporarily determined data transmission speed is determined based on the N times clock signal. Therefore, the data transmission speed can be accurately detected without being affected by noise or the like.

【0020】[0020]

【0021】[0021]

【実施例】以下、本発明をその実施例を示す図に基づい
て説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be described below with reference to the drawings showing the embodiments.

【0022】図1は、データ速度自動認識回路を示すブ
ロック図である。本実施例では、当該回路をLSI化し
易いように、全てのフリップフロップのクロックライン
には一本のベースクロックがつながり、各種カウンター
や制御回路は、イネーブル信号(図面上では各モジュー
ルの入力ポートとしてENAやENB、EN等と表現さ
れる)によって動作が制御される。また、最高で38.
4KBPS(38.4KHz)までを検出可能とし、ベ
ースクロックとしては、4.9152MHzを利用す
る。また自動スピード検出のみを目的とし、キャラクタ
長、パリテイの有無、ストップビット長は、予め固定と
する。
FIG. 1 is a block diagram showing a data rate automatic recognition circuit. In this embodiment, one base clock is connected to the clock lines of all the flip-flops and various counters and control circuits are provided with enable signals (in the drawing, as input ports of each module so that the circuit can be easily formed into an LSI). The operation is controlled by ENA, ENB, EN, etc.). Also, at most 38.
Up to 4 KBPS (38.4 KHz) can be detected, and 4.9152 MHz is used as a base clock. For the purpose of automatic speed detection only, the character length, the presence / absence of parity, and the stop bit length are fixed in advance.

【0023】上記図1の回路は、以下の考え方によって
構成されたものである。
The circuit of FIG. 1 is one that is therefore <br/> constructed following idea.

【0024】即ち、従来例で説明したように、伝送路の
ノイズや相手端末の基準クロックの周波数遷移などによ
り、正確に検出速度に対応するパルス幅が受信できると
は限らないので、判定基準にある程度の幅を持たせる必
要がある。また、この回路をLSI化することを前提と
した場合、相手端末から送られてくる送信データは、こ
の回路から見ると、非同期な信号となるため、図2
(a)に示すように、送信データを基準クロック(3
8.4KHz)に基づいてフリップフロップFF1とF
F2で同期化してカウンター(1)に取り込む必要があ
り、この場合に、同図(b)に示すように、同期化出力
A,B,Cがあり得ることから、必ず判定基準に最低で
も±1クロック分の幅を持たせるようにする。
That is, as described in the conventional example, it is not always possible to accurately receive a pulse width corresponding to the detection speed due to noise on the transmission line or frequency transition of the reference clock of the partner terminal. It is necessary to have a certain width. Also, if it is assumed that this circuit is formed as an LSI, the transmission data sent from the partner terminal is an asynchronous signal when viewed from this circuit.
As shown in (a), the transmission data is transferred to a reference clock (3
Flip-flops FF1 and F
It is necessary to synchronize with F2 and take in the counter (1). In this case, as shown in FIG. 3B, there can be synchronization outputs A, B, and C, so that the judgment criterion must be at least ±. A width for one clock is provided.

【0025】このため、検出幅を38.4KHz×16
倍のクロックの±2、即ち、表1の如くカウンター結果
に基づいて速度を判定することを考える。
Therefore, the detection width is set to 38.4 KHz × 16.
Consider that the speed is determined based on ± 2 of the double clock, that is, the counter result as shown in Table 1.

【0026】[0026]

【表1】 [Table 1]

【0027】このままでは、カウンターの出力Q[1
1:0]の全てのビットを使って判断する必要があるの
で、回路規模が大きくなってしまう。
In this state, the output Q [1
[1: 0], it is necessary to make a determination using all the bits, so that the circuit scale becomes large.

【0028】更に、検出範囲が基準値に対して常に±2
(固定値)であるから、データ速度が低いほど基準速度
に対する検出可能な速度の割合が減少する。例えば、3
8.4Kでは、38.4KBPSに対して、(±2/1
6)×100=±12.5%の範囲の速度が検出可能で
あるが、300では、300BPSに対して(±2/2
048)×100=±0.097%の範囲の速度しか検
出できない。
Further, the detection range is always ± 2 with respect to the reference value.
(Fixed value), the lower the data speed, the lower the ratio of the detectable speed to the reference speed. For example, 3
At 8.4K, (± 2/1) for 38.4KBPS
6) A speed in a range of × 100 = ± 12.5% can be detected, but in 300, (± 2/2) for 300 BPS
048) Only the speed in the range of × 100 = ± 0.097% can be detected.

【0029】そこで、以下の表2に示すように、各スピ
ードの検出幅を38.4KHzの場合の検出幅に合わせ
る。
Therefore, as shown in Table 2 below, the detection width of each speed is adjusted to the detection width in the case of 38.4 KHz.

【0030】[0030]

【表2】 [Table 2]

【0031】そして、この表2によると、小さい側の値
である14,28,56…は、順にその上段の値を2倍
した値となり、また、大きい側の値である18,36,
72…も順にその上段の値を2倍した値となる。数値を
2倍するということは、2進数の状態で1ビット左シフ
トすることである。そして、最上段の値である14と1
8は、2進数では5ビットで表現することができる。従
って、表2を以下の表3のごとく表すことができる。
According to Table 2, the smaller values of 14, 28, 56,... Are successively doubled values of the upper row, and the larger values of 18, 36,.
72... Are sequentially doubled values in the upper stage. To double a numerical value is to shift left by one bit in a binary number state. Then, the uppermost values 14 and 1
8 can be represented by 5 bits in a binary number. Therefore, Table 2 can be represented as shown in Table 3 below.

【0032】[0032]

【表3】 [Table 3]

【0033】なお、Q[4 :0]は、カウンターの0〜4
ビット目の全5ビットを示し、Q[11:7]は、カウンタ
ーの7〜11ビット目の全5ビットを示す。このように
カウンター出力をビットシフトさせたビット列の5個の
ビット列に基づいてデータ伝送速度検出が行えるので、
多種類のデータ速度を検出するために、シフトレジスタ
や判定結果をラッチするためのフリップフロップ等をデ
ータ伝送速度の種類だけ持つ必要はなく、しかも、カウ
ンターの全ビットを使わないので、回路規模を極めて小
さくできる。
Note that Q [4: 0] is 0 to 4 of the counter.
All five bits of the bit are indicated, and Q [11: 7] indicates all five bits of the seventh to eleventh bits of the counter. Since the data transmission rate can be detected based on the five bit strings of the bit string obtained by bit-shifting the counter output,
In order to detect various types of data rates, it is not necessary to have only a shift register or flip-flop for latching the determination result, etc. of only the type of data transmission rate.Moreover, since all bits of the counter are not used, the circuit scale is reduced. Can be extremely small.

【0034】図3は、表2に対し、表3を2進数表現お
よび部分的5ビット表現で示した図である。
FIG. 3 is a diagram showing Table 3 in binary number representation and partial 5-bit representation with respect to Table 2.

【0035】さて、図1において、カウンター(1)
は、上記Q[11:7]のカウンターであり、図示しないC
PUから受信イネーブル信号および、本回路を自動スピ
ード検出モードにさせる自動スピードモード信号を受け
ることで、シリアルデータのスタートビット信号の待ち
状態となる。また、シーケンサー(6)から38.4K
Hzの16倍クロック信号であるEN1を入力し、シリ
アルデータ(SD1)のスタートビットの立ち下がりに
よっカウントを開始し、スタートビットの立ち上がりで
カウントを終了する。
Now, in FIG. 1, the counter (1)
Is a counter of the above Q [11: 7], and C not shown
Upon receiving a reception enable signal from the PU and an automatic speed mode signal for causing the present circuit to enter the automatic speed detection mode, the system enters a wait state for a start bit signal of serial data. In addition, 38.4K from sequencer (6)
A clock signal EN1 which is 16 times the frequency of Hz is input, counting starts when the start bit of serial data (SD1) falls, and ends when the start bit rises.

【0036】カウンター(2)及びカウンター(3)
は、検出したデータ伝送速度(未確定)の16倍のクロ
ック信号であるEN2をシーケンサー(6)から入力し
てこれをカウントする。カウンター(2)の出力値は、
二進数で“0000”〜“1111”までの値であり、
カウンター(3)の出力値は、二進数で“00000”
〜“11111”までの値である。これら、両カウンタ
ーは、ノイズによるデータ速度判定の検証に用いられ
る。
Counter (2) and counter (3)
Inputs from the sequencer (6) EN2 which is a clock signal 16 times the detected data transmission rate (undecided) and counts it. The output value of the counter (2) is
It is a value from "0000" to "1111" in binary,
The output value of the counter (3) is "00000" in binary.
To "11111". Both of these counters are used to verify data rate determination due to noise.

【0037】カウンター(4)は、データ伝送が確定し
た後に用いられるものであり、指定データ長検証のため
のデータサンプリングを行う。
The counter (4) is used after data transmission is determined, and performs data sampling for verifying a designated data length.

【0038】シフトレジスタ(7)およびFIFO
(8)は、データ速度が確定した後に、相手先からのシ
リアルデータをサンプリングし、1バイト毎にFIFO
(8)にデータを書き込むようになっている。
Shift register (7) and FIFO
(8) After the data rate is determined, serial data from the other party is sampled, and FIFO is
Data is written in (8).

【0039】次に、図4乃至図6に基づいて、データ速
度自動認識回路の動作説明を行う。図4は、シーケンサ
ー(6)による制御内容を示した流れ図であり、図5
は、シリアルデータ(SD1)にノイズが含まれている
場合に、これを本構成でその影響を回避できることを例
示したタイミングチャートであり、図6は、前記の表3
に対応するものであって、データ速度の判断条件を示し
た図である。
Next, the operation of the automatic data rate recognition circuit will be described with reference to FIGS. FIG. 4 is a flowchart showing the contents of control by the sequencer (6).
FIG. 6 is a timing chart exemplifying that when the serial data (SD1) includes noise, the influence of the noise can be avoided by the present configuration. FIG.
FIG. 6 is a diagram corresponding to FIG. 3 and showing conditions for determining a data rate.

【0040】図4において、S0は、アイドル状態であ
り、受信イネーブル信号および自動スピードモード信号
によってJ1ステートに移行する。図5においては、A
1で示す状態遷移に相当する。
In FIG. 4, S0 is in the idle state, and shifts to the J1 state by the reception enable signal and the automatic speed mode signal. In FIG. 5, A
This corresponds to the state transition indicated by 1.

【0041】J1ステートでは、カウンター(3),
(4)をクリアーする。また、シリアルデータ(SD
1)の立ち下がり(スタートパルス)を検出したらJ2
ステートに移行する。図5においては、A2で示す状態
遷移に相当する。
In the J1 state, the counter (3),
Clear (4). In addition, serial data (SD
When the falling edge (start pulse) of 1) is detected, J2
Move to state. In FIG. 5, this corresponds to the state transition indicated by A2.

【0042】J2ステートでは、38.4KHzの16
倍クロック(EN1)を連続的に出力する。これによ
り、カウンター(1)のカウントが開始される。その
後、直にJ3ステートに移行する。図5においては、A
2で示す状態遷移に相当する。
In the J2 state, 38.4 kHz 16
The double clock (EN1) is continuously output. Thus, the counter (1) starts counting. Thereafter, the state immediately shifts to the J3 state. In FIG. 5, A
This corresponds to the state transition indicated by 2.

【0043】J3ステートでは、スタートパルスの立ち
上がりを待ち、スタートパルスの立ち上がりを検出した
ら、図6に示す条件1に従って、データ速度を判断す
る。条件1のいずれの条件にも合わない場合には、N1
ステートに進む。図5においては、A3で示す状態遷移
に相当する。一方、いずれかの条件に合う場合にはJ4
ステートに進む。図5においては、A4で示す状態遷移
に相当する。
In the J3 state, the rising of the start pulse is waited. When the rising of the start pulse is detected, the data rate is determined according to the condition 1 shown in FIG. If none of the conditions 1 is met, N1
Proceed to state. In FIG. 5, this corresponds to the state transition indicated by A3. On the other hand, if any of the conditions are met, J4
Proceed to state. In FIG. 5, this corresponds to the state transition indicated by A4.

【0044】N1ステートに移行した場合において、シ
リアルデータが特定の期間内にLOWに戻ったら、J3
ステートに自動的に復帰し、スタートパルスに乗ったノ
イズを除去する役目を果たす。図5においては、A5で
示す状態遷移に相当する。また、特定の期間内にLOW
に戻らない場合は、最初に検出したスタートパルスは、
ノイズとみなし、J1ステートに移行してデータ速度判
定のやり直しを行う。図5の例示においては、この遷移
状態はない。
When the serial data returns to LOW within a specific period in the transition to the N1 state, J3
It automatically returns to the state and plays the role of removing noise on the start pulse. In FIG. 5, this corresponds to the state transition indicated by A5. Also, LOW within a specific period
If it does not return to, the first detected start pulse is
It is regarded as noise, and the processing shifts to the J1 state to perform the data rate determination again. In the example of FIG. 5, this transition state does not exist.

【0045】J4ステートに移行した場合には、直ちに
J5ステートに移行し、条件1で判定(仮定)したデー
タ伝送速度の16倍のクロック信号(EN2)を出力す
る。この信号EN2によってカウンター(2)、及びカ
ウンター(3)のカウントが開始される。図5において
は、A6で示す状態遷移に相当する。
When the state shifts to the J4 state, the state immediately shifts to the J5 state, and a clock signal (EN2) 16 times the data transmission rate determined (assumed) under the condition 1 is output. The counting of the counter (2) and the counter (3) is started by the signal EN2. In FIG. 5, this corresponds to the state transition indicated by A6.

【0046】J5ステートでは、カウンター(2)の出
力を判断して以下の処理を行う。
In the J5 state, the output of the counter (2) is determined and the following processing is performed.

【0047】カウンター(2)の出力が0以上7以下で
かつシリアルデータが“LOW”ならばJ3に戻り、ス
タートパルス幅の計測を継続する。即ち、本当にスター
トパルス期間が終了して“HIGH”になったのであれ
ば、前記仮のデータ伝送速度による当該“HIGH”期
間の中間地点(16パルスの約半分)に至らない時点で
シリアルデータ(SD1)が“LOW”になることはな
いはずなので、図5のA4で示す状態遷移において図6
の条件1に合致したとして判定した仮のデータ速度は、
ノイズによるものであると認定する。なお、中間地点と
するのは、受信データの周波数ジッタ等を考慮するため
である。そして、カウンター(2)をクリアーする(C
LR2信号による)と共に、EN2信号を停止させる。
図5においては、A7で示す状態遷移に相当する。
If the output of the counter (2) is 0 or more and 7 or less and the serial data is "LOW", the process returns to J3 and the measurement of the start pulse width is continued. That is, if the start pulse period has really ended and becomes “HIGH”, the serial data (about half of 16 pulses) does not reach the middle point (about half of 16 pulses) of the “HIGH” period by the provisional data transmission rate. SD1) should not be “LOW”, so in the state transition indicated by A4 in FIG.
The provisional data rate determined as meeting condition 1 of
Recognize that this is due to noise. The reason why the intermediate point is set is to consider frequency jitter of received data and the like. Then, clear the counter (2) (C
LR2 signal) and stop the EN2 signal.
In FIG. 5, this corresponds to the state transition indicated by A7.

【0048】一方、カウンター(2)の出力が7で且つ
EN2信号が“HIGH”ならば、J6ステートに移行
する。図5においては、A8で示す状態遷移に相当す
る。
On the other hand, if the output of the counter (2) is 7 and the EN2 signal is "HIGH", the state shifts to the J6 state. In FIG. 5, this corresponds to the state transition indicated by A8.

【0049】J6ステートにおいては、シフトレジスタ
のシフトイネーブル信号(信号名はSFTEN)を出力
し、またカウンター(2)をクリアーする。その後、J
7ステートに移行する。図5においては、A9に示す状
態遷移に相当する。
In the J6 state, a shift enable signal (signal name is SFTEN) of the shift register is output, and the counter (2) is cleared. Then J
Move to 7 states. In FIG. 5, this corresponds to the state transition indicated by A9.

【0050】J7ステートでは、カウンター(2)の出
力が15で且つEN2が“HIGH”ならば、J8ステ
ートに移行する。即ち、スタートビットの最初の1ビッ
トが正常な場合は、カウンター(3)の出力が14〜1
8の範囲でシリアルデータ(SD1)は、“LOW”状
態に遷移するはずである。なお、これを実行するのにカ
ウンター(3)を利用するのは、J6ステートでカウン
ター(2)を初期化しているためである。また、カウン
ター(3)の出力を前記のごとく14〜18の範囲とす
るのは、受信データの周波数ジッタや非同期入力を同期
化する部分での処理を考慮して、判定基準に±2クロッ
ク分の幅を持たせたことに対応する。
In the J7 state, if the output of the counter (2) is 15 and EN2 is "HIGH", the flow shifts to the J8 state. That is, when the first bit of the start bit is normal, the output of the counter (3) is 14 to 1
In the range of 8, the serial data (SD1) should transition to the “LOW” state. The reason why the counter (3) is used to execute this is that the counter (2) is initialized in the J6 state. The reason why the output of the counter (3) is set in the range of 14 to 18 as described above is that ± 2 clocks are included in the judgment criterion in consideration of frequency jitter of received data and processing at a portion for synchronizing asynchronous input. Corresponding to having a width of

【0051】従って、J7ステートにおいて、カウンタ
ー(3)の出力が18を超え、カウンター(3)の出力
が19でかつシリアルデータ(SD1)が“HIGH”
ならば、スタートビットとして検出した部分自体をノイ
ズとみなし、J1ステートに移行する。
Therefore, in the J7 state, the output of the counter (3) exceeds 18, the output of the counter (3) is 19, and the serial data (SD1) is "HIGH".
If so, the part itself detected as the start bit is regarded as noise, and the state shifts to the J1 state.

【0052】J8ステートにおいては、シフトネーブル
信号(SFTEN)を出力する他、カウンター(2)を
クリアー、EN1信号の停止、検出したスピードをレジ
スタへ設定、及び送信速度の自動更新等が行われる。
In the J8 state, in addition to outputting the shift enable signal (SFTEN), the counter (2) is cleared, the EN1 signal is stopped, the detected speed is set in the register, and the transmission speed is automatically updated.

【0053】その後は、図4に示しているように、J9
ステート,J10ステート,…へと状態遷移し、検出し
たデータ伝送速度に準じたクロックでシフトレジスタ
(7)によりデータサンプルして、1バイト毎に受信F
IFO(8)にデータを書き込んでいく。
Thereafter, as shown in FIG.
State, J10 state,..., The data is sampled by the shift register (7) with a clock according to the detected data transmission speed, and the reception F is received every byte.
Data is written to the IFO (8).

【0054】このような処理がなされることにより、図
5のシリアルデータ(SD1)については、シリアルデ
ータ上にノイズがあるために一度は38.4K/2BP
Sと判断するが、その後正しく38.4K/4=960
0BPSを検出することになる。
By performing such processing, the serial data (SD1) shown in FIG. 5 has a noise of 38.4K / 2BP once because the serial data has noise.
Judged as S, but then correctly 38.4K / 4 = 960
0 BPS will be detected.

【0055】[0055]

【発明の効果】以上説明したように、本発明によれば、
多種類のデータ速度を検出するためにシフトレジスタや
判定結果をラッチするためのフリップフロップ等をデー
タ伝送速度の種類だけ持つ必要はなく、また、カウンタ
ーの全ビットを使わないため、回路を簡素化できる。ま
た、また、ノイズを自動的に除去して自動スピード検出
の信頼性を高めることができるという効果を奏する。
As described above, according to the present invention,
It is not necessary to have only a shift register or flip-flop for latching the judgment result to detect various data speeds only for the data transmission speed type, and the circuit is simplified because not all bits of the counter are used. it can. Also, there is an effect that the reliability of automatic speed detection can be improved by automatically removing noise.

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

【図1】本発明のデータ速度自動認識回路を示すブロッ
ク図である。
FIG. 1 is a block diagram showing a data rate automatic recognition circuit according to the present invention.

【図2】同図(a)は非同期入力を同期化する回路を示
す回路図であり、同図(b)は判定基準クロックに±1
クロック分の幅を持たせた場合の同期化出力を示す説明
図である。
FIG. 2A is a circuit diagram showing a circuit for synchronizing an asynchronous input, and FIG.
FIG. 9 is an explanatory diagram showing a synchronization output when a width corresponding to a clock is provided.

【図3】各データ伝送速度とその判定のためのカウント
数範囲を示す説明図である。
FIG. 3 is an explanatory diagram showing each data transmission speed and a count number range for its determination.

【図4】図1におけるシーケンサー回路の状態遷移およ
び制御内容を示した流れ図である。
FIG. 4 is a flowchart showing a state transition and control contents of a sequencer circuit in FIG. 1;

【図5】スタートビットにノイズがのっても確実に96
00BPSの伝送速度を検出する場合を例示したタイミ
イングチャートである。
FIG. 5 shows that even if noise is present in the start bit, it is reliably 96
6 is a timing chart illustrating a case where a transmission rate of 00BPS is detected.

【図6】カウンターの結果で伝送速度を決定するときの
条件を示す図である。
FIG. 6 is a diagram showing conditions for determining a transmission rate based on the result of the counter.

【図7】“A”(41H)のシリアルデータを示すタイ
ミングチャートである。
FIG. 7 is a timing chart showing serial data of “A” (41H).

【図8】スタートビットによって、データ伝送速度を検
出する原理を示したタイミングチャートである。
FIG. 8 is a timing chart showing a principle of detecting a data transmission speed by a start bit.

【図9】スタートビットにノイズがのった場合の不具合
を示す説明図である。
FIG. 9 is an explanatory diagram showing a problem when noise is placed on a start bit.

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

1 カウンター 2 カウンター 3 カウンター 4 カウンター 6 シーケンサー 7 シフトレジスタ 8 FIFO 1 counter 2 counter 3 counter 4 counter 6 sequencer 7 shift register 8 FIFO

Claims (3)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 接続される相手端末より受信側でデータ
伝送速度を特定可能なキャラクタを調歩同期式でシリア
ル転送してもらい、そのキャラクタの先頭に付加される
スタートビットに基づいてデータ伝送速度を自動認識す
るようにしたデータ速度自動認識回路において、 検出可能な最高のデータ伝送速度のN倍のクロックで前
記キャラクタのスタートビット時間をカウントするカウ
ンターと、そのカウンター出力に含まれる部分的なビッ
ト列である、部分的nビット(但し、n<カウンタ出力
のビット数)に基づいてデータ伝送速度を判定する手段
とを備えたことを特徴とするデータ速度自動認識回路。
1. A character which can specify a data transmission rate on a receiving side from a connected terminal is serially transferred in a start-stop synchronous manner, and the data transmission rate is adjusted based on a start bit added to the head of the character. In a data rate automatic recognition circuit adapted to automatically recognize, a counter for counting the start bit time of the character with a clock which is N times the maximum detectable data transmission rate, and a partial bit included in the counter output.
N bits (where n <counter output
Means for determining the data transmission rate based on the number of bits of the data rate.
【請求項2】 接続される相手端末より受信側でデータ
伝送速度を特定可能なキャラクタを調歩同期式でシリア
ル転送してもらい、そのキャラクタの先頭に付加される
スタートビットに基づいてデータ伝送速度を自動認識す
るようにしたデータ速度自動認識回路において、 検出可能な最高のデータ伝送速度のN倍のクロックで前
記キャラクタのスタートビット時間をカウントするカウ
ンターと、そのカウンター出力に含まれる部分的なビッ
ト列である、部分的nビット(但し、n<カウンタ出力
のビット数)に基づいてデータ伝送速度を仮判定する手
と、仮判定したデータ伝送速度のN倍のクロック信号
を発生する手段と、この仮判定したデータ伝送速度のN
倍のクロック信号に基づいて前記仮判定したデータ伝送
速度の真偽を判定する手段とを備えたことを特徴とする
データ速度自動認識回路。
2. A character which can specify the data transmission rate on the receiving side from the connected terminal is serially transferred in start-stop synchronization, and the data transmission rate is adjusted based on a start bit added to the head of the character. In a data rate automatic recognition circuit adapted to automatically recognize, a counter for counting the start bit time of the character with a clock which is N times the maximum detectable data transmission rate, and a partial bit included in the counter output.
N bits (where n <counter output
Method for temporarily determining the data transmission rate based on the number of bits
Stage and, means for generating a N times the clock signal of the data transmission rate temporarily determined, N of the temporary determined data transmission rate
Means for determining the authenticity of the tentatively determined data transmission rate based on a doubled clock signal.
【請求項3】 前記部分的nビットは検出するデータ伝
送速度に応じて変更されることを特徴とする請求項1又
は請求項2に記載のデータ速度自動認識回路
3. The data transmission device according to claim 1, wherein said partial n bits are data transmission data to be detected.
3. The automatic data rate recognition circuit according to claim 1, wherein the data rate is changed in accordance with a feed rate.
JP6316977A 1994-12-20 1994-12-20 Automatic data rate recognition circuit Expired - Lifetime JP3048866B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6316977A JP3048866B2 (en) 1994-12-20 1994-12-20 Automatic data rate recognition circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6316977A JP3048866B2 (en) 1994-12-20 1994-12-20 Automatic data rate recognition circuit

Publications (2)

Publication Number Publication Date
JPH08172431A JPH08172431A (en) 1996-07-02
JP3048866B2 true JP3048866B2 (en) 2000-06-05

Family

ID=18083049

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6316977A Expired - Lifetime JP3048866B2 (en) 1994-12-20 1994-12-20 Automatic data rate recognition circuit

Country Status (1)

Country Link
JP (1) JP3048866B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4586492B2 (en) * 2004-10-26 2010-11-24 船井電機株式会社 One-wire data communication method and one-wire data transmitter / receiver using this communication method
JP4866288B2 (en) * 2007-04-02 2012-02-01 株式会社日立国際電気 Data communication device and data line termination device
JP4832612B2 (en) * 2010-03-04 2011-12-07 株式会社 エニイワイヤ Signal transmission method in control / monitor signal transmission system

Also Published As

Publication number Publication date
JPH08172431A (en) 1996-07-02

Similar Documents

Publication Publication Date Title
JP2641999B2 (en) Data format detection circuit
CN1009893B (en) Method and device for determination of data transmission speed
EP0500263A2 (en) Method for synchronising a receiver&#39;s data clock
US6097754A (en) Method of automatically detecting the baud rate of an input signal and an apparatus using the method
KR940002144B1 (en) Data transfer system
EP0735709B1 (en) Synchronizing circuit for use in a digital audio signal compressing/expanding system
WO2000033525A1 (en) Autobaud/autoecho method
JP2982731B2 (en) Synchronous signal detection method
JP3048866B2 (en) Automatic data rate recognition circuit
JPH08149120A (en) Asynchronous serial data receiver
US5206888A (en) Start-stop synchronous communication speed detecting apparatus
US20030193374A1 (en) PLL for clock recovery with initialization sequence
JP3199666B2 (en) Serial interface device
US4607378A (en) Detector for detecting sync bits in a stream of data bits
JP3602233B2 (en) AT command analyzer
JPH10294772A (en) At command reception system
JPS6317381B2 (en)
JP2666690B2 (en) Asynchronous data transmission method and apparatus
JP2627890B2 (en) Decoding circuit
JPS6317380B2 (en)
JPH0514334A (en) Communication parameter detection method in start-stop synchronous communication system
JP2680971B2 (en) Asynchronous communication speed detection circuit
JPH06197148A (en) Bit rate and character format discrimination system for reception data
JPH07212413A (en) Reception circuit for asynchronous data
JP2776355B2 (en) Keyboard interface circuit