JP3072264U - Computer peripherals - Google Patents

Computer peripherals

Info

Publication number
JP3072264U
JP3072264U JP2000002020U JP2000002020U JP3072264U JP 3072264 U JP3072264 U JP 3072264U JP 2000002020 U JP2000002020 U JP 2000002020U JP 2000002020 U JP2000002020 U JP 2000002020U JP 3072264 U JP3072264 U JP 3072264U
Authority
JP
Japan
Prior art keywords
data
reception
stored
reception buffer
buffer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP2000002020U
Other languages
Japanese (ja)
Inventor
貴志 平野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Funai Electric Co Ltd
Original Assignee
Funai Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Funai Electric Co Ltd filed Critical Funai Electric Co Ltd
Priority to JP2000002020U priority Critical patent/JP3072264U/en
Application granted granted Critical
Publication of JP3072264U publication Critical patent/JP3072264U/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Record Information Processing For Printing (AREA)

Abstract

(57)【要約】 【課題】安価な構成により、ホストコンピュータからの
データを確実に受信できるようにする。 【解決手段】パソコンからUSBブロックにデータパケ
ットが送信されてくると、データがUSBブロックの受
信バッファに格納されてMPUの割込処理部に割込信号
が出力され、割込処理部により、受信バッファの格納デ
ータが読み出されてワークRAMに保存されると共に、
受信バッファの各面それぞれの格納状況に対応した異な
るビット内容のイベントコードがコマンド解析部に出力
され、コマンド解析部によりワークRAMの保存データ
中のコマンドが解析され、解析結果に応じた処理が行わ
れる。このとき、割込処理部からのイベントコードがB
面イベントであると、コマンド解析部からUSBブロッ
クに受信許可のためのクリア信号が出力され受信バッフ
ァの両面が受信可能な状態となる。
(57) [Summary] An inexpensive configuration enables data from a host computer to be reliably received. When a data packet is transmitted from a personal computer to a USB block, the data is stored in a reception buffer of the USB block, an interrupt signal is output to an interrupt processing unit of an MPU, and the data is received by the interrupt processing unit. The data stored in the buffer is read and stored in the work RAM,
An event code having different bit contents corresponding to the storage status of each side of the reception buffer is output to the command analysis unit, the command analysis unit analyzes the command in the data stored in the work RAM, and performs a process according to the analysis result. Will be At this time, the event code from the interrupt processing unit is B
If the event is a plane event, a clear signal for permitting reception is output from the command analysis unit to the USB block, and both sides of the reception buffer are ready for reception.

Description

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

【0001】[0001]

【考案の属する技術分野】[Technical field to which the invention belongs]

この考案は、ホストコンピュータと接続されるUSB規格に準拠したインター フェイスを備えたコンピュータの周辺装置に関する。 The present invention relates to a computer peripheral device having an interface conforming to the USB standard connected to a host computer.

【0002】[0002]

【従来の技術】[Prior art]

上位機器であるホストコンピュータとその周辺装置との接続は、通常インター フェイス装置を介して行われ、この種インターフェイス装置の規格としてUSB (Universal Serial Bus)と称される規格がある。 The connection between the host computer, which is a higher-level device, and its peripheral devices is usually performed via an interface device, and there is a standard called USB (Universal Serial Bus) as a standard for this type of interface device.

【0003】 このような周辺装置であるプリンタは、通常、多面(ここでは、2面として説 明する)の受信バッファを有するUSBブロックと、種々の処理を行うマイクロ プロセッサ(以下、MPUと称する)とを備えており、ホストコンピュータから 送信されるUSBブロックのUSBポートを介して、各種のコマンドデータや印 刷データ等のデータパケットが受信されると、その受信データがUSBブロック の受信バッファの各々の面に格納される。A printer as such a peripheral device usually includes a USB block having a multi-sided (here, described as two-sided) receiving buffer, and a microprocessor (hereinafter, referred to as an MPU) for performing various processes. When data packets such as various command data and print data are received via the USB port of the USB block transmitted from the host computer, the received data is transferred to each of the reception buffers of the USB block. Stored in the plane.

【0004】 その際、受信バッファの一方の面に受信データが格納されると、そのデータが MPUにより読み出され、受信バッファの残りの面に受信データが格納されると 、そのデータがMPUにより読み出される。At this time, when the reception data is stored on one side of the reception buffer, the data is read out by the MPU, and when the reception data is stored on the remaining side of the reception buffer, the data is transmitted by the MPU. Is read.

【0005】 ところで、多面の受信バッファをサイクリックに使用してデータ受信を行う場 合に、受信バッファの蓄積データを誤って破壊しないようにするために、例えば 特開昭58−170254号公報に記載のように、受信バッファの各面に対応し 、この受信バッファに有効なデータの有無を表示する記憶部を設け、この記憶部 がセットされているときには、対応する受信バッファの面への新たな書き込みを 禁止することが行われる。In order to prevent data accumulated in the reception buffer from being erroneously destroyed when data is received using a multi-sided reception buffer cyclically, for example, Japanese Patent Application Laid-Open No. 58-170254 discloses As described, a storage unit is provided corresponding to each surface of the reception buffer to indicate the presence or absence of valid data in the reception buffer. When this storage unit is set, a new data is stored in the corresponding reception buffer surface. Prohibit unnecessary writing.

【0006】 こうすると、例えば第1面であるA面の受信バッファに有効な1フレームのデ ータが記憶された状態で、第2面であるB面に新しい受信データが蓄積されてい き、1フレームのデータを受信後再びA面にデータを書き込むときに、A面に対 応する記憶部の表示が“有効なデータ有り”を表示しているときには、A面に有 効なデータが残っているためA面への書き込みが禁止され、A面に対応する記憶 部の表示が“有効なデータ無し”を表示していることを条件に、A面に新たなデ ータが書き込まれる。そのため、A面に有効なデータが残ったまま上書きされて データを破損してしまうことを防止できる。[0006] In this case, for example, new received data is accumulated on the second surface B while valid one frame data is stored in the first surface A reception buffer. When data is written to the A side again after receiving one frame of data, valid data remains on the A side if the display of the storage unit corresponding to the A side indicates "valid data available". Therefore, writing to the A side is prohibited, and new data is written to the A side on the condition that the display of the storage unit corresponding to the A side indicates "no valid data". Therefore, it is possible to prevent the data from being damaged by being overwritten while valid data remains on the side A.

【0007】[0007]

【考案が解決しようとする課題】[Problems to be solved by the invention]

しかし、上記した公報に記載のようにするには、受信バッファの各面に対応す る表示部が、“その面に有効なデータ無い”ことを表示していれば、その面をク リア(消去)するために、受信バッファの各面をクリアするごとにクリア信号を 発生する必要があり、そのための構成として、クリア信号を発生するゲート数が 多くなり、装置全体の構成の複雑化を招くという問題があった。 However, in order to be described in the above-mentioned publication, if the display unit corresponding to each surface of the reception buffer indicates that “there is no valid data on that surface”, the surface is cleared ( For this purpose, it is necessary to generate a clear signal every time each side of the receiving buffer is cleared. For this purpose, the number of gates for generating the clear signal increases, which complicates the configuration of the entire device. There was a problem.

【0008】 ところで、特開平1−248731号公報には、複数の受信データバッファの すべてが受信データを保持している状態にならないように、受信データバッファ に一定数が保持されると、緊急に処理して常にデータ受信可能な状態にすること が記載されているが、多数の受信データバッファを備える必要があるため、コス トの上昇を招き、しかもそれらの受信データバッファをすべて利用できる訳では ないために利用効率が悪い。By the way, Japanese Patent Application Laid-Open No. 1-248731 discloses that if a certain number is held in the reception data buffer so that all of the plurality of reception data buffers do not hold the reception data, it is urgently required. Although it is described that data can always be received by processing, it is necessary to provide a large number of receive data buffers, which increases costs and does not mean that all of these receive data buffers can be used. Poor utilization efficiency

【0009】 また、特開平5−46516号公報には、FIFOに格納する受信バッファに 格納したデータの数に対応して割込レベルを発生し、最もレベルの高い割込みを 受け付けたプロセッサが、該当する受信バッファからデータを取り込むようにし た装置が記載されている。更に、特開平5−224848号公報には、複数のコ ンピュータからの印刷データの送信が同時に発生した場合に、複数のバッファ手 段でその印刷データを並列的に受信するようにした印刷装置が記載されているが 、これら両公報に記載の発明は、いずれもUSBにおける多面の受信バッファの 制御に関するものではない。Japanese Patent Application Laid-Open No. 5-46516 discloses a processor that generates an interrupt level corresponding to the number of data stored in a reception buffer stored in a FIFO and receives an interrupt having the highest level. It describes a device that takes in data from a receiving buffer that performs the processing. Further, Japanese Patent Application Laid-Open No. Hei 5-224848 discloses a printing apparatus in which, when print data is transmitted from a plurality of computers at the same time, the print data is received in parallel by a plurality of buffer means. Although described, neither of the inventions described in these publications relates to control of a multi-sided reception buffer in USB.

【0010】 そこで、本考案は、安価な構成により、ホストコンピュータからのデータを確 実に受信できるようにすることを目的とする。Therefore, an object of the present invention is to make it possible to reliably receive data from a host computer with an inexpensive configuration.

【0011】[0011]

【課題を解決するための手段】[Means for Solving the Problems]

上記した目的を達成するために、本考案は、ホストコンピュータと接続される USB規格に準拠したインターフェイスを備えたコンピュータの周辺装置におい て、前記ホストコンピュータからの受信データを1番目からN番目まで順次に格 納していくN個(Nは2以上の自然数)の受信バッファと、前記各受信バッファ それぞれに前記受信データが格納されるごとに割込信号を発生する割込発生部と 、前記割込発生部によるN番目の前記受信バッファへのデータ格納が終了した後 にすべての前記受信バッファに受信許可するためのクリア信号を発生する制御部 とを備えていることを特徴としている。 In order to achieve the above-mentioned object, the present invention provides a peripheral device of a computer having an interface conforming to the USB standard connected to a host computer, and sequentially receives data from the host computer from the first to the Nth. N (N is a natural number of 2 or more) receiving buffers, an interrupt generating unit that generates an interrupt signal each time the received data is stored in each of the receiving buffers, And a control unit for generating a clear signal for permitting reception in all the reception buffers after the N-th data storage in the reception buffers by the read generation unit is completed.

【0012】 このような構成によれば、N番目の受信バッファへのデータ格納が終了した後 でなければクリア信号が発生されないため、クリア信号の出力数が少なくて済み 、クリア信号発生用の例えばゲート数を削減でき、構成の簡素化を図ることがで きる。更に、N番目の受信バッファへのデータ格納が終了した後でなければ、次 のデータを受信すべく受信許可されることがないため、既に格納されている受信 バッファのデータが上書きによって破壊されることを防止できる。According to such a configuration, the clear signal is not generated until after the data storage in the N-th reception buffer is completed, so that the number of outputs of the clear signal can be reduced, and for example, the clear signal is not generated. The number of gates can be reduced, and the configuration can be simplified. In addition, the reception buffer is not permitted to receive the next data unless the data storage in the N-th reception buffer is completed. Therefore, the already stored reception buffer data is destroyed by overwriting. Can be prevented.

【0013】 また、本考案では、前記制御部は、前記割込信号が入力されるごとに、前記受 信バッファの格納データを読み出して処理する割込処理部と、前記割込処理部に より読み出された前記格納データ中のコマンドを解析して解析終了後に前記クリ ア信号を発生するコマンド解析部とを備えることを特徴としている。[0013] In the present invention, the control unit includes: an interrupt processing unit that reads out and processes data stored in the reception buffer every time the interrupt signal is input; A command analysis unit that analyzes the command in the read stored data and generates the clear signal after the analysis is completed.

【0014】 このような構成によれば、コマンド解析部により、N番目の受信バッファから 読み出したデータ中のコマンドの解析が終了した後に、制御部からクリア信号が 発生される。According to such a configuration, the clear signal is generated from the control unit after the command analysis unit completes the analysis of the command in the data read from the Nth reception buffer.

【0015】 また、本考案では、前記割込処理部は、前記各受信バッファそれぞれからその 格納データを読み出すと共に、前記各受信バッファそれぞれに対応した異なるコ ード内容のイベントコードを発生し、前記コマンド解析部は、N番目の前記受信 バッファの格納データの読み出し後に出力される前記イベントコードのコード内 容を認識して前記クリア信号を発生することを特徴としている。In the present invention, the interrupt processing unit reads the stored data from each of the reception buffers and generates an event code having different code contents corresponding to each of the reception buffers. The command analyzer recognizes the code content of the event code output after reading the N-th storage data in the reception buffer and generates the clear signal.

【0016】 このような構成によれば、N番目の受信バッファへのデータ格納後に割込処理 部から出力されるイベントコードの内容をコマンド解析部が認識することを条件 に、コマンド解析部からクリア信号が発生されるため、N番目の受信バッファへ のデータ格納が終了した後でなければクリア信号が発生されることはなく、クリ ア信号の出力数を低減してクリア信号発生用の例えばゲート数を削減できると共 に、既に受信したデータの破壊を防止することができる。According to such a configuration, the command analysis unit clears the event code output from the interrupt processing unit after storing the data in the N-th reception buffer, on condition that the command analysis unit recognizes the content of the event code. Since the signal is generated, the clear signal is not generated until after the data storage to the Nth reception buffer is completed. The number can be reduced, and the destruction of already received data can be prevented.

【0017】 また、本考案は、前記ホストコンピュータから送信されるデータが、印刷デー タを含み、この印刷データに基づく文字、図形等を印刷するプリンタから成るこ とを特徴としている。このような構成によれば、USB規格に準拠し、ホストコ ンピュータからの送信されるデータを破損することなく確実に受信、処理でき、 信頼性の高いプリンタを提供することが可能になる。Further, the present invention is characterized in that the data transmitted from the host computer includes print data, and comprises a printer for printing characters, graphics, and the like based on the print data. According to such a configuration, it is possible to reliably receive and process data transmitted from the host computer without damaging the USB standard, thereby providing a highly reliable printer.

【0018】[0018]

【考案の実施の形態】[Embodiment of the invention]

この考案を、USB規格に準拠したインターフェイスを備えたコンピュータ周 辺装置であるプリンタに適用した場合における一実施形態について図1ないし図 6を参照して説明する。但し、図1はブロック図、図2は一部のブロック図、図 3は動作説明図、図4は異なる一部のブロック図、図5及び図6は動作説明図で ある。 One embodiment in which the present invention is applied to a printer which is a computer peripheral device having an interface conforming to the USB standard will be described with reference to FIGS. 1 to 6. FIG. 1 is a block diagram, FIG. 2 is a partial block diagram, FIG. 3 is an operation explanatory diagram, FIG. 4 is a different partial block diagram, and FIGS. 5 and 6 are operational explanatory diagrams.

【0019】 図1に示すように、ホストコンピュータとしてのパーソナルコンピュータ(以 下、パソコンと省略する)1に対して、USBブロック2と、制御部であるMP U(マイクロプロセッサ)3とを備えて成るプリンタが、USB規格に準拠した コネクタ及びケーブル(いずれも図示せず)により接続される。As shown in FIG. 1, a personal computer (hereinafter abbreviated as a personal computer) 1 as a host computer includes a USB block 2 and an MPU (microprocessor) 3 as a control unit. The printer is connected by a connector and a cable (both not shown) conforming to the USB standard.

【0020】 USBブロック2はASICにより構成され、図2に示すように、1面当り6 4バイトの第1面であるA面と、第2面であるB面の2面の受信バッファ2a、 2bを備えており、USBポート介してパソコン1から送信されるコマンドデー タや印刷データからなるデータパケットを受信して格納する。更に、USBブロ ック2は、受信バッファ2a、2bのうちA面、B面のどちらに受信データが格 納されているかなどを表わす4バイト(32ビット)のステータスレジスタを備 えており、図3に示すように、第0ビット〜第3ビットまでの4ビットのデータ 内容によって、A面、B面の受信バッファ2a、2bのデータ格納状態等を表わ すようになっている。The USB block 2 is composed of an ASIC, and as shown in FIG. 2, a receiving buffer 2a of 64 bytes per side, that is, a first side A side and a second side B side, and 2b, and receives and stores a data packet including command data and print data transmitted from the personal computer 1 via the USB port. Further, the USB block 2 is provided with a 4-byte (32-bit) status register that indicates which of the reception buffers 2a and 2b, A or B, stores the received data. As shown in FIG. 3, the 4-bit data contents from the 0th bit to the 3rd bit indicate the data storage state and the like of the reception buffers 2a and 2b on the A and B sides.

【0021】 具体的には、第3ビットであるRNXTビットは、次に受信して格納可能な受 信バッファ面を表わし、第2ビットであるRBS0ビットは、第1面であるA面 の受信バッファ2aの格納状態を表わし、このビット内容が“0”であればデー タが格納されていない状態、“1”であればデータが格納されている状態をそれ ぞれ表わす。Specifically, the RNXT bit as the third bit indicates a reception buffer plane that can be received and stored next, and the RBS0 bit as the second bit is the reception plane in the A plane as the first plane. This bit indicates the storage state of the buffer 2a. If this bit content is "0", it indicates a state where no data is stored, and if "1", it indicates a state where data is stored.

【0022】 また、第1ビットであるRBS1ビットは、第2面であるB面の受信バッファ 2bの格納状態を表わし、このビット内容が“0”であればデータが格納されて いない状態、“1”であればデータが格納されている状態をそれぞれ表わす。The RBS1 bit, which is the first bit, indicates the storage state of the reception buffer 2b on the B surface, which is the second surface. If the bit content is “0”, no data is stored; If it is "1", it indicates a state where data is stored.

【0023】 更に、第0ビットであるRCNTビットは、パソコン1からのデータパケット を受信したことをACK(応答)パケットで応答した旨をパソコン1に対して示 すもので、USBブロック2がパソコン1からデータパケットを受信すると、U SBブロック2から割込信号が出力されてMPU3に割り込みがかけられると同 時にこのRCNTビットが“1”にセットされる。このUSBブロック2による 割込信号の発生処理が割込発生部に相当する。Further, the RCNT bit, which is the 0th bit, indicates to the personal computer 1 that the data packet from the personal computer 1 has been received with an ACK (response) packet. When a data packet is received from 1, an interrupt signal is output from the USB block 2 and the MPU 3 is interrupted. At the same time, the RCNT bit is set to "1". The process of generating an interrupt signal by the USB block 2 corresponds to an interrupt generation unit.

【0024】 このとき、MPU3は、USBブロック2からの割込信号に基づく割り込み処 理により、受信バッファ2a、2bの格納データを読み出し、特に最後の面であ るB面の受信バッファ2bの格納データの読み出しが終了したときに、MPU3 からUSBブロック2にクリア信号が出力され、これにより第2ビットであるR BS0ビット、第1ビットであるRBS1ビットが“0”にクリアされ、パソコ ン1からの新たなデータパケットの受信が可能な受信許可状態となる。At this time, the MPU 3 reads out the data stored in the reception buffers 2a and 2b by interrupt processing based on the interrupt signal from the USB block 2, and particularly stores the data in the reception buffer 2b on the B plane which is the last plane. When the data reading is completed, a clear signal is output from the MPU 3 to the USB block 2, whereby the RBS0 bit as the second bit and the RBS1 bit as the first bit are cleared to "0", and the PC 1 It is in a reception permission state in which a new data packet can be received from.

【0025】 次に、MPU3は、図4に示すように、USBブロック2から割込信号が入力 されるごとに受信バッファの各面の格納データを順次に読み出し、例えばMPU 3に内蔵のワークRAM(図示せず)に保存処理する割込処理部3aと、この割 込処理部3aによりワークRAMに格納されたデータ中のコマンドを解析して解 析結果に応じた処理を行うと共に、解析終了後に受信許可するためのクリア信号 を発生するコマンド解析部3bとを備えている。Next, as shown in FIG. 4, each time an interrupt signal is input from the USB block 2, the MPU 3 sequentially reads data stored on each side of the reception buffer, and for example, a work RAM built in the MPU 3. (Not shown), an interrupt processing unit 3a that analyzes commands in the data stored in the work RAM by the interrupt processing unit 3a, performs processing in accordance with the analysis result, and terminates the analysis. A command analyzer 3b for generating a clear signal for permitting reception later.

【0026】 割込処理部3aは、USBブロック2からの割込信号が入力されると、上記し たUSBブロック2のステータスレジスタを読み出し、ステータスレジスタのR BS0ビット及びRBS1ビットの内容に基づき、A面、B面の受信バッファ2 a、2bのどちらの面からデータを読み出すべきかを判断する。When the interrupt signal from the USB block 2 is input, the interrupt processing unit 3a reads the status register of the USB block 2 described above, and based on the contents of the RBS0 bit and the RBS1 bit of the status register, It is determined which of the receiving buffers 2a and 2b of the A and B sides should read data.

【0027】 例えば、図5に示すように、RBS0ビットが“1”、RBS1ビットが“0 ”であれば、A面にのみデータが格納されていることがわかるため、割込処理部 3aによりA面の受信バッファ2aの格納データが読み出される。次に、図5に 示すように、USBブロック2からの割込信号により、割込処理部3aがステー タスレジスタを読み出したときにRBS0ビットが“1”、RBS1ビットが“ 1”となっていれば、B面の受信バッファ2bに新たにデータが格納されたこと がわかるため、割込処理部3aによりB面の受信バッファ2bの格納データが読 み出される。For example, as shown in FIG. 5, if the RBS0 bit is “1” and the RBS1 bit is “0”, it can be understood that data is stored only on the A side, so that the interrupt processing unit 3a The data stored in the reception buffer 2a on the A side is read. Next, as shown in FIG. 5, the RBS0 bit is set to "1" and the RBS1 bit is set to "1" when the interrupt processing unit 3a reads the status register by the interrupt signal from the USB block 2. Then, since it is known that data is newly stored in the reception buffer 2b on the B side, the data stored in the reception buffer 2b on the B side is read out by the interrupt processing unit 3a.

【0028】 このとき、両面の受信ブロック2a、2bが埋まるようなデータがパソコン1 から送信されてきた場合であっても、まずA面のバッファ2aにデータが格納さ れてから、続いてB面の受信バッファ2bにデータが格納されるため、A面のバ ッファ2aにデータが格納された時点で、RBS0ビットが“1”、RBS1ビ ットが“0”となり、その後、B面のバッファ2bにデータが格納された時点で RBS0ビット、RBS1ビットが共に“1”となる。従って、上記したように 、割込処理部3aにより、A面の受信バッファ2aの格納データが読み出された 後、B面の受信バッファ2aの格納データが読み出されることになる。At this time, even if the personal computer 1 transmits data such that the receiving blocks 2a and 2b on both sides are filled, the data is first stored in the buffer 2a on the A side, and then the B Since the data is stored in the buffer 2a on the A side, the RBS0 bit becomes “1” and the RBS1 bit becomes “0” when the data is stored on the buffer 2a on the A side. When the data is stored in the buffer 2b, the RBS0 bit and the RBS1 bit both become "1". Therefore, as described above, after the data stored in the reception buffer 2a on the side A is read by the interrupt processing unit 3a, the data stored in the reception buffer 2a on the side B is read.

【0029】 そして、割込処理部3aは、図5に示すように、A面の受信バッファ2aの格 納データを読み出すと、A面の受信バッファ2aの格納データを読み出したこと を表わすビット内容のイベントコード(図5中のA面イベント)をコマンド解析 部3bに出力すると共に、B面の受信バッファ2bの格納データを読み出すと、 B面の受信バッファ2bの格納データを読み出したことを表わすビット内容のイ ベントコード(図5中のB面イベント)をコマンド解析部3bに出力する。Then, as shown in FIG. 5, when the interrupt processing unit 3a reads the data stored in the reception buffer 2a on the A side, the interrupt processing unit 3a reads the data stored in the reception buffer 2a on the A side. Is output to the command analysis unit 3b and the data stored in the reception buffer 2b on the side B is read out, indicating that the data stored in the reception buffer 2b on the side B has been read out. An event code having bit contents (B-side event in FIG. 5) is output to the command analysis unit 3b.

【0030】 一方、コマンド解析部3bは、上記したように割込処理部3aによりワークR AMに保存されたデータ中のコマンド解析を行うが、割込処理部3aからのイベ ントコード(図5中のA面イベント、B面イベント)を受け取ったときに、その イベントコードのビット内容から、それがB面の受信バッファ2bの格納データ を読み出した旨を表わすもの(図5中のB面イベント)であると認識して始めて 、USBブロック2のステータスレジスタのRBS0ビット、RBS1ビットを “0”にクリアすべくクリア信号を出力する。これにより、USBブロック2の 両受信バッファ2a、2bがパソコン1からのデータを受信可能な状態となる。On the other hand, the command analyzing unit 3b analyzes the command in the data stored in the work RAM by the interrupt processing unit 3a as described above, and the event code (in FIG. 5) from the interrupt processing unit 3a. (A-side event and B-side event), the bit code of the event code indicates that it has read the data stored in the reception buffer 2b of the B-side (B-side event in FIG. 5). Only after recognizing that the RBS0 and RBS1 bits of the status register of the USB block 2 are cleared to "0", a clear signal is output. As a result, both reception buffers 2a and 2b of the USB block 2 can receive data from the personal computer 1.

【0031】 次に、プリンタにおけるデータ受信の一連の動作について説明する。いま、図 6に示すように、パソコン1からUSBブロック2のUSBポートに1番目のデ ータパケット(図6中のデータ1)が送信されてくると、このデータ1がUSB ブロック2のA面の受信バッファ2aに格納されると共に、USBブロック2の ステータスレジスタのRBS0ビットが“1”にセットされ、MPU3の割込処 理部3aに割込信号が出力される。Next, a series of operations of data reception in the printer will be described. Now, as shown in FIG. 6, when the first data packet (data 1 in FIG. 6) is transmitted from the personal computer 1 to the USB port of the USB block 2, the data 1 is transmitted to the A side of the USB block 2. While being stored in the reception buffer 2a, the RBS0 bit of the status register of the USB block 2 is set to "1", and an interrupt signal is output to the interrupt processing unit 3a of the MPU 3.

【0032】 そして、MPU3の割込処理部3aにUSBブロック2からの割込信号が入力 されると、図6に示すように、割込処理部3aにより、A面の受信バッファ2a の格納データが読み出されてワークRAMに保存されると共に、A面の受信バッ ファ2aの格納データを読み出したことを表わすビット内容のイベントコード( 図5中のA面イベント)がコマンド解析部3bに出力される。When an interrupt signal from the USB block 2 is input to the interrupt processing unit 3 a of the MPU 3, as shown in FIG. 6, the data stored in the reception buffer 2 a on the A side is output by the interrupt processing unit 3 a. Is read and stored in the work RAM, and an event code (A-side event in FIG. 5) having a bit content indicating that the data stored in the reception buffer 2a on the A-side has been read out is output to the command analyzer 3b. Is done.

【0033】 このA面イベントに基づき、図6に示すように、コマンド解析部3bにより、 ワークRAMに保存されているA面の受信バッファ2aからのデータ中のコマン ドが解析され、解析結果に応じた処理が行われる。このとき、割込処理部3aか ら受け取ったイベントコードはA面イベントであるため、コマンド解析部3bか らUSBブロック2に受信許可のためのクリア信号が出力されることはない。Based on the A-side event, as shown in FIG. 6, a command in the data from the A-side receiving buffer 2a stored in the work RAM is analyzed by the command analysis unit 3b, and the analysis result is obtained. The corresponding processing is performed. At this time, since the event code received from the interrupt processing unit 3a is an A-side event, a clear signal for permitting reception is not output from the command analysis unit 3b to the USB block 2.

【0034】 続いて、パソコン1からUSBブロック2のUSBポートに2番目のデータパ ケット(図6中のデータ2)が送信されてくると、USBブロック2のA面の受 信バッファ2aにはデータが格納されたままであるため、このデータ2は、まだ データの格納されていないB面の受信バッファ2bに格納されると共に、USB ブロック2のステータスレジスタのRBS1ビットが“1”にセットされ、MP U3の割込処理部3aに割込信号が出力される。Subsequently, when the second data packet (data 2 in FIG. 6) is transmitted from the personal computer 1 to the USB port of the USB block 2, the data is stored in the reception buffer 2 a on the side A of the USB block 2. Is stored, the data 2 is stored in the reception buffer 2b on the B side in which no data is stored yet, the RBS1 bit of the status register of the USB block 2 is set to "1", and the MP2 An interrupt signal is output to the interrupt processing unit 3a of U3.

【0035】 MPU3の割込処理部3aにUSBブロック2からの割込信号が入力されると 、図6に示すように、割込処理部3aにより、B面の受信バッファ2bの格納デ ータが読み出されてワークRAMに保存されると共に、B面の受信バッファ2b の格納データを読み出したことを表わすビット内容のイベントコード(図5中の B面イベント)がコマンド解析部3bに出力される。When an interrupt signal from the USB block 2 is input to the interrupt processing unit 3 a of the MPU 3, as shown in FIG. 6, the data stored in the reception buffer 2 b on the B side is transmitted by the interrupt processing unit 3 a. Is read and stored in the work RAM, and an event code (B-side event in FIG. 5) having a bit content indicating that the data stored in the reception buffer 2b on the B-side has been read out is output to the command analysis unit 3b. You.

【0036】 このB面イベントに基づき、図6に示すように、コマンド解析部3bにより、 ワークRAMに保存されているB面の受信バッファ2bからのデータ中のコマン ドが解析され、解析結果に応じた処理が行われる一方、コマンド解析部3bによ り、割込処理部3aから受け取ったイベントコードがB面イベントであると認識 され、コマンド解析部3bからUSBブロック2に受信許可のためのクリア信号 が出力され、USBブロック2のステータスレジスタのRBS0ビット、RBS 1ビットが共に“0”にクリアされて、両受信バッファ2a、2bがパソコン1 からのデータを受信可能な受信許可状態となる。Based on the B-side event, as shown in FIG. 6, a command in the data from the reception buffer 2b on the B-side stored in the work RAM is analyzed by the command analysis unit 3b. While the corresponding process is performed, the event code received from the interrupt processing unit 3a is recognized as a B-side event by the command analysis unit 3b. A clear signal is output, the RBS0 bit and the RBS1 bit of the status register of the USB block 2 are both cleared to "0", and the reception buffers 2a and 2b enter a reception permitting state in which data from the personal computer 1 can be received. .

【0037】 従って、上記した実施形態によれば、B面の受信バッファ2bへのデータ格納 が終了した後でなければコマンド解析部3bからクリア信号が発生されないため 、コマンド解析部3bにおけるクリア信号の出力数は少なくて済み、その結果ク リア信号を発生するためのゲート数を削減することができ、構成の簡素化を図る ことが可能になる。Therefore, according to the above-described embodiment, since the clear signal is not generated from the command analyzing unit 3b until the data storage in the receiving buffer 2b on the side B is completed, the clear signal of the command analyzing unit 3b is not generated. The number of outputs is small, and as a result, the number of gates for generating a clear signal can be reduced, and the configuration can be simplified.

【0038】 また、B面の受信バッファ2bへのデータ格納が終了した後でなければ、次の データを受信すべく受信許可されることがないため、例えば既に格納されている A面の受信バッファ2aのデータが上書きによって破壊されることを未然に防止 できる。Also, unless the data is stored in the reception buffer 2b on the side B, reception is not permitted to receive the next data. For example, the reception buffer on the side A already stored The data of 2a can be prevented from being destroyed by overwriting.

【0039】 なお、上記した実施形態では、USBブロック2の受信バッファを2面として 説明しているが、受信バッファは、特に2面に限定されるものではなく、3面以 上であっても構わない。In the above-described embodiment, the reception buffer of the USB block 2 is described as having two faces. However, the reception buffer is not particularly limited to two faces, and may be provided with three or more faces. I do not care.

【0040】 また、上記した実施形態では、コンピュータ周辺装置をプリンタとした場合に ついて説明したが、周辺装置は特にプリンタに限定されるものではなく、スキャ ナやその他のコンピュータ周辺装置であってもよいのは勿論である。In the above-described embodiment, a case has been described where the computer peripheral device is a printer. However, the peripheral device is not particularly limited to a printer, and may be a scanner or other computer peripheral devices. Of course it is good.

【0041】 更に、ホストコンピュータも、上記したようなパソコン1に限定されるもので はない。Further, the host computer is not limited to the personal computer 1 as described above.

【0042】 また、本考案は上記した実施形態に限定されるものではなく、その趣旨を逸脱 しない限りにおいて上述したもの以外に種々の変更を行うことが可能である。The present invention is not limited to the above-described embodiment, and various changes other than those described above can be made without departing from the gist of the present invention.

【0043】[0043]

【考案の効果】[Effect of the invention]

以上のように、請求項1に記載の考案によれば、N番目の受信バッファへのデ ータ格納が終了した後でなければクリア信号が発生されないため、クリア信号の 出力数を低減してクリア信号発生用のゲート数を削減することができ、装置全体 の構成の簡素化を図ることが可能になる。 As described above, according to the first aspect of the present invention, the clear signal is not generated until after the data storage in the N-th receiving buffer is completed. The number of gates for generating a clear signal can be reduced, and the configuration of the entire device can be simplified.

【0044】 更に、N番目の受信バッファへのデータ格納が終了した後でなければ、次のデ ータを受信すべく受信許可されることがないため、既に格納されている受信バッ ファのデータが上書きされることによって破壊されてしまうことを確実に防止で きる。Further, the reception buffer is not permitted to receive the next data unless the data storage in the N-th reception buffer is completed. Can be reliably prevented from being destroyed by being overwritten.

【0045】 また、請求項2に記載の考案によれば、コマンド解析部により、N番目(最後 )の受信バッファから読み出したデータ中のコマンドの解析が終了した後に、制 御部からクリア信号が発生されるため、クリア信号発生用のゲート数の削減を図 ることができると共に、既に受信したデータの破壊を防止することができる。According to the invention of claim 2, after the command analysis unit completes the analysis of the command in the data read from the N-th (last) reception buffer, a clear signal is sent from the control unit. Since it is generated, the number of gates for generating a clear signal can be reduced, and destruction of already received data can be prevented.

【0046】 また、請求項3に記載の考案によれば、N番目の受信バッファへのデータ格納 後に割込処理部から出力されるイベントコードの内容をコマンド解析部が認識す ることを条件に、コマンド解析部からクリア信号が発生されるため、N番目の受 信バッファへのデータ格納が終了した後でなければクリア信号が発生されること はなく、クリア信号の出力数を低減してクリア信号発生用のゲート数を削減でき ると共に、既に受信したデータの破壊を防止することができる。According to the invention, the command analysis unit recognizes the contents of the event code output from the interrupt processing unit after the data is stored in the N-th reception buffer. Since the clear signal is generated from the command analysis unit, the clear signal is not generated until after the data storage to the Nth reception buffer is completed, and the number of clear signal outputs is reduced to clear. The number of gates for signal generation can be reduced, and destruction of already received data can be prevented.

【0047】 また、請求項4に記載の考案によれば、USB規格に準拠し、ホストコンピュ ータからの送信されるデータを破損することなく確実に受信して処理することが でき、信頼性の高いプリンタを提供することが可能になる。According to the invention of claim 4, data transmitted from the host computer can be reliably received and processed without being damaged in accordance with the USB standard, and reliability can be improved. It is possible to provide a high-quality printer.

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

【図1】この発明の一実施形態のブロック図である。FIG. 1 is a block diagram of one embodiment of the present invention.

【図2】この発明の一実施形態の一部のブロック図であ
る。
FIG. 2 is a partial block diagram of one embodiment of the present invention.

【図3】この発明の一実施形態の動作説明図である。FIG. 3 is an operation explanatory diagram of one embodiment of the present invention.

【図4】この発明の一実施形態の異なる一部のブロック
図である。
FIG. 4 is a block diagram of a part of another embodiment of the present invention.

【図5】この発明の一実施形態の動作説明図である。FIG. 5 is an operation explanatory diagram of one embodiment of the present invention.

【図6】この発明の一実施形態の動作説明図である。FIG. 6 is an operation explanatory diagram of one embodiment of the present invention.

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

1 パソコン(ホストコンピュータ) 2 USBブロック(割込発生部) 2a、2b 受信バッファ 3 MPU 3a 割込処理部 3b コマンド解析部 Reference Signs List 1 personal computer (host computer) 2 USB block (interrupt generating unit) 2a, 2b receiving buffer 3 MPU 3a interrupt processing unit 3b command analyzing unit

Claims (4)

【実用新案登録請求の範囲】[Utility model registration claims] 【請求項1】 ホストコンピュータと接続されるUSB
規格に準拠したインターフェイスを備えたコンピュータ
の周辺装置において、 前記ホストコンピュータからの受信データを1番目から
N番目まで順次に格納していくN個(Nは2以上の自然
数)の受信バッファと、 前記各受信バッファそれぞれに前記受信データが格納さ
れるごとに割込信号を発生する割込発生部と、 前記割込発生部によるN番目の前記受信バッファへのデ
ータ格納が終了した後にすべての前記受信バッファに受
信許可するためのクリア信号を発生する制御部とを備え
ていることを特徴とするコンピュータの周辺装置。
1. USB connected to a host computer
A peripheral device for a computer having an interface conforming to a standard, wherein N (N is a natural number of 2 or more) reception buffers for sequentially storing received data from the host computer from the first to the Nth; An interrupt generation unit for generating an interrupt signal each time the reception data is stored in each of the reception buffers; and all the receptions after the completion of the Nth data storage in the reception buffer by the interrupt generation unit. A control unit for generating a clear signal for permitting reception in a buffer.
【請求項2】 前記制御部は、前記割込信号が入力され
るごとに、前記受信バッファの格納データを読み出して
処理する割込処理部と、前記割込処理部により読み出さ
れた前記格納データ中のコマンドを解析して解析終了後
に前記クリア信号を発生するコマンド解析部とを備える
ことを特徴とする請求項1に記載のコンピュータの周辺
装置。
2. The control unit includes: an interrupt processing unit configured to read and process data stored in the reception buffer every time the interrupt signal is input; 2. The computer peripheral device according to claim 1, further comprising: a command analysis unit that analyzes a command in the data and generates the clear signal after the analysis is completed.
【請求項3】 前記割込処理部は、前記各受信バッファ
それぞれからその格納データを読み出すと共に、前記各
受信バッファそれぞれに対応した異なるコード内容のイ
ベントコードを発生し、前記コマンド解析部は、N番目
の前記受信バッファの格納データの読み出し後に出力さ
れる前記イベントコードのコード内容を認識して前記ク
リア信号を発生することを特徴とする請求項1または2
に記載のコンピュータの周辺装置。
3. The interrupt processing unit reads the stored data from each of the reception buffers, generates an event code having different code contents corresponding to each of the reception buffers, and the command analysis unit 3. The clear signal is generated by recognizing the code content of the event code output after the data stored in the reception buffer is read out.
A computer peripheral device according to claim 1.
【請求項4】 前記ホストコンピュータから送信される
データが、印刷データを含み、この印刷データに基づく
文字、図形等を印刷するプリンタから成ることを特徴と
する請求項1ないし3に記載のコンピュータの周辺装
置。
4. The computer according to claim 1, wherein the data transmitted from the host computer includes print data, and comprises a printer that prints characters, graphics, and the like based on the print data. Peripheral devices.
JP2000002020U 2000-04-04 2000-04-04 Computer peripherals Expired - Lifetime JP3072264U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000002020U JP3072264U (en) 2000-04-04 2000-04-04 Computer peripherals

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000002020U JP3072264U (en) 2000-04-04 2000-04-04 Computer peripherals

Publications (1)

Publication Number Publication Date
JP3072264U true JP3072264U (en) 2000-10-06

Family

ID=43205565

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000002020U Expired - Lifetime JP3072264U (en) 2000-04-04 2000-04-04 Computer peripherals

Country Status (1)

Country Link
JP (1) JP3072264U (en)

Similar Documents

Publication Publication Date Title
JP5451857B2 (en) Active X-based keyboard hacking prevention input window
CN107256134B (en) Method and device for virtualizing POS terminal as computer printer and POS terminal
JP3072264U (en) Computer peripherals
IE45210B1 (en) A method of transmitting data in a communication network
JP2002064714A (en) Image processing unit and method and storage medium
JP2699440B2 (en) Printer device
JPH0542749A (en) Printing suspension processing device
CN1107596A (en) Quick imaging method for Chinese character laser printer
US20040024926A1 (en) Controller of multi function device
JPH1185455A (en) Graphic drawing and processing system
JP2999662B2 (en) Print control device and print control method
JP2005122224A (en) External electronic storage medium having virtual information processing device function and virtual printing device function
JP2768352B2 (en) Graphic drawing processing system
JP3250118B2 (en) Printing device data management method
JP2516810B2 (en) Printer data reception interface
JP4058197B2 (en) Drawing apparatus, drawing method, and storage medium
JP3069867U (en) Electronic equipment
JP2872144B2 (en) Printing equipment
JPH10275069A (en) Image processing device and method
KR100571775B1 (en) Network Printer capable of improving transmission speed of printing data and a method thereof
JP2516810C (en)
JPH05193203A (en) Image rectangular dma system
JP2000293329A (en) Device and method for abbreviating control code
JPH1091461A (en) Multifunction parallel processing electronic device
JPH03237526A (en) Printing device

Legal Events

Date Code Title Description
R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

EXPY Cancellation because of completion of term