JPH04360422A - Decoding method - Google Patents

Decoding method

Info

Publication number
JPH04360422A
JPH04360422A JP13687091A JP13687091A JPH04360422A JP H04360422 A JPH04360422 A JP H04360422A JP 13687091 A JP13687091 A JP 13687091A JP 13687091 A JP13687091 A JP 13687091A JP H04360422 A JPH04360422 A JP H04360422A
Authority
JP
Japan
Prior art keywords
count
pulse width
limit value
margin
quotient
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
JP13687091A
Other languages
Japanese (ja)
Inventor
Mitsufumi Osada
長田 光文
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP13687091A priority Critical patent/JPH04360422A/en
Publication of JPH04360422A publication Critical patent/JPH04360422A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To realize the decoding method tolerant of pulse width fluctuation due to the effect of noise or the like in a transmission line. CONSTITUTION:A count N (6) of a counter (2) counting a clock pulse (4) is read for each change in an input signal sent in an NRZ code. The count N is divided by a basic pulse count W, the obtained quotient has a residue Y and the residue is more than an upper limit set by a margin with respect to the basic pulse count W, the quotient is added by 1, and when the residue is less than a limit or below set by a margin with respect to the basic pulse count W, the quotient is left as it is, and when the residue is between an upper limit and a lower limit B, it is discriminated that a pulse width is incorrect. Thus, the decoder tolerant of the pulse width fluctuation is realized without addition of an expensive noise elimination circuit and an expensive waveform shaping circuit.

Description

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

【0001】0001

【産業上の利用分野】この発明はデジタル信号のシリア
ル伝送における復号化方法に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a decoding method for serial transmission of digital signals.

【0002】0002

【従来の技術】図5はNRZ符号で送られてきたデジタ
ル信号を復号化する復号化回路のブロック図であり、図
において、(1)は復号化の処理をするマイコン、(2
)はNRZ符号で送られてきたデジタル信号のパルス幅
を測定するカウンタ、(3)はデジタル信号であるNR
Z符号の入力信号、(4)は外部回路(図示せず)から
カウンタ(2)に供給されるクロック信号、(5)はマ
イコン(1)からカウンタ(2)に供給されるリセット
信号、(6)はマイコン(1)によってカウンタ(2)
から読み出されるカウント値Nである。
2. Description of the Related Art FIG. 5 is a block diagram of a decoding circuit that decodes a digital signal sent in an NRZ code.
) is a counter that measures the pulse width of the digital signal sent in the NRZ code, and (3) is the NR that is the digital signal.
Z code input signal, (4) is a clock signal supplied to the counter (2) from an external circuit (not shown), (5) is a reset signal supplied from the microcomputer (1) to the counter (2), ( 6) is a counter (2) by the microcomputer (1)
This is the count value N read from.

【0003】図6は上記の入力信号(3)、クロック信
号(4)、カウント値N(6)の関係を示すタイムチャ
ート図である。
FIG. 6 is a time chart showing the relationship among the above input signal (3), clock signal (4), and count value N(6).

【0004】次に図7に示すフローチャート図を参照し
ながら動作について説明する。マイコン(1)は入力信
号(3)を監視し該入力信号が変化した時、カウンタ(
2)からクロック信号(4)のカウント値Nを読み込む
(ステップST7−1)とともにリセット信号(5)を
出力してカウンタ(2)をリセットする。そして、上記
カウント値Nは基本パルス幅であるWの倍数と考えられ
るので、マイコン(1)は読み込んだカウント値Nを基
本パルス幅Wで除算する(ステップST7−2)。除算
した商が得られると(ステップST7−3)、余りYが
零かを判断し(ステップST7−4)、YESの場合は
連続した「1」または「0」の個数であり、NO、つま
り、余りが出たらパルス幅が不正であるとみなして復号
化の動作を中止する。このような動作を入力信号(3)
の変化点ごとに繰返すことにより、送られてきた入力信
号を復号化することができる。
Next, the operation will be explained with reference to the flowchart shown in FIG. The microcomputer (1) monitors the input signal (3), and when the input signal changes, the counter (
2), the count value N of the clock signal (4) is read (step ST7-1), and a reset signal (5) is output to reset the counter (2). Since the count value N is considered to be a multiple of the basic pulse width W, the microcomputer (1) divides the read count value N by the basic pulse width W (step ST7-2). When the division quotient is obtained (step ST7-3), it is determined whether the remainder Y is zero (step ST7-4). If YES, it is the number of consecutive "1" or "0", and if NO, that is, , if a remainder occurs, it is assumed that the pulse width is invalid and the decoding operation is stopped. Input signal (3)
By repeating this at each change point, the input signal sent can be decoded.

【0005】[0005]

【発明が解決しようとする課題】従来の復号化方法は以
上のように行われているので、伝送路上でパルス幅が雑
音等の影響により変動した場合は、除算の結果に余りが
出て正しく復号化することができず、雑音の少ない伝送
路での通信にしかつかえないという問題点があった。
[Problem to be solved by the invention] Conventional decoding methods are performed as described above, so if the pulse width fluctuates due to the influence of noise etc. on the transmission path, a remainder will appear in the division result and it will not be correct. The problem was that it could not be decoded and could only be used for communication over transmission lines with little noise.

【0006】この発明は上記のような問題点を解消する
ことを課題になされたもので、雑音の多い伝送路でも高
価な雑音除去回路を付加しないで、入力信号を正しく復
号化するための復号化方法を提供することを目的とする
The present invention has been made to solve the above-mentioned problems, and it is a decoding method for correctly decoding an input signal even on a noisy transmission line without adding an expensive noise removal circuit. The purpose is to provide a method for

【0007】[0007]

【課題を解決するための手段】この発明に係る復号化方
法は、NRZ符号で伝送されてきた入力信号の変化時ご
とにカウンタのカウント値を読み込み、このカウント値
を基本パルスカウントで除算し、得られた商に余りがあ
り該余りが前記基本パルスカウントに対するマージンに
より設定される上限値以上のときは商に+1し、前記基
本パルスカウントに対するマージンにより設定される下
限値以下のときは商はそのままとし、前記余りが上限値
と下限値の間にあるときはパルス幅が不正であるとする
[Means for Solving the Problems] A decoding method according to the present invention reads a count value of a counter every time an input signal transmitted in an NRZ code changes, divides this count value by a basic pulse count, If the obtained quotient has a remainder and the remainder is greater than or equal to the upper limit set by the margin for the basic pulse count, add 1 to the quotient, and if it is less than the lower limit set by the margin for the basic pulse count, the quotient is If the remainder is between the upper limit value and the lower limit value, it is assumed that the pulse width is invalid.

【0008】[0008]

【作用】この発明における復号化方法は、入力信号の変
化時ごとに読み込んだカウンタのカウント値Nの処理に
マージンを持たせたことにより、伝送路上で入力信号の
パルス幅が変動しても正しく復号化できる。
[Operation] The decoding method according to the present invention provides a margin for processing the count value N of the counter read every time the input signal changes, so that the decoding method is correct even if the pulse width of the input signal changes on the transmission path. Can be decrypted.

【0009】[0009]

【実施例】以下、この発明の一実施例を図について説明
する。この発明の復号化方法は前記図4に示す復号化回
路を用いて実施するもので、入力信号(3)の変化時ご
とに読み込まれたカウント値Nは、図1に示すフローチ
ャートに従ってマイコン(1)内で処理される。図2は
基本パルスカウントWに対するマージンにより設定され
る上限値Aおよび下限値Bの説明図である。
DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings. The decoding method of the present invention is carried out using the decoding circuit shown in FIG. ) is processed within. FIG. 2 is an explanatory diagram of an upper limit value A and a lower limit value B set by a margin for the basic pulse count W.

【0010】まず、マイコン(1)はカウンタ(2)の
カウント値Nを読み込み(ステップST1−1)、この
カウント値Nを基本パルスカウントWで除算する(ステ
ップST1−2)。除算した商をX、余りをYとして(
ステップST1−3)、余りYが上限値Aより大きいか
を判断し(ステップST1−4)、YESであれば商X
を+1(ステップST1−5)、NOであれば余りYが
下限値Bより小さいかを判断し(ステップST1−6)
、YESであれば商Xをそのままとし、NO、つまり、
余りYが上限値Aと下限値Bの間にある場合は不正なカ
ウントとする。この結果、得られた商Xは連続する1ま
たは0の個数である。
First, the microcomputer (1) reads the count value N of the counter (2) (step ST1-1), and divides this count value N by the basic pulse count W (step ST1-2). Let the quotient of the division be X and the remainder be Y (
Step ST1-3), determine whether the remainder Y is larger than the upper limit value A (step ST1-4), and if YES, the quotient
+1 (step ST1-5), and if NO, it is determined whether the remainder Y is smaller than the lower limit B (step ST1-6).
, if YES, leave the quotient X as is; if NO, that is,
If the remainder Y is between the upper limit value A and the lower limit value B, it is assumed that the count is incorrect. As a result, the obtained quotient X is the number of consecutive 1's or 0's.

【0011】いま、パルス幅の変動マージンを±20%
とする場合は、上限値Aを0.8×Wとする。このよう
にマージンを設定することにより、雑音等によりパルス
幅が変動しても正しく復号化することができる。
[0011] Now, the pulse width fluctuation margin is ±20%.
In this case, the upper limit value A is set to 0.8×W. By setting the margin in this manner, correct decoding can be achieved even if the pulse width varies due to noise or the like.

【0012】なお、上記実施例ではマージンにより上限
値Aと下限値Bが固定されているが、上限値と下限値を
変化させてもよい。その場合のフローチャートを図3に
示す。NRZ信号を符号化する側では基本パルス幅に基
づいて符号化するので、直前のパルス幅が長くなると、
次のパルス幅は逆に短くなると考えられる。
In the above embodiment, the upper limit value A and the lower limit value B are fixed by the margin, but the upper limit value and the lower limit value may be changed. A flowchart in that case is shown in FIG. The NRZ signal is encoded based on the basic pulse width, so if the previous pulse width becomes longer,
On the contrary, the next pulse width is considered to be shorter.

【0013】マイコン(1)はカウンタ(2)のカウン
ト値Nを読み込み(ステップST3−1)、このカウン
ト値Nを基本パルスカウントWで除算し(ステップST
3−2)、得られた商をX、余りをYとする(ステップ
ST3−3)。次いで、この余りYが上限値A′より大
きいかを判断し(ステップST3−4)、YESであれ
ば上記商Xを+1した後(ステップST3−5)、パル
ス幅が短かくなった場合として、基本パルスカウントW
との誤差(W−Y)を上限値Aと下限値Bに加算して新
しい上限値A′と下限値B′を作成する(ステップST
3−6)。
The microcomputer (1) reads the count value N of the counter (2) (step ST3-1), and divides this count value N by the basic pulse count W (step ST3-1).
3-2), let the obtained quotient be X and the remainder be Y (step ST3-3). Next, it is determined whether this remainder Y is larger than the upper limit value A' (step ST3-4), and if YES, after adding 1 to the above quotient X (step ST3-5), assuming that the pulse width has become shorter, , basic pulse count W
The error (W-Y) between
3-6).

【0014】この新しく作成された上限値A′と下限値
B′は、次に処理されるカウント値Nに対して上限値A
と下限値Bより大きくなっているので、パルス幅が長く
なる変動に対してマージンを持つことになる。
The newly created upper limit value A' and lower limit value B' are the upper limit value A' and the lower limit value B' for the next processed count value N.
Since this value is larger than the lower limit value B, there is a margin against fluctuations in which the pulse width becomes longer.

【0015】このパルス幅が長くなった場合は、上記ス
テップST3−4における判断結果がNOとなるので、
余りYが下限値B′より小さいかを判断し(ステップS
T3−7)、YESであれば余りYを上限値Aと下限値
Bから減算して新しい上限値A′と下限値B′を作成す
る(ステップST3−8)。上記ステップST3−7に
おける判断結果がNOの場合はパルス幅不正とみなして
復号化動作を中止する。このようにして、よりパルス幅
の変動に対して強い学習形の復号化ができる。
[0015] If this pulse width becomes longer, the determination result in step ST3-4 is NO, so
Determine whether the remainder Y is smaller than the lower limit value B' (step S
T3-7), if YES, the remainder Y is subtracted from the upper limit value A and lower limit value B to create new upper limit value A' and lower limit value B' (step ST3-8). If the determination result in step ST3-7 is NO, it is assumed that the pulse width is incorrect and the decoding operation is stopped. In this way, learning-type decoding that is more resistant to fluctuations in pulse width can be performed.

【0016】図4は復号化処理すべき直前の入力信号だ
けでなく、その前の入力信号も累計して上限値Aと下限
値Bを変化させる実施例のフローチャートを示すもので
、ステップST4−1〜ST4−5までの処理は前記図
3におけるステップST3−1〜ST3−5までの処理
と同じであるから重複説明を省略する。
FIG. 4 shows a flowchart of an embodiment in which the upper limit value A and the lower limit value B are changed by accumulating not only the input signal immediately before the decoding process but also the previous input signal. Since the processing from Steps ST3-1 to ST4-5 is the same as the processing from Steps ST3-1 to ST3-5 in FIG. 3, redundant explanation will be omitted.

【0017】本実施例は新しい上限値A′と下限値B′
を作成するための誤差(W−Y)の入力信号として、直
前の誤差(W−Y)とそれまでの平均誤差Y′の平均値
を求め(ステップST4−6)、パルス幅が短くなった
場合は上記平均値Y′を上限値Aと下限値Bに加算して
新しい上限値A′と下限値B′を作成する(ステップS
T4−7)。
In this embodiment, new upper limit value A' and lower limit value B'
As the input signal for the error (W-Y) to create the error (W-Y), the average value of the previous error (W-Y) and the average error Y' up to that point is obtained (step ST4-6), and the pulse width is shortened. If so, add the above average value Y' to the upper limit value A and lower limit value B to create new upper limit value A' and lower limit value B' (step S
T4-7).

【0018】また、余りYが下限値B′より小さくなっ
た場合は、上記平均値Y′を上限値Aと下限値Bから減
算して新しい上限値A′と下限値B′とを作成する(ス
テップST4−8〜ST4−10)。ステップST4−
8の判断がNOであれば、パルス幅不正とみなして復号
化動作を中止する。
Furthermore, if the remainder Y becomes smaller than the lower limit value B', the above average value Y' is subtracted from the upper limit value A and the lower limit value B to create a new upper limit value A' and lower limit value B'. (Steps ST4-8 to ST4-10). Step ST4-
If the determination in step 8 is NO, it is assumed that the pulse width is incorrect and the decoding operation is stopped.

【0019】この平均値Y′を使用することにより、単
発性のパルス幅変動だけでなく、伝送路特性のような静
的なパルス幅変動にも強い適応形の復号化ができる。
By using this average value Y', it is possible to perform adaptive decoding that is strong against not only single pulse width fluctuations but also static pulse width fluctuations such as transmission path characteristics.

【0020】[0020]

【発明の効果】以上のように、この発明によれば、入力
信号の変化時毎に読み込んだカウンタのカウント値の処
理にマージンを持たせたことにより、高価な雑音除去回
路やパルス整形回路を加えずに、最小限の回路で雑音等
によりパルス幅が変動しても正しい復号化を実現するこ
とができるという効果がある。
[Effects of the Invention] As described above, according to the present invention, by providing a margin in processing the count value of the counter read every time the input signal changes, expensive noise removal circuits and pulse shaping circuits can be saved. This has the effect that correct decoding can be achieved even if the pulse width varies due to noise, etc., with a minimum number of circuits.

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

【図1】この発明の第1実施例による復号化方法を実施
するマージン固定形のフローチャート図である。
FIG. 1 is a flowchart diagram of a fixed margin type implementation of a decoding method according to a first embodiment of the present invention.

【図2】基本パルスカウントに対するマージンにより設
定される上限値および下限値の説明図である。
FIG. 2 is an explanatory diagram of an upper limit value and a lower limit value set by a margin for a basic pulse count.

【図3】この発明の第2実施例による復号化方法を実施
する学習形のフローチャート図である。
FIG. 3 is a flow chart diagram of a learning type implementing a decoding method according to a second embodiment of the present invention.

【図4】この発明の第3実施例による復号化方法を実施
する適応形のフローチャート図である。
FIG. 4 is a flowchart diagram of an adaptive implementation of a decoding method according to a third embodiment of the invention;

【図5】復号化回路のブロック図である。FIG. 5 is a block diagram of a decoding circuit.

【図6】各信号のタイムチャート図である。FIG. 6 is a time chart diagram of each signal.

【図7】従来の復号化方法を実施するフローチャート図
である。
FIG. 7 is a flowchart diagram for implementing a conventional decoding method.

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

(1)  マイコン (2)  カウンタ (3)  入力信号 (4)  クロック信号 (5)  リセット信号 (6)  カウント値N (1) Microcomputer (2) Counter (3) Input signal (4) Clock signal (5) Reset signal (6) Count value N

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】  基本パルス幅で符号化されて伝送され
てきたNRZ符号のパルス信号を監視し該パルス信号の
変化時にクロックパルスのカウント値をカウンタから読
み込むとともに該カウンタをリセットし、読み込んだカ
ウント値を基本パルスカウントで除算し、この除算結果
に余りがあり該余りが前記基本パルスカウントに対する
マージンにより設定される上限値以上のときは商に+1
し、前記基本パルスカウントに対するマージンにより設
定される下限値以下のときは商をそのままとし、前記余
りが上限値と下限値の間にあるときはパルス幅を不正と
することを特徴とする復号化方法。
Claim 1: A pulse signal of an NRZ code encoded with a basic pulse width and transmitted is monitored, and when the pulse signal changes, a count value of clock pulses is read from a counter, and the counter is reset, and the read count is The value is divided by the basic pulse count, and if the division result has a remainder and the remainder is greater than or equal to the upper limit set by the margin for the basic pulse count, the quotient is +1.
The decoding method is characterized in that when the quotient is equal to or less than a lower limit value set by a margin for the basic pulse count, the quotient is left as is, and when the remainder is between the upper limit value and the lower limit value, the pulse width is determined to be invalid. Method.
【請求項2】  マージンを処理直前のパルス幅変動に
よる誤差で補正することを特徴とする請求項1記載の復
号化方法。
2. The decoding method according to claim 1, wherein the margin is corrected by an error due to pulse width fluctuation immediately before processing.
【請求項3】  マージンをパルス幅変動による誤差の
平均値で補正することを特徴とする請求項1記載の復号
化方法。
3. The decoding method according to claim 1, wherein the margin is corrected by an average value of errors caused by pulse width fluctuations.
JP13687091A 1991-06-07 1991-06-07 Decoding method Pending JPH04360422A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP13687091A JPH04360422A (en) 1991-06-07 1991-06-07 Decoding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP13687091A JPH04360422A (en) 1991-06-07 1991-06-07 Decoding method

Publications (1)

Publication Number Publication Date
JPH04360422A true JPH04360422A (en) 1992-12-14

Family

ID=15185454

Family Applications (1)

Application Number Title Priority Date Filing Date
JP13687091A Pending JPH04360422A (en) 1991-06-07 1991-06-07 Decoding method

Country Status (1)

Country Link
JP (1) JPH04360422A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015058473A1 (en) * 2013-10-25 2015-04-30 深圳市明微电子股份有限公司 Decoding method and apparatus of transmission protocol and transmission protocol decoding chip

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015058473A1 (en) * 2013-10-25 2015-04-30 深圳市明微电子股份有限公司 Decoding method and apparatus of transmission protocol and transmission protocol decoding chip

Similar Documents

Publication Publication Date Title
US4710960A (en) Speech-adaptive predictive coding system having reflected binary encoder/decoder
JP2621614B2 (en) Code error detection circuit
JPH057908B2 (en)
US6049903A (en) Digital data error detection and correction system
US4476458A (en) Dual threshold decoder for convolutional self-orthogonal codes
JPH04315332A (en) Error correction device
US5038351A (en) Coded mark inversion block synchronization circuit
JPH04360422A (en) Decoding method
US7274312B2 (en) High rate coding for media noise
JPH06350540A (en) Error compensating method for digital audio signal
JP2710525B2 (en) Jitter suppression circuit
GB1521091A (en) Circuit arrangements for use in data transmission systems
JPH08249822A (en) Sync detection method and sync detection circuit
JP2823158B2 (en) Error correction device
JPH0248994B2 (en) SHINGOHOSEISOCHI
JPH0431211B2 (en)
JP2600581B2 (en) Code synchronization circuit
JP2573180B2 (en) Error correction decoding device
JP2611722B2 (en) Error flag output circuit
KR930015380A (en) Compression Data Transmission Error Correction Method
JPH0220941A (en) Data discriminating circuit
JPH07245630A (en) High speed data transmission system
RU1793553C (en) Device for transmitting and receiving instructions of speed matching
JPH0531973B2 (en)
JPH0685808A (en) Frame synchronization system