JP2004118517A - Data transfer method and device, printing method, printer, control program for data transfer device, and storage medium - Google Patents

Data transfer method and device, printing method, printer, control program for data transfer device, and storage medium Download PDF

Info

Publication number
JP2004118517A
JP2004118517A JP2002280801A JP2002280801A JP2004118517A JP 2004118517 A JP2004118517 A JP 2004118517A JP 2002280801 A JP2002280801 A JP 2002280801A JP 2002280801 A JP2002280801 A JP 2002280801A JP 2004118517 A JP2004118517 A JP 2004118517A
Authority
JP
Japan
Prior art keywords
data transfer
data
mode
control program
host
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
JP2002280801A
Other languages
Japanese (ja)
Inventor
Takahiro Ogushi
大串 卓広
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 JP2002280801A priority Critical patent/JP2004118517A/en
Publication of JP2004118517A publication Critical patent/JP2004118517A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Systems (AREA)
  • Accessory Devices And Overall Control Thereof (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a data transfer method and device capable of realizing positive and rapid data transfer in a high-speed responding device of universal serial bus (USB) specification, and to provide a printing method, a printer, a control program for the data transfer device, and a storage medium. <P>SOLUTION: In the data transfer device for transferring data between a host PC 101 and the printer 102, a printer controller 104 controls to change the set time of a timer for detecting the end of data, according to a transfer mode. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、ホスト側装置と周辺機器との間のデータ転送を行うデータ転送方法及び装置及び印刷方法及び印刷装置及びデータ転送装置の制御プログラム及び記憶媒体に関する。
【0002】
【従来の技術】
ホスト側装置である例えばPC(パーソナルコンピュータ)に周辺機器である例えばプリンタ(印刷装置)を接続する方法として、近年USBの普及が進んでいる。USBは、既存のレガシーインターフェースを統合していくことを目的に開発され、プラグアンドプレイ、活線挿抜による使い勝手の良さ、ポートの拡張性の高さ等から普及が進んでいる。更に、2000年4月に正式な仕様が公開されたUSB規格Rev2.0仕様では、転送速度が480Mbps迄引き上げられ、USBの普及は、より一層進むものと考えられる。
【0003】
また、USB、IEEE1394等を用いた高速データ転送に関する技術は、従来公知である。(例えば、特許文献1〜7参照)
【0004】
【特許文献1】
特開平10−228355号公報
【特許文献2】
特開平10−228357号公報
【特許文献3】
特開平10−228364号公報
【特許文献4】
特開平11−170632号公報
【特許文献5】
特開2000−341306号公報
【特許文献6】
特開2001−67309号公報
【特許文献7】
特開2001−67310号公報
【0005】
【発明が解決しようとする課題】
USBを使用したデータの転送方法では、USBプロトコル上でのデータ転送の終了について規定されていない。USBによるデータ転送方法を用いたプリンタでは、データ転送の終了が判断できないと、IEEE1284.4でのデータ転送と非IEEE1284.4でのデータ転送とが混在した場合、プリント動作に不具合が起きてしまう。
【0006】
そのため、データ転送が終了したか否かの判断は、通常ショートパケットの認識により行われる。USBでのデータ転送では、最大パケットサイズより大きいデータ転送を行おうとした場合、データは、パケットサイズに分割されてデータ転送が行われる。例えば、フルスピードのバルク転送を行おうとした場合、その最大パケットサイズは64バイトである。フルスピードのバルク転送で200バイトのデータを転送しようとした場合、データは64バイト、64バイト、64バイト、8バイトとデータを分割して転送する。
【0007】
このように、データ転送では、データ転送終了の最後のパケットまでは、最大パケット長でデータ転送が行われ、最後のパケットのみ最大パケットサイズに満たないデータ量でデータ転送が行われる。つまり、最大パケットサイズに満たないデータが転送されたことを認識して、データ転送が終了したものと判断する。
【0008】
しかし、これだけでは最大パケットサイズの整数倍のデータを転送しようとした場合に、データ転送を終了したことを認識することができない。
【0009】
そこで、最大パケットサイズの整数倍のデータ転送での転送終了検知には、通常はタイマを使用した方法が用いられる。この方法は、最大パケット長のデータが送られて来ても、一定時間次のパケットの受信がない場合は、データ転送が終了したものと判断するものである。
【0010】
この方法では、データ転送が終了したものと見なすまでの時間設定を慎重に行わなければならない。何故ならば、USBによるプリンタのデータ転送の場合、IEEE1284.4のデータと非IEEE1284.4のデータとを混在させてデータ転送を行う場合、設定時間が短すぎると、CPUによるIEEE1284.4でのデータ転送か、非IEEE1284.4でのデータ転送かを判断する回数が増えてしまうため、データ転送速度が遅くなってしまう。逆に、長すぎた場合は、データの区切りを認識できないため、データ転送が失敗してしまうからである。
【0011】
一般に、USBによるデータ転送の終了認識方法は、前述したショートパケットによる方法とタイマの設定時間による方法とを組み合わせて行う。
【0012】
USB規格Rev2.0規格で新しく策定されたハイスピードモードは、フルスピードモードの40倍高速であるが、下位互換性を保つため、フルスピードモードもサポートする必要がある。具体的には、周辺機器の上位側に接続されるホスト側装置がハイスピード対応であればハイスピードでの動作が、ホスト側装置がフルスピード対応であればフルスピードでの動作が、それぞれ要求される。
【0013】
このため、前記データ転送終了の認識方式の時間設定をフルスピードと同じ時間とすると、ハイスピード動作にとっては長すぎる時間設定となる。また、同様に、ハイスピードモードにとって最適な設定時間は、フルスピードモードにとっては短すぎる時間設定となる。
【0014】
本発明は上述した従来技術の有する問題点を解消するためになされたものであり、その目的は、ハイスピード対応デバイスにおいて、確実且つ高速なデータ転送を可能にしたデータ転送方法及び装置及び印刷方法及び印刷装置及びデータ転送装置の制御プログラム及び記憶媒体を提供することである。
【0015】
【課題を解決するための手段】
上記目的を達成するために本発明のデータ転送方法は、複数のデータ転送モードを有すると共にホスト側装置がサポートするデータ転送モードにより実際のデータ通信モードを互いに決定する機能を有し且つ前記ホスト側装置と周辺機器との間のデータ転送を行うデータ転送方法であって、前記データ転送モードを検出するデータ転送モード検出ステップと、データ受信後タイマに設定された時間が経過しても次のデータ受信が無い場合にデータ転送終了とするデータ転送終了検知ステップと、前記転送モード検出ステップにより検出されたデータ転送モードに応じて前記タイマの設定時間を変更するように制御する制御ステップとを有することを特徴とする。
【0016】
また、上記目的を達成するために本発明のデータ転送装置は、複数のデータ転送モードを有すると共にホスト側装置がサポートするデータ転送モードにより実際のデータ通信モードを互いに決定する機能を有し且つ前記ホスト側装置と周辺機器との間のデータ転送を行うデータ転送装置であって、前記データ転送モードを検出するデータ転送モード検出手段と、データ受信後タイマに設定された時間が経過しても次のデータ受信が無い場合にデータ転送終了とするデータ転送終了検知手段と、前記転送モード検出手段により検出されたデータ転送モードに応じて前記タイマの設定時間を変更するように制御する制御手段とを有することを特徴とする。
【0017】
また、上記目的を達成するために本発明の印刷方法は、前記データ転送方法によりデータを転送することを特徴とする。
【0018】
また、上記目的を達成するために本発明の印刷装置は、前記データ転送装置によりデータを転送することを特徴とする。
【0019】
また、上記目的を達成するために本発明のデータ転送装置の制御プログラムは、複数のデータ転送モードを有すると共にホスト側装置がサポートするデータ転送モードにより実際のデータ通信モードを互いに決定する機能を有し且つ前記ホスト側装置と周辺機器との間のデータ転送を行うデータ転送装置を制御するためのコンピュータ読み取り可能な制御プログラムであって、前記データ転送モードを検出するデータ転送モード検出ステップと、データ受信後タイマに設定された時間が経過しても次のデータ受信が無い場合にデータ転送終了とするデータ転送終了検知ステップと、前記転送モード検出ステップにより検出されたデータ転送モードに応じて前記タイマの設定時間を変更するように制御する制御ステップとをコンピュータに実行させるためのプログラムコードから成ることを特徴とする。
【0020】
更に、上記目的を達成するために本発明の記憶媒体は、前記制御プログラムを格納したことを特徴とする。
【0021】
【発明の実施の形態】
以下、本発明の各実施の形態を図面に基づき説明する。
【0022】
(一実施形態)
まず、本発明の一実施形態を図1乃至図4に基づき説明する。
【0023】
図1は、本実施の形態に係るデータ転送装置によりデータ転送を行うプリントシステムの構成を示すブロック図である。
【0024】
同図において、101はホスト側装置であるホストPC(パーソナルコンピュータ)、102は周辺機器(デバイス)であるプリンタ(印刷装置)であり、これらは外部バス102を介して互いに接続されている。プリンタ102は、プリンタコントローラ104とプリンタエンジン105とを有している。
【0025】
そして、ホストPC101で生成された画像データを、外部バス102を経由してプリンタ102に転送し、このプリンタ102によりプリント出力処理が行われる。プリンタコントローラ104では、ホストPC101との通信に用いられる外部バス103とのインターフェース(I/F)制御を行う。
【0026】
即ち、プリンタコントローラ104では、ホストPC101から転送されるプリンタ制御コマンド(画像データを変換したもの)の解釈・ビットマップデータ生成、ビットマップデータ生成時における各種画像処理、ユーザからの操作を受け付け、プリンタエンジン105へのコマンド送信が主に行われる。
【0027】
また、プリンタエンジン105では、プリンタコントローラ104で生成されたビットマップデータを受け取り、図示しないインクヘッドの吐出タイミングデータ生成、印字処理、インクヘッドへのインク供給・回復処理、紙搬送、ヘッド動作におけるモータ制御が主に行われる。
【0028】
以上の処理により、ホストPC101から受け取った画像データがプリンタ103によりプリント出力される。
【0029】
図2は、図1に示すプリンタシステムにおけるプリンタコントローラ104の構成を示すブロック図であり、同図に示すようにプリンタコントローラ104は、USBコントローラ201、DMA(Direct Memory Access)コントローラ202、RAM(Random Access Memory)203、ROM(Read Only Memory)204、EEPROM(Electrically Erasable and Programmable Read Only Memory)205、メモリコントローラ206、操作パネル207、操作パネルインターフェース(操作パネルI/F)208、CPU209、画像処理ASIC(特定用途向け集積回路)210、SDRAM(Synchronous Dynamic Random Access Memory)211及び内部バス212を有している。
【0030】
USBコントローラ201はエンドポイントバッファ(EPバッファ)201aを有し、このUSBコントローラ201にはUSBを介してホストPC101が接続され、また、画像処理ASIC210にはプリンタエンジン105が接続されている。
【0031】
次に、USBについて簡単に説明する。
【0032】
USBでのデータ転送は、基本的に3つのパケット、即ち、トークンパケット、データパケット、ハンドシェークパケットで構成される。これら3つのパケットで構成される1回のデータ転送をトランザクションと呼ぶ。
【0033】
トークンパケットには、トランザクションの種類を示すパケットID(識別子)、データ転送のターゲットとなる周辺機器(デバイス)のアドレス、エンドポイント番号が格納されており、このトークンパケットの情報に適合した周辺機器(デバイス)とホスト側装置との間でデータ転送が可能になる。このトークンパケットは、ホスト側装置のみが生成することができる。これは、ホスト側装置のみでバスのアクセス権を管理していることを意味する。データパケットには、転送データが格納されている。ハンドシェークパケットには、データ転送が正常に完了したか否かを示す情報が格納されている。
【0034】
トランザクションには、イントランザクション、アウトトランザクション、セットアップトランザクションの3種類がある。イントランザクションでは、周辺機器からホスト側装置へデータが転送される。アウトトランザクションでは、ホスト側装置から周辺機器へデータが転送される。セットアップトランザクションは、ホスト側装置から周辺機器に対して規格で規定されたコマンドの転送に使用される。これら3つのトランザクションで、バルク転送、コントロール転送、アイソクロナス転送、インタラプト転送と呼ばれるトランスファーが構成される。
【0035】
バルク転送は、イントランザクション、またはアウトトランザクションの並びである。コントロール転送は、セットアップトランザクションのみ、またはセットアップトランザクションに続くイントランザクションとアウトトランザクションの並びである。アイソクロナス転送は、ハンドシェークパケットの無いイントランザクションまたはアウトトランザクションの並びである。インタラプト転送は、一つのイントランザクションである。
【0036】
これらのトランスファーは、フレームと呼ばれる1ms単位の期間に並べられる。この制御は、ホスト外部バス制御部で行われる。フレームの開始は、SOF(Start of Frame)パケットと呼ばれる特殊なパケットで通知される。このうち、アイソクロナス転送とインタラプト転送は、フレーム内にその帯域が確保されている。バルク転送は、非同期のデータ転送であり、コントロール転送は、バスに接続されている周辺機器外部バス制御部の初期化に使用される。アイソクロナス転送は、同期転送であり、単位時間当たりのデータ転送量が確保されている。
【0037】
但し、他のトランスファーとは異なり、アイソクロナス転送のみデータの保証はされていない。インタラプト転送は、設定時間毎に必ず転送されることが保証されているため、割込み処理に使用される。USB規格Rev2.0仕様で、μフレームが追加されている。ハイスピードモードにおけるデータ転送は、μフレームによる同期が行われる。μフレームは、フレームの1/8の長さの125μsである。SOFは、フレームと同じSOFパケットが使用され、同じフレーム番号を持つSOFが連続して8回発行される。
【0038】
以上のようなUSB通信は、ホスト側装置とエンドポイントとの間で行われる。周辺機器(デバイス)は、複数のエンドポイントを持つことができ、複数のエンドポイントをグループ化することにより、インターフェースと呼ばれる単位にすることができる。周辺機器(デバイス)は、更にインターフェースを複数持つことができ、複数のインターフェースをグループ化することにより、周辺機器(デバイス)構成とすることができる。これらのインターフェース及び周辺機器(デバイス)構成を定義することにより、複雑な機能を持った周辺機器(デバイス)へ柔軟に対応することができる。
【0039】
次に、USBを用いたデータ転送方法に対して本発明を適用した場合のデータ転送方法について、図3を用いて説明する。
【0040】
ここでは、ホストPC101からプリンタ102へのプリントデータの転送を行なう場合を例に挙げて説明する。また、ここでは、USBコントローラ201のエンドポイントバッファ(EPバッファ)201aからメモリへのデータ転送にDMA転送を使用する場合を例に挙げて説明する。
【0041】
図3は、本実施の形態に係るデータ転送装置を適用した場合のプリントデータ転送における動作の流れを示すフローチャートである。
【0042】
プリンタ102へのデータ転送を行う際には、バルクOUT転送が用いられる。
【0043】
本実施の形態では、ホストPC101からプリンタ102へプリントデータを、USBバルクOUT転送を使用して転送する場合を例に挙げて説明する。
【0044】
まず、データ転送に先立って、転送モードに応じたタイマ設定時間をセットし(ステップS301)、次に、DMAサイズをMaxパケットサイズにセットしておく(ステップS302)。
【0045】
尚、転送モードに応じたタイマの時間設定の設定方法については後述する。
【0046】
ホストPC101からデータ転送が開始され、最初のパケットを受信すると(ステップS303)、データは、USBコントローラ201内のシリアルインターフェースエンジンによりUSBプロトコルの解釈が行われ、前記ステップS303において受信したパケットのデータサイズがMaxパケットサイズであるか否かを判断し(ステップS304)、データは、エンドポイントバッファ201aに格納される。
【0047】
そして、受信したパケットのデータサイズがMaxパケットサイズではないと判断された場合は、ショートパケット受信割込みが発生する(ステップS313)。ショートパケット受信割込みを検知したらDMA転送終了要求が出され(ステップS314)、DMAを停止させる。
【0048】
DMAを停止させると、DMAコントローラ202からのDMA転送終了割込みが発生する(ステップS305)。DMA転送終了割込みを検知したら、受信したデータがIEEE1284.4のデータであるか否かを判断する(ステップS306)。IEEE1284.4のデータであると判断された場合は、IEEE1284.4における処理を行い(ステップS315)、その後、前記ステップS301へ戻る。
【0049】
尚、ここでは、IEEE1284.4における処理内容についての説明は省略する。
【0050】
一方、前記ステップS304において受信したパケットのデータサイズがMaxパケットサイズであると判断された場合は、DMA転送終了割込みが発生し(ステップS305)、次に、IEEE1284.4のデータか否かを判断する(ステップS306)。そして、上述したショートパケットの場合と同様に、IEEE1284.4のデータであれば、IEEE1284.4における処理を行い(ステップS315)、その後、前記ステップS302へ戻る。
【0051】
また、前記ステップS306において受信したデータがIEEE1284.4ではないと判断された場合は、最初のパケットがショートパケットであるか否かを判断する(ステップS307)。そして、最初のパケットがショートパケットであると判断された場合は、データ転送が終了しているため、前記ステップS301へ戻る。
【0052】
一方、前記ステップS307において最初のパケットがショートパケットではないと判断された場合は、DMAサイズを再度セットする(ステップS308)。
【0053】
次に、パケットを設定時間内に受信したか否かを判断する(ステップS309)。そして、次のパケットを設定時間内に受信しないと判断された場合は、DMA転送終了要求が出され(ステップS317)、DMA転送終了割込みが発生し、DMA転送が終了し(ステップS312)、その後、前記ステップS301へ戻る。
【0054】
一方、前記ステップS309において、次のパケットを設定時間内に受信したと判断された場合は、その受信したパケットのサイズがMaxパケットサイズであるか否かを判断する。そして、受信したパケットのサイズがショートパケットの場合は、ショートパケット割込みが発生し(ステップS316)、DMA転送終了要求が出され(ステップS317)、DMA転送終了割込みが発生し(ステップS312)、DMA転送を終了させて、その後、前記ステップS302へ戻る。
【0055】
一方、前記ステップS310において設定時間内で受信したパケットのサイズがMaxパケットサイズであると判断された場合は、DMAデータの転送が完了したか否かを判断する(ステップS311)。そして、DMAデータの転送が完了しないと判断された場合は、前記ステップS309へ戻る。
【0056】
一方、予めセットしておいたDMAサイズと比較し、セットしたDMAサイズ分のデータ受信が行われた場合は、DMA転送完了となり、前記ステップS311にお上述した第一実施の形態ける判断結果は肯定(YES)となり、DMA転送終了割込みが発生するので(ステップS312)、前記ステップS302へ戻る。
【0057】
また、セットしておいたDMAサイズのデータ受信が行われていない場合は、ホストPC101から次のデータパケットが送信されて来るか否かが分らないため、タイマを作動させ、ここで設定時間内に次のパケットが来ればDMA転送を行い、設定時間経過してもデータ受信が無い場合は、DMA転送を終了させる。
【0058】
パケットを受信したか否かの判断は、エンドポイントバッファ201aがフルになった場合に発生する割込みを用いて行えば良い。また、データ転送が行われたデータ量をカウントしておき、データ転送量に変化があるか否かで、パケットを受信したか否かを判断するようにしても良い。
【0059】
以上の動作を繰り返すことによりデータ転送を行うことで、効率的なデータ転送を実現することができる。
【0060】
次に、データ転送モードの検出方法とタイマの設定時間の設定方法について説明する。
【0061】
タイマの設定時間の切り換えは、USB接続時のバス・エニュミレーション(データ転送速度検出)時に行えば良い。
【0062】
以下にその方法を説明する。
【0063】
まず、プリンタの電源投入によりプリンタコントローラ104の初期化が行われる。この際に、USBコントローラの初期化が行われる。この時点では、タイマ設定にフルスピード用の時間を設定しておく。
【0064】
その後、プリンタ102とホストPC101とがUSBにより接続されている場合は、USBのバス・エニュミレーションが行われる。また、プリンタ102とホストPC101とが接続されていない場合は、それらの接続が行われた時点でUSBのバス・エニュミレーションが行われる。
【0065】
USBデバイスは、図4に示すデバイス・ステートを遷移していき、アイドル状態となることができる。
【0066】
以下、具体的なUSBのバス・エニュミレーション時の動作について説明する。
【0067】
図4は、エニュミレーション時の動作を説明するためのデバイス・ステート・ダイアグラム(Device State Diagram)である。
(1)USBデバイスをハブ(Hub)に接続すると、ハブがステータスの変化をホストPC101に通知する。このとき、USBデバイスは、Attached(接続)ステート(図4の401)となり、USBデバイスが接続されたポートは、ディスエーブルとなる。
(2)ホストPC101は、ハブに何故ステータスが変化したかを問い合わせる。
(3)ホストPC101は、新しいデバイスが接続されたことを知り、また、どのポートに接続されたことも知る。ホストPC101は、新しいデバイスが接続されたポートに対し、ポートイネーブル、リセットコマンドを発行する。Powered(電源投入)ステート(図4の402)となる。
(4)ハブは、新しいデバイスが接続されたポートへのリセット信号を10ms保持する。リセット信号が解除されるとポートがイネーブルになり、ハブは100mAのバス電流をUSBデバイスに供給する。これで、USBデバイスは、Default(デフォルト)ステート(図4の403)となる。USBデバイスは、デフォルトアドレスに応答できるようになる。
(5)USBデバイスが一意なアドレスを受け取るまでは、デフォルトパイプにデフォルトアドレスを通じてアクセスできる。ホストPC101は、デバイスディスクリプタを読み取り、デフォルトパイプが使用できる最大データペイロードサイズを判断する。
(6)ホストPC101は、USBデバイスに一意のアドレスを割り当て、そのデバイスをAddress(アドレス割り当て)ステート(図4の404)に移す。
(7)ホストPC101は、USBデバイスからの構成情報を読み取るために、それぞれの構成0〜nを読み取る。このプロセスを完了するのに幾つかのフレームが必要になることがある。
(8)構成情報とUABデバイスの使用方法を基にして、ホストPC101は、デバイスに構成値を割り当てる。これで、デバイスは、Configured
(構成)ステート(図4の405)となり、この構成中の全てのエンドポイントは、記述されている特性をとる。USBデバイスは、その構成ディスクリプタの中で記述されている量のVbus電力を得ることができる。デバイスからの観点からは、デバイスは、使用可能な状態(アイドル)状態となっている。
【0068】
USBデバイスは、バスに接続してから使用可能になるまでに、上記のようにステートを遷移する。USBのフルスピード(FS)とハイスピード(HS)の調停も上記ステート遷移の中で行われる。具体的には上記(4)のリセット信号の10ms保持しているときに行われる。ハブがリセット信号を保持している際に、HS対応デバイスは、リセット信号を検知した場合、FS対応デバイスと同様に、まず、D+ラインをプルアップする。その後、HS対応デバイスは、D+、D−ラインをKステートにドライブを行うことにより、ハブにHS対応デバイスであることを通知する(デバイスChirpと呼ばれる)。
【0069】
ハブは、デバイスChirpを検知すると、D+、D−ラインをKステートとJステートとを交互にドライブすることにより、デバイスにHS対応ハブであることを通知する(ハブChirpと呼ばれる)。
【0070】
以上のデバイスChirpとハブChirpとにより、互いにHS対応デバイスであることが確認できると、ハイスピードモードとなる。
【0071】
ハイスピード、フルスピードの調停方法は、前記手段によるため、USBデバイスは、自分がハイスピードモード、フルスピードモードのどちらの転送モードを使用したデータ転送手段を用いるかを認識している。調停が行なわれた時点でUSBデバイスは、ハイスピードモード、フルスピードモードのどちらの転送モードを使用するかをレジスタにセットしておくことにより、プリンタコントローラ104は、自分がどちらの転送モードを使用しているかが認識可能となる。転送モードがどちらか一方でもHSに対応していない場合は、フルスピードモードとなる。
【0072】
以上の調停により、ハイスピードモードでの通信が確定しているデフォルトステートで、転送モードが示されるレジスタを参照し、ハイスピードモードでの転送モードが採用されている場合に、タイマの設定時間をハイスピード用の時間設定に切り換える。
【0073】
以上説明した方法によれば、エニュミレーション時のタイマ設定時間の切り替えが実現できる。
【0074】
尚、本発明は、上述した一実施形態に限定されるものではなく、種々の応用が可能である。
【0075】
また、上述した一実施形態では、インクジェットプリンタを例に挙げて説明したが、例えば、レーザビームプリンタ(LBP)、ストレージ機器等のデータ転送にUSBを使用した場合等、様々な周辺機器に応用が可能である。
【0076】
また、周辺機器のみではなく、ホスト装置側に本発明を適用しても良い。
【0077】
更に、上述した一実施形態では、ソフト的に次のパケット受信までのタイマ設定を行ったが、ハード的に行っても良い。
【0078】
(その他の実施形態)
本発明は、複数の機器(例えば、ホストコンピュータ、インターフェース機器、リーダー、プリンタ等)から構成されるシステムに適用しても、1つの機器からなる装置(例えば、複写機、ファクシミリ装置等)に適用してもよい。
【0079】
また、本発明の目的は、上記実施の形態の機能を実現するソフトウェアのプログラムコードを記録した記憶媒体を、システム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)が記憶媒体に格納されたプログラムコードを読み出して実行することによっても達成されることは言うまでもない。
【0080】
この場合、記憶媒体から読み出されたプログラムコード自体が前述した実施の形態の機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。
【0081】
上述した実施形態の機能を実現するソフトウェアのプログラムコードを記憶した記憶媒体を、システム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)が記憶媒体に格納されたプログラムコードを読み出して実行することによっても、本発明が達成されることは言うまでもない。
【0082】
この場合、記憶媒体から読み出されたプログラムコード自体が上述した実施形態の機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。
【0083】
また、プログラムコードを供給するための記憶媒体としては、例えば、RAM、NV−RAM、フロッピー(登録商標)ディスク、ハードディスク、光ディスク、光磁気ディスク、MO、CD−ROM、CD−R、CD−RW、DVD(DVD−ROM、DVD−R、DVD−RW等)、磁気テープ、不揮発性のメモリカード、他のROM等の上記プログラムコードを記憶できるものであれば良く、或いはネットワークを介したダウンロード等を用いることができる。
【0084】
また、コンピュータが読み出したプログラムコードを実行することにより、上述した実施形態の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼動しているOS(オペレーティングシステム)等が実際の処理の一部または全部を行い、その処理によって上述した実施形態の機能が実現される場合も含まれることは言うまでもない。
【0085】
更に、記憶媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書き込まれた後、そのプログラムコードの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPU等が実際の処理の一部または全部を行い、その処理によって上述した実施形態の機能が実現される場合も含まれることは言うまでもない。
【0086】
【発明の効果】
以上説明したように、本発明によれば、転送モードに応じてタイマ設定時間を設定することができ、ハイスピード対応デバイスにおいて、フルスピード転送モード及びハイスピード転送モードのいずれにおいても、確実で高速なデータ転送を実現することができる。更に、前記データ転送方式を印刷装置に用いることにより、高速な印刷装置が得られる。
【図面の簡単な説明】
【図1】本発明の一実施の形態に係るデータ転送装置によりデータ転送を行うプリントシステムの構成を示すブロック図である。
【図2】本発明の一実施の形態に係るデータ転送装置によりデータ転送を行うプリントシステムにおけるプリンタコントローラの構成を示すブロック図である
【図3】本発明の一実施の形態に係るデータ転送装置によりデータ転送を行うプリントシステムにおけるUSBを使用したプリントデータ受信時における動作の流れを示すフローチャートである。
【図4】本発明の一実施の形態に係るデータ転送装置におけるエニュミレーション時の動作を説明するためのデバイス・ステート・ダイアグラムである。
【符号の説明】
101  ホストPC
102  プリンタ
103  外部バス
104  プリンタコントローラ
105  プリンタエンジン
201  USBコントローラ
202  DMAコントローラ
203  RAM
204  ROM
205  EEPROM
206  メモリコントローラ
207  操作パネル
208  操作パネルI/F
209  CPU
210  画像処理ASIC
211  SDRAM
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a data transfer method and apparatus for performing data transfer between a host-side apparatus and peripheral devices, a printing method, a printing apparatus, a control program for the data transfer apparatus, and a storage medium.
[0002]
[Prior art]
In recent years, USB has been widely used as a method of connecting a peripheral device such as a printer (printing device) to a host device such as a PC (personal computer). USB has been developed for the purpose of integrating existing legacy interfaces, and is becoming popular due to its ease of use by plug-and-play, hot-swapping, high port expandability, and the like. Further, in the USB standard Rev 2.0 specification, whose official specification was released in April 2000, the transfer speed has been raised to 480 Mbps, and it is considered that the spread of USB will further advance.
[0003]
In addition, techniques related to high-speed data transfer using USB, IEEE1394, and the like are conventionally known. (For example, see Patent Documents 1 to 7)
[0004]
[Patent Document 1]
JP-A-10-228355
[Patent Document 2]
JP-A-10-228357
[Patent Document 3]
JP-A-10-228364
[Patent Document 4]
JP-A-11-170632
[Patent Document 5]
JP 2000-341306 A
[Patent Document 6]
JP 2001-67309 A
[Patent Document 7]
JP 2001-67310A
[0005]
[Problems to be solved by the invention]
In the data transfer method using USB, termination of data transfer on the USB protocol is not specified. In the printer using the USB data transfer method, if the end of the data transfer cannot be determined, if the data transfer in IEEE1284.4 and the data transfer in non-IEEE1284.4 are mixed, a trouble occurs in the printing operation. .
[0006]
Therefore, whether or not the data transfer has been completed is usually determined by recognizing the short packet. In USB data transfer, if an attempt is made to transfer data larger than the maximum packet size, the data is divided into packet sizes and then transferred. For example, when performing full-speed bulk transfer, the maximum packet size is 64 bytes. When attempting to transfer 200 bytes of data by full-speed bulk transfer, the data is divided into 64 bytes, 64 bytes, 64 bytes, and 8 bytes and transferred.
[0007]
Thus, in the data transfer, the data transfer is performed with the maximum packet length until the last packet at the end of the data transfer, and the data transfer is performed only on the last packet with the data amount less than the maximum packet size. That is, it recognizes that data less than the maximum packet size has been transferred, and determines that data transfer has been completed.
[0008]
However, this alone cannot recognize that the data transfer has been completed when attempting to transfer data that is an integral multiple of the maximum packet size.
[0009]
Therefore, a method using a timer is usually used to detect the transfer end in data transfer of an integral multiple of the maximum packet size. In this method, even if data of the maximum packet length is transmitted, if there is no reception of the next packet for a predetermined time, it is determined that the data transfer has been completed.
[0010]
In this method, it is necessary to carefully set the time until it is considered that the data transfer is completed. Because, in the case of USB printer data transfer, when data is transferred by mixing IEEE1284.4 data and non-IEEE1284.4 data, if the setting time is too short, the CPU will use IEEE1284.4 data. Since the number of times of determining whether to perform data transfer or non-IEEE1284.4 data transfer increases, the data transfer speed decreases. Conversely, if the length is too long, the data transfer fails because the data break cannot be recognized.
[0011]
Generally, the method of recognizing the end of data transfer by USB is performed by combining the above-described method using a short packet and the method using a set time of a timer.
[0012]
The high-speed mode newly formulated in the USB standard Rev 2.0 standard is 40 times faster than the full-speed mode, but it is necessary to support the full-speed mode in order to maintain backward compatibility. Specifically, high-speed operation is required if the host device connected to the higher-level peripheral device supports high speed, and full-speed operation is required if the host device supports full speed. Is done.
[0013]
Therefore, if the time setting of the data transfer end recognition method is set to the same time as the full speed, the time setting is too long for the high speed operation. Similarly, the optimal setting time for the high speed mode is a time setting that is too short for the full speed mode.
[0014]
SUMMARY OF THE INVENTION The present invention has been made to solve the above-mentioned problems of the related art, and an object of the present invention is to provide a data transfer method, an apparatus, and a printing method that enable reliable and high-speed data transfer in a high-speed compatible device. And a control program and a storage medium for a printing apparatus and a data transfer apparatus.
[0015]
[Means for Solving the Problems]
In order to achieve the above object, a data transfer method according to the present invention has a plurality of data transfer modes and has a function of mutually determining an actual data communication mode according to a data transfer mode supported by a host device, and A data transfer method for performing data transfer between a device and a peripheral device, comprising: a data transfer mode detecting step of detecting the data transfer mode; and A data transfer end detecting step of terminating data transfer when there is no reception, and a control step of controlling to change a set time of the timer according to the data transfer mode detected by the transfer mode detecting step. It is characterized by.
[0016]
In order to achieve the above object, the data transfer device of the present invention has a plurality of data transfer modes and has a function of mutually determining an actual data communication mode according to a data transfer mode supported by the host device, and A data transfer device for performing data transfer between a host-side device and a peripheral device, comprising: a data transfer mode detecting means for detecting the data transfer mode; Data transfer end detecting means for terminating data transfer when there is no data reception, and control means for controlling to change the set time of the timer according to the data transfer mode detected by the transfer mode detecting means. It is characterized by having.
[0017]
In order to achieve the above object, a printing method according to the present invention is characterized in that data is transferred by the data transfer method.
[0018]
In order to achieve the above object, a printing apparatus according to the present invention is characterized in that data is transferred by the data transfer apparatus.
[0019]
In order to achieve the above object, a control program for a data transfer device of the present invention has a plurality of data transfer modes and a function of mutually determining an actual data communication mode based on a data transfer mode supported by a host device. A computer-readable control program for controlling a data transfer device that performs data transfer between the host-side device and a peripheral device, the data transfer mode detecting step detecting the data transfer mode; A data transfer end detection step for terminating data transfer when there is no next data reception even after the time set in the timer has elapsed after the reception, and the timer according to the data transfer mode detected by the transfer mode detection step. And controlling the computer to change the set time of the computer. Characterized in that it consists of program code for causing.
[0020]
Further, in order to achieve the above object, a storage medium of the present invention stores the control program.
[0021]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[0022]
(One embodiment)
First, an embodiment of the present invention will be described with reference to FIGS.
[0023]
FIG. 1 is a block diagram illustrating a configuration of a print system that performs data transfer by the data transfer device according to the present embodiment.
[0024]
In FIG. 1, reference numeral 101 denotes a host PC (personal computer) as a host-side device, and 102, a printer (printing device) as a peripheral device (device), which are connected to each other via an external bus 102. The printer 102 has a printer controller 104 and a printer engine 105.
[0025]
Then, the image data generated by the host PC 101 is transferred to the printer 102 via the external bus 102, and the printer 102 performs a print output process. The printer controller 104 controls an interface (I / F) with an external bus 103 used for communication with the host PC 101.
[0026]
That is, the printer controller 104 interprets a printer control command (converted image data) transferred from the host PC 101, generates bitmap data, accepts various image processing when generating bitmap data, and accepts user operations. Command transmission to the engine 105 is mainly performed.
[0027]
The printer engine 105 receives the bitmap data generated by the printer controller 104 and generates ejection timing data of an ink head (not shown), print processing, ink supply / recovery processing to the ink head, paper transport, and motors in the head operation. Control is mainly performed.
[0028]
Through the above processing, the image data received from the host PC 101 is printed out by the printer 103.
[0029]
FIG. 2 is a block diagram showing a configuration of the printer controller 104 in the printer system shown in FIG. 1. As shown in FIG. 2, the printer controller 104 includes a USB controller 201, a DMA (Direct Memory Access) controller 202, and a RAM (Random). Access Memory (203), ROM (Read Only Memory) 204, EEPROM (Electrically Erasable and Programmable Read Only Memory) 205, memory controller 206, operation panel 207, operation panel interface (operation panel I / F) IC 20, CPU A A20, CPU A 208, A20 (Application Specific Integrated Circuit) 210, SDRAM (Synchronous Dyn) AIC (Random Random Access Memory) 211 and an internal bus 212.
[0030]
The USB controller 201 has an end point buffer (EP buffer) 201a. The USB controller 201 is connected to the host PC 101 via USB, and the image processing ASIC 210 is connected to the printer engine 105.
[0031]
Next, USB will be briefly described.
[0032]
The USB data transfer basically includes three packets, that is, a token packet, a data packet, and a handshake packet. One data transfer composed of these three packets is called a transaction.
[0033]
The token packet stores a packet ID (identifier) indicating the type of transaction, an address of a peripheral device (device) that is a target of data transfer, and an endpoint number. Device) and the host-side device. This token packet can be generated only by the host device. This means that only the host device manages the bus access right. Transfer data is stored in the data packet. The handshake packet stores information indicating whether data transfer has been completed normally.
[0034]
There are three types of transactions: an in-transaction, an out-transaction, and a setup transaction. In the in-transaction, data is transferred from the peripheral device to the host device. In the out transaction, data is transferred from the host device to the peripheral device. The setup transaction is used to transfer a command specified by the standard from the host device to the peripheral device. These three transactions constitute a transfer called a bulk transfer, a control transfer, an isochronous transfer, and an interrupt transfer.
[0035]
Bulk transfer is a sequence of in-transactions or out-transactions. The control transfer is a setup transaction only, or a sequence of an in transaction and an out transaction following the setup transaction. An isochronous transfer is a sequence of in-transactions or out-transactions without a handshake packet. An interrupt transfer is one in-transaction.
[0036]
These transfers are arranged in 1 ms units called frames. This control is performed by the host external bus control unit. The start of a frame is notified by a special packet called a SOF (Start of Frame) packet. Among them, the bandwidths of the isochronous transfer and the interrupt transfer are secured in the frame. The bulk transfer is an asynchronous data transfer, and the control transfer is used to initialize a peripheral device external bus control unit connected to the bus. The isochronous transfer is a synchronous transfer, and a data transfer amount per unit time is secured.
[0037]
However, unlike other transfer, data is not guaranteed only for isochronous transfer. The interrupt transfer is used for interrupt processing because it is guaranteed that the transfer is always performed every set time. A μ frame is added in the USB standard Rev 2.0 specification. Data transfer in the high-speed mode is synchronized with a μ frame. The μ frame is 125 μs, which is 8 the length of the frame. The SOF uses the same SOF packet as the frame, and the SOF having the same frame number is issued eight times consecutively.
[0038]
The USB communication as described above is performed between the host device and the endpoint. A peripheral device can have a plurality of endpoints, and can be grouped into a plurality of endpoints to form a unit called an interface. The peripheral device can further have a plurality of interfaces, and the plurality of interfaces can be grouped to form a peripheral device configuration. By defining these interfaces and peripheral device (device) configurations, it is possible to flexibly cope with peripheral devices (devices) having complicated functions.
[0039]
Next, a data transfer method when the present invention is applied to a data transfer method using USB will be described with reference to FIG.
[0040]
Here, a case in which print data is transferred from the host PC 101 to the printer 102 will be described as an example. Also, here, an example will be described in which DMA transfer is used for data transfer from the endpoint buffer (EP buffer) 201a of the USB controller 201 to the memory.
[0041]
FIG. 3 is a flowchart showing a flow of operation in print data transfer when the data transfer device according to the present embodiment is applied.
[0042]
When transferring data to the printer 102, bulk OUT transfer is used.
[0043]
In the present embodiment, an example will be described in which print data is transferred from the host PC 101 to the printer 102 using USB bulk OUT transfer.
[0044]
First, prior to data transfer, a timer set time corresponding to the transfer mode is set (step S301), and then the DMA size is set to the Max packet size (step S302).
[0045]
A method of setting the time of the timer according to the transfer mode will be described later.
[0046]
When data transfer is started from the host PC 101 and the first packet is received (step S303), the data is subjected to the interpretation of the USB protocol by the serial interface engine in the USB controller 201, and the data size of the packet received in step S303 is obtained. Is determined to be the Max packet size (step S304), and the data is stored in the endpoint buffer 201a.
[0047]
If it is determined that the data size of the received packet is not the Max packet size, a short packet reception interrupt occurs (step S313). When the short packet reception interrupt is detected, a DMA transfer end request is issued (step S314), and the DMA is stopped.
[0048]
When the DMA is stopped, a DMA transfer end interrupt is generated from the DMA controller 202 (step S305). When the DMA transfer end interrupt is detected, it is determined whether the received data is IEEE1284.4 data (step S306). If it is determined that the data is IEEE1284.4, the processing in IEEE1284.4 is performed (step S315), and thereafter, the process returns to step S301.
[0049]
Here, description of the processing contents in IEEE1284.4 will be omitted.
[0050]
On the other hand, if it is determined in step S304 that the data size of the received packet is the Max packet size, a DMA transfer end interrupt occurs (step S305), and it is determined whether the data is IEEE1284.4 data. (Step S306). Then, as in the case of the short packet described above, if the data is IEEE1284.4, the processing in IEEE1284.4 is performed (step S315), and thereafter, the process returns to the step S302.
[0051]
If it is determined in step S306 that the received data is not IEEE1284.4, it is determined whether the first packet is a short packet (step S307). If it is determined that the first packet is a short packet, the data transfer has been completed, and the process returns to step S301.
[0052]
On the other hand, if it is determined in step S307 that the first packet is not a short packet, the DMA size is set again (step S308).
[0053]
Next, it is determined whether or not the packet has been received within the set time (step S309). If it is determined that the next packet is not received within the set time, a DMA transfer end request is issued (step S317), a DMA transfer end interrupt occurs, and the DMA transfer ends (step S312). The process returns to step S301.
[0054]
On the other hand, if it is determined in step S309 that the next packet has been received within the set time, it is determined whether the size of the received packet is the Max packet size. If the size of the received packet is a short packet, a short packet interrupt is generated (step S316), a DMA transfer end request is issued (step S317), and a DMA transfer end interrupt is generated (step S312). After the transfer is completed, the process returns to step S302.
[0055]
On the other hand, if it is determined in step S310 that the size of the packet received within the set time is the Max packet size, it is determined whether the transfer of the DMA data has been completed (step S311). If it is determined that the transfer of the DMA data is not completed, the process returns to the step S309.
[0056]
On the other hand, if data of the set DMA size is received as compared with the preset DMA size, the DMA transfer is completed, and the determination result in the first embodiment described above in step S311 is: Since the result is affirmative (YES) and a DMA transfer end interrupt occurs (step S312), the process returns to step S302.
[0057]
If the data of the set DMA size has not been received, it is not known whether or not the next data packet is transmitted from the host PC 101. When the next packet arrives, DMA transfer is performed, and if no data is received even after the set time has elapsed, the DMA transfer is terminated.
[0058]
The determination as to whether or not a packet has been received may be made using an interrupt generated when the endpoint buffer 201a becomes full. Alternatively, the amount of data transferred may be counted, and whether or not a packet has been received may be determined based on whether or not the data transfer amount has changed.
[0059]
By performing data transfer by repeating the above operations, efficient data transfer can be realized.
[0060]
Next, a method of detecting the data transfer mode and a method of setting the set time of the timer will be described.
[0061]
Switching of the set time of the timer may be performed at the time of bus enumeration (data transfer speed detection) at the time of USB connection.
[0062]
The method will be described below.
[0063]
First, the printer controller 104 is initialized by turning on the power of the printer. At this time, the USB controller is initialized. At this point, the time for full speed is set in the timer setting.
[0064]
Thereafter, when the printer 102 and the host PC 101 are connected by USB, USB bus enumeration is performed. When the printer 102 and the host PC 101 are not connected, USB bus enumeration is performed at the time when the connection is made.
[0065]
The USB device can transition to the device state shown in FIG. 4 and enter the idle state.
[0066]
Hereinafter, a specific operation at the time of USB bus enumeration will be described.
[0067]
FIG. 4 is a device state diagram for describing the operation at the time of enumeration.
(1) When a USB device is connected to a hub (Hub), the hub notifies the host PC 101 of a status change. At this time, the USB device is in the attached (connection) state (401 in FIG. 4), and the port to which the USB device is connected is disabled.
(2) The host PC 101 inquires of the hub why the status has changed.
(3) The host PC 101 knows that a new device has been connected, and also knows which port it has been connected to. The host PC 101 issues a port enable / reset command to a port to which a new device is connected. The power state (402 in FIG. 4) is entered.
(4) The hub holds a reset signal to the port to which the new device is connected for 10 ms. When the reset signal is released, the port is enabled, and the hub supplies 100 mA of bus current to the USB device. The USB device is now in the Default (default) state (403 in FIG. 4). The USB device will be able to respond to the default address.
(5) Until the USB device receives a unique address, the default pipe can be accessed through the default address. The host PC 101 reads the device descriptor and determines the maximum data payload size that can be used by the default pipe.
(6) The host PC 101 assigns a unique address to the USB device, and moves the device to the Address (address assignment) state (404 in FIG. 4).
(7) The host PC 101 reads the respective configurations 0 to n in order to read the configuration information from the USB device. Several frames may be required to complete this process.
(8) Based on the configuration information and the method of using the UAB device, the host PC 101 allocates a configuration value to the device. The device is now configured
(Configuration) State (405 in FIG. 4), and all the endpoints in this configuration have the described characteristics. A USB device can obtain the amount of Vbus power described in its configuration descriptor. From a device perspective, the device is in a usable (idle) state.
[0068]
The USB device makes a state transition as described above before connecting to the bus and becoming usable. USB full-speed (FS) and high-speed (HS) arbitration is also performed during the state transition. Specifically, this is performed when the reset signal of (4) is held for 10 ms. When the HS-compatible device detects the reset signal while the hub holds the reset signal, the HS-compatible device first pulls up the D + line similarly to the FS-compatible device. After that, the HS-compatible device drives the D + and D- lines to the K state to notify the hub that the device is an HS-compatible device (referred to as a device Chirp).
[0069]
When the hub detects the device Chirp, it notifies the device that the device is an HS-compatible hub by alternately driving the D + and D- lines between the K state and the J state (referred to as a hub Chirp).
[0070]
When the device Chirp and the hub Chirp can confirm that they are HS-compatible devices, the high-speed mode is set.
[0071]
The high-speed and full-speed arbitration methods are based on the above-described means. Therefore, the USB device recognizes which one of the high-speed mode and the full-speed mode is used for the data transfer means. At the time of the arbitration, the USB device sets in the register whether to use the high-speed mode or the full-speed mode in the register, so that the printer controller 104 can use either of the transfer modes. It can be recognized whether or not. If either one of the transfer modes does not support HS, the full speed mode is set.
[0072]
By the above arbitration, in the default state where communication in the high-speed mode is determined, the register indicating the transfer mode is referred to, and when the transfer mode in the high-speed mode is adopted, the timer setting time is set. Switch to high speed time setting.
[0073]
According to the method described above, switching of the timer setting time at the time of enumeration can be realized.
[0074]
Note that the present invention is not limited to the above-described embodiment, and various applications are possible.
[0075]
In the above-described embodiment, an inkjet printer has been described as an example. However, the present invention is applicable to various peripheral devices such as a case where a USB is used for data transfer of a laser beam printer (LBP) or a storage device. It is possible.
[0076]
In addition, the present invention may be applied not only to peripheral devices but also to a host device.
[0077]
Further, in the above-described embodiment, the timer setting until the next packet reception is performed by software, but may be performed by hardware.
[0078]
(Other embodiments)
The present invention can be applied to a system including a plurality of devices (eg, a host computer, an interface device, a reader, a printer, etc.), but can also be applied to a device including a single device (eg, a copier, a facsimile machine, etc.). May be.
[0079]
Further, an object of the present invention is to supply a storage medium in which a program code of software for realizing the functions of the above-described embodiments is recorded to a system or an apparatus, and a computer (or CPU, MPU or the like) of the system or apparatus stores the storage medium. Needless to say, this can also be achieved by reading and executing the program code stored in the medium.
[0080]
In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiment, and the storage medium storing the program code constitutes the present invention.
[0081]
A storage medium storing software program codes for realizing the functions of the above-described embodiments is supplied to a system or an apparatus, and a computer (or CPU, MPU, or the like) of the system or apparatus executes the program code stored in the storage medium. It goes without saying that the present invention is also achieved by reading and executing.
[0082]
In this case, the program code itself read from the storage medium implements the functions of the above-described embodiment, and the storage medium storing the program code constitutes the present invention.
[0083]
Examples of storage media for supplying the program code include RAM, NV-RAM, floppy (registered trademark) disk, hard disk, optical disk, magneto-optical disk, MO, CD-ROM, CD-R, and CD-RW. , A DVD (DVD-ROM, DVD-R, DVD-RW, etc.), a magnetic tape, a non-volatile memory card, another ROM, etc., as long as the program code can be stored, or a download via a network. Can be used.
[0084]
When the computer executes the readout program code, not only the functions of the above-described embodiments are realized, but also an OS (Operating System) or the like running on the computer based on the instruction of the program code. It goes without saying that a part or all of the actual processing is performed and the functions of the above-described embodiments are realized by the processing.
[0085]
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, the function expansion is performed based on the instruction of the program code. It goes without saying that a CPU or the like provided in the board or the function expansion unit performs a part or all of the actual processing, and the processing realizes the functions of the above-described embodiments.
[0086]
【The invention's effect】
As described above, according to the present invention, the timer setting time can be set in accordance with the transfer mode, and in a high-speed compatible device, both in the full-speed transfer mode and the high-speed transfer mode, reliable and high-speed Data transfer can be realized. Further, by using the data transfer method for a printing apparatus, a high-speed printing apparatus can be obtained.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a configuration of a print system that performs data transfer by a data transfer device according to an embodiment of the present invention.
FIG. 2 is a block diagram illustrating a configuration of a printer controller in a print system that performs data transfer by the data transfer device according to one embodiment of the present invention.
FIG. 3 is a flowchart illustrating an operation flow when print data is received using USB in a print system that performs data transfer by the data transfer device according to the embodiment of the present invention.
FIG. 4 is a device state diagram for explaining an operation at the time of enumeration in the data transfer device according to one embodiment of the present invention.
[Explanation of symbols]
101 Host PC
102 Printer
103 External bus
104 Printer controller
105 Printer Engine
201 USB controller
202 DMA controller
203 RAM
204 ROM
205 EEPROM
206 Memory controller
207 Operation panel
208 Operation panel I / F
209 CPU
210 Image Processing ASIC
211 SDRAM

Claims (30)

複数のデータ転送モードを有すると共にホスト側装置がサポートするデータ転送モードにより実際のデータ通信モードを互いに決定する機能を有し且つ前記ホスト側装置と周辺機器との間のデータ転送を行うデータ転送方法であって、
前記データ転送モードを検出するデータ転送モード検出ステップと、
データ受信後タイマに設定された時間が経過しても次のデータ受信が無い場合にデータ転送終了とするデータ転送終了検知ステップと、
前記転送モード検出ステップにより検出されたデータ転送モードに応じて前記タイマの設定時間を変更するように制御する制御ステップとを有することを特徴とするデータ転送方法。
A data transfer method having a plurality of data transfer modes, having a function of mutually determining an actual data communication mode according to a data transfer mode supported by a host device, and performing data transfer between the host device and a peripheral device And
A data transfer mode detecting step of detecting the data transfer mode,
A data transfer end detection step of terminating data transfer when there is no next data reception even after the time set in the timer has elapsed after data reception;
Controlling the timer to change the set time of the timer according to the data transfer mode detected by the transfer mode detecting step.
前記データ転送モードとは、データ転送を行う通信速度であることを特徴とする請求項1に記載のデータ転送方法。The data transfer method according to claim 1, wherein the data transfer mode is a communication speed at which data is transferred. 前記ホスト側装置とは、コンピュータであることを特徴とする請求項1に記載のデータ転送方法。2. The data transfer method according to claim 1, wherein the host device is a computer. 前記周辺機器とは、プリンタであることを特徴とする請求項1に記載のデータ転送方法。The method according to claim 1, wherein the peripheral device is a printer. 前記データ転送終了検知ステップを前記デバイス側装置のファームウェアに設けたことを特徴とする請求項1に記載のデータ転送方法。2. The data transfer method according to claim 1, wherein the data transfer end detecting step is provided in firmware of the device side device. 前記データ転送終了検知ステップを前記デバイス側装置のハードウェアに設けたことを特徴とする請求項1に記載のデータ転送方法。2. The data transfer method according to claim 1, wherein the data transfer end detecting step is provided in hardware of the device-side device. データ転送の有無を判断する判断ステップを有することを特徴とする請求項1に記載のデータ転送方法。2. The data transfer method according to claim 1, further comprising a determining step of determining whether data transfer is performed. 前記判断ステップは、転送されたデータ量をカウントする能を備え、この機能にてカウントされたデータ転送量の変化によりデータ転送の有無を判断することを特徴とする請求項7に記載のデータ転送方法。8. The data transfer according to claim 7, wherein the determining step includes an ability to count the amount of transferred data, and determines whether or not data transfer is performed based on a change in the amount of data transferred counted by this function. Method. データ転送に用いられるシリアルバスは、USB Rev2.0に準拠しており且つハイスピードモードに対応していることを特徴とする請求項1乃至8のいずれかに記載のデータ転送方法。9. The data transfer method according to claim 1, wherein a serial bus used for data transfer conforms to USB@Rev2.0 and supports a high-speed mode. 複数のデータ転送モードを有すると共にホスト側装置がサポートするデータ転送モードにより実際のデータ通信モードを互いに決定する機能を有し且つ前記ホスト側装置と周辺機器との間のデータ転送を行うデータ転送装置であって、
前記データ転送モードを検出するデータ転送モード検出手段と、
データ受信後タイマに設定された時間が経過しても次のデータ受信が無い場合にデータ転送終了とするデータ転送終了検知手段と、
前記転送モード検出手段により検出されたデータ転送モードに応じて前記タイマの設定時間を変更するように制御する制御手段とを有することを特徴とするデータ転送装置。
A data transfer device having a plurality of data transfer modes and having a function of mutually determining an actual data communication mode according to a data transfer mode supported by a host device, and performing data transfer between the host device and a peripheral device And
Data transfer mode detecting means for detecting the data transfer mode,
Data transfer end detection means for terminating data transfer when there is no next data reception even after the time set in the timer has elapsed after data reception;
Control means for controlling so as to change the set time of the timer in accordance with the data transfer mode detected by the transfer mode detecting means.
前記データ転送モードとは、データ転送を行う通信速度であることを特徴とする請求項10に記載のデータ転送装置。The data transfer device according to claim 10, wherein the data transfer mode is a communication speed at which data is transferred. 前記ホスト側装置とは、コンピュータであることを特徴とする請求項10に記載のデータ転送装置。The data transfer device according to claim 10, wherein the host-side device is a computer. 前記周辺機器とは、プリンタであることを特徴とする請求項10に記載のデータ転送装置。The data transfer device according to claim 10, wherein the peripheral device is a printer. 前記データ転送終了検知手段を前記デバイス側装置のファームウェアに設けたことを特徴とする請求項10に記載のデータ転送装置。11. The data transfer apparatus according to claim 10, wherein the data transfer end detection unit is provided in firmware of the device. 前記データ転送終了検知手段を前記デバイス側装置のハードウェアに設けたことを特徴とする請求項10に記載のデータ転送装置。11. The data transfer apparatus according to claim 10, wherein the data transfer end detection means is provided in hardware of the device. データ転送の有無を判断する判断手段を有することを特徴とする請求項10に記載のデータ転送装置。The data transfer device according to claim 10, further comprising a determination unit configured to determine whether data transfer is performed. 前記判断手段は、転送されたデータ量をカウントする能を備え、この機能にてカウントされたデータ転送量の変化によりデータ転送の有無を判断することを特徴とする請求項16に記載のデータ転送装置。17. The data transfer method according to claim 16, wherein said determination means has an ability to count the amount of transferred data, and determines the presence or absence of data transfer based on a change in the data transfer amount counted by this function. apparatus. データ転送に用いられるシリアルバスは、USB Rev2.0に準拠しており且つハイスピードモードに対応していることを特徴とする請求項10乃至17のいずれかに記載のデータ転送装置。18. The data transfer device according to claim 10, wherein a serial bus used for data transfer conforms to USB @ Rev 2.0 and supports a high-speed mode. 請求項1乃至9のいずれかに記載のデータ転送方法によりデータを転送することを特徴とする印刷方法。A printing method for transferring data by the data transfer method according to claim 1. 請求項10乃至19のいずれかに記載のデータ転送装置によりデータを転送することを特徴とする印刷装置。A printing apparatus for transferring data by the data transfer apparatus according to claim 10. 複数のデータ転送モードを有すると共にホスト側装置がサポートするデータ転送モードにより実際のデータ通信モードを互いに決定する機能を有し且つ前記ホスト側装置と周辺機器との間のデータ転送を行うデータ転送装置を制御するためのコンピュータ読み取り可能な制御プログラムであって、
前記データ転送モードを検出するデータ転送モード検出ステップと、データ受信後タイマに設定された時間が経過しても次のデータ受信が無い場合にデータ転送終了とするデータ転送終了検知ステップと、前記転送モード検出ステップにより検出されたデータ転送モードに応じて前記タイマの設定時間を変更するように制御する制御ステップとをコンピュータに実行させるためのプログラムコードから成ることを特徴とするデータ転送装置の制御プログラム。
A data transfer device having a plurality of data transfer modes and having a function of mutually determining an actual data communication mode according to a data transfer mode supported by a host device, and performing data transfer between the host device and a peripheral device A computer-readable control program for controlling the
A data transfer mode detecting step of detecting the data transfer mode, a data transfer end detecting step of terminating the data transfer when there is no next data reception even after the time set in the timer has elapsed after the data reception; And a control step of controlling the timer to change the set time of the timer in accordance with the data transfer mode detected by the mode detecting step. .
前記データ転送モードとは、データ転送を行う通信速度であることを特徴とする請求項21に記載のデータ転送装置の制御プログラム。22. The control program according to claim 21, wherein the data transfer mode is a communication speed at which data is transferred. 前記ホスト側装置とは、コンピュータであることを特徴とする請求項21に記載のデータ転送装置の制御プログラム。22. The control program according to claim 21, wherein the host-side device is a computer. 前記周辺機器とは、プリンタであることを特徴とする請求項21に記載のデータ転送装置の制御プログラム。22. The control program according to claim 21, wherein the peripheral device is a printer. 前記データ転送終了検知ステップを前記デバイス側装置のファームウェアに設けたことを特徴とする請求項21に記載のデータ転送装置の制御プログラム。22. The control program according to claim 21, wherein the data transfer end detecting step is provided in firmware of the device. 前記データ転送終了検知ステップを前記デバイス側装置のハードウェアに設けたことを特徴とする請求項21に記載のデータ転送装置の制御プログラム。22. The control program according to claim 21, wherein the data transfer end detecting step is provided in hardware of the device-side device. データ転送の有無を判断する判断ステップをコンピュータに実行させるためのプログラムコードから成ることを特徴とする請求項21に記載のデータ転送装置の制御プログラム。22. The control program for a data transfer device according to claim 21, comprising a program code for causing a computer to execute a determination step of determining whether data transfer is performed. 前記判断ステップは、転送されたデータ量をカウントする能を備え、この機能にてカウントされたデータ転送量の変化によりデータ転送の有無を判断することを特徴とする請求項27に記載のデータ転送装置の制御プログラム。28. The data transfer according to claim 27, wherein the determining step includes an ability to count the amount of transferred data, and determines whether data transfer is performed based on a change in the amount of data transferred counted by this function. Device control program. データ転送に用いられるシリアルバスは、USB Rev2.0に準拠しており且つハイスピードモードに対応していることを特徴とする請求項21乃至28のいずれかに記載のデータ転送装置の制御プログラム。29. The control program according to claim 21, wherein a serial bus used for data transfer conforms to USB@Rev2.0 and supports a high-speed mode. 請求項21乃至29に記載の制御プログラムを格納したことを特徴とする記憶媒体。A storage medium storing the control program according to claim 21.
JP2002280801A 2002-09-26 2002-09-26 Data transfer method and device, printing method, printer, control program for data transfer device, and storage medium Pending JP2004118517A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002280801A JP2004118517A (en) 2002-09-26 2002-09-26 Data transfer method and device, printing method, printer, control program for data transfer device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002280801A JP2004118517A (en) 2002-09-26 2002-09-26 Data transfer method and device, printing method, printer, control program for data transfer device, and storage medium

Publications (1)

Publication Number Publication Date
JP2004118517A true JP2004118517A (en) 2004-04-15

Family

ID=32275410

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002280801A Pending JP2004118517A (en) 2002-09-26 2002-09-26 Data transfer method and device, printing method, printer, control program for data transfer device, and storage medium

Country Status (1)

Country Link
JP (1) JP2004118517A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20160061077A (en) 2014-11-21 2016-05-31 에스케이이노베이션 주식회사 Lithium secondary battery
KR20160073178A (en) 2014-12-16 2016-06-24 에스케이이노베이션 주식회사 Lithium secondary battery

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20160061077A (en) 2014-11-21 2016-05-31 에스케이이노베이션 주식회사 Lithium secondary battery
KR20210118004A (en) 2014-11-21 2021-09-29 에스케이이노베이션 주식회사 Lithium secondary battery
KR20160073178A (en) 2014-12-16 2016-06-24 에스케이이노베이션 주식회사 Lithium secondary battery
KR20210123275A (en) 2014-12-16 2021-10-13 에스케이이노베이션 주식회사 Lithium secondary battery

Similar Documents

Publication Publication Date Title
JP3927647B2 (en) Information processing apparatus, information processing method, and information processing system
US7200685B2 (en) Communication apparatus for communicating data between separate toplogies, and related method, storage medium, and program
US7058748B1 (en) ATA device control via a packet-based interface
JP4026948B2 (en) Network system, device, device control method, and storage medium
US7505461B2 (en) Data transfer control device, electronic instrument, and data transfer control method
JP2002342261A (en) Data transfer controller and electronic equipment
JPH10260798A (en) Device and method for processing information, device and method for controlling output and information processing system
JP2004157966A (en) End point memory control method and device, usb device, and storage medium
JP2003316719A (en) Upstream peripheral equipment performing role of usb host
EP1820110B1 (en) Multimedia card interface method, computer program product and apparatus
JPH10229427A (en) Information processing device and method
JP2001094613A (en) Communication controller, method and recording medium
US20010043361A1 (en) Printer detecting data precisely in response to change in data transmission speed
JP2004118517A (en) Data transfer method and device, printing method, printer, control program for data transfer device, and storage medium
JP4306118B2 (en) Printer and printer control method
JP2003256355A (en) Dma control device, printing unit, and dma control method
JP2001105689A (en) Printing system and printing apparatus and its control method
JP2004133537A (en) Data transfer method, data transfer device, printing method, printer, control program for data transfer device, and storage medium
JP2003248558A (en) Method and device for data transfer
JP2005208811A (en) Data transfer device, data transfer method, and recording system
JP2000280582A (en) Data-processing apparatus and method for processing data and recording medium with data-processing control program recorded
JP2003256152A (en) Dma controller, printer, and dma control method
EP0855641B1 (en) Printer detecting data precisely in response to change in data transmission speed
JPH10228364A (en) Data transfer device, its controlling method and printing system
JP2004110619A (en) Data communication device