[go: up one dir, main page]

JPH1139256A - Communication control apparatus, communication control method, and storage medium storing computer-readable program - Google Patents

Communication control apparatus, communication control method, and storage medium storing computer-readable program

Info

Publication number
JPH1139256A
JPH1139256A JP9192175A JP19217597A JPH1139256A JP H1139256 A JPH1139256 A JP H1139256A JP 9192175 A JP9192175 A JP 9192175A JP 19217597 A JP19217597 A JP 19217597A JP H1139256 A JPH1139256 A JP H1139256A
Authority
JP
Japan
Prior art keywords
data
parallel port
output
signal line
encoding
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
JP9192175A
Other languages
Japanese (ja)
Inventor
Yoichi Sakamoto
陽一 坂本
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP9192175A priority Critical patent/JPH1139256A/en
Publication of JPH1139256A publication Critical patent/JPH1139256A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Transfer Systems (AREA)

Abstract

(57)【要約】 【課題】 データ受信側においては、データ信号を確実
に記憶するクロックを自動生成して、大量のデータ信号
を短時間に受信処理することである。 【解決手段】 ラッチ回路18がプリンタパラレルポー
ト16の任意のデータ信号の変化を検出してクロック信
号を生成し、該生成されたクロック信号によりFIFO
メモリ19がプリンタパラレルポート16を介して受信
した符号化データ信号を記憶し、FIFOメモリ19よ
り所定の空き領域があるか否かを示す受信可能状態信号
を前記プリンタパラレルポート16の状態信号線または
データ信号線に出力する構成を特徴とする。
(57) [Problem] To provide a data receiving side in which a clock for reliably storing a data signal is automatically generated and a large amount of data signal is received and processed in a short time. SOLUTION: A latch circuit 18 detects a change in an arbitrary data signal of a printer parallel port 16 and generates a clock signal, and a FIFO is generated based on the generated clock signal.
The memory 19 stores the coded data signal received via the printer parallel port 16, and a receivable state signal indicating whether or not there is a predetermined free area from the FIFO memory 19 is output from the state signal line of the printer parallel port 16. The present invention is characterized in that a configuration for outputting to a data signal line is provided.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、所定の通信媒体を
介して相互にデータ通信処理を行う通信制御装置および
通信制御方法およびコンピュータが読み出し可能なプロ
グラムを格納した記憶媒体に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a communication control device and a communication control method for mutually performing data communication processing via a predetermined communication medium, and a storage medium storing a computer-readable program.

【0002】[0002]

【従来の技術】従来、 各種のデータ処理装置間におい
て、汎用のパラレルポートを経由してデータ転送処理を
行う場合、制御信号nStrobeと状態信号Busy
を使用してハンドシェークを行うのが一般的である。こ
の方法によれば、データを1バイト転送するごとに、状
態信号Busyが「L」状態であることを確認してデー
タを出力し、制御信号nStrobeに「L」状態を出
力した後に、制御信号nStrobeに「H」レベルを
出力しなければならない。
2. Description of the Related Art Conventionally, when data transfer processing is performed between various data processing devices via a general-purpose parallel port, a control signal nStrobe and a state signal Busy are used.
It is common to perform handshake using According to this method, every time one byte of data is transferred, the state signal Busy is confirmed to be in the “L” state, the data is output, and after the control signal nStrobe outputs the “L” state, the control signal "H" level must be output to nStrobe.

【0003】一般のパーソナルコンピュータでは、この
ハンドシェークをハードウエアで行うことができないた
め、ソフトウエアで行っており、高速のデータ転送を行
うことができなかった。
[0003] In a general personal computer, this handshake cannot be performed by hardware, so that it is performed by software, and high-speed data transfer cannot be performed.

【0004】この問題を解決するために、IEEE規格
「IEEE Std 1284−1994」に規定され
るECPモード転送のように、ハードウエアでハンドシ
ェークを行うことにより、高速のデータ転送を行う方法
がある。
[0004] In order to solve this problem, there is a method of performing high-speed data transfer by performing a handshake by hardware, such as ECP mode transfer specified in the IEEE standard "IEEE Std 1284-1994".

【0005】[0005]

【発明が解決しようとする課題】しかしながら、一般の
パーソナルコンピュータは、このハードウエアを備えて
いるとは限らないため、接続できるコンピュータが制限
されるという問題点があった。
However, a general personal computer does not always have this hardware, so that there is a problem that the number of computers that can be connected is limited.

【0006】また、例えば実願平4−34147号(コ
ンピュータ・プリンタ・ポートおよびレーザ・エンジン
界面転換装置)に示されるように、8ビットのデータの
うちの1ビットをクロックビットとして使用し、1バイ
ト毎のハンドシェークを省略することにより、高速転送
を可能にする方法がある。
Further, as shown in Japanese Utility Model Application No. 4-34147 (computer printer port and laser engine interface conversion device), one bit of 8-bit data is used as a clock bit, and There is a method that enables high-speed transfer by omitting the handshake for each byte.

【0007】しかしながら、この方法で、1ビットをク
ロックビットとして使用するため、1回の転送で7ビッ
トしか送ることができない。
However, in this method, since one bit is used as a clock bit, only seven bits can be transmitted in one transfer.

【0008】本発明は、上記の問題点を解消するために
なされたもので、本発明の目的は、符号化されて転送さ
れる所定ビット数のパラレルのデータ信号から該データ
信号を記憶するためのクロックを生成しつつデータ信号
を順次記憶することにより、データ送信元においては、
汎用のパラレルポートの全データビット幅を介して大量
のデータを短時間、かつ正確に受信可能なデータ信号を
符号化でき、データ受信側においては、データ信号を確
実に記憶するクロックを自動生成して、大量のデータ信
号を短時間に受信処理することができる通信制御装置お
よび通信制御方法およびコンピュータが読み出し可能な
プログラムを格納した記憶媒体を提供することにある。
SUMMARY OF THE INVENTION The present invention has been made to solve the above problems, and an object of the present invention is to store a data signal from a parallel data signal of a predetermined number of bits which is encoded and transferred. By sequentially storing the data signals while generating the clock of
A data signal capable of receiving a large amount of data in a short time and accurately through the entire data bit width of a general-purpose parallel port can be encoded. On the data receiving side, a clock that reliably stores the data signal is automatically generated. It is another object of the present invention to provide a communication control device and a communication control method capable of receiving and processing a large amount of data signals in a short time, and a storage medium storing a computer-readable program.

【0009】[0009]

【課題を解決するための手段】本発明に係る第1の発明
は、複数のデータ信号線および少なくとも一つの制御信
号線および少なくとも一つの状態信号線を有するパラレ
ルポートと、前記パラレルポートの任意のデータ信号の
変化を検出してクロック信号を生成するクロック生成手
段と、前記クロック生成手段により生成されたクロック
信号により前記パラレルポートを介して受信した符号化
データ信号を記憶する記憶手段と、前記記憶手段に所定
の空き領域があるか否かを示す受信可能状態信号を前記
パラレルポートの状態信号線またはデータ信号線に出力
する受信可能状態信号出力手段とを有するものである。
According to a first aspect of the present invention, there is provided a parallel port having a plurality of data signal lines, at least one control signal line, and at least one state signal line; Clock generation means for detecting a change in a data signal to generate a clock signal; storage means for storing an encoded data signal received via the parallel port by the clock signal generated by the clock generation means; Means for outputting a receivable state signal indicating whether or not there is a predetermined free area to a state signal line or a data signal line of the parallel port.

【0010】本発明に係る第2の発明は、前記記憶手段
に記憶されたデータ信号を復号する復号手段を有するも
のである。
A second invention according to the present invention has a decoding means for decoding the data signal stored in the storage means.

【0011】本発明に係る第3の発明は、複数のデータ
信号線および少なくとも一つの制御信号線および少なく
とも一つの状態信号線を有するパラレルポートと、前記
パラレルポートを介して外部に転送すべき出力データの
符号を解析して相並ぶ符号同士が少なくとも1ビット異
なるように符号化を行ってデータを生成する符号化手段
と、前記パラレルポートに接続されている外部装置から
出力される受信可能状態信号が所定の大きさのデータを
受信可能であることを示している場合に、前記符号化手
段により符号化されたデータを前記パラレルポートのデ
ータ信号線に出力する通信手段とを有するものである。
According to a third aspect of the present invention, there is provided a parallel port having a plurality of data signal lines, at least one control signal line, and at least one state signal line, and an output to be transferred to the outside via the parallel port. Encoding means for analyzing the code of the data so as to perform encoding so that the codes arranged side by side are at least one bit different from each other to generate data, and a receivable state signal output from an external device connected to the parallel port Communication means for outputting the data encoded by the encoding means to the data signal line of the parallel port when indicates that data of a predetermined size can be received.

【0012】本発明に係る第4の発明は、前記符号化手
段は、相並ぶ符号同士が同一となる場合には、データを
表現しない符号を挿入するものである。
According to a fourth aspect of the present invention, the encoding means inserts a code that does not represent data when the codes arranged next to each other are the same.

【0013】本発明に係る第5の発明は、前記符号化手
段は、相並ぶ符号同士が同一となる場合には、より小さ
い長さを表現する符号に符号化するものである。
In a fifth aspect according to the present invention, the encoding means encodes a code representing a smaller length when the codes arranged side by side are the same.

【0014】本発明に係る第6の発明は、前記符号化手
段は、相並ぶ符号同士が同一となる場合には、同一の意
味を持つ別の符号に符号化するものである。
In a sixth aspect according to the present invention, the encoding means encodes another code having the same meaning when the codes arranged next to each other are the same.

【0015】本発明に係る第7の発明は、複数のデータ
信号線および少なくとも一つの制御信号線および少なく
とも一つの状態信号線を有するパラレルポートを介して
外部に転送すべき出力データの符号を解析して相並ぶ符
号同士が少なくとも1ビット異なるように符号化を行っ
てデータを生成する符号化工程と、前記パラレルポート
に接続されている外部装置から出力される受信可能状態
信号が所定の大きさのデータを受信可能であることを示
している場合に、前記符号化工程により符号化されたデ
ータを前記パラレルポートのデータ信号線に出力する通
信工程とを有するものである。
According to a seventh aspect of the present invention, a code for output data to be transferred to the outside via a parallel port having a plurality of data signal lines, at least one control signal line, and at least one state signal line is analyzed. An encoding step of encoding data so that the codes arranged side by side differ by at least one bit to generate data; and a receivable state signal output from an external device connected to the parallel port has a predetermined size. And a communication step of outputting the data encoded in the encoding step to a data signal line of the parallel port when it indicates that the data can be received.

【0016】本発明に係る第8の発明は、複数のデータ
信号線および少なくとも一つの制御信号線および少なく
とも一つの状態信号線を有するパラレルポートを介して
外部に転送すべき出力データの符号を解析して相並ぶ符
号同士が少なくとも1ビット異なるように符号化を行っ
てデータを生成する符号化工程と、前記パラレルポート
に接続されている外部装置から出力される受信可能状態
信号が所定の大きさのデータを受信可能であることを示
している場合に、前記符号化工程により符号化されたデ
ータを前記パラレルポートのデータ信号線に出力する通
信工程とを含むコンピュータが読み出し可能なプログラ
ムを記憶媒体に格納したものである。
An eighth invention according to the present invention analyzes the sign of output data to be transferred to the outside via a parallel port having a plurality of data signal lines, at least one control signal line, and at least one state signal line. An encoding step of encoding data so that the codes arranged side by side differ by at least one bit to generate data; and a receivable state signal output from an external device connected to the parallel port has a predetermined size. And a communication step of outputting the data encoded in the encoding step to a data signal line of the parallel port when the data can be received. Is stored in.

【0017】[0017]

【発明の実施の形態】BEST MODE FOR CARRYING OUT THE INVENTION

〔第1実施形態〕図1は、本発明の第1実施形態を示す
通信制御装置の構成を説明するブロック図である。
[First Embodiment] FIG. 1 is a block diagram illustrating the configuration of a communication control apparatus according to a first embodiment of the present invention.

【0018】図において、1はホストコンピュータであ
り、CPU2,メモリ3,ハードディスク4,フロッピ
ードライブ5およびホストパラレルポート6を備え、ホ
ストパラレルポート6を介してプリンタ7に接続されて
いる。
In FIG. 1, reference numeral 1 denotes a host computer, which includes a CPU 2, a memory 3, a hard disk 4, a floppy drive 5, and a host parallel port 6, and is connected to the printer 7 via the host parallel port 6.

【0019】2はCPUであり、メモリ3に記憶された
各種の制御プログラム,アプリケーションプログラムを
実行する。3はメモリであり、ハードディスク4または
フロッピードライブ5から読み出されたプログラム、お
よびそのプログラムが必要とするデータを記憶する。
Reference numeral 2 denotes a CPU which executes various control programs and application programs stored in the memory 3. Reference numeral 3 denotes a memory, which stores a program read from the hard disk 4 or the floppy drive 5 and data required by the program.

【0020】4はハードディスクであり、図2において
後述するオペレーティングシステム10,アプリケーシ
ョンプログラム(アプリケーション)11,プリンタド
ライバプログラム12,符号化プログラム13,通信プ
ログラム14などのプログラムを格納する。
Reference numeral 4 denotes a hard disk, which stores programs such as an operating system 10, an application program (application) 11, a printer driver program 12, an encoding program 13, and a communication program 14, which will be described later with reference to FIG.

【0021】5はフロッピードライブであり、インスト
ールディスク8などのフロッピーディスクを装着するこ
とができ、装着されたフロッピーディスクに格納された
プログラムを読み取る。6はホストパラレルポートであ
り、プリンタ7にデータおよび制御信号を送るととも
に、プリンタ7からの状態信号を受け取ることができ
る。7はプリンタであり、ホストパラレルポート6から
データおよび制御信号を受け取り、印刷を行うととも
に、ホストパラレルポート6にエンジン部の各種ステー
タスを状態信号として送る。
Reference numeral 5 denotes a floppy drive, on which a floppy disk such as an installation disk 8 can be mounted, and which reads a program stored in the mounted floppy disk. Reference numeral 6 denotes a host parallel port that can send data and control signals to the printer 7 and receive status signals from the printer 7. Reference numeral 7 denotes a printer which receives data and control signals from the host parallel port 6, performs printing, and sends various statuses of the engine unit to the host parallel port 6 as status signals.

【0022】8はインストールディスクであり、後述す
る図2に示すプリンタドライバプログラム12,符号化
プログラム13,通信プログラム14およびインストー
ルプログラムを格納する。
An installation disk 8 stores a printer driver program 12, an encoding program 13, a communication program 14, and an installation program shown in FIG.

【0023】通常のインストール操作は、操作者がイン
ストールディスク8をフロッピードライブ5(あるいは
図示しないCD−ROMドライブ)にセットし、インス
トールプログラム(セットアッププログラムを含む)を
起動すると、インストールプログラムはプリンタドライ
バプログラム12,符号化プログラム13,通信プログ
ラム14をインストールディスク8から読み込み、ハー
ドディスク4の所定のエリアに書き込む。
In a normal installation operation, when an operator sets the installation disk 8 in the floppy drive 5 (or a CD-ROM drive not shown) and starts an installation program (including a setup program), the installation program is replaced with a printer driver program. 12, the encoding program 13, and the communication program 14 are read from the installation disk 8 and written into a predetermined area of the hard disk 4.

【0024】また、インストールプログラムはオペレー
ティングシステム10が提供する機能を用いて、プリン
タドライバプログラム12がアプリケーションプログラ
ム11から使用可能となるように設定する。
The installation program uses a function provided by the operating system 10 to set the printer driver program 12 so that the application program 11 can use the printer driver program 12.

【0025】図2は、本発明に係る通信制御装置を適用
可能な印刷システムの構成を示すブロック図である。
FIG. 2 is a block diagram showing the configuration of a printing system to which the communication control device according to the present invention can be applied.

【0026】図において、10はオペレーティングシス
テム(OS)であり、CPU2,メモリ3,ハードディ
スク4,フロッピードライブ5,ホストパラレルポート
6などのハードウエア資源の管理、およびアプケーショ
ンプログラム11,プリンタドライバプログラム12,
符号化プログラム13,通信プログラム14などのソフ
トウエアの管理を行う。
In FIG. 1, reference numeral 10 denotes an operating system (OS) which manages hardware resources such as a CPU 2, a memory 3, a hard disk 4, a floppy drive 5, a host parallel port 6, an application program 11, and a printer driver program 12. ,
The software such as the encoding program 13 and the communication program 14 is managed.

【0027】11はアプリケーションプログラムであ
り、操作者の指示に従って印刷データを作成するととも
に、オペレーティングシステム10を経由してプリンタ
ドライバプログラム12に印刷指令を発行する。12は
プリンタドライバプログラムであり、アプリケーション
プログラム11から発行された印刷指令に基づき、プリ
ンタ7が印刷を行うためのビットマップデータを作成す
る。
Reference numeral 11 denotes an application program which creates print data in accordance with an operator's instruction and issues a print command to the printer driver program 12 via the operating system 10. A printer driver program 12 creates bitmap data for the printer 7 to perform printing based on a print command issued from the application program 11.

【0028】13は符号化プログラムであり、プリンタ
ドライバプログラム12が作成したビットマップデータ
から、同一のデータバイトが連続しないような符号化デ
ータを生成する。14は通信プログラムであり、プリン
タ7に対し印刷の指令を行うとともに、符号化プログラ
ム13が生成した符号化データをプリンタ7に出力す
る。
Reference numeral 13 denotes an encoding program, which generates encoded data from the bitmap data created by the printer driver program 12 such that identical data bytes do not continue. Reference numeral 14 denotes a communication program which issues a print command to the printer 7 and outputs encoded data generated by the encoding program 13 to the printer 7.

【0029】6はホストパラレルポートであり、IEE
E規格「IEEE Std 1284−1994」に規
定される、8ビットのデータ信号Data1からDat
a8,プリンタ7を制御する4ビットの制御信号nSt
robe,nAutoFd,nSelectIn,nI
nit,プリンタ7の状態を示す5ビットの状態信号n
Ack,Busy,PError,Select,nF
aultによりプリンタパラレルポート16に接続され
る。16はプリンタパラレルポートであり、前述の信号
によりホストパラレルポート6に接続される。
Reference numeral 6 denotes a host parallel port, which is an IEEE parallel port.
8-bit data signals Data1 to Dat specified by the E standard "IEEE Std 1284-1994"
a8, a 4-bit control signal nSt for controlling the printer 7
probe, nAutoFd, nSelectIn, nI
nit, a 5-bit status signal n indicating the status of the printer 7
Ack, Busy, PError, Select, nF
By default, the printer parallel port 16 is connected. Reference numeral 16 denotes a printer parallel port, which is connected to the host parallel port 6 by the above-described signal.

【0030】17は制御回路であり、例えば1チップC
PUで構成され、プリンタパラレルポート16の制御を
行うとともに、プリンタエンジン22との間でシリアル
信号を用いてエンジンコマンドの送信およびエンジンス
テータスの受信を行う。
Reference numeral 17 denotes a control circuit, for example, one chip C
A PU is used to control the printer parallel port 16 and transmit an engine command and receive an engine status with the printer engine 22 using a serial signal.

【0031】18はラッチ回路であり、通信プログラム
14が出力した符号列データの受信の際に、データ信号
からクロックを生成し、データをラッチする。19はフ
ァーストインファーストアウトメモリ(FIFOメモ
リ)であり、ラッチ回路18がラッチしたデータを記憶
し、記憶したデータを先入れ先出しの順に復号回路20
に出力する。
A latch circuit 18 generates a clock from a data signal and latches the data when receiving the code string data output from the communication program 14. A first-in first-out memory (FIFO memory) 19 stores data latched by the latch circuit 18 and decodes the stored data in a first-in first-out order in a decoding circuit 20.
Output to

【0032】FIFOメモリ19は、また空き容量が8
KB以上であるか否かを示す信号FULLをプリンタパ
ラレルポート16に出力する。復号回路20は、FIF
Oメモリ19に記憶された符号列データを復号し、シフ
トレジスタ21に出力する。
The FIFO memory 19 has a free space of 8
A signal FULL indicating whether it is equal to or larger than KB is output to the printer parallel port 16. The decoding circuit 20
The code string data stored in the O memory 19 is decoded and output to the shift register 21.

【0033】シフトレジスタ21は、プリンタエンジン
22から主走査の開始を通知するBD信号を受信する
と、復号回路20が出力したパラレルデータをシリアル
データに変換し、プリンタエンジン22に出力する。
When the shift register 21 receives the BD signal for notifying the start of the main scanning from the printer engine 22, the shift register 21 converts the parallel data output from the decoding circuit 20 into serial data, and outputs the serial data to the printer engine 22.

【0034】プリンタエンジン22はレーザビームプリ
ンタエンジンであり、制御回路17との間でシリアル信
号を用いてエンジンコマンドの受信およびエンジンステ
ータスの送信を行い、制御回路17からPRINTコマ
ンドを受信すると、1ページの印刷処理を開始し、用紙
が所定の位置にくると主走査の開始を通知するBD信号
をシフトレジスタ21に出力し、シフトレジスタ21が
出力したシリアルデータに従って印刷を行う。
The printer engine 22 is a laser beam printer engine. The printer engine 22 receives an engine command and transmits an engine status using a serial signal with the control circuit 17, and receives a PRINT command from the control circuit 17 so that one page is output. When the sheet reaches a predetermined position, a BD signal notifying the start of main scanning is output to the shift register 21 and printing is performed according to the serial data output from the shift register 21.

【0035】以下、印刷処理時におけるデータ転送処理
動作について説明する。
The data transfer operation during the printing process will be described below.

【0036】操作者がホストコンピュータ1側でアプリ
ケーションプログラム11を操作して印刷データを生成
し、これを印刷指示すると、アプリケーションプログラ
ム11からオペレーティングシステム10を経由してプ
リンタドライバプログラム12に印刷指令が渡される。
プリンタドライバプログラム12はアプリケーションプ
ログラム11から発行された印刷指令に基づき、ビット
マップデータを作成する。
When the operator operates the application program 11 on the host computer 1 side to generate print data and gives a print instruction, a print command is passed from the application program 11 to the printer driver program 12 via the operating system 10. It is.
The printer driver program 12 creates bitmap data based on a print command issued from the application program 11.

【0037】そして、符号化プログラム13は、後述す
る符号化手順に基づき、プリンタドライバプログラム1
2が作成したビットマップデータから、同一のデータバ
イトが連続しないような符号化データを生成する。
The encoding program 13 executes the printer driver program 1 based on an encoding procedure described later.
2 generates encoded data such that the same data byte is not consecutive from the bitmap data created by the second unit.

【0038】通信プログラム14は、まず、印刷の開始
を指示するコマンド「0x01」を、ホストパラレルポ
ート6を経由して送信する。制御回路17はプリンタパ
ラレルポート16を経由してこれを受信する。受信した
コマンドが印刷の開始を指示するコマンド「0x01」
であった場合、制御回路17はプリンタエンジン22に
PRINTコマンドを送信する。プリンタエンジン22
はPRINTコマンドを受信すると、印刷を開始する。
The communication program 14 first transmits a command “0x01” for instructing the start of printing via the host parallel port 6. The control circuit 17 receives this via the printer parallel port 16. Command “0x01” that the received command instructs to start printing
If so, the control circuit 17 transmits a PRINT command to the printer engine 22. Printer engine 22
Starts printing upon receiving the PRINT command.

【0039】そして、通信プログラム14は、次に符号
化プログラム13が生成した符号化データを、後述する
通信手順に基づき、ホストパラレルポート6を経由して
送信する。ラッチ回路18は、プリンタパラレルポート
16を経由してこれを受信し、後述する回路によりデー
タの変化を検出して生成したクロックによりデータをラ
ッチし、FIFOメモリ19に格納する。
Then, the communication program 14 transmits the encoded data generated by the encoding program 13 via the host parallel port 6 based on a communication procedure described later. The latch circuit 18 receives the data via the printer parallel port 16, detects a change in data by a circuit described later, latches the data with a clock generated, and stores the data in the FIFO memory 19.

【0040】復号回路20は、後述する復号手順に基づ
き、FIFOメモリ19に格納された符号化データを復
号してシフトレジスタ21に出力する。シフトレジスタ
21は主走査の長さをカウントするカウンタを持ち、プ
リンタエンジン22が出力するBD信号により主走査の
開始が通知される毎に、カウンタに所定の値を設定した
後、カウンタが「0」より大である間、所定のタイミン
グで復号回路20が出力したパラレルデータをシリアル
データに変換し、プリンタエンジン22に出力するとと
もにカウンタを減算する。プリンタエンジン22は用紙
が所定の位置に達すると、主走査開始毎にBD信号を出
力することにより、データの出力が必要であることを通
知するとともに、シフトレジスタ21が出力したシリア
ルデータに基づき、印刷を行う。
The decoding circuit 20 decodes the encoded data stored in the FIFO memory 19 and outputs the decoded data to the shift register 21 based on a decoding procedure described later. The shift register 21 has a counter for counting the length of the main scanning. Each time the start of the main scanning is notified by the BD signal output from the printer engine 22, a predetermined value is set in the counter, and then the counter is set to "0". During this period, the parallel data output from the decoding circuit 20 at a predetermined timing is converted into serial data, which is output to the printer engine 22 and decrements the counter. When the paper reaches a predetermined position, the printer engine 22 outputs a BD signal each time main scanning starts, thereby notifying that data output is necessary, and based on the serial data output by the shift register 21. Perform printing.

【0041】次に、図3に示すテーブルを参照し、図2
に示した符号化プログラム13が生成する符号について
説明する。なお、本実施形態で使用されている符号はラ
ンレングス符号の一種である。
Next, referring to the table shown in FIG.
The code generated by the encoding program 13 shown in FIG. Note that the code used in the present embodiment is a type of run-length code.

【0042】図3は、図2に示した符号化プログラム1
3が生成する符号化テーブルの一例を示す図である。
FIG. 3 shows the encoding program 1 shown in FIG.
FIG. 3 is a diagram illustrating an example of an encoding table generated by No. 3;

【0043】図3に示すように、コマンドコードCが
「0」から「0x7F」までの場合は生データコマンド
であり、コマンドコードCによって決められた長さの生
データが次に続くことを指定する。
As shown in FIG. 3, when the command code C is from "0" to "0x7F", it is a raw data command, and specifies that raw data having a length determined by the command code C follows. I do.

【0044】生データの長さは、コマンドコードCが
「0」または「1」の場合は「1」,「2」から「0x
7F」までの場合は「C」である。例えば、符号
「0」,「0x44」は1バイトのデータ「0x44」
を表現する。また、符号「2」,「0x55」,「0x
66」は2バイトのデータ「0x55」,「0x66」
を表現する。
When the command code C is “0” or “1”, the length of the raw data ranges from “1”, “2” to “0x”.
"C" up to "7F". For example, codes “0” and “0x44” are 1-byte data “0x44”.
To express. Further, reference numerals “2”, “0x55”, “0x
66 ”is 2-byte data“ 0x55 ”,“ 0x66 ”
To express.

【0045】コマンドコードCが「0x80」の場合は
「NOP」コマンドであり、空のデータを表現する。コ
マンドコードCが「0x81」から「0xFF」までの
場合はランコマンドであり、次に続く1バイトのデータ
が、コマンドコードCによって決められたランの長さ、
すなわち繰り返される回数を持つことを指定する。
When the command code C is "0x80", it is a "NOP" command and represents empty data. When the command code C is from “0x81” to “0xFF”, it is a run command, and the following 1-byte data is the length of the run determined by the command code C,
In other words, it is specified to have the number of times to be repeated.

【0046】ランの長さは、コマンドコードCが「0x
81」または「0x82」の場合は、2,「0x83」
から「0xFF」までの場合は(C−0x80)であ
る。
As for the length of the run, when the command code C is "0x
81 ”or“ 0x82 ”, 2,“ 0x83 ”
To (0xFF) is (C-0x80).

【0047】例えば、符号「0x82」,「0x55」
は2バイトのデータ「0x55」,「0x55」を表現
する。また、符号「0x83」,「0x66」は3バイ
トのデータ「0x66」,「0x66」,「0x66」
を表現する。
For example, the codes "0x82", "0x55"
Represents 2-byte data "0x55" and "0x55". The codes “0x83” and “0x66” are 3-byte data “0x66”, “0x66”, “0x66”
To express.

【0048】以下、本実施形態の特徴的構成について図
2等を参照して説明する。
Hereinafter, a characteristic configuration of the present embodiment will be described with reference to FIG.

【0049】上記のように構成された通信制御装置であ
って、複数のデータ信号線および少なくとも一つの制御
信号線および少なくとも一つの状態信号線を有するパラ
レルポート(プリンタパラレルポート16)と、前記パ
ラレルポートの任意のデータ信号の変化を検出してクロ
ック信号を生成するクロック生成手段(ラッチ回路1
8)と、前記クロック生成手段により生成されたクロッ
ク信号により前記パラレルポートを介して受信した符号
化データ信号を記憶する記憶手段(FIFOメモリ1
9)と、前記記憶手段に所定の空き領域があるか否かを
示す受信可能状態信号を前記パラレルポートの状態信号
線またはデータ信号線に出力する受信可能状態信号出力
手段(制御回路17により例えばプリンタパラレルポー
ト16上に出力する)とを有するので、汎用のパラレル
ポートを介して受信するパラレルデータから転送クロッ
クを自動生成でき、従来のようにクロックビットをあら
かじめ割り当てて転送ビット幅を削ることなく、転送可
能な全てのビットを最大限利用して所望の出力データを
高速に転送できる。
A communication control device configured as described above, comprising: a parallel port (printer parallel port 16) having a plurality of data signal lines, at least one control signal line, and at least one status signal line; Clock generation means (latch circuit 1) for detecting a change in an arbitrary data signal of a port and generating a clock signal
8) and storage means (FIFO memory 1) for storing the encoded data signal received via the parallel port by the clock signal generated by the clock generation means.
9) and a receivable state signal output means for outputting a receivable state signal indicating whether or not a predetermined free area is present in the storage means to a state signal line or a data signal line of the parallel port. Output to the printer parallel port 16), a transfer clock can be automatically generated from the parallel data received via the general-purpose parallel port, and the transfer bit width is reduced by allocating clock bits in advance as in the related art. Thus, desired output data can be transferred at high speed by using all transferable bits to the maximum.

【0050】また、前記記憶手段に記憶された符号化デ
ータ信号を復号する復号手段(復号回路20)を有する
ので、符号化されて受信したデータから意図する出力デ
ータを少ない記憶容量で高速に受信処理することができ
る。
Further, since there is provided a decoding means (decoding circuit 20) for decoding the coded data signal stored in the storage means, intended output data can be received at high speed with a small storage capacity from the coded and received data. Can be processed.

【0051】さらに、複数のデータ信号線および少なく
とも一つの制御信号線および少なくとも一つの状態信号
線を有するパラレルポート(ホストパラレルポート6)
と、前記パラレルポートを介して外部(本実施形態では
プリンタ7)に転送すべき出力データの符号を解析して
相並ぶ符号同士が少なくとも1ビット異なるように符号
化を行ってデータを生成する符号化手段(符号化プログ
ラム13)と、前記パラレルポートに接続されている外
部装置から出力される受信可能状態信号が所定の大きさ
のデータを受信可能であることを示している場合に、前
記符号化手段により符号化されたデータを前記パラレル
ポートのデータ信号線に出力する通信手段(通信プログ
ラム14)とを有するので、連続して転送されるデータ
信号中から転送先でデータ信号を記憶するためのクロッ
クを確実に生成できるデータとして符号化することがで
きる。
Furthermore, a parallel port (host parallel port 6) having a plurality of data signal lines, at least one control signal line, and at least one status signal line
And a code for generating data by analyzing the code of output data to be transferred to the outside (the printer 7 in the present embodiment) via the parallel port and performing encoding so that the adjacent codes are different by at least one bit. The encoding means (encoding program 13) and the reception enable signal output from the external device connected to the parallel port indicate that the data of a predetermined size can be received. Communication means (communication program 14) for outputting data encoded by the conversion means to the data signal line of the parallel port, so that the data signal can be stored at the transfer destination from the data signals continuously transferred. Can be encoded as data that can be reliably generated.

【0052】次に、図4に示すプログラムリストを参照
し、図2に示した符号化プログラム13の符号化手順の
詳細を説明する。
Next, the encoding procedure of the encoding program 13 shown in FIG. 2 will be described in detail with reference to the program list shown in FIG.

【0053】図4は、図2に示した符号化プログラム1
3の符号化手順の詳細を説明する図であり、例えばプロ
グラムはC言語で記述された関数で構成される。
FIG. 4 shows the encoding program 1 shown in FIG.
FIG. 4 is a diagram for explaining the details of the encoding procedure of No. 3; for example, a program is configured by a function described in C language.

【0054】図において、行1は関数名,引数、および
戻り値の型を定義する。この関数の関数名はencod
eであり、呼び元からビットマップデータの先頭アドレ
スsrc,符号化データを格納するバッファの先頭アド
レスdst,ビットマップデータのバイト数sizeを
受け取り、ビットマップデータを符号化して符号化デー
タをバッファに格納し、戻り値として格納したバイト数
を返す。
In the figure, line 1 defines a function name, an argument, and a return value type. The function name of this function is encode
e, receives from the caller the start address src of the bitmap data, the start address dst of the buffer for storing the encoded data, and the number of bytes size of the bitmap data, encodes the bitmap data, and stores the encoded data in the buffer. Store and return the number of stored bytes as the return value.

【0055】符号化処理の過程で、先頭アドレスsr
c,先頭アドレスdst,バイト数sizeは各々未処
理のビットマップデータの先頭アドレス,未処理のバッ
ファの先頭アドレス,未処理のビットマップデータのバ
イト数を示すように更新される。
During the encoding process, the start address sr
c, the start address dst, and the number of bytes size are updated to indicate the start address of the unprocessed bitmap data, the start address of the unprocessed buffer, and the number of bytes of the unprocessed bitmap data, respectively.

【0056】行3から行5は一時変数dsttop,c
md,lenを定義する。dsttopは関数enco
deが呼び出されたときの符号化データを格納するバッ
ファの先頭アドレスdstを記憶する。cmdは処理中
の符号のコマンドを格納する。lenは処理中の生デー
タの長さ、またはランの長さを格納する。
Lines 3 to 5 are temporary variables dstop, c
md and len are defined. dstop is a function enco
The start address dst of the buffer that stores the encoded data when de is called is stored. The cmd stores the command of the code being processed. len stores the length of the raw data being processed or the length of the run.

【0057】関数encodeが呼び出されると、行3
でバッファの先頭アドレスdstの値をdsttopに
格納し、行6にてdstが指すバッファに1バイトの0
x80すなわちNOPコマンドを格納してdstを1つ
進める。次に、未処理のビットマップデータのバイト数
sizeが0になるまで、行7から行56までのwhi
leループを繰り返す。
When the function encode is called, line 3
Stores the value of the start address dst of the buffer in dststop, and stores 1 byte 0 in the buffer pointed to by dst in row 6.
x80, that is, the NOP command is stored, and dst is advanced by one. Next, until the number of bytes size of the unprocessed bitmap data becomes 0, “whi” in rows 7 to 56
Repeat the le loop.

【0058】行7から行56までのwhileループで
は、まず行8にて未処理のビットマップデータのバイト
数sizeが1より大であるか判定する。1より大であ
れば行9に進み、*srcすなわち未処理のビットマッ
プデータの先頭バイトと、*(src+1)すなわちそ
の次のバイトが同一であるかを判定する。同一であれ
ば、ランコマンドに符号化する場合なので、ランの長さ
の最大値127または未処理のビットマップデータのバ
イト数sizeに達するまで、行10から行12までの
forループを繰り返すことにより、ランの長さを求め
る。
In the while loop from row 7 to row 56, it is first determined in row 8 whether the number of bytes size of unprocessed bitmap data is greater than one. If it is greater than 1, the process proceeds to row 9 to determine whether * src, ie, the first byte of unprocessed bitmap data, and * (src + 1), ie, the next byte, are the same. If they are the same, it is a case of encoding to a run command, so by repeating the for loop from row 10 to row 12 until the maximum run length 127 or the number of bytes of unprocessed bitmap data reaches size Find the length of the run.

【0059】forループ中、行11にて、*srcと
*(src+len)が等しくない場合は、同一データ
が連続しなくなった場合なので、forループを終了す
る。forループ終了時点では、lenにはランの長さ
が格納されている。
In the for loop, when * src and * (src + len) are not equal in row 11, the same data is no longer continuous, so the for loop ends. At the end of the for loop, len stores the length of the run.

【0060】次に行13にて、ランの長さlenが2よ
り大であるか判定する。2より大である場合は、行14
に進み、ランコマンドをcmdに格納する。
Next, at line 13, it is determined whether or not the length len of the run is greater than 2. If greater than 2, row 14
To store the run command in cmd.

【0061】次に行15にて、コマンドcmdとランデ
ータ*srcを比較し、両者が同じであれば同一データ
が連続することになるため、それを回避するためにラン
の長さlenを1減らし、それに応じてコマンドcmd
を再設定する。次に行16にて、ランの長さlenが2
より大であるか判定する。2より大である場合は、行1
7に進み、*(dst−1)すなわちバッファに最後に
格納したデータとコマンドcmdが同じであった場合
は、同一データが連続することになるため、それを回避
するためにdstが指すバッファに1バイトの0x80
すなわちNOPコマンドを格納してdstを一つ進め
る。次に行18にてdstが指すバッファにコマンドc
mdを格納してdstを1つ進める。次に、行19にて
dstが指すバッファにランデータ*srcを格納して
dstを1つ進める。
Next, in line 15, the command cmd and the run data * src are compared, and if they are the same, the same data will be continuous. To avoid this, the run length len is set to 1 Reduce and command cmd accordingly
To reset. Next, in line 16, the run length len is 2
Determine if it is greater. If greater than 2, row 1
7 and * (dst-1), that is, if the command cmd is the same as the data last stored in the buffer, the same data will be continuous. 1x0x80
That is, the NOP command is stored and the dst is advanced by one. Next, in line 18, the command c is stored in the buffer pointed to by dst.
md is stored and dst is advanced by one. Next, in line 19, the run data * src is stored in the buffer pointed to by dst, and the dst is advanced by one.

【0062】次に、行20にて、未処理のビットマップ
データの先頭アドレスsrcにランの長さlenを加
え、未処理のビットマップデータのバイト数sizeか
らランの長さlenを引く。次に、行20のconti
nue文により、whileループの先頭である行7に
戻る。
Next, in row 20, the run length len is added to the start address src of the unprocessed bitmap data, and the run length len is subtracted from the number of bytes size of the unprocessed bitmap data. Next, in the row 20
The statement returns to line 7 which is the head of the while loop.

【0063】行13または行16にて、ランの長さle
nが2であった場合は、行24に進み、コマンドcmd
に0x81すなわちランの長さが2であることを示す第
1のコマンドを格納する。次に行25にて、ランデータ
*srcがコマンドcmdと同一である場合には、同一
データが連続することになるため、それを回避するため
に、コマンドcmdに0x82すなわちランの長さが2
であることを示す第2のコマンドを格納する。
In row 13 or row 16, the run length le
If n is 2, proceed to line 24 and enter the command cmd
0x81, that is, the first command indicating that the run length is 2. Next, in line 25, if the run data * src is the same as the command cmd, the same data will be continuous. To avoid this, the command cmd contains 0x82, ie, the run length is 2
Is stored.

【0064】次に行26にて、*(dst−1)すなわ
ちバッファに最後に格納したデータとコマンドcmdが
同じであった場合は、同一データが連続することになる
ため、それを回避するためにdstが指すバッファに1
バイトの0x80すなわちNOPコマンドを格納してd
stを1つ進める。次に行27にてdstが指すバッフ
ァにコマンドcmdを格納してdstを1つ進める。
Next, in line 26, if * (dst-1), that is, the last data stored in the buffer and the command cmd are the same, the same data will be continuous, so that it is avoided. To the buffer pointed to by dst
Byte 0x80, that is, the NOP command is stored and d
Advance st by one. Next, in line 27, the command cmd is stored in the buffer pointed to by dst, and the dst is advanced by one.

【0065】次に、行28にてdstが指すバッファに
ランデータ*srcを格納してdstを1つ進める。次
に行29にて、未処理のビットマップデータの先頭アド
レスsrcにランの長さ2を加え、未処理のビットマッ
プデータのバイト数sizeからランの長さ2を引く。
次に行30のcontinue文により、whileル
ープの先頭である行7に戻る。
Next, in line 28, the run data * src is stored in the buffer pointed to by dst, and the dst is advanced by one. Next, in line 29, the run length 2 is added to the head address src of the unprocessed bitmap data, and the run length 2 is subtracted from the number of bytes size of the unprocessed bitmap data.
Next, the continuation statement in line 30 returns to line 7 which is the head of the while loop.

【0066】行9にて、*srcすなわち未処理のビッ
トマップデータの先頭バイトと、*(src+1)すな
わちその次のバイトが同一でなかった場合は、ローコマ
ンドに符号化する場合なので、行32に進み、行32か
ら行35までのforループを繰り返すことにより、生
データの長さを求める。forループ中、行33にて、
生データの長さlenが、ランの長さの最大値127よ
り1小さい値、または未処理のビットマップデータのバ
イト数sizeより1小さい値に達した場合は、生デー
タの最後のバイトである場合なので、比較を行わずに生
データの長さlenに1を加え、forループを終了す
る。
In line 9, if * src, ie, the first byte of the unprocessed bitmap data, and * (src + 1), ie, the next byte, are not the same, it is a case to encode a row command. The length of raw data is determined by repeating the for loop from line 32 to line 35. In the for loop, at line 33,
If the length len of the raw data reaches one less than the maximum value 127 of the run length or one less than the number of bytes size of the unprocessed bitmap data, it is the last byte of the raw data. In this case, 1 is added to the length len of the raw data without performing comparison, and the for loop ends.

【0067】また、行34にて、*(src+len)
と*(src+len+1)が等しい場合は、隣接する
データが同一である場合なので、forループを終了す
る。forループ終了時点では、lenには生データの
長さが格納されている。
In line 34, * (src + len)
If * and (* src + len + 1) are equal, it means that adjacent data is the same, and the for loop ends. At the end of the for loop, len stores the length of raw data.

【0068】次に、行36にて、生データの長さlen
が1より大であるか判定する。1より大である場合は、
行37に進み、生データコマンドをcmdに格納する。
次に行38にて、コマンドcmdと生データの先頭バイ
ト*srcを比較し、両者が同じであれば、同一データ
が連続することになるため、それを回避するために生デ
ータの長さlenを1減らし、それに応じてコマンドc
mdを再設定する。
Next, in line 36, the length len of the raw data
Is greater than one. If it is greater than 1,
Proceeding to line 37, the raw data command is stored in cmd.
Next, at line 38, the command cmd is compared with the first byte * src of the raw data, and if the two are the same, the same data will be continuous. Is reduced by 1 and the command c
Reset md.

【0069】次に行39にて、生データの長さlenが
1より大であるか判定する。1より大である場合は、行
40に進み、*(dst−1)すなわちバッファに最後
に格納したデータとコマンドcmdが同じであった場合
は、同一データが連続することになるため、それを回避
するためにdstが指すバッファに1バイトの0x80
すなわちNOPコマンドを格納してdstを1つ進め
る。
Next, at line 39, it is determined whether or not the length len of the raw data is greater than one. If it is greater than 1, the process proceeds to line 40, and if * (dst-1), that is, the last data stored in the buffer and the command cmd are the same, the same data will be continuous. 1x 0x80 in the buffer pointed to by dst to avoid
That is, the NOP command is stored and dst is advanced by one.

【0070】次に、行41にてdstが指すバッファに
コマンドcmdを格納してdstを1つ進める。次に行
42にて、未処理のビットマップデータのバイト数si
zeから生データの長さlenを引く。
Next, in the line 41, the command cmd is stored in the buffer pointed to by dst, and the dst is advanced by one. Next, in line 42, the number of bytes of unprocessed bitmap data si
The length len of the raw data is subtracted from ze.

【0071】次に、行43のwhileループにて、未
処理のビットマップデータの先頭アドレスsrcから未
処理のバッファの先頭アドレスdstに、生データの長
さlenによって示される生データを転送するととも
に、未処理のビットマップデータの先頭アドレスsr
c、および未処理のバッファの先頭アドレスdstを転
送したバイト数だけ進める。次に、行44のconti
nue文より、whileループの先頭である行7に戻
る。
Next, in the while loop of the row 43, the raw data indicated by the raw data length len is transferred from the head address src of the unprocessed bitmap data to the head address dst of the unprocessed buffer. , The start address sr of the unprocessed bitmap data
c and the start address dst of the unprocessed buffer are advanced by the number of transferred bytes. Next, the row 44
Returning to line 7 which is the head of the while loop from the “nu” statement.

【0072】行8で未処理のビットマップデータのサイ
ズsizeが1であった場合、または行36または行3
9にて、生データの長さlenが1であった場合は、行
49に進み、コマンドcmdに0すなわち生データの長
さ1であることを示す第1のコマンドを格納する。次に
行50にて、生データの先頭バイト*srcがコマンド
cmdと同一である場合には、同一データが連続するこ
とになるため、それを回避するために、コマンドcmd
に1すなわち生データの長さが1であることを示す第2
のコマンドを格納する。次に行51にて、*(dst−
1)すなわちバッファに最後に格納したデータとコマン
ドcmdが同じであった場合は、同一データが連続する
ことになるため、それを回避するためにdstが指すバ
ッファに1バイトの0x80すなわちNOPコマンドを
格納してdstを1つ進める。次に、行52にてdst
が指すバッファにコマンドcmdを格納してdstを1
つ進める。
When the size size of the unprocessed bitmap data in row 8 is 1, or when row 36 or row 3
In step 9, if the length len of the raw data is 1, the process proceeds to line 49, and the command cmd stores 0, that is, the first command indicating that the length of the raw data is 1. Next, in line 50, if the first byte * src of the raw data is the same as the command cmd, the same data will be continuous.
1 indicating that the length of the raw data is 1.
To store the command. Next, at line 51, * (dst-
1) That is, if the command cmd is the same as the data last stored in the buffer, the same data will be continuous. To avoid this, 1-byte 0x80, that is, a NOP command is stored in the buffer pointed to by dst. Store and advance dst by one. Next, at line 52, dst
Cmd is stored in the buffer pointed to by
Go forward.

【0073】次に、行53にてdstが指すバッファに
ランデータ*srcを格納してsrcおよびdstを1
つ進める。次に行54にて、未処理のビットマップデー
タのバイト数sizeから生データの長さ1を引く。次
にwhileループの先頭である行7に戻る。
Next, in line 53, the run data * src is stored in the buffer pointed to by dst, and src and dst are set to 1
Go forward. Next, in line 54, the raw data length 1 is subtracted from the number of bytes size of the unprocessed bitmap data. Next, the process returns to line 7 which is the head of the while loop.

【0074】すべてのデータの処理を終えて、未処理の
ビットマップデータのバイト数sizeが0となると、
行7から行55までのwhileループを終了し、行5
6にてdstすなわちバッファの終了アドレスからds
ttop、すなわちバッファの先頭アドレスを引くこと
によりバッファに格納したバイト数を求め、それを戻り
値として関数を終了する。
When the processing of all data is completed and the number of bytes of unprocessed bitmap data becomes 0,
The while loop from line 7 to line 55 ends, and line 5
At dst, ds from the end address of the buffer
ttop, that is, the number of bytes stored in the buffer is obtained by subtracting the head address of the buffer, and the function is terminated using the number as the return value.

【0075】以下、本実施形態の特徴的構成についてさ
らに図4等を参照して説明する。
Hereinafter, the characteristic configuration of the present embodiment will be further described with reference to FIG.

【0076】上記のように構成された通信制御方法ある
いはコンピュータが読み出し可能なプログラムを格納し
た記憶媒体であって、複数のデータ信号線および少なく
とも一つの制御信号線および少なくとも一つの状態信号
線を有するホストパラレルポート6を介して外部に転送
すべき出力データの符号を解析して相並ぶ符号同士が少
なくとも1ビット異なるように符号化を行ってデータを
生成する符号化工程(図4の行1〜57のプログラムコ
ードに従うステップ)と、ホストパラレルポート6に接
続されている外部装置から出力される受信可能状態信号
が所定の大きさのデータを受信可能であることを示して
いる場合に、前記符号化工程により符号化されたデータ
をホストパラレルポート6のデータ信号線に出力する通
信工程(通信プログラム14に従うステップ(図示しな
い))とを有するので、汎用のパラレルポートを介して
受信するパラレルデータから転送クロックを自動生成で
き、従来のようにクロックビットをあらかじめ割り当て
て転送ビット幅を削ることなく、転送可能な全てのビッ
トを最大限利用して所望の出力データを外部装置に対し
て高速に転送できる。
A storage medium storing a communication control method or a computer readable program configured as described above, comprising a plurality of data signal lines, at least one control signal line, and at least one state signal line. An encoding step of analyzing the code of output data to be transferred to the outside via the host parallel port 6 and encoding the encoded data so that the aligned codes are different from each other by at least one bit (rows 1 to 4 in FIG. 4) 57) and when the receivable state signal output from the external device connected to the host parallel port 6 indicates that data of a predetermined size can be received, Communication step of outputting the data encoded in the conversion step to the data signal line of the host parallel port 6 (communication processing (Step (not shown) according to RAM 14), a transfer clock can be automatically generated from parallel data received via a general-purpose parallel port, and a clock bit is allocated in advance and a transfer bit width is not reduced as in the related art. Thus, desired output data can be transferred to an external device at a high speed by making full use of all transferable bits.

【0077】次に、図5を参照し、図2に示したホスト
コンピュータ1とプリンタ7とのデータ通信処理手順に
ついて説明する。
Next, a data communication processing procedure between the host computer 1 and the printer 7 shown in FIG. 2 will be described with reference to FIG.

【0078】図5は、図2に示したホストコンピュータ
1とプリンタ7とのデータ通信処理を説明するタイミン
グチャートである。
FIG. 5 is a timing chart for explaining data communication processing between the host computer 1 and the printer 7 shown in FIG.

【0079】図において、通信プログラム14は、符号
化プログラム13から隣接するデータバイトが同一にな
ることがないように符号化した符号列を受け取ると、ホ
ストパラレルポート6に符号列の送信開始を示すコマン
ド「0x00」を出力後、制御信号nStrobeに
「L」を出力する。
In the figure, when the communication program 14 receives, from the encoding program 13, a code string encoded so that adjacent data bytes do not become the same, it indicates to the host parallel port 6 the start of transmission of the code string. After outputting the command “0x00”, “L” is output to the control signal nStrobe.

【0080】プリンタパラレルポート16は制御信号n
Strobeの立ち下がりを検出し、ホストコンピュー
タ1から出力されたデータを受信する。
The printer parallel port 16 outputs a control signal n
The falling edge of the probe is detected, and the data output from the host computer 1 is received.

【0081】そして、該受信したデータが符号列の送信
開始を示すコマンド「0x00」であった場合には、F
IFOメモリ19に転送ブロックサイズの最大値である
8KB以上の空きがあるときにはBusyを「L」のま
ま保ち、そうでない場合は図中点線で示すように0.5
マイクロ秒以内に状態信号Busyに「H」を出力す
る。
If the received data is a command “0x00” indicating the start of transmission of a code string,
If the IFO memory 19 has a free space of 8 KB or more, which is the maximum value of the transfer block size, the Busy is kept at "L".
"H" is output to the state signal Busy within microseconds.

【0082】通信プログラム14は制御信号nStro
beに「L」を出力してから1マイクロ秒以上待ち、状
態信号Busyを読む。状態信号Busyが「Hであっ
た場合は、FIFOメモリ19に転送ブロックサイズの
最大値である。8KB以上の空きがないので、状態信号
Busyが「L」になるまで待つ。
The communication program 14 controls the control signal nStro
After outputting "L" to be, wait for 1 microsecond or more, and read the status signal Busy. If the status signal Busy is "H", it is the maximum value of the transfer block size in the FIFO memory 19. Since there is no space of 8 KB or more, wait until the status signal Busy becomes "L".

【0083】通信プログラム14は状態信号Busyが
「H」である場合、制御信号nStrobeを「H」に
戻して符号列の送信開始を取り消すこともできる。プリ
ンタパラレルポート16は、通信プログラム14が制御
信号nStrobeを「H」に戻す前に、FIFOメモ
リ19に転送ブロックサイズの最大値である8KB以上
の空きができたときには、状態信号Busyに「L」を
出力する。
When the status signal Busy is "H", the communication program 14 can return the control signal nStrobe to "H" to cancel the transmission of the code string. Before the communication program 14 returns the control signal nStrobe to “H”, the printer parallel port 16 sets the status signal Busy to “L” when an empty space of 8 KB or more, which is the maximum value of the transfer block size, is created in the FIFO memory 19. Is output.

【0084】通信プログラム14は状態信号Busyが
「L」であることを検出すると、転送ブロックサイズの
最大値である8KBを越えない範囲で、符号列のデータ
を1マイクロ秒以上の間隔で順次送信する。このとき制
御信号を変化させずにデータ信号のみを変化させるの
で、きわめて高速にデータを送信することができる。
When the communication program 14 detects that the status signal Busy is "L", it sequentially transmits code string data at intervals of 1 microsecond or more within a range not exceeding the maximum transfer block size of 8 KB. I do. At this time, since only the data signal is changed without changing the control signal, data can be transmitted at a very high speed.

【0085】符号列のデータはプリンタパラレルポート
16を経由してラッチ回路18に供給される。ラッチ回
路18は、8ビットのデータ信号のうちいずれかの変化
を検出するとクロックを生成し、データのラッチを行
う。
The data of the code string is supplied to the latch circuit 18 via the printer parallel port 16. When detecting any change in the 8-bit data signal, the latch circuit 18 generates a clock and latches the data.

【0086】なお、データ信号の立ち上がり時間と、立
ち下がり時間には違いがあるのが普通なので、データ信
号の変化の検出時にデータを直ちにラッチしてしまうと
誤ったデータをラッチすることがある。これを避けるた
め、データのラッチはデータ信号の変化の検出から0.
5マイクロ秒後に行う。
Since the rise time and the fall time of a data signal usually differ from each other, erroneous data may be latched if data is latched immediately upon detection of a change in the data signal. To avoid this, the data latch is set to 0.
Perform after 5 microseconds.

【0087】ラッチ回路18がラッチしたデータはFI
FOメモリ19に書き込まれる。通信プログラム14は
1ブロックのデータを転送し終えると、制御信号nSt
robeを「H」に戻す。プリンタパラレルポート16
はこれに応答し、nAckを「L」,「H」と変化させ
るとともに状態信号Busyが「H」であれば「L」を
出力する。
The data latched by the latch circuit 18 is FI
The data is written to the FO memory 19. When the communication program 14 finishes transferring one block of data, the control signal nSt
The probe is returned to “H”. Printer parallel port 16
Responds to this by changing nAck to “L” and “H”, and outputs “L” if the status signal Busy is “H”.

【0088】次に、図6を参照し、図2に示したラッチ
回路18の構成および動作について詳細に説明する。
Next, the configuration and operation of the latch circuit 18 shown in FIG. 2 will be described in detail with reference to FIG.

【0089】図6は、図2に示したラッチ回路18の詳
細を示す回路図である。
FIG. 6 is a circuit diagram showing details of latch circuit 18 shown in FIG.

【0090】図において、30は8ビットのDフリップ
フロップであり、入力D11から入力D18に加えられ
た、プリンタパラレルポート16からのデータ信号Da
ta1からデータ信号Data8を、例えば0.1マイ
クロ秒周期のシステムクロックSCLKの立ち上がりエ
ッジでサンプルしてラッチし、出力Q11から出力Q1
8に出力する。
In the figure, reference numeral 30 denotes an 8-bit D flip-flop, which is a data signal Da from the printer parallel port 16 added to the input D11 to the input D18.
From ta1, the data signal Data8 is sampled and latched at the rising edge of the system clock SCLK having a period of, for example, 0.1 microsecond, and output Q11 to output Q1
8 is output.

【0091】31は8ビットのDフリップフロップであ
り、入力D21から入力D28に加えられた、出力Q1
1から出力Q18の信号を例えば0.1マイクロ秒周期
のシステムクロックSCLKの立ち上がりエッジでサン
プルしてラッチし、出力Q21から出力Q28に出力す
る。
Reference numeral 31 denotes an 8-bit D flip-flop, which outputs an output Q1 applied from an input D21 to an input D28.
The signals from 1 to Q18 are sampled and latched at the rising edge of the system clock SCLK having a period of, for example, 0.1 microsecond, and output from the outputs Q21 to Q28.

【0092】32〜39はエクスクルーシブオア回路
(EXOR回路)であり、8ビットのDフリップフロッ
プ30の出力Q11から出力Q18の信号と、8ビット
のDフリップフロップ31の出力Q21から出力Q28
の信号との排他的論理和演算(EXOR演算)を行い、
演算結果を出力X1から出力X8に出力する。
Reference numerals 32 to 39 denote exclusive OR circuits (EXOR circuits), which are the signals of the output Q11 to the output Q18 of the 8-bit D flip-flop 30 and the output Q21 to the output Q28 of the 8-bit D flip-flop 31.
Perform an exclusive OR operation (EXOR operation) with the signal of
The calculation result is output from the output X1 to the output X8.

【0093】40は8入力のオア回路であり、EXOR
回路39の出力である出力X1から出力X8の論理和演
算を行い、その演算結果を出力Yに出力する。41はア
ンド回路であり、プリンタパラレルポート16から供給
される符号列の受信中を示す信号BLKと、上記出力Y
とSRフリップフロップ43の出力である出力Qとの論
理積演算を行い、演算結果を出力Zに出力する。
Reference numeral 40 denotes an 8-input OR circuit.
The logical sum of the output X1 to the output X8, which is the output of the circuit 39, is performed, and the result is output to the output Y. Reference numeral 41 denotes an AND circuit which outputs a signal BLK indicating that a code string supplied from the printer parallel port 16 is being received, and the output Y
And an output Q which is the output of the SR flip-flop 43, and outputs the operation result to the output Z.

【0094】42はシフトレジスタであり、出力Zの信
号を、例えば0.5マイクロ秒遅延してクロックCLK
に出力する。クロックCLKは書き込み信号WRとして
FIFOメモリ19に供給される。
Reference numeral 42 denotes a shift register which delays the signal of the output Z by, for example, 0.5 microsecond, and outputs a clock CLK.
Output to The clock CLK is supplied to the FIFO memory 19 as a write signal WR.

【0095】43はSRフリップフロップであり、出力
ZおよびクロックCLKをZCLKの立ち上がりエッジ
でサンプルし、サンプルしたZ信号が「H」であれば出
力QをLに、サンプルしたCLK信号が「H」であれば
出力Qを「H」にする。
An SR flip-flop 43 samples the output Z and the clock CLK at the rising edge of ZCLK. If the sampled Z signal is "H", the output Q is set to L, and the sampled CLK signal is set to "H". Then, the output Q is set to “H”.

【0096】なお、SRフリップフロップ43は、初期
状態で「H」に設定する。44は8ビットのDフリップ
フロップであり、入力D31から入力D38に加えられ
た、出力Q11から出力Q18の信号をシステムクロッ
クSCLKの立ち上がりエッジでサンプルし、ラッチし
て出力Q31から出力Q38に出力し、FIFOメモリ
19に供給する。
The SR flip-flop 43 is set to "H" in the initial state. Reference numeral 44 denotes an 8-bit D flip-flop, which samples the signals from the output Q11 to the output Q18 applied to the input D31 to the input D38 at the rising edge of the system clock SCLK, latches them, and outputs the signals from the output Q31 to the output Q38. , FIFO memory 19.

【0097】次に、図7を参照し、図6に示したラッチ
回路18の動作例を説明する。
Next, an operation example of the latch circuit 18 shown in FIG. 6 will be described with reference to FIG.

【0098】図7は、図6に示したラッチ回路18の動
作を示すタイミングチャートである。
FIG. 7 is a timing chart showing the operation of latch circuit 18 shown in FIG.

【0099】図において、データ信号Data1が
「H」から「L」に変化すると、次のシステムクロック
SCLKの立ち上がりエッジに同期して出力Q11が
「H」から「L」に、その次のシステムクロックSCL
Kの立ち上がりエッジに同期して出力Q21が「H」か
ら「L」に変化する。出力Q11が「L」に変化してか
ら出力Q21が「L」に変化する間、出力X1はHとな
る。同様に、立ち上がり時間と立ち下がり時間の差のた
めに、データ信号Data1の変化に遅れて、データ信
号Data2が「L」から「H」に変化すると、次のシ
ステムクロックSCLKの立ち上がりエッジに同期して
出力Q12が「L」から「H」に、その次のシステムク
ロックSCLKの立ち上がりエッジに同期して出力Q2
2が「L」から「H」に変化する。出力Q12が「H」
に変化してから出力Q22が「H」に変化する間、出力
X2は「H」となる。これに伴い、出力Yは出力X1ま
たは出力X2のいずれかが「H」である間、「H」とな
る。
In the figure, when the data signal Data1 changes from “H” to “L”, the output Q11 changes from “H” to “L” in synchronization with the next rising edge of the system clock SCLK, and the output of the next system clock SCLK changes. SCL
The output Q21 changes from “H” to “L” in synchronization with the rising edge of K. While the output Q11 changes to “L” after the output Q21 changes to “L”, the output X1 becomes H. Similarly, when the data signal Data2 changes from "L" to "H" after the change of the data signal Data1 due to the difference between the rise time and the fall time, the data signal Data2 is synchronized with the next rising edge of the system clock SCLK. The output Q12 changes from "L" to "H", and the output Q2 is synchronized with the next rising edge of the system clock SCLK.
2 changes from “L” to “H”. Output Q12 is "H"
, The output X2 becomes “H” while the output Q22 changes to “H”. Accordingly, the output Y becomes “H” while either the output X1 or the output X2 is “H”.

【0100】符号列の受信中を示す信号BLKが「Hで
あれば、SRフリップフロップ43の出力Qは最初は
「H」となっているので、出力X1および出力Yが
「H」と変化するに伴ってアンド回路41の出力Zが
「H」に変化する。該出力ZがHに変化すると、次のシ
ステムクロックSCLKの立ち上がりエッジに同期して
SRフリップフロップ43の出力Qが「L」に変化す
る。
If the signal BLK indicating that the code string is being received is "H", the output Q of the SR flip-flop 43 is initially "H", and the outputs X1 and Y change to "H". Accordingly, the output Z of the AND circuit 41 changes to “H”. When the output Z changes to H, the output Q of the SR flip-flop 43 changes to "L" in synchronization with the next rising edge of the system clock SCLK.

【0101】そして、SRフリップフロップ43の出力
Qが「L」にあると、オア回路40の出力Yの状態にか
かわらず、アンド回路41の出力Zは「L」となるの
で、出力X2および出力Yが「H」と変化しても、
「L」の状態を保つ。シフトレジスタ42により、出力
Zから0.5マイクロ秒遅れて、クロックCLKが
「L」から「H」に変化すると、Dフリップフロップ4
4は出力Q11から出力Q18の信号をラッチしてFI
FOメモリ19に供給するとともに、次のシステムクロ
ックSCLKの立ち上がりエッジに同期して、SRフリ
ップフロップ43の出力Qが「H」に変化する。クロッ
クCLKは出力Zから0.5マイクロ秒遅れて「H」か
ら「L」に変化するので、元の状態に復帰し、次のデー
タ信号の変化の検出の準備が整う。
When the output Q of the SR flip-flop 43 is at "L", the output Z of the AND circuit 41 is at "L" regardless of the state of the output Y of the OR circuit 40. Even if Y changes to "H",
The state of "L" is maintained. When the clock CLK changes from “L” to “H” with a delay of 0.5 microsecond from the output Z by the shift register 42, the D flip-flop 4
4 latches the signal of output Q11 to output Q18 to
While being supplied to the FO memory 19, the output Q of the SR flip-flop 43 changes to “H” in synchronization with the next rising edge of the system clock SCLK. Since the clock CLK changes from "H" to "L" with a delay of 0.5 microsecond from the output Z, the clock CLK returns to the original state and is ready for the detection of the next data signal change.

【0102】上述の説明では、最初にデータ信号Dat
a1が「H」から「L」に変化した場合であるが、
「L」から「H」への変化、あるいはデータ信号Dat
a1以外のデータ信号の変化であっても同様に動作す
る。このため、いずれかのデータ信号が変化すればこれ
を検出し、クロックCLKを生成することができる。
In the above description, first, the data signal Dat
a1 changes from “H” to “L”,
Change from "L" to "H" or data signal Dat
The same operation is performed even when a data signal other than a1 changes. Therefore, if any data signal changes, it can be detected and the clock CLK can be generated.

【0103】次に、図2に示した復号回路20の復号手
順の詳細を説明する。
Next, details of the decoding procedure of the decoding circuit 20 shown in FIG. 2 will be described.

【0104】シフトレジスタ21からデータが要求され
ると、復号回路20はFIFOメモリ19から1バイト
のコマンドを読む。該読み取ったコマンドがNOPコマ
ンド「0x80」であった場合は空のデータなので、こ
れを無視する。
When data is requested from the shift register 21, the decoding circuit 20 reads a 1-byte command from the FIFO memory 19. If the read command is a NOP command “0x80”, it is empty data and is ignored.

【0105】一方、読み取ったコマンドがランコマンド
であった場合は、コマンドコードからラン長を計算して
カウンタに設定し、FIFOメモリ19から次の1バイ
トのデータを読んでデータレジスタに格納する。然る後
に、カウンタが「0」より大である間、シフトレジスタ
21からデータが要求される毎にデータレジスタに格納
されているデータを出力し、カウンタから「1」を減算
する。
On the other hand, if the read command is a run command, the run length is calculated from the command code and set in the counter, and the next one byte of data is read from the FIFO memory 19 and stored in the data register. Thereafter, while the counter is greater than "0", the data stored in the data register is output every time data is requested from the shift register 21, and "1" is subtracted from the counter.

【0106】一方、読み取ったコマンドが生データコマ
ンドであった場合は、コマンドコードから生データ長を
計算してカウンタに設定する。然る後に、カウンタが
「0」より大である間、シフトレジスタ21からデータ
が要求される毎にFIFOメモリ19から1バイトのデ
ータを読んでそのデータを出力し、カウンタから「1」
を減算する。
On the other hand, if the read command is a raw data command, the raw data length is calculated from the command code and set in the counter. Thereafter, while the counter is greater than "0", every time data is requested from the shift register 21, one byte of data is read from the FIFO memory 19 and the data is output.
Is subtracted.

【0107】〔第2実施形態〕なお、上述の第1実施形
態では、長さ「1」の生データコマンドおよび長さ
「2」のランコマンドに限り、複数のコマンドコードが
割り当てられている。このため、データによっては、符
号化したデータのサイズが元のデータサイズを大きく越
えることが希にあるという問題を生じる。
[Second Embodiment] In the first embodiment, a plurality of command codes are assigned only to the raw data command having the length "1" and the run command having the length "2". Therefore, there is a problem that the size of the encoded data rarely greatly exceeds the original data size depending on the data.

【0108】そこで、上記問題点を軽減するため、複数
のコマンドコードを割り当てるコマンドを増やしてもよ
い。例えば、長さ「1」の生データコマンドを3種類、
長さ「2」の生データコマンドを3種類、長さ「3」の
生データコマンドを3種類、長さ「2」のランコマンド
を3種類割り当てることにより、この問題を大幅に軽減
することができる。
Therefore, in order to reduce the above problem, the number of commands to which a plurality of command codes are assigned may be increased. For example, three types of raw data commands of length "1"
By assigning three types of raw data commands of length "2", three types of raw data commands of length "3", and three types of run commands of length "2", this problem can be greatly reduced. it can.

【0109】また、上述の第1実施形態では、データを
表現するコマンドは生データコマンドおよび任意のデー
タの繰り返しを示すランコマンドに限られていたが、こ
れらのコマンドの一部を別のコマンド、例えばデータ0
の繰り返しを示すランコマンドや、直前の走査のデータ
を参照するコマンドに割り当ててもよい。
In the first embodiment described above, the commands expressing data are limited to raw data commands and run commands indicating repetition of arbitrary data. However, some of these commands are replaced with other commands, For example, data 0
May be assigned to a run command indicating repetition of the above or a command referring to data of the immediately preceding scan.

【0110】さらに、上述の第1実施形態では、符号列
の送信開始は、コマンド0x00を出力後、nStro
beにLを出力することにより通知しているが、これに
かえて任意の方法、例えばIEEE規格「IEEE S
td 1284−1994」に規定される拡張リンクモ
ードに入ることにより通知してもよい。
Further, in the above-described first embodiment, the transmission of the code string is started by outputting the command 0x00 and then nStr.
The notification is made by outputting L to be, but instead of this, an arbitrary method, for example, the IEEE standard “IEEE S
The notification may be made by entering an extended link mode defined in “td 1284-1994”.

【0111】また、上述の実施形態では、転送ブロック
サイズの最大値である8KB以上の空きがあるか否かを
Busy信号を用いてホストコンピュータに通知してい
るが、これにかえて任意の方法、例えばIEEE規格
「IEEE Std 1284−1994」に規定され
るニブルモード転送、あるいはECPモード転送でプリ
ンタからホストコンピュータにデータを転送することに
より通知してもよい。
Further, in the above-described embodiment, whether or not there is a free space of 8 KB or more, which is the maximum value of the transfer block size, is notified to the host computer by using the Busy signal. For example, the notification may be made by transferring data from the printer to the host computer by nibble mode transfer or ECP mode transfer specified in the IEEE standard "IEEE Std 1284-1994".

【0112】以下、図8に示すメモリマップを参照して
本発明に係る通信制御装置を適用可能な印刷システムで
読み出し可能なデータ処理プログラムの構成について説
明する。
Hereinafter, the configuration of a data processing program that can be read by a printing system to which the communication control device according to the present invention can be applied will be described with reference to a memory map shown in FIG.

【0113】図8は、本発明に係る通信制御装置を適用
可能な印刷システムで読み出し可能な各種データ処理プ
ログラムを格納する記憶媒体のメモリマップを説明する
図である。
FIG. 8 is a diagram for explaining a memory map of a storage medium for storing various data processing programs that can be read by a printing system to which the communication control device according to the present invention can be applied.

【0114】なお、特に図示しないが、記憶媒体に記憶
されるプログラム群を管理する情報、例えばバージョン
情報,作成者等も記憶され、かつ、プログラム読み出し
側のOS等に依存する情報、例えばプログラムを識別表
示するアイコン等も記憶される場合もある。
Although not shown, information for managing a group of programs stored in the storage medium, for example, version information, a creator and the like are also stored, and information dependent on the OS or the like on the program reading side, for example, a program is stored. An icon or the like for identification display may also be stored.

【0115】さらに、各種プログラムに従属するデータ
も上記ディレクトリに管理されている。また、各種プロ
グラムをコンピュータにインストールするためのプログ
ラムや、インストールするプログラムが圧縮されている
場合に、解凍するプログラム等も記憶される場合もあ
る。
Further, data dependent on various programs is also managed in the directory. In addition, a program for installing various programs on a computer or a program for decompressing a program to be installed when the program to be installed is compressed may be stored.

【0116】本実施形態における図4に示す機能が外部
からインストールされるプログラムによって、ホストコ
ンピュータにより遂行されていてもよい。そして、その
場合、CD−ROMやフラッシュメモリやFD等の記憶
媒体により、あるいはネットワークを介して外部の記憶
媒体から、プログラムを含む情報群を出力装置に供給さ
れる場合でも本発明は適用されるものである。
The functions shown in FIG. 4 in this embodiment may be executed by a host computer by a program installed from the outside. In this case, the present invention is applied even when a group of information including a program is supplied to the output device from a storage medium such as a CD-ROM, a flash memory, or an FD, or from an external storage medium via a network. Things.

【0117】以上のように、前述した実施形態の機能を
実現するソフトウエアのプログラムコードを記録した記
憶媒体を、システムあるいは装置に供給し、そのシステ
ムあるいは装置のコンピュータ(またはCPUやMP
U)が記憶媒体に格納されたプログラムコードを読出し
実行することによっても、本発明の目的が達成されるこ
とは言うまでもない。
As described above, the storage medium storing the program codes of the software for realizing the functions of the above-described embodiments is supplied to the system or the apparatus, and the computer (or CPU or MP) of the system or the apparatus is supplied.
It goes without saying that the object of the present invention is also achieved when U) reads and executes the program code stored in the storage medium.

【0118】この場合、記憶媒体から読み出されたプロ
グラムコード自体が本発明の新規な機能を実現すること
になり、そのプログラムコードを記憶した記憶媒体は本
発明を構成することになる。
In this case, the program code itself read from the storage medium realizes a novel function of the present invention, and the storage medium storing the program code constitutes the present invention.

【0119】プログラムコードを供給するための記憶媒
体としては、例えば、フロッピーディスク,ハードディ
スク,光ディスク,光磁気ディスク,CD−ROM,C
D−R,磁気テープ,不揮発性のメモリカード,RO
M,EEPROM等を用いることができる。
Examples of the storage medium for supplying the program code include a floppy disk, hard disk, optical disk, magneto-optical disk, CD-ROM,
DR, magnetic tape, nonvolatile memory card, RO
M, EEPROM and the like can be used.

【0120】また、コンピュータが読み出したプログラ
ムコードを実行することにより、前述した実施形態の機
能が実現されるだけでなく、そのプログラムコードの指
示に基づき、コンピュータ上で稼働しているOS(オペ
レーティングシステム)等が実際の処理の一部または全
部を行い、その処理によって前述した実施形態の機能が
実現される場合も含まれることは言うまでもない。
When the computer executes the readout program code, not only the functions of the above-described embodiment are realized, but also the OS (Operating System) running on the computer based on the instruction of the program code. ) And the like perform part or all of the actual processing, and the processing realizes the functions of the above-described embodiments.

【0121】さらに、記憶媒体から読み出されたプログ
ラムコードが、コンピュータに挿入された機能拡張ボー
ドやコンピュータに接続された機能拡張ユニットに備わ
るメモリに書き込まれた後、そのプログラムコードの指
示に基づき、その機能拡張ボードや機能拡張ユニットに
備わるCPU等が実際の処理の一部または全部を行い、
その処理によって前述した実施形態の機能が実現される
場合も含まれることは言うまでもない。
Further, after the program code read from the storage medium is written into a memory provided in a function expansion board inserted into the computer or a function expansion unit connected to the computer, based on the instruction of the program code, The CPU provided in the function expansion board or function expansion unit performs part or all of the actual processing,
It goes without saying that a case where the function of the above-described embodiment is realized by the processing is also included.

【0122】[0122]

【発明の効果】以上説明したように、本発明に係る第1
の発明によれば、複数のデータ信号線および少なくとも
一つの制御信号線および少なくとも一つの状態信号線を
有するパラレルポートと、前記パラレルポートの任意の
データ信号の変化を検出してクロック信号を生成するク
ロック生成手段と、前記クロック生成手段により生成さ
れたクロック信号により前記パラレルポートを介して受
信した符号化データ信号を記憶する記憶手段と、前記記
憶手段に所定の空き領域があるか否かを示す受信可能状
態信号を前記パラレルポートの状態信号線またはデータ
信号線に出力する受信可能状態信号出力手段とを有する
ので、汎用のパラレルポートを介して受信するパラレル
データから転送クロックを自動生成でき、従来のように
クロックビットをあらかじめ割り当てて転送ビット幅を
削ることなく、転送可能な全てのビットを最大限利用し
て所望の出力データを高速に転送できる。
As described above, the first embodiment according to the present invention is described.
According to the invention, a parallel port having a plurality of data signal lines, at least one control signal line, and at least one state signal line, and detecting a change in an arbitrary data signal of the parallel port to generate a clock signal A clock generation unit, a storage unit for storing an encoded data signal received via the parallel port by a clock signal generated by the clock generation unit, and indicating whether or not a predetermined free area exists in the storage unit. Since there is provided a receivable state signal output means for outputting a receivable state signal to a state signal line or a data signal line of the parallel port, a transfer clock can be automatically generated from parallel data received via a general-purpose parallel port. The clock bits are allocated in advance as in All bits possible to maximize the available transfer the desired output data at high speed.

【0123】第2の発明は、前記記憶手段に記憶された
符号化データ信号を復号する復号手段を有するので、符
号化されて受信したデータから意図する出力データを少
ない記憶容量で高速に受信処理することができる。
Since the second invention has decoding means for decoding the coded data signal stored in the storage means, the desired output data can be processed at a high speed with a small storage capacity from the coded and received data. can do.

【0124】第3〜第6の発明は、複数のデータ信号線
および少なくとも一つの制御信号線および少なくとも一
つの状態信号線を有するパラレルポートと、前記パラレ
ルポートを介して外部に転送すべき出力データの符号を
解析して相並ぶ符号同士が少なくとも1ビット異なるよ
うに符号化を行ってデータを生成する符号化手段と、前
記パラレルポートに接続されている外部装置から出力さ
れる受信可能状態信号が所定の大きさのデータを受信可
能であることを示している場合に、前記符号化手段によ
り符号化されたデータを前記パラレルポートのデータ信
号線に出力する通信手段とを有するので、連続して転送
されるデータ信号中から転送先でデータ信号を記憶する
ためのクロックを確実に生成できるデータとして符号化
することができる。
The third to sixth inventions are directed to a parallel port having a plurality of data signal lines, at least one control signal line, and at least one state signal line, and output data to be transferred to the outside via the parallel port. An encoding means for analyzing the codes and encoding the data so that the codes arranged next to each other are different by at least one bit to generate data, and a receivable state signal output from an external device connected to the parallel port. Communication means for outputting the data encoded by the encoding means to the data signal line of the parallel port when indicating that data of a predetermined size can be received, A clock for storing a data signal at a transfer destination from a transferred data signal can be encoded as data that can be reliably generated.

【0125】第7,第8の発明は、複数のデータ信号線
および少なくとも一つの制御信号線および少なくとも一
つの状態信号線を有するパラレルポートを介して外部に
転送すべき出力データの符号を解析して相並ぶ符号同士
が少なくとも1ビット異なるように符号化を行ってデー
タを生成する符号化工程と、前記パラレルポートに接続
されている外部装置から出力される受信可能状態信号が
所定の大きさのデータを受信可能であることを示してい
る場合に、前記符号化工程により符号化されたデータを
前記パラレルポートのデータ信号線に出力する通信工程
とを有するので、汎用のパラレルポートを介して受信す
るパラレルデータから転送クロックを自動生成でき、従
来のようにクロックビットをあらかじめ割り当てて転送
ビット幅を削ることなく、転送可能な全てのビットを最
大限利用して所望の出力データを高速に転送できる。
The seventh and eighth inventions analyze the sign of output data to be transferred to the outside via a parallel port having a plurality of data signal lines, at least one control signal line, and at least one state signal line. An encoding step of encoding data so that the codes arranged in sequence are different by at least one bit to generate data; and a receivable state signal output from an external device connected to the parallel port having a predetermined magnitude. And a communication step of outputting the data encoded in the encoding step to the data signal line of the parallel port when it indicates that the data can be received. The transfer clock can be automatically generated from the parallel data to be transferred, and the transfer bit width can be reduced by assigning clock bits in advance as in the past. No, it transfers the desired output data at a high speed all the bits capable of transferring and maximum use.

【0126】従って、データ送信元においては、汎用の
パラレルポートの全データビット幅を介して大量のデー
タを短時間、かつ正確に受信可能なデータ信号を符号化
でき、データ受信側においては、データ信号を確実に記
憶するクロックを自動生成して、大量のデータ信号を短
時間に受信処理することができる等の効果を奏する。
Therefore, at the data transmission source, a data signal capable of receiving a large amount of data in a short time and accurately through the entire data bit width of the general-purpose parallel port can be encoded. It is possible to automatically generate a clock for surely storing a signal and to receive a large amount of data signal in a short time.

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

【図1】本発明の第1実施形態を示す通信制御装置の構
成を説明するブロック図である。
FIG. 1 is a block diagram illustrating a configuration of a communication control device according to a first embodiment of the present invention.

【図2】本発明に係る通信制御装置を適用可能な印刷シ
ステムの構成を示すブロック図である。
FIG. 2 is a block diagram illustrating a configuration of a printing system to which a communication control device according to the present invention can be applied.

【図3】図2に示した符号化プログラムが生成する符号
化テーブルの一例を示す図である。
FIG. 3 is a diagram showing an example of an encoding table generated by the encoding program shown in FIG. 2;

【図4】図2に示した符号化プログラムの符号化手順の
詳細を説明する図である。
FIG. 4 is a diagram illustrating details of an encoding procedure of the encoding program shown in FIG. 2;

【図5】図2に示したホストコンピュータとプリンタと
のデータ通信処理を説明するタイミングチャートであ
る。
FIG. 5 is a timing chart illustrating a data communication process between the host computer and the printer illustrated in FIG. 2;

【図6】図2に示したラッチ回路の詳細を示す回路図で
ある。
FIG. 6 is a circuit diagram showing details of a latch circuit shown in FIG. 2;

【図7】図6に示したラッチ回路の動作を示すタイミン
グチャートである。
FIG. 7 is a timing chart illustrating an operation of the latch circuit illustrated in FIG. 6;

【図8】本発明に係る通信制御装置を適用可能な印刷シ
ステムで読み出し可能な各種データ処理プログラムを格
納する記憶媒体のメモリマップを説明する図である。
FIG. 8 is a diagram illustrating a memory map of a storage medium that stores various data processing programs that can be read by a printing system to which the communication control device according to the present invention can be applied.

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

1 ホストコンピュータ 2 CPU 6 ホストパラレルポート 7 プリンタ 11 アプリケーションプログラム 12 プリンタドライバプログラム 13 符号化プログラム 14 通信プログラム 16 プリンタパラレルポート 17 制御回路 18 ラッチ回路 19 FIFOメモリ 20 復号回路 21 シストレジスタ 22 プリンタエンジン DESCRIPTION OF SYMBOLS 1 Host computer 2 CPU 6 Host parallel port 7 Printer 11 Application program 12 Printer driver program 13 Encoding program 14 Communication program 16 Printer parallel port 17 Control circuit 18 Latch circuit 19 FIFO memory 20 Decoding circuit 21 Cyst register 22 Printer engine

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】 複数のデータ信号線および少なくとも一
つの制御信号線および少なくとも一つの状態信号線を有
するパラレルポートと、 前記パラレルポートの任意のデータ信号の変化を検出し
てクロック信号を生成するクロック生成手段と、 前記クロック生成手段により生成されたクロック信号に
より前記パラレルポートを介して受信した符号化データ
信号を記憶する記憶手段と、 前記記憶手段に所定の空き領域があるか否かを示す受信
可能状態信号を前記パラレルポートの状態信号線または
データ信号線に出力する受信可能状態信号出力手段と、
を有することを特徴とする通信制御装置。
1. A parallel port having a plurality of data signal lines, at least one control signal line, and at least one state signal line, and a clock for generating a clock signal by detecting a change in an arbitrary data signal of the parallel port. Generating means; storing means for storing an encoded data signal received via the parallel port based on the clock signal generated by the clock generating means; and receiving indicating whether or not a predetermined free area exists in the storing means. Receivable state signal output means for outputting a possible state signal to a state signal line or a data signal line of the parallel port,
A communication control device comprising:
【請求項2】 前記記憶手段に記憶されたデータ信号を
復号する復号手段を有することを特徴とする請求項1記
載の通信制御装置。
2. The communication control device according to claim 1, further comprising decoding means for decoding the data signal stored in said storage means.
【請求項3】 複数のデータ信号線および少なくとも一
つの制御信号線および少なくとも一つの状態信号線を有
するパラレルポートと、 前記パラレルポートを介して外部に転送すべき出力デー
タの符号を解析して相並ぶ符号同士が少なくとも1ビッ
ト異なるように符号化を行ってデータを生成する符号化
手段と、 前記パラレルポートに接続されている外部装置から出力
される受信可能状態信号が所定の大きさのデータを受信
可能であることを示している場合に、前記符号化手段に
より符号化されたデータを前記パラレルポートのデータ
信号線に出力する通信手段と、を有することを特徴とす
る通信制御装置。
3. A parallel port having a plurality of data signal lines, at least one control signal line, and at least one state signal line, and analyzing the sign of output data to be transferred to the outside via the parallel port. Encoding means for encoding and generating data so that the arranged codes are different from each other by at least one bit; and a receivable state signal output from an external device connected to the parallel port converts data of a predetermined size. A communication control unit that outputs data encoded by the encoding unit to a data signal line of the parallel port when it indicates that reception is possible.
【請求項4】 前記符号化手段は、相並ぶ符号同士が同
一となる場合には、データを表現しない符号を挿入する
ことを特徴とする請求項3記載の通信制御装置。
4. The communication control device according to claim 3, wherein the encoding unit inserts a code that does not represent data when the codes arranged side by side are the same.
【請求項5】 前記符号化手段は、相並ぶ符号同士が同
一となる場合には、より小さい長さを表現する符号に符
号化することを特徴とする請求項3記載の通信制御装
置。
5. The communication control device according to claim 3, wherein the encoding unit encodes the code having a smaller length when the codes arranged in a row are the same.
【請求項6】 前記符号化手段は、相並ぶ符号同士が同
一となる場合には、同一の意味を持つ別の符号に符号化
することを特徴とする請求項3記載の通信制御装置。
6. The communication control apparatus according to claim 3, wherein said encoding means encodes, when the codes arranged side by side are identical, another code having the same meaning.
【請求項7】 複数のデータ信号線および少なくとも一
つの制御信号線および少なくとも一つの状態信号線を有
するパラレルポートを介して外部に転送すべき出力デー
タの符号を解析して相並ぶ符号同士が少なくとも1ビッ
ト異なるように符号化を行ってデータを生成する符号化
工程と、 前記パラレルポートに接続されている外部装置から出力
される受信可能状態信号が所定の大きさのデータを受信
可能であることを示している場合に、前記符号化工程に
より符号化されたデータを前記パラレルポートのデータ
信号線に出力する通信工程と、を有することを特徴とす
る通信制御方法。
7. The code of output data to be transferred to the outside via a parallel port having a plurality of data signal lines, at least one control signal line, and at least one status signal line is analyzed, and at least codes arranged in parallel are analyzed. An encoding step of performing encoding so as to generate data by one bit differently; and a receivable state signal output from an external device connected to the parallel port can receive data of a predetermined size. A communication step of outputting data encoded in the encoding step to a data signal line of the parallel port.
【請求項8】 複数のデータ信号線および少なくとも一
つの制御信号線および少なくとも一つの状態信号線を有
するパラレルポートを介して外部に転送すべき出力デー
タの符号を解析して相並ぶ符号同士が少なくとも1ビッ
ト異なるように符号化を行ってデータを生成する符号化
工程と、 前記パラレルポートに接続されている外部装置から出力
される受信可能状態信号が所定の大きさのデータを受信
可能であることを示している場合に、前記符号化工程に
より符号化されたデータを前記パラレルポートのデータ
信号線に出力する通信工程と、を含むことを特徴とする
コンピュータが読み出し可能なプログラムを格納した記
憶媒体。
8. Analyzing the codes of output data to be transferred to the outside via a parallel port having a plurality of data signal lines, at least one control signal line, and at least one state signal line, and determining that at least two codes are aligned. An encoding step of performing encoding so as to generate data by one bit differently; and a receivable state signal output from an external device connected to the parallel port can receive data of a predetermined size. A communication step of outputting data encoded by the encoding step to a data signal line of the parallel port, wherein a computer-readable program is stored. .
JP9192175A 1997-07-17 1997-07-17 Communication control apparatus, communication control method, and storage medium storing computer-readable program Pending JPH1139256A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9192175A JPH1139256A (en) 1997-07-17 1997-07-17 Communication control apparatus, communication control method, and storage medium storing computer-readable program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9192175A JPH1139256A (en) 1997-07-17 1997-07-17 Communication control apparatus, communication control method, and storage medium storing computer-readable program

Publications (1)

Publication Number Publication Date
JPH1139256A true JPH1139256A (en) 1999-02-12

Family

ID=16286936

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9192175A Pending JPH1139256A (en) 1997-07-17 1997-07-17 Communication control apparatus, communication control method, and storage medium storing computer-readable program

Country Status (1)

Country Link
JP (1) JPH1139256A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115048236A (en) * 2022-06-27 2022-09-13 联想(北京)信息技术有限公司 Signal processing method and processing device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115048236A (en) * 2022-06-27 2022-09-13 联想(北京)信息技术有限公司 Signal processing method and processing device

Similar Documents

Publication Publication Date Title
US5581669A (en) System and method for peripheral data transfer
US6040792A (en) Universal serial bus to parallel bus signal converter and method of conversion
US6901465B2 (en) Data transfer control device, electronic equipment, and data transfer control method
US7051124B2 (en) Data transfer control device, electronic equipment, and data transfer control method
US7007112B2 (en) Data transfer control device, electronic equipment, and data transfer control method
US5461701A (en) System and method for peripheral data transfer
JPH08197788A (en) Image data read circuit of printer controller
US6170027B1 (en) LPC/ISA bridge and its bridging method
US6785424B1 (en) Encoding method and apparatus for compressing a data structure having two or more dimensions, decoding method, and storage medium
JPH1139256A (en) Communication control apparatus, communication control method, and storage medium storing computer-readable program
US20060236001A1 (en) Direct memory access controller
WO2024082497A1 (en) Asynchronous signal processing method and structure
US6791705B1 (en) Communication control apparatus and method
KR100591243B1 (en) On-chip serial peripheral bus system and its operation method
US20010018732A1 (en) Parallel processor and parallel processing method
JPS59117864A (en) System for controlling data compression and expansion
CN119556986B (en) Register structure for writing multi-bit wide data of memory and writing method
KR100460994B1 (en) High-bandwidth I/O device with direct memory access and method thereof
JP3260862B2 (en) Parallel data transmission device
JP2000112878A (en) Device and method for controlling timing of transfer request in data processor
JP3293382B2 (en) Data compression device and data decompression device
JP2005110019A (en) Serial communication system
TW202240411A (en) Method for transmitting data and data processing circuit
CN116756073A (en) Method for improving read-write speed of SPI slave
JP2003115767A (en) Decoding device and decoding method

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20040106