JP3260862B2 - Parallel data transmission device - Google Patents

Parallel data transmission device

Info

Publication number
JP3260862B2
JP3260862B2 JP31419392A JP31419392A JP3260862B2 JP 3260862 B2 JP3260862 B2 JP 3260862B2 JP 31419392 A JP31419392 A JP 31419392A JP 31419392 A JP31419392 A JP 31419392A JP 3260862 B2 JP3260862 B2 JP 3260862B2
Authority
JP
Japan
Prior art keywords
data
transmission
parallel
code
sequence
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 - Fee Related
Application number
JP31419392A
Other languages
Japanese (ja)
Other versions
JPH06139030A (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.)
Ricoh Co Ltd
Original Assignee
Ricoh 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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP31419392A priority Critical patent/JP3260862B2/en
Publication of JPH06139030A publication Critical patent/JPH06139030A/en
Application granted granted Critical
Publication of JP3260862B2 publication Critical patent/JP3260862B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related 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 parallel data transmission device for transmitting data from a computer to a printer, and more particularly, to a conventional strobe (synchronous clock) for transmission data using a Centronics interface. The present invention relates to a parallel data transmission device that realizes high-speed data transmission by mixing a corresponding component to transmit only data on a transmission side and simultaneously monitoring a clock and fetching data on a reception side.

【0002】[0002]

【従来の技術】従来のパラレル方式のデータ伝送方式と
して,コンピュータとプリンタ間にて用いられてるセン
トロニクスインターフェイスが一般的である。このイン
ターフェイスは,周知の如く米国セントロニクス社によ
って開発された,コンピュータからプリンタに対してデ
ータをパラレル(8ビット並列)に伝送するための規格
である。このセントロニクスインターフェイスは8ビッ
トのパラレルデータライン,データが確定したことを示
すストローブ信号,プリンタ(受信側)が動作中である
ことを知らせるビジー信号,及びデータ受入れ可能状態
であることを示すアック信号のハンドシェイクラインか
ら構成されている。
2. Description of the Related Art As a conventional parallel data transmission method, a Centronics interface used between a computer and a printer is generally used. This interface is a standard developed by Centronics Corporation in the United States for transmitting data from a computer to a printer in parallel (8-bit parallel). The Centronics interface includes an 8-bit parallel data line, a strobe signal indicating that data has been determined, a busy signal indicating that the printer (reception side) is operating, and an ack signal indicating that data can be received. It consists of a handshake line.

【0003】図8は,セントロニクスインターフェイス
による一般的なデータ伝送を示すタイミングチャートで
あり,図9は,データ送信のシーケンスを示すフローチ
ャートである。なお,ビジー信号は正論理の制御信号,
一方,ストローブ信号は負論理の制御信号である。図8
及び図9において,コンピュータ側は入力ポートよりビ
ジー信号の状態(ステータス)を入力し(S901),
プリンタがビジー状態であるか否かを判断する(S90
2)。プリンタがビジー状態ではないと判断したときに
は,送信データを取り出してパラレルポートへ出力し
(S903),データセットタイム(t1)分待機する
(S904)。その後,ストローブをセットし(S90
5),データリードタイム(t2)分待機(S906)
した後,ストローブを解除し(S907),データホー
ルドタイム(t3)分待機する(S908)。その後,
送信データが有るか否かを判断し(S909),送信デ
ータが有ると判断したときには上記ステップ901に戻
り,一方,送信データがないと判断したときには本処理
を終了する。また,上記ステップ902において,プリ
ンタがビジー状態であると判断したときには,上記ステ
ップ901に戻る。
FIG. 8 is a timing chart showing general data transmission by the Centronics interface, and FIG. 9 is a flowchart showing a data transmission sequence. The busy signal is a positive logic control signal,
On the other hand, the strobe signal is a negative logic control signal. FIG.
In FIG. 9 and FIG. 9, the computer inputs a busy signal state from the input port (S901).
It is determined whether the printer is busy (S90).
2). If it is determined that the printer is not in the busy state, the transmission data is taken out and output to the parallel port (S903), and waits for the data set time (t1) (S904). Thereafter, the strobe is set (S90).
5), waiting for data lead time (t2) (S906)
After that, the strobe is released (S907), and waits for the data hold time (t3) (S908). afterwards,
It is determined whether or not there is transmission data (S909). When it is determined that there is transmission data, the process returns to step 901. On the other hand, when it is determined that there is no transmission data, this processing ends. If it is determined in step 902 that the printer is busy, the process returns to step 901.

【0004】このようにして,セントロニクスインター
フェイスは非同期のパラレルデータ伝送を実現してい
る。なお,図8に示したデータセットタイム(t1),
データリードタイム(t2),及びデータホールドタイ
ム(t3)は少なくとも0.5マイクロセカンド(μs
ec)以上である必要がある。
Thus, the Centronics interface realizes asynchronous parallel data transmission. The data set time (t1) shown in FIG.
Data lead time (t2) and data hold time (t3) are at least 0.5 microsecond (μs)
ec).

【0005】従って,一般的なコンピュータ側のセント
ロニクスインターフェイスは単純な入出力ポートによる
構成のものが殆どであり,上記図8及び図9にて説明し
たようにコンピュータ側のシーケンスは全てソフトウェ
ア制御で実行していた。また,このような方式を用い
て,従来におけるプリンタはテキストデータベースのド
ットインパクトプリンタであったため,処理速度等にお
いて満足するものであった。なぜならば,プリンタの処
理速度に比較してコンピュータ側の処理速度がはるかに
勝っているためである。
Therefore, most of the general computer-based Centronics interface has a simple input / output port, and the computer-side sequence is entirely controlled by software as described with reference to FIGS. Was. Further, by using such a method, a conventional printer is a dot impact printer for a text database, and thus has satisfactory processing speed and the like. This is because the processing speed of the computer is far superior to the processing speed of the printer.

【0006】[0006]

【発明が解決しようとする課題】しかしながら,上記に
示されるような従来におけるパラレルデータ伝送方式に
あっては,最近,特に普及している高速のレーザプリン
タに対応することが困難となってきた。換言すると,レ
ーザプリンタでは高速化が図られていると共に,処理す
るデータが画像データを多く含んでおり,その結果,大
量データが扱われるようになるため,プリンタの処理は
以前と比較して高性能が要求されている。このようにプ
リンタが高速化されると,従来とは逆にコンピュータ側
のソフトウェア制御による処理に制約が生じ,プリンタ
の処理性能に追従することが困難であるという問題点が
クローズアップされてきた。
However, in the conventional parallel data transmission system as described above, it has recently become difficult to cope with a high-speed laser printer which is particularly popular. In other words, laser printers have been improved in speed, and the data to be processed contains a lot of image data. As a result, a large amount of data is handled. Performance is required. As described above, when the speed of the printer is increased, the processing by software control on the computer side is restricted on the contrary, and the problem that it is difficult to follow the processing performance of the printer has been highlighted.

【0007】また,上記問題点を解決する一手段とし
て,例えば,コンピュータ側のインターフェイスを周知
のDMA(ダイレクト・メモリ・アクセス)転送処理を
用いたハードウェアベースの制御方式によることが可能
である。ところが,このDMA転送方式では,高価なハ
ードウェアの変更を必要とし,且つ,従来の単純な入出
力ポートで構成されたセントロニクスインターフェイス
を有する機器にはそのまま応用できないとう問題点があ
った。
As a means for solving the above-mentioned problem, for example, a computer-based interface can be realized by a hardware-based control method using a well-known DMA (direct memory access) transfer process. However, this DMA transfer method has a problem that it requires expensive hardware change and cannot be applied to a conventional device having a centronics interface composed of simple input / output ports.

【0008】本発明は,上記に鑑みてなされたものであ
って,既存のハードウェアを用いてソフトウェア制御の
みでコンピュータとプリンタ間の高速データ伝送を実現
し,経済性及び機器の汎用性を向上させることを目的と
する。
The present invention has been made in view of the above, and realizes high-speed data transmission between a computer and a printer only by software control using existing hardware, thereby improving economy and versatility of equipment. The purpose is to let them.

【0009】[0009]

【課題を解決するための手段】本発明は,上記の目的を
達成するために,複数のビット列をデータの1単位と
し,該データ単位毎に並列にデータを伝送するパラレル
出力手段と,該パラレル出力手段によって伝送される1
単位のデータのうちの同一のデータが隣接する部分を,
互いに異なるデータで構成される符号列に変換する符号
化手段と,送信データ列を前記符号化手段によって変換
することにより得られた符号列を前記パラレル出力手段
に送出する送信手段とを具備するパラレルデータ伝送装
置を提供するものである。
The present invention SUMMARY OF], in order to achieve the above object, a plurality of bit sequences and one unit of data, and parallel output means for transmitting data in parallel for each said data unit, said parallel 1 transmitted by output means
The part of the unit data where the same data is adjacent is
Code to be converted into a code sequence composed of different data
An object of the present invention is to provide a parallel data transmission apparatus comprising: a conversion unit; and a transmission unit that transmits a code sequence obtained by converting a transmission data sequence by the coding unit to the parallel output unit.

【0010】また,複数のビット列をデータの1単位と
し,該データ単位毎に並列にデータを伝送するパラレル
出力手段と,該パラレル出力手段によって伝送される1
単位のデータのうちの同一のデータが隣接する部分を,
互いに異なるデータで構成される符号列に変換すると共
に,送信データ列が連続データパターンである場合に連
長符号に変換して符号列とする符号化手段と,送信デー
タ列を前記符号化手段によって変換することにより得ら
れた符号列を前記パラレル出力手段に送出する送信手段
とを具備するパラレルデータ伝送装置を提供するもので
ある。
Further, the parallel output means for a plurality of bit sequences and one unit of data, transmitting data in parallel for each said data unit, 1 transmitted by said parallel output means
The part of the unit data where the same data is adjacent is
Encoding means for converting the transmission data sequence into a continuous data pattern and converting it into a continuous length code to form a code sequence, while converting the transmission data sequence into a continuous data pattern; And a transmitting means for transmitting a code string obtained by converting the data to the parallel output means to the parallel output means.

【0011】[0011]

【作用】本発明によるパラレルデータ伝送装置は,符号
化手段によりパラレル出力手段によって伝送される1単
位のデータのうちの同一のデータが隣接する部分を,互
いに異なるデータで構成される符号列に変換し,該符号
列を送信手段を介してパラレル出力手段から並列に出力
させてデータ伝送効率を向上させる。
According to the parallel data transmission apparatus of the present invention, one unit transmitted by the parallel output means by the encoding means is provided.
Of adjacent data with the same data
In this case, the data is converted into a code string composed of different data, and the code string is output in parallel from the parallel output means via the transmission means to improve data transmission efficiency.

【0012】また,符号化手段によりパラレル出力手段
によって伝送される1単位のデータのうちの同一のデー
タが隣接する部分を,互いに異なるデータで構成される
符号列に変換すると共に,送信データ列が連続データパ
ターンである場合に連長符号に変換して符号列を生成
し,該符号列を送信手段を介してパラレル出力手段から
並列に出力させることにより,データの圧縮化を図り大
量データを高速伝送する。
[0012] Further, a parallel output means is provided by the encoding means.
Data of one unit of data transmitted by
Adjacent parts are composed of different data
By converting the data into a code sequence and converting the transmission data sequence into a continuous length code when the data sequence is a continuous data pattern to generate a code sequence, and outputting the code sequence in parallel from a parallel output unit via a transmission unit, , To compress data and transmit large amounts of data at high speed.

【0013】[0013]

【実施例】本発明の要旨は,送信データに従来のストロ
ーブ(同期クロック)に相当する成分を混入させること
によって,コンピュータ側(送信側)ではデータのみを
伝送し,プリンタ側(受信側)ではクロックの監視及び
データの取り込みを同時に実行するものである。従来ス
トローブを用いてデータの伝送を実行していたのは,送
信データが確定したことを受信側に知らせる必要があっ
たからである。例えば,「1」,「2」,「2」,
「3」という4個のデータを送信する場合には,各々の
データを出力ポートへ送出すると共に,ストローブを発
生させることにより実行していた。ここで,データのみ
に注目すると「1」,「2」,「3」としか変化しない
ため,送信されたデータ列が「1」,「2」,「3」で
あるか,或いは「1」,「2」,「2」,「3」である
かという判別を行うことは不可能である。本発明は,こ
の点に着眼し,隣接するデータが必ず異なるように構成
されたデータ列を送信する場合には,データ毎にストロ
ーブを発生させなくとも受信側で判別可能であることを
利用したものである。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS The gist of the present invention is to transmit only data on the computer side (transmission side) and to transmit data on the printer side (reception side) by mixing components corresponding to a conventional strobe (synchronous clock) into transmission data. The monitoring of the clock and the fetching of the data are simultaneously executed. Conventionally, data transmission was performed using strobes because it was necessary to notify the receiving side that transmission data was determined. For example, "1", "2", "2",
When four data "3" are transmitted, each data is transmitted to an output port and a strobe is generated. Here, if attention is paid only to the data, only “1”, “2”, and “3” are changed. Therefore, the transmitted data sequence is “1”, “2”, “3”, or “1”. , “2”, “2”, and “3” cannot be determined. The present invention focuses on this point, and utilizes the fact that, when transmitting a data sequence configured so that adjacent data is always different, it is possible to determine on the receiving side without generating a strobe for each data. Things.

【0014】従って,本実施例では,上記の着想を具現
化するため,一般的に使用されているセントロニクスイ
ンターフェイスのハードウェアを利用し,コンピュータ
とプリンタ間におけるデータ伝送にそれを応用するもの
である。
Therefore, in the present embodiment, in order to realize the above-mentioned idea, hardware of a generally used Centronics interface is used and applied to data transmission between a computer and a printer. .

【0015】以下,本発明の一実施例を添付図面を参照
して説明する。図1は,本発明によるパラレルデータ伝
送装置の基本構成を示すブロック図であり,コンピュー
タ側(送信側)及びプリンタ側(受信側)とから大きく
構成されている。図において,コンピュータ側は,10
1の送信メッセージを隣接するデータが必ず異なるよう
にコードデータに変換する符号器と,102の符号器1
01からのコードデータを単に出力処理する送信部と,
103のパラレル出力ポートとから構成されている。ま
た,プリンタ側は,104のパラレル入力ポートと,1
05の受信データの変化点を検出して符号列をバッファ
リングする受信部と,106の受信された符号列を元の
送信メッセージに復号する復号器とから構成されてい
る。なお,本実施例においては,符号器101及び復号
器106による処理を送信処理と受信処理として各々別
構成としたが,これらの符号化/復号化処理をデータの
送信及び受信時に同時に実行してもよい。
An embodiment of the present invention will be described below with reference to the accompanying drawings. FIG. 1 is a block diagram showing a basic configuration of a parallel data transmission device according to the present invention, which is largely composed of a computer side (transmission side) and a printer side (reception side). In the figure, the computer side is 10
An encoder for converting the transmission message of No. 1 into code data so that adjacent data is always different;
A transmitter for simply outputting the code data from 01,
103 parallel output ports. On the printer side, 104 parallel input ports and 1
A receiving unit 05 detects a change point of the received data and buffers the code string, and a decoder 106 decodes the received code string into the original transmission message. In the present embodiment, the processes performed by the encoder 101 and the decoder 106 are separately configured as a transmission process and a reception process. However, these encoding / decoding processes are performed simultaneously when transmitting and receiving data. Is also good.

【0016】次に,以上のように構成されたパラレルデ
ータ伝送装置の動作等を下記の項目に分けて詳細に説明
する。即ち, (1) データ送出の手順 (2) データ受信の手順 (3) 符号器及び復号器の構成 (4) 符号化の手順 (5) 符号化例 (6) 復号化の手順 (7) 復号化例
Next, the operation and the like of the parallel data transmission apparatus configured as described above will be described in detail by dividing the following items. (1) Data transmission procedure (2) Data reception procedure (3) Configuration of encoder and decoder (4) Encoding procedure (5) Encoding example (6) Decoding procedure (7) Decoding Example

【0017】(1) データ送出の手順 図2は,本発明によるデータ送出の手順例を示すフロー
チャートである。図において,先ず,送信メッセージ列
を符号器101により送信符号列に符号化(変換処理)
し(S201),1バイトのデータを送信符号列から取
り出してパラレル出力ポート103にセットする(S2
02)。更に,データホールドタイム(t4)分待機
(S203)した後,符号列が終了したか否かを判断す
る(S204)。該判断の結果,符号列が終了したと判
断したときには本ルーチンを終了させ,一方,送信すべ
き送信符号列が残っている場合には,上記ステップ20
2に戻って,以下同様の処理を実行する。
(1) Procedure of Data Transmission FIG. 2 is a flowchart showing an example of the procedure of data transmission according to the present invention. In the figure, first, a transmission message sequence is encoded into a transmission code sequence by an encoder 101 (conversion process).
(S201), 1-byte data is extracted from the transmission code string and set in the parallel output port 103 (S2).
02). Further, after waiting for the data hold time (t4) (S203), it is determined whether or not the code string is completed (S204). As a result of the determination, when it is determined that the code string has been completed, this routine is terminated. On the other hand, when the transmission code string to be transmitted remains, the above-described step 20 is performed.
2, the same process is performed.

【0018】このように,送信シーケンスは単純にデー
タをパラレル出力ポート103に対して出力する動作の
繰り返しであるため,データ伝送性能は略プロセッサの
処理能力の限界まで利用することが可能となる。なお,
上記データホールドタイム(t4)の待機はプロセッサ
の処理能力に対応させるため,若干タイミングを調整す
るのに実行するものであり,少なくともステップ202
及び204におけるプロセッサ処理時間の間はパラレル
出力ポート103に同一データが保持されるので,ハー
ドウェア上の制約を受けなければデータホールドタイム
(t4)=0であっても良い。
As described above, since the transmission sequence is simply a repetition of the operation of outputting data to the parallel output port 103, the data transmission performance can be used almost to the limit of the processing capability of the processor. In addition,
The waiting of the data hold time (t4) is executed to slightly adjust the timing in order to correspond to the processing capacity of the processor.
Since the same data is held in the parallel output port 103 during the processor processing time in steps (2) and (4), the data hold time (t4) may be zero if there is no restriction on hardware.

【0019】(2) データ受信の手順 図3は,本発明によるデータ受信の手順例を示すフロー
チャートである。図において,先ず,受信部105は前
回の入力データを保持する変数Pに−1をセットして初
期化し(S301),パラレル入力ポート104よりデ
ータを入力する(S302)。その後,DATA=Pで
あるか否かを判断し(S303),DATA=Pである
と判断したときには上記ステップ302に戻る。一方,
DATA=Pではないと判断したときにはデータセット
アップタイム(t5)分待機(S304)した後,パラ
レル入力ポート104よりデータを入力して(S30
5),符号列にデータを追加する(S306)。次に,
変数Pにデータをセットし(S307),受信処理終了
か否かを判断して(S308),受信処理終了ではない
と判断したときには上記ステップ302に戻り,受信処
理終了と判断したときには受信符号列を復号器106に
よりメッセージ列に変換して(S309),本ルーチン
を終了する。
(2) Procedure of Data Reception FIG. 3 is a flowchart showing an example of the procedure of data reception according to the present invention. In the figure, first, the receiving unit 105 initializes the variable P holding the previous input data by setting it to −1 (S301), and inputs data from the parallel input port 104 (S302). Thereafter, it is determined whether or not DATA = P (S303). When it is determined that DATA = P, the process returns to step 302. on the other hand,
When it is determined that DATA = P is not satisfied, after waiting for the data setup time (t5) (S304), data is input from the parallel input port 104 (S30).
5), add data to the code string (S306). next,
Data is set in the variable P (S307), and it is determined whether or not the reception processing has been completed (S308). When it is determined that the reception processing has not been completed, the process returns to step 302, and when it is determined that the reception processing has been completed, the reception code string has been received. Is converted into a message string by the decoder 106 (S309), and this routine ends.

【0020】なお,上記ステップ305及び306にお
いて,再度パラレル入力ポート104よりデータ入力す
るのは,ステップ302にて入力したデータが過度状態
にある場合が想定されるからである。即ち,複数のビッ
トが変化する可能性があるのでステップ302の時点で
は,全てのビットが変化していない状態で入力している
可能性があるためである。従って,データセットアップ
タイム(t5)は,パラレルデータとして全データビッ
トが安定するまでの保証期間である。また,このデータ
セットアップタイム(t5)は本実施例において,通常
のセントロニクスインターフェイスにあっては,0.5
マイクロセカンド(μsec)程度あれば十分であるこ
とが確認できた。
The reason why the data is again input from the parallel input port 104 in the steps 305 and 306 is because it is assumed that the data input in the step 302 is in an excessive state. That is, since there is a possibility that a plurality of bits may change, at the time of step 302, there is a possibility that all bits are input in a state where they have not changed. Therefore, the data setup time (t5) is a guaranteed period until all data bits are stabilized as parallel data. In this embodiment, the data setup time (t5) is set to 0.5 in the ordinary Centronics interface.
It was confirmed that microseconds (μsec) were sufficient.

【0021】(3) 符号器及び復号器の構成 符号器101は,セントロニクスインターフェイスを用
いるため1バイト(8ビット)単位として,隣接するデ
ータが一致しないような符号を生成するように構成され
ている。このような条件を満たすための手段は種々考え
られるが,本発明の主旨として以下の関係を満たさなけ
ればならない。即ち, (符号化時間+伝送時間) < 従来の伝送方式による
伝送時間 である。
(3) Configuration of Encoder and Decoder The encoder 101 is configured to generate a code such that adjacent data does not match in units of 1 byte (8 bits) because a centronics interface is used. . Although various means for satisfying such a condition can be considered, the following relationship must be satisfied as the gist of the present invention. That is, (encoding time + transmission time) <transmission time by the conventional transmission method.

【0022】従って,本実施例においては処理時間を最
小にするため,次のような方式を採用する。 メッセージ列において隣接するデータが異なる場合
には,そのままの状態のデータを符号として処理する。 隣接するデータが一致する場合,即ち,連続データ
パターンであることが判明したときには,連続データの
長さを付加した特殊パターン(以下,フラグという)を
符号として処理する。なお,該フラグは次のように3バ
イトのデータ列で定義される。データXがMバイト連続
した場合のフラグは,(X),(X+1),(X+M)
の3バイトで表現する。但し,Mは2〜255の範囲の
値とする。また,このフラグは,連長符号(ランレング
ス符号)とも見做すことができるため,連続パターンが
4バイト以上の場合には,データの圧縮効果をも期待す
ることができる。 メッセージ列において,フラグの先頭2バイトとの
形式と一致するパターンが発生した場合には,フラグパ
ターンにおいて連続データ長Mを0として処理する。即
ち,元のデータが(X),(X+1)のパターンであっ
た場合には,(X),(X+1),(X)として符号化
する。
Accordingly, in the present embodiment, the following method is employed to minimize the processing time. If adjacent data is different in the message sequence, the data in the same state is processed as a code. When adjacent data match, that is, when it is determined that the pattern is a continuous data pattern, a special pattern (hereinafter, referred to as a flag) to which the length of the continuous data is added is processed as a code. The flag is defined by a 3-byte data string as follows. Flags when data X continues for M bytes are (X), (X + 1), (X + M)
Expressed in 3 bytes. However, M is a value in the range of 2 to 255. Further, since this flag can be regarded as a run length code (run length code), when the continuous pattern is 4 bytes or more, an effect of compressing data can be expected. If a pattern that matches the format of the first two bytes of the flag occurs in the message sequence, processing is performed with the continuous data length M set to 0 in the flag pattern. That is, if the original data is a pattern of (X), (X + 1), it is encoded as (X), (X + 1), (X).

【0023】(4) 符号化の手順 図4は,本発明による符号化の手順を示すフローチャー
トである。ここでは送信メッセージが連続パターンであ
るか否か,及びフラグパターンと一致しているか否かの
判断のため変数Pを用いる。図4において,先ず,受信
メッセージ列内にて発生し得ない値で初期化,即ち,変
数Pに−1をセットして初期化し(S401),受信メ
ッセージ列より1バイト単位で変数Mへデータを読み込
み(S402),全ての受信メッセージが終了したか否
かを判断する(S403)。このとき全ての受信メッセ
ージが終了したと判断したときには本ルーチンを終了さ
せ,一方,送信すべき受信メッセージがあるときには,
更にM=Pであるか否かを判断する(S404)。即
ち,受信メッセージが連続パターンであるか否かを判定
するものである。
(4) Encoding Procedure FIG. 4 is a flowchart showing an encoding procedure according to the present invention. Here, the variable P is used to determine whether or not the transmission message is a continuous pattern and whether or not the transmission message matches the flag pattern. In FIG. 4, first, initialization is performed with a value that cannot occur in the received message sequence, that is, the variable P is initialized by setting −1 (S401). Is read (S402), and it is determined whether or not all the received messages have been completed (S403). At this time, if it is determined that all the received messages have been completed, this routine is terminated.
Further, it is determined whether or not M = P (S404). That is, it is determined whether or not the received message has a continuous pattern.

【0024】上記ステップ404において,前回データ
Pと一致したパターンが発生した(M=P)と判断した
ときには,連続データとみなして符号列に対し,フラグ
パターン(M+1)を追加する(S405)。次に,こ
の時点で少なくとも2バイトの連続データが検出されて
いるので,連続個数をカウントする変数Cを2に初期化
し(S406),以下に示す繰り返しループL(ステッ
プ407〜411)に基づいて連続データをカウントす
る。
If it is determined in step 404 that a pattern matching the previous data P has occurred (M = P), a flag pattern (M + 1) is added to the code string assuming that the pattern is continuous data (S405). Next, since at least two bytes of continuous data have been detected at this time, a variable C for counting the number of continuous data is initialized to 2 (S406), and based on a repetition loop L (steps 407 to 411) described below. Count continuous data.

【0025】即ち,受信メッセージ列より1バイト単位
で変数Mへデータを読み込み(S407),全ての受信
メッセージが終了したか否かを判断する(S408)。
このとき送信すべき受信メッセージがある(終了してい
ない)と判断したときには,更にM=Pであるか否かを
判断して(S409),受信メッセージが連続パターン
であるか否かを判定する。次に,連続個数をカウントす
る変数Cが255以下であるか否か(C<255)を判
断し(S410),連続個数をカウントする変数Cが2
55以下であると判断したときには,更にCに1を追加
(C+1)して(S411),ステップ407に戻り,
繰り返しループLを実行する。
That is, data is read into the variable M from the received message sequence in byte units (S407), and it is determined whether or not all the received messages have been completed (S408).
At this time, when it is determined that there is a received message to be transmitted (not completed), it is further determined whether or not M = P (S409), and whether or not the received message is a continuous pattern is determined. . Next, it is determined whether the variable C for counting the continuous number is equal to or less than 255 (C <255) (S410), and the variable C for counting the continuous number is 2
If it is determined that it is 55 or less, 1 is further added to C (C + 1) (S411), and the process returns to step 407,
Execute the loop L repeatedly.

【0026】また,上記繰り返しループLの脱出条件
は,メッセージの終了,データの不一致,及び扱うデー
タが8ビットのために生じる連続個数値の制限オーバ時
の3ケースである。即ち,上記ステップ408にてメッ
セージ終了と判断したとき,ステップ409にて前回デ
ータPと一致したパターンが発生した(M=P)と判断
したとき,及びステップ410にてC>255と判断し
たときである。この場合,Pに対してCを追加し(S4
12),更に,Cには連続データの個数がセットされて
いるためフラグの3バイト目(P+M)を符号列に追加
する(S413)。その後,この時点で変数Mには既に
次のメッセージ列が読み込まれているのでステップ40
3に戻り前述の処理を実行する。
The conditions for exiting the repetition loop L are three cases: the end of the message, the mismatch of the data, and the limit on the continuous number generated due to the 8-bit data to be handled. That is, when it is determined in step 408 that the message has ended, when it is determined in step 409 that a pattern matching the previous data P has occurred (M = P), and when it is determined in step 410 that C> 255. It is. In this case, C is added to P (S4
12) Further, since the number of continuous data is set in C, the third byte (P + M) of the flag is added to the code string (S413). Then, at this point, the next message string has already been read into the variable M, so
3 and the above-described processing is executed.

【0027】一方,上記ステップ404において,前回
データPと一致しないパターンであると判断したときに
は,メッセージ列がフラグパターンと一致しているか否
かを判断し(S414),メッセージ列がフラグパター
ンと一致していると判断したときには符号列にP+1を
追加して(S415),更にPを追加する(S41
6)。一方,上記ステップ414においてメッセージ列
がフラグパターンと一致していないと判断したときに
は,そのままの値を符号とすればよいため,前回データ
Pを更新し(S417),その値を符号列へ追加する
(S416)。更に,ステップ416の処理を実行した
後,上記ステップ402に戻って前述の処理を実行し,
メッセージデータが終了するまで本ルーチンを継続させ
る。
On the other hand, if it is determined in step 404 that the pattern does not match the previous data P, it is determined whether or not the message string matches the flag pattern (S414). If it is determined that they match, P + 1 is added to the code string (S415), and P is further added (S41).
6). On the other hand, if it is determined in step 414 that the message string does not match the flag pattern, the previous value P is updated (S417), and the value is added to the code string, since the value may be used as it is as the code. (S416). Further, after executing the process of step 416, the process returns to step 402 to execute the above-described process.
This routine is continued until the end of the message data.

【0028】(5) 符号化例 図5は,本発明による符号化の例を示す説明図であり,
図5(a)は符号化処理前のデータ,いわゆる送信メッ
セージデータを示し,図5(b)は符号化処理後のデー
タ(符号列)を示している。ここでは,図5(a)に示
すようにメッセージ列M0〜M8を符号化する場合につ
いて説明する。先ず,最初の値はそのままM0→Q0と
いうように符号化する。次にM1の値「3」はM0の値
「1」と異なるのでこの値もそのまま符号化する。続く
M2の値「3」は前回のM1の値「3」と同一であるた
め符号列には連続パターンを示すフラグをセットする。
この場合,Q2に対しては(Q1+1),即ち「4」が
セットされ,更に,この場合は値「3」がM1〜M5ま
で5個連続しているので,Q3には(Q1+5),即
ち,「8」がセットされる。
(5) Encoding example FIG. 5 is an explanatory diagram showing an example of encoding according to the present invention.
FIG. 5A shows data before encoding processing, that is, so-called transmission message data, and FIG. 5B shows data (code string) after encoding processing. Here, a case where the message strings M0 to M8 are encoded as shown in FIG. First, the first value is encoded as M0 → Q0 as it is. Next, since the value “3” of M1 is different from the value “1” of M0, this value is also encoded as it is. Since the subsequent value “3” of M2 is the same as the previous value “3” of M1, a flag indicating a continuous pattern is set in the code string.
In this case, (Q1 + 1), that is, "4" is set for Q2. In this case, since five values "3" are consecutive from M1 to M5, (Q1 + 5), that is, , "8" are set.

【0029】続いて,M6のデータを参照する。この場
合,最後の符号値Q3とM6とは異なるためQ4にはM
6の値がそのままセットする。更に,M7の値はQ4に
対して異なるため,そのままQ5にセットされるが,こ
のときM7=(M6+1)とフラグパターンと一致して
いるため。Q6にはメッセージそのものがフラグパター
ンであることを示すのでQ4+0の値「5」をセットす
る。最後にM8はQ6と異なるためそのままの値「4」
がQ7にセットする。
Subsequently, the data of M6 is referred to. In this case, since the last code values Q3 and M6 are different, Q4 has M
The value of 6 is set as it is. Further, since the value of M7 is different from Q4, it is set to Q5 as it is. At this time, M7 = (M6 + 1), which matches the flag pattern. Since Q6 indicates that the message itself is a flag pattern, the value "5" of Q4 + 0 is set. Finally, M8 is different from Q6, so the value is “4”
Set to Q7.

【0030】従って,このように符号化されたデータ
は,一意的に元のメッセージデータに復号化可能である
ため,復号器106は上記符号化手順に対して逆の手順
で処理をすればよいことになる。
Accordingly, since the data thus encoded can be uniquely decoded into the original message data, the decoder 106 has only to process the above-mentioned encoding procedure in a reverse procedure. Will be.

【0031】(6)復号化の手順 図6は,本発明による復号化の手順を示すフローチャー
トである。先ず,符号列から1バイトを取り出して(S
601),前回の符号を保持するための変数Pを最初の
符号で初期化し,更にそのPをメッセージ列に追加する
(S602)。次に,符号列より読み込まれた1バイト
のデータを変数Qにセットし(S603),符号列が全
て終了したか否かを判断する(S604)。即ち,符号
列が全てなくなるまで復号化処理を実行する。
(6) Decoding Procedure FIG. 6 is a flowchart showing a decoding procedure according to the present invention. First, one byte is extracted from the code string (S
601), a variable P for holding the previous code is initialized with the first code, and the P is added to the message sequence (S602). Next, 1-byte data read from the code string is set in a variable Q (S603), and it is determined whether or not all the code strings have been completed (S604). That is, the decoding process is executed until all the code strings are exhausted.

【0032】また,上記ステップ604において,符号
列が全て終了したと判断したときには本ルーチンを終了
させ,一方,符号列が終了していないと判断したときに
は,フラグパターンであるか否かを判断(検出)し(S
605),フラグパターンでないと判断(検出)したと
きには符号をそのままメッセージへ追加し(S60
6),変数Pの値を更新して(S607),上記ステッ
プ603に戻る。
In step 604, when it is determined that the entire code sequence has been completed, the present routine is terminated. On the other hand, when it is determined that the code sequence has not been completed, it is determined whether or not the pattern is a flag pattern ( Detected) (S
605), if it is determined (detected) that the pattern is not a flag pattern, the code is added to the message as it is (S60).
6), the value of the variable P is updated (S607), and the process returns to step 603.

【0033】また,上記ステップ605において,フラ
グパターンであると判断(検出)したときには,符号列
より1バイト取り出し(S608),連続データの個数
Cを計算(Q−P)する(S609)。次に,連続デー
タの個数Cが0であるか否かを判断する(S610)。
このとき,個数Cが0と判断したときには,元のメッセ
ージそのものがフラグパターンであったことを示してい
るので,メッセージ列へフラグと同じパターン(P+
1)を追加して(S611),上記ステップ603に戻
る。
If it is determined (detected) in step 605 that the pattern is a flag pattern, one byte is extracted from the code string (S608), and the number C of continuous data is calculated (QP) (S609). Next, it is determined whether the number C of continuous data is 0 (S610).
At this time, when the number C is determined to be 0, it indicates that the original message itself was a flag pattern, and the same pattern (P +
1) is added (S611), and the process returns to step 603.

【0034】また,上記ステップ610において個数C
が0でないと判断したときには,データPがC個連続す
ることを示しているので,データPをC回メッセージ列
に追加し(S612),更に前回符号データを示す変数
Pを更新して(S613),上記ステップ603に戻
る。
In step 610, the number C
Is not 0, it indicates that the data P is continuous C, so the data P is added to the message sequence C times (S612), and the variable P indicating the previous sign data is updated (S613). ), Returning to step 603.

【0035】(7) 復号化例 図7は,本発明による復号化の例を示す説明図であり,
図7(a)は符号列,図7(b)は復号列を示してい
る。また,ここでは図5にて説明した符号化例の逆の処
理によってメッセージデータに復号化する場合を示して
おり,符号列Q0〜Q7を復号処理する。図において,
先ず,最初の値Q1,Q2はそのままメッセージM0,
M1と復号する。続くQ2はQ2=(Q1+1)とフラ
グ開始パターンとなっているので,更にQ3より連続デ
ータの個数を求める。即ち,このときの個数は(Q3−
Q1)=(8−3)=5となる。従って,メッセージ列
には5個のQ1の値「3」がセットされる(M1〜M
5)。
(7) Decoding Example FIG. 7 is an explanatory diagram showing an example of decoding according to the present invention.
FIG. 7A shows a code sequence, and FIG. 7B shows a decoded sequence. Also, here, a case where decoding is performed on message data by a process reverse to the coding example described in FIG. 5 is shown, and code strings Q0 to Q7 are decoded. In the figure,
First, the first values Q1, Q2 are used as they are in the message M0,
Decode as M1. Since the subsequent Q2 has a flag start pattern of Q2 = (Q1 + 1), the number of continuous data is further obtained from Q3. That is, the number at this time is (Q3-
Q1) = (8-3) = 5. Therefore, five Q1 values “3” are set in the message sequence (M1 to M1).
5).

【0036】次に,符号Q4を参照する。この場合はQ
3とQ4は異なるのでそのままの値「5」がM6にセッ
トされる。続いて,Q5を参照すると,これもフラグパ
ターンとなっているので,更にQ6を参照して個数を求
める。即ち,この場合の個数=Q6−Q4=0となり,
フラグパターンがメッセージそのものであることが判
る。従って,M7に対してはQ5の値「6」がそのまま
セットされる。最後にQ7を参照すると,該Q7 はQ6
に対してフラグパターンとはならないため,そのままM
8にセットして,この場合の復号化処理を終了する。
Next, reference is made to the code Q4. In this case Q
Since 3 and Q4 are different, the value "5" as it is is set in M6. Subsequently, referring to Q5, since this is also a flag pattern, the number is obtained by further referring to Q6. That is, the number in this case = Q6-Q4 = 0, and
It turns out that the flag pattern is the message itself. Therefore, the value “6” of Q5 is set as it is for M7. Finally, referring to Q7, Q7 is Q6
Does not become a flag pattern for
8 to end the decoding process in this case.

【0037】ところで,本実施例のおける符号器101
は,入力データパターンにより理論上において最大で入
力データ長の2倍の長さの符号を生成する場合が考えら
れる。即ち,入力データパターンが常にフラグパターン
と一致するケースである。このようなケースを考慮し
て,実際に検証実験を行った。
By the way, the encoder 101 in the present embodiment
It is conceivable that a code having a maximum length of twice the input data length is theoretically generated by the input data pattern. That is, this is a case where the input data pattern always matches the flag pattern. In consideration of such a case, a verification experiment was actually performed.

【0038】本符号化の方式に基づいて8086系マイ
クロプロセッサ(米国インテル社製)上で動作するMS
−DOSにおいて一般的に扱われるファイルについて検
証を行った。その結果,通常の実行型ファイルでは1割
弱程度,及びビットマップイメージデータでは5〜9割
程度が入力データと比較して符号列長を短縮化できるこ
とが確認できた。従って,故意にデータを作成しない限
り,入力データに対して長いデータ列を発生させるケー
スが極めて少なくなり,実用上におけるケースでは符号
化と同時にデータの圧縮効果をもたらすものである。
An MS operating on an 8086 microprocessor (manufactured by Intel Corporation, USA) based on this encoding method.
-Verification was performed on files generally handled in DOS. As a result, it was confirmed that a code string length can be reduced by about 10% in a normal executable file and about 50 to 90% in a bitmap image data as compared with input data. Therefore, unless data is intentionally created, the number of cases in which a long data string is generated for input data is extremely reduced. In a practical case, data compression is achieved simultaneously with encoding.

【0039】従って,本実施例にて説明したように,既
存のハードウェア構成をそのまま利用し,これを従来方
式と比較した場合に数倍のデータ伝送効率を得ることが
可能となると共に,低コストで高性能のパラレルデータ
伝送が実現する。また,本方式により,特にビットマッ
プイメージデータを伝送する場合において,その連長圧
縮効果が顕著となるため大量のデータ伝送を必要とする
画像データの伝送効率が著しく向上するものである。
Therefore, as described in the present embodiment, the existing hardware configuration can be used as it is, and when compared with the conventional system, it is possible to obtain several times the data transmission efficiency and to reduce the data transmission efficiency. High-performance parallel data transmission is realized at low cost. In addition, according to this method, especially when bitmap image data is transmitted, the effect of the compression of the run length becomes remarkable, so that the transmission efficiency of image data requiring a large amount of data transmission is remarkably improved.

【0040】[0040]

【発明の効果】以上説明したように,本発明によるパラ
レルデータ伝送装置によれば,符号化手段により,パラ
レル出力手段によって伝送される1単位のデータのうち
の同一のデータが隣接する部分を,互いに異なるデータ
で構成される符号列に変換し,該符号列を送信手段を介
してパラレル出力手段から並列に出力し,また,符号化
手段により,パラレル出力手段によって伝送される1単
位のデータのうちの同一のデータが隣接する部分を,互
いに異なるデータで構成される符号列に変換すると共
,送信データ列が連続データパターンである場合に連
長符号に変換して符号列を生成し,該符号列を送信手段
を介してパラレル出力手段から並列に出力するようにし
たため,既存のハードウェアを用いてソフトウェア制御
のみでコンピュータとプリンタ間の高速データ伝送が実
現し,経済性及び機器の汎用性を向上させることができ
る。
As described above, according to the parallel data transmission device of the present invention, the encoding means uses the
Of one unit of data transmitted by the rel output means
Of the same data adjacent to each other
, Converted from the parallel output means through the transmission means and output in parallel from the parallel output means.
Of adjacent data with the same data
When converting to a code string composed of different data
When the transmission data sequence is a continuous data pattern, it is converted into a run length code to generate a code sequence, and the code sequence is output in parallel from the parallel output means via the transmission means. High-speed data transmission between a computer and a printer can be realized only by software control using hardware, and the economy and versatility of equipment can be improved.

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

【図1】本発明によるパラレルデータ伝送装置の概略構
成を示すブロック図である。
FIG. 1 is a block diagram showing a schematic configuration of a parallel data transmission device according to the present invention.

【図2】本発明によるデータ送出の手順例を示すフロー
チャートである。
FIG. 2 is a flowchart showing an example of a data transmission procedure according to the present invention.

【図3】本発明によるデータ受信の手順例を示すフロー
チャートである。
FIG. 3 is a flowchart showing an example of a data receiving procedure according to the present invention.

【図4】本発明による符号化の手順を示すフローチャー
トである。
FIG. 4 is a flowchart showing an encoding procedure according to the present invention.

【図5】本発明による符号化の例を示す説明図である。FIG. 5 is an explanatory diagram showing an example of encoding according to the present invention.

【図6】本発明による復号化の手順を示すフローチャー
トである。
FIG. 6 is a flowchart showing a decoding procedure according to the present invention.

【図7】本発明による復号化の例を示す説明図である。FIG. 7 is an explanatory diagram showing an example of decoding according to the present invention.

【図8】セントロニクスインターフェイスによる一般的
なデータ伝送を示すタイミングチャートである。
FIG. 8 is a timing chart showing general data transmission by a Centronics interface.

【図9】図8に示したデータ送信のシーケンスを示すフ
ローチャートである。
FIG. 9 is a flowchart showing a data transmission sequence shown in FIG. 8;

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

101 符号器 102 送信部 103 パラレル出力ポート 104 パラレル
入力ポート 105 受信部 106 復号器
Reference Signs List 101 encoder 102 transmission unit 103 parallel output port 104 parallel input port 105 reception unit 106 decoder

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 複数のビット列をデータの1単位とし,
該データ単位毎に並列にデータを伝送するパラレル出力
手段と,該パラレル出力手段によって伝送される1単位
のデータのうちの同一のデータが隣接する部分を,互い
に異なるデータで構成される符号列に変換する符号化手
段と,送信データ列を前記符号化手段によって変換する
ことにより得られた符号列を前記パラレル出力手段に送
出する送信手段とを具備することを特徴とするパラレル
データ伝送装置。
A plurality of bit strings are defined as one unit of data,
Parallel output means for transmitting data in parallel for each data unit, and one unit transmitted by the parallel output means
Parts of the same data that are adjacent to each other
Method to convert to a code string composed of different data
A parallel data transmission apparatus comprising: a stage; and a transmitting unit that transmits a code sequence obtained by converting a transmission data sequence by the encoding unit to the parallel output unit.
【請求項2】 複数のビット列をデータの1単位とし,
該データ単位毎に並列にデータを伝送するパラレル出力
手段と,該パラレル出力手段によって伝送される1単位
のデータのうちの同一のデータが隣接する部分を,互い
に異なるデータで構成される符号列に変換すると共に,
送信データ列が連続データパターンである場合に連長符
号に変換して符号列とする符号化手段と,送信データ列
を前記符号化手段によって変換することにより得られた
符号列を前記パラレル出力手段に送出する送信手段とを
具備することを特徴とするパラレルデータ伝送装置。
2. A method according to claim 1, wherein a plurality of bit strings are defined as one unit of data.
Parallel output means for transmitting data in parallel for each data unit, and one unit transmitted by the parallel output means
Parts of the same data that are adjacent to each other
Into a code string composed of different data ,
Encoding means for converting the transmission data sequence into a continuous length code to form a code sequence when the transmission data sequence is a continuous data pattern, and converting the transmission data sequence by the encoding means into a parallel output means; And a transmitting means for transmitting the data to the parallel data transmission apparatus.
JP31419392A 1992-10-29 1992-10-29 Parallel data transmission device Expired - Fee Related JP3260862B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP31419392A JP3260862B2 (en) 1992-10-29 1992-10-29 Parallel data transmission device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP31419392A JP3260862B2 (en) 1992-10-29 1992-10-29 Parallel data transmission device

Publications (2)

Publication Number Publication Date
JPH06139030A JPH06139030A (en) 1994-05-20
JP3260862B2 true JP3260862B2 (en) 2002-02-25

Family

ID=18050391

Family Applications (1)

Application Number Title Priority Date Filing Date
JP31419392A Expired - Fee Related JP3260862B2 (en) 1992-10-29 1992-10-29 Parallel data transmission device

Country Status (1)

Country Link
JP (1) JP3260862B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6336192B1 (en) 1998-02-16 2002-01-01 Nippon Telegraph And Telephone Corporation Parallel redundancy encoding apparatus
TW200818815A (en) 2006-07-20 2008-04-16 Nxp Bv Coexistence device communication

Also Published As

Publication number Publication date
JPH06139030A (en) 1994-05-20

Similar Documents

Publication Publication Date Title
JPS5810236A (en) Interface circuit
JPS59178077A (en) Method for compressing data of binary picture
JP3260862B2 (en) Parallel data transmission device
KR930006750B1 (en) Coding appalatus of video data
JP2002043950A (en) Coding method and device, and decoding method and device
JPH04298164A (en) Data compression/release circuit for facsimile apparatus
EP0499225B1 (en) Variable-length code decoding device
US20020057742A1 (en) Sorting device of variable-length code
JP3189873B2 (en) Color converter
JPH04348638A (en) Data transmission method
JPH04258084A (en) Code rule converter
JP2999020B2 (en) Grouping processing method in audio mixing section
JP2945324B2 (en) Decompression apparatus and method
JP2535616B2 (en) Synchronous communication device
JP2564318B2 (en) Communication processing device
JP3108243B2 (en) Encoding and decoding device
JP3044847B2 (en) Variable-length code decoding device
JPS59156073A (en) Data decoding device
JPS6343473A (en) Modified huffman code decoding circuit
JPS5926691Y2 (en) Facsimile signal transmission equipment
JPS6132867B2 (en)
JP2522515B2 (en) EOL address table creation circuit
JPS6153896B2 (en)
JPS6043716B2 (en) Orthogonal transform encoding circuit
JPH034622A (en) Modified huffman coding and decoding control system

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20071214

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081214

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees