JPH09305341A - Adapter, printing system and printing method - Google Patents

Adapter, printing system and printing method

Info

Publication number
JPH09305341A
JPH09305341A JP12158996A JP12158996A JPH09305341A JP H09305341 A JPH09305341 A JP H09305341A JP 12158996 A JP12158996 A JP 12158996A JP 12158996 A JP12158996 A JP 12158996A JP H09305341 A JPH09305341 A JP H09305341A
Authority
JP
Japan
Prior art keywords
task
printer
adapter
initialization command
computer
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.)
Withdrawn
Application number
JP12158996A
Other languages
Japanese (ja)
Inventor
Shuichi Kadowaki
修一 門脇
Isamu Ozawa
勇 小澤
Kuniaki Otsuka
邦明 大塚
Tadashi Yamamoto
忠 山本
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 JP12158996A priority Critical patent/JPH09305341A/en
Publication of JPH09305341A publication Critical patent/JPH09305341A/en
Withdrawn legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To enbale a computer to transmit a signal for initializing a printer from a computer to an adapter even by the use of an IrDA protocol by transmitting an initializing command from the computer to a printer adapter and outputting the initializing signal to the printer by means of the adapter which receives the initializing command. SOLUTION: An application 302 transmits an intialization request by way of a printer driver. A control task 403 receives an initializing instruction from an IrCOMM task 404. The control task 403 outputs the initializing signal from a centronics I/F by a centronics driver 402. At this time, the IrCOMM task 404 transmits the initializing instruction to the control task 403 before receiving a disconnecting instruction from a TP task 405, so that it does not transmit the disconnecting instruction. Thus, the signal for initializing the printer is transmitted from the computer to the adapter in a system connected by radio communication.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、電磁波や光を媒体
とした無線通信によりコンピュータとプリンタを接続し
て印刷を行う印刷システムに、印刷方法、及び、アダプ
タに関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a printing system for printing by connecting a computer and a printer by wireless communication using electromagnetic waves or light as a medium, a printing method, and an adapter.

【0002】[0002]

【従来の技術】近年、コンピュータや周辺機器を接続す
る手段として、光空間通信が注目されてきている。光空
間通信は、接続のためのケーブルを必要としないワイヤ
レス化を比較的安価に実現することができる。
2. Description of the Related Art In recent years, optical space communication has attracted attention as a means for connecting a computer and peripheral devices. The optical space communication can realize a wireless system that does not require a cable for connection at a relatively low cost.

【0003】最近設立されたIrDA(Infrare
d Data Association)は、赤外線光
空間通信の規格化を進めている団体である。IrDAに
より、115.2kbpsの伝送速度をもつ物理レイヤ
の規格およびプロトコル(通信規約)が作成された。物
理レイヤの規格として、“Serial Infrar
ed(SIR)Physical Layer Lin
k Specification”がある。プロトコル
として、“Serial InfraredLink
Access Protocol(IrLAP)”、
“Link Management Protcol
(IrLMP)”、“A Flow−Control
Mechanism for Use with Ir
LMP(Tiny TP)”および“Serial a
nd Pararel PortEmulation
over IR(IrCOMM)”がある。これらの規
格プロトコルにしたがった赤外線光空間通信の方式をI
rDAと呼ぶこともある。最近は、1.2Mbpsおよ
び4Mbpsの伝送速度も規定された。現在の規格で
は、通信距離は1m以内で、照射角±15°である。
Recently established IrDA (Infrare
d Data Association) is an organization that is promoting the standardization of infrared optical space communication. IrDA created a physical layer standard and protocol (communication protocol) having a transmission rate of 115.2 kbps. As a physical layer standard, "Serial Infrar"
ed (SIR) Physical Layer Lin
k Specification. ”As a protocol,“ Serial Infrared Link ”is available.
Access Protocol (IrLAP) ",
"Link Management Protocol
(IrLMP) "," A Flow-Control
Mechanism for Use with Ir
LMP (Tiny TP) "and" Serial a
nd Parallel Port Emulation
over IR (IrCOMM) ”. The infrared optical space communication method according to these standard protocols is
Sometimes called rDA. Recently, transmission rates of 1.2 Mbps and 4 Mbps have also been specified. According to the current standard, the communication distance is within 1 m and the irradiation angle is ± 15 °.

【0004】従来、IrDAのような赤外線光空間通信
でコンピュータとプリンタを接続するとき、赤外線I/
FとセントロニクスI/Fを変換するアダプタをプリン
タに取り付けてきた。
Conventionally, when a computer and a printer are connected by infrared optical space communication such as IrDA, the infrared I /
I have installed an adapter that converts F and Centronics I / F to the printer.

【0005】図19は、IrDAでコンピュータとプリ
ンタを接続する従来例である。
FIG. 19 shows a conventional example in which a computer and a printer are connected by IrDA.

【0006】1901は、PC(パーソナルコンピュー
タ)である。
Reference numeral 1901 is a PC (personal computer).

【0007】1902は、赤外線I/Fおよびセントロ
ニクスI/Fをもつアダプタである。
Reference numeral 1902 is an adapter having an infrared I / F and a Centronics I / F.

【0008】1903はプリンタである。Reference numeral 1903 is a printer.

【0009】アダプタ1902は、IrDAてPC19
01と接続されている。アダプタ1902は、セントロ
ニクスI/Fでプリンタ1903と接続されている。P
C1901からアダプタ1902にIrDAで送られた
印刷データは、セントロニクスI/Fでプリンタ190
3に送られ印刷される。
The adapter 1902 is an IrDA PC 19
01 is connected. The adapter 1902 is connected to the printer 1903 by a Centronics I / F. P
The print data sent from the C1901 to the adapter 1902 by IrDA is sent to the printer 190 by the Centronics I / F.
3 and printed.

【0010】[0010]

【発明が解決しようとする課題】しかしながら、上記従
来例では、IrDAのプロトコルを使用してPC190
1からアダプタ1902にプリンタ1903を初期化す
るための信号を送信することができない欠点があった。
However, in the above conventional example, the PC 190 is used by using the IrDA protocol.
There is a drawback in that a signal for initializing the printer 1903 cannot be transmitted from 1 to the adapter 1902.

【0011】セントロニクスI/Fには、INITとい
う信号線がある。INIT信号は、PC1901とプリ
ンタ1903がセントロニクスI/Fで直結されている
ときに、PC1901がプリンタ1903を初期化する
ために使用される。印刷を途中で中止する場合などに、
PC1901はINIT信号を出力する。初期化された
プリンタ1903は、印刷データのクリアや排紙などを
行い初期状態になる。
The Centronics I / F has a signal line called INIT. The INIT signal is used by the PC 1901 to initialize the printer 1903 when the PC 1901 and the printer 1903 are directly connected by the Centronics I / F. If you want to cancel printing in the middle,
The PC 1901 outputs the INIT signal. The initialized printer 1903 is in an initial state by clearing print data and discharging paper.

【0012】IrDAのIrCOMMプロトコルは、セ
ントロニクスI/Fをエミュレートする機能がある。
The IrCOM IrCOMM protocol has a function of emulating the Centronics I / F.

【0013】しかし、IrCOMMの制御パラメータに
はINIT信号に対応するものがない。したがって、図
19においてPC1901はプリンタ1903を初期化
することができない。
However, there is no IrCOMM control parameter corresponding to the INIT signal. Therefore, in FIG. 19, the PC 1901 cannot initialize the printer 1903.

【0014】[0014]

【課題を解決するための手段】本発明によれば、アダプ
タを経由してコンピュータとプリンタを接続する印刷シ
ステムにおいて、(1)コンピュータとアダプタをIr
DAで接続する手段と、(2)アダプタとプリンタをセ
ントロニクスで接続する手段と、(3)コンピュータか
らプリンタアダプタに初期化コマンドを送信する手段
と、(4)この初期化コマンドを受信したアダプタがプ
リンタにINIT信号を出力する手段を設けることによ
り、IrDAのプロトコルを使用してもコンピュータか
らアダプタにプリンタを初期化するための信号を送信で
きるようにしたものである。
According to the present invention, in a printing system in which a computer and a printer are connected via an adapter, (1) the computer and the adapter are connected by Ir.
DA connecting means, (2) connecting the adapter and printer by Centronics, (3) sending an initialization command from the computer to the printer adapter, and (4) the adapter receiving this initialization command. By providing the printer with means for outputting an INIT signal, a signal for initializing the printer can be transmitted from the computer to the adapter even when the IrDA protocol is used.

【0015】[0015]

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

(第1の発明の実施の形態)本発明の実施の形態の一例
を図にしたがって説明する。
(First Embodiment of the Invention) An example of an embodiment of the present invention will be described with reference to the drawings.

【0016】本発明は、PC、アダプタおよびプリンタ
からなる。PCとアダプタは、IrDAで通信する。ア
ダプタは、プリンタとセントロニクスのケーブルで接続
されている。
The present invention comprises a PC, an adapter and a printer. The PC and the adapter communicate by IrDA. The adapter is connected to the printer with a Centronics cable.

【0017】図1は、本発明におけるPCのブロック図
である。
FIG. 1 is a block diagram of a PC according to the present invention.

【0018】101は、PC全体、102は、PC全体
101を制御するCPU、103は、CPU102で実
行されるプログラムを格納するROM、104は、CP
U102で使用されるデータを格納するRAM、105
は、CPU102で使用されるファイルを格納する磁気
ディスクなどからなる外部記憶装置、106は、PCの
操作を行うためのキーボードやマウスなどからなる操作
部、107は、CRTやLCDなどからなる表示部、1
08は、CPU102に対してシリアル・データ・チャ
ネルを提供するUART(Universal Asy
nchronous Receiver/Transm
itter)、109は、UART108から赤外線送
信部111への信号を変換する変調部、110は、赤外
線受信部112からUART108への信号を変換する
復調部、111は、赤外線を送信するLEDとそのドラ
イバなどからなる赤外線送信部、112は、赤外線を受
信するphoto detectorとそのドライバな
どからなる赤外線受信部、113は、構成ブロック10
2から108を接続するバスである。
Reference numeral 101 is the entire PC, 102 is a CPU for controlling the entire PC 101, 103 is a ROM for storing the programs executed by the CPU 102, and 104 is a CP.
RAM for storing data used by U102, 105
Is an external storage device such as a magnetic disk that stores files used by the CPU 102, 106 is an operation unit including a keyboard and mouse for operating a PC, and 107 is a display unit such as a CRT or LCD. 1
08 is a UART (Universal Asy) that provides a serial data channel to the CPU 102.
nchronous Receiver / Transm
)), 109 is a modulator that converts a signal from the UART 108 to the infrared transmitter 111, 110 is a demodulator that converts a signal from the infrared receiver 112 to the UART 108, and 111 is an LED that transmits infrared light and its driver. An infrared transmission section 112 including an infrared reception section including a photo detector for receiving infrared rays and a driver thereof, and a reference numeral 113 indicating a configuration block 10.
A bus connecting 2 to 108.

【0019】図1において、PC101は赤外線送信部
111および赤外線受信部112により図2に示すアダ
プタと通信する。
In FIG. 1, the PC 101 communicates with the adapter shown in FIG. 2 by an infrared transmitter 111 and an infrared receiver 112.

【0020】図2は、本発明におけるアダプタのブロッ
ク図である。
FIG. 2 is a block diagram of the adapter according to the present invention.

【0021】201は、アダプタ全体、202は、アダ
プタ全体201を制御するCPU、203は、CPU2
02で実行されるプログラムを格納するROM、204
は、CPU202で使用されるデータを格納するRA
M、205は、セントロニクスケーブルに接続されるセ
ントロニクスI/F、206は、アダプタの操作を行う
ためのボタンやスイッチなどからなる操作部、207
は、LEDやLCDなどからなる表示部、208は、C
PU202に対してシリアル・データ・チャネルを提供
するUART(Universal Asynchro
nous Receiver/Transmitte
r)、209は、UART208から赤外線送信部21
1への信号を変換する変調部、210は、赤外線受信部
212からUART208への信号を変換する復調部、
211は、赤外線を送信するLEDとそのドライバなど
からなる赤外線送信部、212は、赤外線を受信するp
hotodetectorとそのドライバなどからなる
赤外線受信部、213は、構成ブロック202から20
8を接続するバスである。
Reference numeral 201 is the entire adapter, 202 is a CPU that controls the entire adapter 201, and 203 is the CPU 2.
ROM for storing the program executed in 02, 204
Is an RA that stores data used by the CPU 202.
M, 205 are Centronics I / Fs connected to the Centronics cable, 206 is an operation unit including buttons and switches for operating the adapter, 207
Is a display unit including an LED or LCD, and 208 is C
UART (Universal Asynchro) that provides a serial data channel to the PU 202
nous Receiver / Transmitte
r) and 209 are infrared transmission units 21 from the UART 208.
1, a modulator 210 for converting the signal to 1 and a demodulator 210 for converting the signal from the infrared receiver 212 to the UART 208,
Reference numeral 211 denotes an infrared transmission unit including an LED for transmitting infrared rays and a driver for the LED, and 212 denotes p for receiving infrared rays.
An infrared receiver 213 including a photodetector and its driver is provided in the building blocks 202 to 20.
It is a bus that connects eight.

【0022】図2において、アダプタ201は赤外線送
信部211により図1に示すPCと通信する。また、セ
ントロニクスI/F205はセントロニクスケーブルに
よりプリンタと接続されている。
In FIG. 2, the adapter 201 communicates with the PC shown in FIG. 1 by the infrared transmitter 211. The Centronics I / F 205 is connected to the printer by a Centronics cable.

【0023】図3は、本発明におけるPC101のCP
U102上で実行されるプログラムのブロック図であ
る。
FIG. 3 is a CP of the PC 101 according to the present invention.
FIG. 7 is a block diagram of a program executed on U102.

【0024】301は、PCプログラム全体、302
は、印刷データをプリンタドライバ303に送信するア
プリケーション、303は、アプリケーション302か
ら受信した印刷データをプリンタが印刷できるように変
換してIrCOMMタスク304に送信するプリンタド
ライバ、304は、IrCOMMのプロトコルを実行す
るIrCOMMタスク、305は、Tiny TPのプ
ロトコルを実行するTiny TPタスク、306は、
IrLMPのプロトコルを実行するIrLMPタスク、
307は、IrLAPのプロトコルを実行するIrLA
Pタスク、308から311は、送信データを一時的に
格納する送信バッファ、312から315は、受信デー
タを一時的に格納する受信バッファである。
Reference numeral 301 denotes the entire PC program, 302
Is an application that sends print data to the printer driver 303. 303 is a printer driver that converts print data received from the application 302 so that the printer can print and sends it to the IrCOMM task 304. 304 is an IrCOMM protocol. IrCOMM task to perform, 305 is a Tiny TP task that executes the protocol of Tiny TP, and 306 is
An IrLMP task that executes the IrLMP protocol,
307 is an IrLA that executes the IrLAP protocol
P tasks, 308 to 311 are transmission buffers for temporarily storing transmission data, and 312 to 315 are reception buffers for temporarily storing reception data.

【0025】図3において、IrCOMMタスク304
から送信された送信データは、Tiny TPタスク3
05、IrLMPタスク306、IrLAPタスク30
7を経由してUART108に送信される。UART1
08から受信された受信データは、IrLAPタスク3
07、IrLMPタスク306、Tiny TPタスク
305を経由してIrCOMMタスク304に受信され
る。送信データは、308から311の送信バッファに
一時的に格納されて転送される。受信データは、312
から315の受信バッファに一時的に格納されて転送さ
れる。308から311の送信のバッファおよび312
から315の受信バッファはFIFO(First I
n First Out)になっており、最初に入力さ
れた送信データまたは受信データが最初に出力される。
In FIG. 3, IrCOMM task 304
The transmission data transmitted from is Tiny TP task 3
05, IrLMP task 306, IrLAP task 30
7 to the UART 108. UART1
The received data received from 08 is the IrLAP task 3
07, IrLMP task 306, and Tiny TP task 305 to be received by the IrCOMM task 304. The transmission data is temporarily stored in the transmission buffers 308 to 311 and transferred. The received data is 312
From 315 to 315 are temporarily stored in the reception buffer and transferred. 308 to 311 transmit buffers and 312
The receiving buffers from 315 to 315 are FIFO (First I
n First Out), the first input transmission data or reception data is output first.

【0026】アプリケーション302がプリンタドライ
バ303経由でIrCOMMタスク304に送信した印
刷データは、送信データとしてUART108へ送信さ
れる。
The print data transmitted from the application 302 to the IrCOMM task 304 via the printer driver 303 is transmitted to the UART 108 as transmission data.

【0027】図4は、本発明におけるアダプタ201の
CPU202上で実行されるプログラムのブロック図で
ある。
FIG. 4 is a block diagram of a program executed on the CPU 202 of the adapter 201 according to the present invention.

【0028】401は、アダプタプログラム全体、40
2は、制御タスクから受信した印刷データをセントロニ
クスI/F205に出力するセントロニクスドライバ、
403は、アダプタ201全体を制御する制御タスク、
404は、IrCOMMのプロトコルを実行するIrC
OMMタスク、405は、Tiny TPのプロトコル
を実行するTiny TPタスク、406は、IrLM
Pのプロトコルを実行するIrLMPタスク、407
は、IrLAPのプロトコルを実行するIrLAPタス
ク、408から411は、送信データを一時的に格納す
る送信バッファ、412から415は、受信データを一
時的に格納する受信バッファである。
401 is the entire adapter program, 40
2 is a Centronics driver that outputs the print data received from the control task to the Centronics I / F 205,
403 is a control task for controlling the entire adapter 201,
404 is an IrC that executes the IrCOMM protocol.
An OMM task, 405 is a Tiny TP task that executes the Tiny TP protocol, and 406 is an IrLM.
IrLMP task to execute P protocol, 407
Is an IrLAP task for executing the IrLAP protocol, 408 to 411 are transmission buffers for temporarily storing transmission data, and 412 to 415 are reception buffers for temporarily storing reception data.

【0029】図4において、IrCOMMタスク404
から送信された送信データは、Tiny TPタスク4
05、IrLMPタスク406、IrLAP407を経
由してUART208に送信される。UART208か
ら受信された受信データは、IrLAPタスク407、
IrLMPタスク406、Tiny TPタスク405
を経由してIrCOMMタスク404に受信される。送
信データは、408から411の送信バッファに一時的
に格納されて転送される。受信データは、412から4
15の受信バッファに一時的に格納されて転送される。
408から411の送信バッファおよび412から41
5の受信バッファはFIFO(First In Fi
rst Out)になっており、最初に入力された送信
データまたは受信データが最初に出力される。
In FIG. 4, the IrCOMM task 404 is shown.
The transmission data transmitted from is Tiny TP task 4
05, the IrLMP task 406, and the IrLAP 407 to be transmitted to the UART 208. The received data received from the UART 208 is the IrLAP task 407,
IrLMP task 406, Tiny TP task 405
It is received by the IrCOMM task 404 via. The transmission data is temporarily stored in the transmission buffers 408 to 411 and transferred. Received data is from 412 to 4
It is temporarily stored in 15 reception buffers and transferred.
408 to 411 transmit buffers and 412 to 41
The receiving buffer of 5 is a FIFO (First In Fi).
rst Out), the first input transmission data or reception data is output first.

【0030】UART208から受信された印刷データ
は、受信データとしてIrCOMMタスク404に受信
される。この印刷データは、制御タスク403経由でセ
ントロニクスドライバ402に受信される。セントロニ
クスドライバ402は、この印刷データをセントロニク
スI/F205に出力する。
The print data received from the UART 208 is received by the IrCOMM task 404 as received data. This print data is received by the Centronics driver 402 via the control task 403. The Centronics driver 402 outputs this print data to the Centronics I / F 205.

【0031】本発明では、図1のPCと図2のアダプタ
はIrDAのプロトコルにしたがって赤外線通信する。
IrDAでは、通信中に送受信されるデータはフレーム
により搬送される。
In the present invention, the PC of FIG. 1 and the adapter of FIG. 2 perform infrared communication according to the IrDA protocol.
In IrDA, data transmitted and received during communication is carried in frames.

【0032】図5は、本発明のフレームの形式である。FIG. 5 is a frame format of the present invention.

【0033】501は、IrLAPでフレームの開始を
示すBOF(Beginningof Frame)、
502は、IrLAPで接続アドレスを示すアドレスフ
ィールドA、503は、IrLAPでフレームの機能を
示す制御フィールドC、504は、IrLMPで送信先
アドレスを示すフィールドDLSAP−SEL(Des
tination Link Service Acc
ess PointSelector)、505は、I
rLMPで送信元アドレスを示すフィールドSLSAP
−SEL(Source Link Service
Access Point Selector)、50
6は、Tiny TPで使用するフィールドTTP、5
07は、IrCOMMで制御データ508〜510の長
さを示す制御長Clen、508は、IrCOMMで制
御パラメータの種別を示すパラメータ識別子PI、50
9は、IrCOMMで制御パラメータの長さを示すパラ
メータ長PL、510は、IrCOMMで制御パラメー
タの値を示すパラメータ値PV、511は、データを示
すフィールドData、512は、IrLAPで受信エ
ラーを検出するためのフィールドFCS(Frame
Check Sequence)、513は、IrLA
Pでフレームの終了を示すフラグEOF(End of
Frame)である。
Reference numeral 501 denotes a BOF (Beginning of Frame) indicating the start of a frame in IrLAP,
502 is an address field A indicating a connection address by IrLAP, 503 is a control field C indicating a frame function by IrLAP, and 504 is a field DLSAP-SEL (Des) indicating a destination address by IrLMP.
Tination Link Service Acc
ess PointSelector), 505 is I
Field SLSAP indicating the source address in rLMP
-SEL (Source Link Service)
Access Point Selector), 50
6 is a field TTP used in Tiny TP, 5
Reference numeral 07 is a control length Clen indicating the length of the control data 508 to 510 by IrCOMM, and 508 is a parameter identifier PI, 50 indicating the type of control parameter by IrCOMM.
9 is a parameter length PL that indicates the length of the control parameter in IrCOMM, 510 is a parameter value PV that indicates the value of the control parameter in IrCOMM, 511 is a field Data that indicates the data, and 512 is IrLAP that detects a reception error. Fields for FCS (Frame
(Check Sequence), 513 is IrLA
A flag EOF (End of of P) indicating the end of the frame
Frame).

【0034】本発明では、図1のPCと図2のアダプタ
の間にはひとつのIrLAP接続が設定できる。このI
rLAP接続は、アドレスフィールドAの値により識別
される。このIrLAP接続は、IrLMPにより複数
のIrLMP接続に多重化される。各IrLMP接続
は、フィールドDLSAP−SELおよびフィールドS
LSAP−SELの値により識別される。図3のPCプ
ログラム中のTinyTPタスク305と図4のアダプ
タプログラム中のTiny TPタスク405は、Ir
LMP接続により通信する。
In the present invention, one IrLAP connection can be set between the PC of FIG. 1 and the adapter of FIG. This I
The rLAP connection is identified by the value of address field A. This IrLAP connection is multiplexed by IrLMP into a plurality of IrLMP connections. Each IrLMP connection has a field DLSAP-SEL and a field S
It is identified by the value of LSAP-SEL. The TinyTP task 305 in the PC program of FIG. 3 and the TinyTP task 405 in the adapter program of FIG.
Communicate by LMP connection.

【0035】図5で、507〜510は制御チャネルと
呼ばれる。制御チャネルは、制御長Clenと制御デー
タ508〜510からなる。制御データ508〜510
は、複数の制御パラメータからなる。(図6では、ひと
つの制御パラメータ508〜510だけを図示してい
る)。制御パラメータ508〜510は、パラメータ識
別子PI、パラメータ長PLおよびパラメータ値PVか
らなる。
In FIG. 5, 507 to 510 are called control channels. The control channel includes a control length Clen and control data 508 to 510. Control data 508-510
Is composed of a plurality of control parameters. (In FIG. 6, only one control parameter 508-510 is shown). The control parameters 508 to 510 consist of a parameter identifier PI, a parameter length PL and a parameter value PV.

【0036】通信開始時に、PCプログラム301中の
IrCOMMタスク304は「サービスタイプ」を示す
制御パラメータ508〜510を送信する。この制御パ
ラメータ508〜510のPVの値は「サービスタイ
プ」を示すゼロである。PLの値は、1である。PVの
値は、セントロニクスを示す8である。
At the start of communication, the IrCOMM task 304 in the PC program 301 sends control parameters 508 to 510 indicating "service type". The PV value of the control parameters 508 to 510 is zero indicating the "service type". The value of PL is 1. The value of PV is 8 indicating Centronics.

【0037】通信中に、PCプログラム301中のIr
COMMタスク304は「状態問い合わせ」を示す制御
パラメータ508〜510を送信する。この制御パラメ
ータ508〜510のPVの値は「状態問い合わせ」を
示す30(16進)である。PLの値は、0である。P
Vは、ない。この後、アダプタプログラム401中のI
rCOMMタスク404は「状態問い合わせ応答」を示
す制御パラメータ508〜510を送信する。この制御
パラメータ508〜510のPVの値は「状態問い合わ
せ応答」を示す38(16進)である。PLの値は、1
である。PVは、セントロニクスI/F205の状態を
表す。(例えば、PV中のビット1が1のときFAUL
T信号が活性であり、ビット3が1のときPE信号が活
性であることを表す)。
Ir in the PC program 301 during communication
The COMM task 304 transmits control parameters 508 to 510 indicating "state inquiry". The PV value of the control parameters 508 to 510 is 30 (hexadecimal) indicating “state inquiry”. The value of PL is 0. P
There is no V. After this, I in the adapter program 401
The rCOMM task 404 sends control parameters 508 to 510 indicating "state inquiry response". The PV value of the control parameters 508 to 510 is 38 (hexadecimal) indicating “state inquiry response”. The value of PL is 1
It is. PV represents the state of the Centronics I / F 205. (For example, when bit 1 in PV is 1, FAUL
When the T signal is active and the bit 3 is 1, the PE signal is active).

【0038】アダプタ201のセントロニクスI/F2
05からセントロニクスケーブルでプリンタにINIT
信号を出力したいとき、PCプログラム301中のIr
COMMタスク304は「初期化コマンド」を示す制御
パラメータ508〜510を送信する。この制御パラメ
ータ508〜510のPVの値は「初期化コマンド」を
示す37(16進)である。PLの値は、0である。P
Vは、ない。(この制御パラメータ508〜510は、
IrCOMMのプロトコルに本発明で追加したものであ
る)。
Centronics I / F 2 of the adapter 201
INIT to printer with Centronics cable from 05
When you want to output a signal, Ir in the PC program 301
The COMM task 304 sends control parameters 508 to 510 indicating "initialization command". The PV value of the control parameters 508 to 510 is 37 (hexadecimal) indicating “initialization command”. The value of PL is 0. P
There is no V. (The control parameters 508 to 510 are
This is an addition to the protocol of IrCOMM according to the present invention).

【0039】図6は、PC101とアダプタ201の間
の通常の通信手順である。
FIG. 6 shows a normal communication procedure between the PC 101 and the adapter 201.

【0040】手順601で、プリンタドライバ303は
IrCOMMタスク304にIrCOMM_接続要求を
送信し、IrCOMMタスク304はTiny TPタ
スク305にTTP_接続要求を送信する。Tiny
TPタスク405はIrCOMMタスク404にTTP
_接続指示を送信し、IrCOMMタスク404は制御
タスク403にIrCOMM_接続指示を送信する。
In step 601, the printer driver 303 sends an IrCOMM_connection request to the IrCOMM task 304, and the IrCOMM task 304 sends a TTP_connection request to the Tiny TP task 305. Tiny
The TP task 405 sends a TTP to the IrCOMM task 404.
_ Connection instruction is sent, and the IrCOMM task 404 sends an IrCOMM_connection instruction to the control task 403.

【0041】手順602で、制御タスク403はIrC
OMMタスクは404にIrCOMM_接続応答を送信
し、IrCOMMタスク404はTiny TPタスク
405にTTP_接続応答を送信する。Tiny TP
タスク305はIrCOMMタスク304にTTP_接
続確認を送信し、IrCOMMタスク304は制御タス
ク303にIrCOMM_接続確認を送信する。
In step 602, the control task 403 determines that IrC
The OMM task sends an IrCOMM_Connect response to 404, and the IrCOMM task 404 sends a TTP_Connect response to the Tiny TP task 405. Tiny TP
Task 305 sends a TTP_connection confirmation to IrCOMM task 304, and IrCOMM task 304 sends an IrCOMM_connection confirmation to control task 303.

【0042】手順603から605で、プリンタドライ
バ303はIrCOMMタスク304に印刷データを含
むIrCOMM_データ要求を送信し、IrCOMMタ
スク304はTiny TPタスク305に印刷データ
を含むTTP_データ要求を送信する。Tiny TP
タスク405はIrCOMMタスク404に印刷データ
を含むTTP_データ指示を送信し、IrCOMMタス
ク404は制御タスク403に印刷データを含むIrC
OMM_データ指示を送信する。
In steps 603 to 605, the printer driver 303 sends an IrCOMM_data request containing print data to the IrCOMM task 304, and the IrCOMM task 304 sends a TTP_data request containing print data to the Tiny TP task 305. Tiny TP
Task 405 sends a TTP_DATA instruction containing print data to IrCOMM task 404, and IrCOMM task 404 sends IrC containing print data to control task 403.
Send the OMM_Data instruction.

【0043】手順606で、プリンタドライバ303は
IrCOMMタスク304にIrCOMM_切断要求を
送信し、IrCOMMタスク304はTiny TPタ
スク305にTTP_切断要求を送信する。Tiny
TPタスク405はIrCOMMタスク404にTTP
_切断指示を送信し、IrCOMMタスク404は制御
タスク403にIrCOMM_データ切断指示を送信す
る。
In step 606, the printer driver 303 sends an IrCOMM_disconnect request to the IrCOMM task 304, and the IrCOMM task 304 sends a TTP_disconnect request to the Tiny TP task 305. Tiny
The TP task 405 sends a TTP to the IrCOMM task 404.
The _disconnect instruction is transmitted, and the IrCOMM task 404 transmits the IrCOMM_data disconnection instruction to the control task 403.

【0044】図6の手順では、印刷データはPC101
からアダプタ201へすべて正常に転送される。
In the procedure of FIG. 6, the print data is the PC 101.
To the adapter 201 are all transferred normally.

【0045】図7は、PC101が途中で印刷を中止す
るときの通信手順である。
FIG. 7 shows a communication procedure when the PC 101 cancels printing halfway.

【0046】手順701から705は、手順601から
605と同じである。
Steps 701 to 705 are the same as steps 601 to 605.

【0047】手順706で、プリンタドライバ303は
IrCOMMタスク304に初期化要求を送信し、Ir
COMMタスク304はTiny TPタスク305に
初期化コマンドを含むTTP_データ要求を送信する。
Tiny TPタスク405はIrCOMMタスク40
4に初期化コマンドを含むTTP_データ指示を送信
し、IrCOMMタスク404は制御タスク403に初
期化指示を送信する。
In step 706, the printer driver 303 sends an initialization request to the IrCOMM task 304, and
The COMM task 304 sends a TTP_data request containing an initialization command to the Tiny TP task 305.
Tiny TP task 405 is IrCOMM task 40
4 transmits the TTP_DATA instruction including the initialization command, and the IrCOMM task 404 transmits the initialization instruction to the control task 403.

【0048】手順707で、IrCOMMタスク304
はTiny TPタスク305にTTP_切断要求を送
信する。Tiny TPタスク405はIrCOMMタ
スク404にTTP_切断指示を送信する。
In step 707, the IrCOMM task 304
Sends a TTP_disconnect request to Tiny TP task 305. The Tiny TP task 405 sends a TTP_disconnect instruction to the IrCOMM task 404.

【0049】図7の手順では、印刷データを転送中にP
C101の操作部106で印刷中止の操作をしている。
この時、アプリケーション302はプリンタドライバ経
由で初期化要求を送信する。制御タスク403は、Ir
COMMタスク404から初期化指示を受信する。制御
タスク403は、セントロニクスドライバ402により
セントロニクスI/F205からINIT信号を出力す
る。手順707で、IrCOMMタスク404はTin
y TPタスク405からTTP_切断指示を受信して
いるが、すでに初期化指示を制御タスク403に送信し
ているので、IrCOMM_切断指示を送信しない。
(制御タスク403はすでにアイドル状態になっている
ので、IrCOMM_切断指示を受信すると通信異常が
発生したと見なしてしまう。例えば、初期化されたはず
なのに表示部207中のエラーを表すLEDが点灯して
しまう)。
In the procedure of FIG. 7, P is set during transfer of print data.
A print cancel operation is performed on the operation unit 106 of C101.
At this time, the application 302 sends an initialization request via the printer driver. The control task 403 is Ir
The initialization instruction is received from the COMM task 404. The control task 403 causes the Centronics driver 402 to output the INIT signal from the Centronics I / F 205. In step 707, the IrCOMM task 404 sets Tin.
y The TTP_disconnect instruction is received from the TP task 405, but the initialization instruction has already been transmitted to the control task 403, so the IrCOMM_disconnect instruction is not transmitted.
(Because the control task 403 is already in the idle state, it is considered that a communication error has occurred when the IrCOMM_disconnect instruction is received. For example, the LED indicating the error in the display unit 207 is turned on although it should have been initialized. End).

【0050】図8は、本発明のPC101のROM10
3に格納されたプログラムの内、IrCOMMタスク3
04で実行されるフローチャートである。本フローチャ
ートは、IrCOMMタスク304で繰り返し実行され
る。
FIG. 8 shows the ROM 10 of the PC 101 of the present invention.
IrCOMM task 3 of the programs stored in 3
It is a flowchart executed in 04. This flowchart is repeatedly executed by the IrCOMM task 304.

【0051】ステップ801で、プリンタドライバ30
3からIrCOMM_接続要求を受信したとき、ステッ
プ802に進む。そうでないなら、ステップ805に進
む。
In step 801, the printer driver 30
When the IrCOMM_connection request is received from No. 3, the process proceeds to step 802. Otherwise, go to step 805.

【0052】ステップ802で、Tiny TPタスク
305にTTP_接続要求を送信する。
At step 802, a TTP_connection request is sent to the Tiny TP task 305.

【0053】ステップ803で、Tiny TPタスク
305からTTP_接続確認を受信したとき、ステップ
804に進む。そうでないなら、ステップ803に戻
る。
When the TTP_connection confirmation is received from the Tiny TP task 305 in step 803, the process proceeds to step 804. If not, the process returns to step 803.

【0054】ステップ804で、プリンタドライバ30
3にIrCOMM_接続確認を送信して、終了する。
In step 804, the printer driver 30
3. Send IrCOMM_connection confirmation to 3 and end.

【0055】ステップ805で、プリンタドライバ30
3からIrCOMM_データ要求を受信したとき、ステ
ップ806に進む。そうでないなら、ステップ807に
進む。
In step 805, the printer driver 30
When the IrCOMM_data request is received from No. 3, the process proceeds to step 806. Otherwise, proceed to step 807.

【0056】ステップ806で、Tiny TPタスク
305に印刷データを含むTTP_データ要求を送信し
て、終了する。
At step 806, a TTP_data request including print data is transmitted to the Tiny TP task 305, and the processing is terminated.

【0057】ステップ807で、プリンタドライバ30
3からIrCOMM_切断要求を受信したとき、ステッ
プ808に進む。そうでないなら、ステップ809に進
む。
In step 807, the printer driver 30
When the IrCOMM_disconnection request is received from No. 3, the process proceeds to step 808. Otherwise, go to step 809.

【0058】ステップ808で、Tiny TPタスク
305にTTP_切断要求を送信して、終了する。
At step 808, the TTP_disconnect request is transmitted to the Tiny TP task 305, and the processing is terminated.

【0059】ステップ809で、プリンタドライバ30
3から初期化要求を受信したとき、ステップ810に進
む。そうでないなら、終了する。
In step 809, the printer driver 30
When the initialization request is received from step 3, the process proceeds to step 810. If not, exit.

【0060】ステップ810で、Tiny TPタスク
305に初期化コマンドを含むTTP_データ要求を送
信する。
At step 810, a TTP_data request including an initialization command is sent to the Tiny TP task 305.

【0061】ステップ811で、Tiny TPタスク
305にTTP_切断要求を送信して、終了する。
At step 811, the TTP_disconnect request is transmitted to the Tiny TP task 305, and the processing is terminated.

【0062】図9は、本発明のアダプタ201のROM
203に格納されたプログラムの内、IrCOMMタス
ク404で実行されるフローチャートである。本フロー
チャートは、IrCOMMタスク404で繰り返し実行
される。
FIG. 9 is a ROM of the adapter 201 of the present invention.
13 is a flowchart executed by an IrCOMM task 404 of the programs stored in 203. This flowchart is repeatedly executed by the IrCOMM task 404.

【0063】ステップ901で、Tiny TPタスク
405からTTP_接続指示を受信したとき、ステップ
902に進む。そうでないなら、ステップ906に進
む。
When the TTP_connection instruction is received from the Tiny TP task 405 in step 901, the process proceeds to step 902. Otherwise, go to step 906.

【0064】ステップ902で、制御タスク403にI
rCOMM_接続指示を送信する。
At step 902, the control task 403
Send rCOMM_Connect Indication.

【0065】ステップ903で、制御タスク403から
IrCOMM_接続応答を受信したとき、ステップ90
4に進む。そうでないなら、ステップ903に戻る。
When the IrCOMM_connection response is received from the control task 403 in step 903, step 90
Go to 4. If not, the process returns to step 903.

【0066】ステップ904で、Tiny TPタスク
405にTTP_接続応答を送信する。
At step 904, the TTP_connection response is transmitted to the Tiny TP task 405.

【0067】ステップ905で、変数initFlag
に値FALSEをセットする。
In step 905, the variable initFlag
To the value FALSE.

【0068】ステップ906で、Tiny TPタスク
405から印刷データを含むTTP_データ指示を受信
したとき、ステップ907に進む。そうでないなら、ス
テップ908に進む。
When the TTP_data instruction including the print data is received from the Tiny TP task 405 in step 906, the process proceeds to step 907. Otherwise, proceed to step 908.

【0069】ステップ907で、制御タスク403に印
刷データを含むIrCOMM_データ指示を送信する。
At step 907, an IrCOMM_data instruction including print data is transmitted to the control task 403.

【0070】ステップ908で、Tiny TPタスク
405からTTP_切断指示を受信したとき、ステップ
909に進む。そうでないなら、ステップ911に進
む。
When the TTP_disconnect instruction is received from the Tiny TP task 405 in step 908, the process proceeds to step 909. Otherwise, proceed to step 911.

【0071】ステップ909で、変数initFlag
の値がFALSEのとき、ステップ910に進む。そう
でないなら、終了する。
In step 909, the variable initFlag
When the value of is FALSE, the process proceeds to step 910. If not, exit.

【0072】ステップ910で、制御タスク403にI
rCOMM_切断指示を送信する。
At step 910, the control task 403
Send rCOMM_disconnect instruction.

【0073】ステップ911で、Tiny TPタスク
405から初期化コマンドを含むTTP_データ指示を
受信したとき、ステップ912に進む。そうでないな
ら、終了する。
When the TTP_data instruction including the initialization command is received from the Tiny TP task 405 in step 911, the process proceeds to step 912. If not, exit.

【0074】ステップ912で、制御タスク403に初
期化指示を送信する。
At step 912, an initialization instruction is sent to the control task 403.

【0075】ステップ913で、変数initFlag
に値TRUEをセットして、終了する。
In step 913, the variable initFlag
Set the value TRUE to and exit.

【0076】図10は、本発明のアダプタ201のRO
M203に格納されたプログラムの内、制御タスク40
3で実行されるフローチャートである。本フローチャー
トは、制御タスク403で繰り返し実行される。
FIG. 10 shows the RO of the adapter 201 of the present invention.
Control task 40 of the programs stored in M203
3 is a flowchart executed in 3. This flowchart is repeatedly executed by the control task 403.

【0077】ステップ1001で、IrCOMM_タス
ク404からIrCOMM_接続指示を受信したとき、
ステップ1002に進む。そうでないなら、ステップ1
003に進む。
At step 1001, when the IrCOMM_connection instruction is received from the IrCOMM_task 404,
Proceed to step 1002. If not, step 1
Proceed to 003.

【0078】ステップ1002で、IrCOMM_タス
ク404にIrCOMM_接続応答を送信して、終了す
る。
In step 1002, the IrCOMM_connection response is sent to the IrCOMM_task 404, and the processing is terminated.

【0079】ステップ1003で、IrCOMM_タス
ク404からIrCOMM_データ指示を受信したと
き、ステップ1004に進む。そうでないなら、ステッ
プ1005に進む。
When the IrCOMM_data instruction is received from the IrCOMM_task 404 in step 1003, the process proceeds to step 1004. Otherwise, proceed to step 1005.

【0080】ステップ1004で、セントロニクスドラ
イバ402によりセントロニクスI/F205に印刷デ
ータを出力して、終了する。
In step 1004, the Centronics driver 402 outputs the print data to the Centronics I / F 205, and the process is terminated.

【0081】ステップ1005で、IrCOMM_タス
ク404からIrCOMM_切断指示を受信したとき、
終了する。そうでないなら、ステップ1006に進む。
At step 1005, when the IrCOMM_disconnect instruction is received from the IrCOMM_task 404,
finish. Otherwise, proceed to step 1006.

【0082】ステップ1006で、IrCOMM_タス
ク404から初期化指示を受信したとき、ステップ10
07に進む。そうでないなら、終了する。
When the initialization instruction is received from IrCOMM_task 404 in step 1006, step 10
Proceed to 07. If not, exit.

【0083】ステップ1007でセントロニクスドライ
バ402によりセントロニクスI/F205にINIT
信号を出力して、終了する。
In step 1007, the Centronics driver 402 INITs the Centronics I / F 205.
Output a signal and exit.

【0084】(第2の発明の実施の形態)本発明の第2
の発明の実施の形態を図にしたがって説明する。
(Embodiment of the Second Invention) Second Embodiment of the Present Invention
Embodiments of the invention will be described with reference to the drawings.

【0085】本発明は、PC、アダプタおよびプリンタ
からなる。PCとアダプタは、IrDAで通信する。
The present invention comprises a PC, an adapter and a printer. The PC and the adapter communicate by IrDA.

【0086】アダプタは、プリンタとセントロニクスの
ケーブルで接続されている。
The adapter is connected to the printer with a Centronics cable.

【0087】PCのブロック図は、図1と同じである。The block diagram of the PC is the same as that of FIG.

【0088】アダプタのブロック図は、図2と同じであ
る。
The block diagram of the adapter is the same as in FIG.

【0089】PCプログラムのブロック図は、図3と同
じである。
The block diagram of the PC program is the same as that shown in FIG.

【0090】アダプタプログラムのブロック図は、図4
と同じである。
A block diagram of the adapter program is shown in FIG.
Is the same as

【0091】フレームの形式は、図5と同じである。The frame format is the same as in FIG.

【0092】通信手順は、図6および図7と同じであ
る。
The communication procedure is the same as in FIGS. 6 and 7.

【0093】図11は、本発明の第2の発明の実施の形
態でPC101のROM103に格納されたプログラム
の内、IrCOMMタスク304で実行されるフローチ
ャートである。本フローチャートは、IrCOMMタス
ク304で繰り返し実行される。
FIG. 11 is a flow chart executed by the IrCOMM task 304 of the programs stored in the ROM 103 of the PC 101 in the second embodiment of the present invention. This flowchart is repeatedly executed by the IrCOMM task 304.

【0094】ステップ1101からステップ1111
は、ステップ801からステップ811と同じである。
Steps 1101 to 1111
Is the same as steps 801 to 811.

【0095】ステップ1112で、送信バッファ308
から311をクリアする。
At step 1112, the transmission buffer 308
To clear 311.

【0096】図11では、ステップ1110でTiny
TPタスク305に初期化コマンドを含むTTP_デ
ータ要求を送信する前に、ステップ1112で送信バッ
ファ308から311をクリアする。このため、本実施
例では、送信バッファ308から311に印刷データが
滞留しているときでも、ただちに初期化コマンドを送信
してプリンタを初期化できる。
In FIG. 11, Tiny is calculated in step 1110.
Before sending a TTP_DATA request containing an initialization command to the TP task 305, the send buffers 308 to 311 are cleared in step 1112. Therefore, in this embodiment, the printer can be initialized by immediately transmitting the initialization command even when the print data is accumulated in the transmission buffers 308 to 311.

【0097】図12は、本発明の第2の発明の実施の形
態でアダプタ201のROM203に格納されたプログ
ラムの内、IrLAPタスク407で実行されるフロー
チャートである。本フローチャートは、IrLAPタス
ク407で繰り返し実行される。
FIG. 12 is a flowchart executed by the IrLAP task 407 of the programs stored in the ROM 203 of the adapter 201 according to the second embodiment of the present invention. This flowchart is repeatedly executed by the IrLAP task 407.

【0098】ステップ1201で、UART208から
初期化コマンドを含むIフレームを受信したとき、ステ
ップ1202に進む。そうでないなら、ステップ120
3に進む。ここで、Iフレームの形式は、図5と同じで
ある。
When the I frame including the initialization command is received from the UART 208 in step 1201, the process proceeds to step 1202. If not, step 120.
Proceed to 3. Here, the format of the I frame is the same as in FIG.

【0099】ステップ1202で、受信バッファ412
から414をクリアする。
In step 1202, the reception buffer 412
To clear 414.

【0100】ステップ1203で、通常のIrLAP処
理を行い、終了する。
At step 1203, a normal IrLAP process is performed, and the process ends.

【0101】図12では、ステップ1203でIrLM
Pタスク406に初期化コマンドを送信する前に、ステ
ップ1202で受信バッファ412から414をクリア
する。このため、本発明の実施の形態では受信バッファ
412から414に印刷データが滞留しているときでも
ただちに初期化コマンドを受信してプリンタを初期化で
きる。
In FIG. 12, in step 1203, IrLM is used.
Before sending the initialization command to the P-task 406, the receive buffers 412 to 414 are cleared in step 1202. Therefore, in the embodiment of the present invention, the printer can be initialized by receiving the initialization command immediately even when the print data is accumulated in the reception buffers 412 to 414.

【0102】IrCOMMタスク404で実行されるフ
ローチャートは、図9と同じである。
The flowchart executed by the IrCOMM task 404 is the same as that shown in FIG.

【0103】制御タスク403で実行されるフローチャ
ートは、図10と同じである。
The flowchart executed by the control task 403 is the same as that shown in FIG.

【0104】(第3の発明の実施の形態)本発明の第3
の発明の実施の形態を図にしたがって説明する。
(Embodiment of the Third Invention) Third Embodiment of the Present Invention
Embodiments of the invention will be described with reference to the drawings.

【0105】本発明は、PC、アダプタおよびプリンタ
からなる。PCとアダプタは、IrDAで通信する。
The present invention comprises a PC, an adapter and a printer. The PC and the adapter communicate by IrDA.

【0106】アダプタは、プリンタとセントロニクスの
ケーブルで接続されている。
The adapter is connected to the printer with a Centronics cable.

【0107】PCのブロック図は、図1と同じである。The block diagram of the PC is the same as that of FIG.

【0108】アダプタのブロック図は、図2と同じであ
る。
The block diagram of the adapter is the same as in FIG.

【0109】PCプログラムのブロック図は、図3と同
じである。
The block diagram of the PC program is the same as that shown in FIG.

【0110】アダプタプログラムのブロック図は、図4
と同じである。
A block diagram of the adapter program is shown in FIG.
Is the same as

【0111】フレームの形式は、図5と同じである。The frame format is the same as that shown in FIG.

【0112】通信手順は、図6および図7と同じであ
る。
The communication procedure is the same as in FIGS. 6 and 7.

【0113】図13は、PC101とアダプタ201の
間の通信エラー時の通信手順である。
FIG. 13 shows a communication procedure at the time of a communication error between the PC 101 and the adapter 201.

【0114】手順1301から1304は手順601か
ら604と同じである。
Steps 1301 to 1304 are the same as steps 601 to 604.

【0115】手順1305で、プリンタドライバ303
はIrCOMMタスク304に印刷データを含むIrC
OMM_データ要求を送信し、IrCOMMタスク30
4はTiny TPタスク305に印刷データを含むT
TP_データ要求を送信する。ここで、通信エラーが発
生し無通信状態になったとする。
In step 1305, the printer driver 303
IrCMM task 304 contains print data in IrC
Send OMM_Data Request, IrCOMM Task 30
4 is a T that includes print data in the Tiny TP task 305.
Send the TP_Data request. Here, it is assumed that a communication error occurs and a non-communication state occurs.

【0116】手順1306で、タイムアウト発生後Ti
ny TPタスク305はIrCOMMタスク304に
TTP_切断指示を送信し、IrCOMMタスク304
はプリンタドライバ303にIrCOMM_切断指示を
送信する。Tiny TPタスク405はIrCOMM
タスク404にTTP_切断指示を送信し、IrCOM
Mタスク404は制御タスク403にIrCOMM_切
断指示を送信する。
At step 1306, Ti
The ny TP task 305 sends a TTP_disconnect instruction to the IrCOMM task 304, and the IrCOMM task 304
Sends an IrCOMM_disconnection instruction to the printer driver 303. Tiny TP task 405 is IrCOMM
Send TTP_disconnect instruction to task 404 and send IrCOM
The M task 404 sends an IrCOMM_disconnect instruction to the control task 403.

【0117】図13において、手順1306でプリンタ
ドライバ303がIrCOMM_切断指示を受信する
と、表示部107にエラーが表示される。
In FIG. 13, when the printer driver 303 receives the IrCOMM_disconnection instruction in step 1306, an error is displayed on the display unit 107.

【0118】図13の手順1305で印刷データを含む
TTP_データ要求を受信したPC側のTiny TP
タスク305は、IrLMPタスク306にLM_デー
タ要求を送信する。LM_データ要求を受信したIrL
MPタスク306は、IrLAPタスク307にIrL
AP_データ要求を送信する。IrLAP_データ要求
を受信したIrLAPタスク307は、UART108
にIフレームを送信する。このIフレームは、赤外線送
信部111から赤外線で送信される。このとき、IrL
APタスク307は、監視タイマを開始する。(この監
視タイマは、IrLAPタスク307がUART108
から何かフレームを受信すると停止する)。
The PC-side Tiny TP that has received the TTP_data request including the print data in step 1305 of FIG.
Task 305 sends an LM_Data request to IrLMP task 306. IrL that received the LM_DATA request
The MP task 306 sends the IrLAP task 307 the IrL
Send AP_DATA REQUEST. Upon receiving the IrLAP_data request, the IrLAP task 307 sends the UART 108
I frame is transmitted. This I frame is transmitted by infrared rays from the infrared transmitter 111. At this time, IrL
The AP task 307 starts a monitoring timer. (The IrLAP task 307 monitors the UART 108 for this monitoring timer.
Stops when it receives any frames from).

【0119】手順1306でIrLAPタスク307が
何も受信せずに監視タイマがタイムアップすると、Ir
LAPタスク307は通信エラーとしてIrLMPタス
ク306にIrLAP_切断指示を送信する。IrLA
P_切断指示を受信したIrLMPタスク306は、T
iny TPタスク305にLM_切断指示を送信す
る。LM_切断指示を受信したTiny TPタスク3
05は、IrCOMMタスク304にTTP_切断指示
を送信する。
In step 1306, when the IrLAP task 307 does not receive anything and the monitoring timer times out, Ir
The LAP task 307 sends an IrLAP_disconnect instruction to the IrLMP task 306 as a communication error. IrLA
The IrLMP task 306 that has received the P_disconnect instruction
The LM_disconnect instruction is transmitted to the iny TP task 305. Tiny TP task 3 that received the LM_disconnect instruction
05 sends a TTP_disconnect instruction to the IrCOMM task 304.

【0120】図13の手順1304でIフレームを受信
したアダプタ側のIrLAPタスク407は、IrLM
Pタスク406にIrLAP_データ指示を送信する。
IrLAP_データ指示を受信したIrLMPタスク4
06は、Tiny TPタスク405にLM_データ指
示を送信する。LM_データ指示を受信したTinyT
Pタスク405はIrCOMMタスク404にTTPデ
ータ指示を送信する。このとき、IrLAPタスク40
7は、監視タイマを開始する。(この監視タイマは、I
rLAPタスク407がUART208から何かフレー
ムを受信すると停止する)。
The IrLAP task 407 on the adapter side which has received the I frame in step 1304 of FIG.
Send IrLAP_DATA instruction to P-task 406.
IrLMP task 4 which received the IrLAP_DATA instruction
06 sends an LM_DATA instruction to the Tiny TP task 405. TinyT that received the LM_DATA instruction
The P task 405 sends a TTP data instruction to the IrCOMM task 404. At this time, the IrLAP task 40
7 starts a monitoring timer. (This monitoring timer is
It stops when the rLAP task 407 receives any frame from the UART 208).

【0121】手順1306でIrLAPタスク407が
何も受信せずに監視タイマがタイムアップすると、Ir
LAPタスク407は通信エラーとしてIrLMPタス
ク406にIrLAP_切断指示を送信する。IrLA
P_切断指示を受信したIrLMPタスク406は、T
iny TPタスク405にLM_切断指示を送信す
る。LM_切断指示を受信したTiny TPタスク4
05は、IrCOMMタスク404にTTP_切断指示
を送信する。
In step 1306, if the IrLAP task 407 does not receive anything and the monitoring timer times out, Ir
The LAP task 407 transmits an IrLAP_disconnection instruction to the IrLMP task 406 as a communication error. IrLA
The IrLMP task 406 that has received the P_disconnect instruction
The LM_disconnect instruction is transmitted to the iny TP task 405. Tiny TP task 4 that received the LM_disconnect instruction
05 sends a TTP_disconnect instruction to the IrCOMM task 404.

【0122】手順1306の後、PC側で送信バッファ
308から311および受信バッファ312から315
をクリアする。また手順1306の後、アダプタ側で送
信バッファ408から411および受信バッファ412
から415をクリアする。
After step 1306, the transmission buffers 308 to 311 and the reception buffers 312 to 315 on the PC side.
To clear. Further, after the procedure 1306, the transmission buffers 408 to 411 and the reception buffer 412 on the adapter side.
To clear 415.

【0123】図14は、印刷中止時に通信エラーが発生
したときの通信手順である。
FIG. 14 shows a communication procedure when a communication error occurs when printing is stopped.

【0124】手順1401から1405は、手順601
から605と同じである。
Procedures 1401 to 1405 correspond to procedure 601.
From 605 to 605.

【0125】手順1406で、プリンタドライバ303
はIrCOMMタスク304に初期化要求を送信し、I
rCOMMタスク304はTiny TPタスク305
に初期化コマンドを含むTTP_データ要求を送信す
る。ここで、通信エラーが発生し無通信状態になったと
する。
In step 1406, the printer driver 303
Sends an initialization request to IrCOMM task 304, and I
rCOMM task 304 is Tiny TP task 305
Send a TTP_DATA request containing an initialization command to the. Here, it is assumed that a communication error occurs and a non-communication state occurs.

【0126】手順1407で、IrCOMMタスク30
4はTiny TPタスク305にTTP_切断要求を
送信する。ここでも、無通信状態が続いているとする。
In step 1407, the IrCOMM task 30
4 sends a TTP_disconnect request to the Tiny TP task 305. Here again, it is assumed that the non-communication state continues.

【0127】手順1408で、タイムアウト発生後Ti
ny TPタスク305はIrCOMMタスク304に
TTP_切断指示を送信する。Tiny TPタスク4
05はIrCOMMタスク404にTTP_切断指示を
送信し、IrCOMMタスク404は制御タスク403
にIrCOMM_切断指示を送信する。
At step 1408, after the timeout occurs, Ti
The ny TP task 305 sends a TTP_disconnect instruction to the IrCOMM task 304. Tiny TP task 4
05 sends a TTP_disconnect instruction to the IrCOMM task 404, and the IrCOMM task 404 sends the control task 403.
To the IrCOMM_disconnect instruction.

【0128】図14の手順では、手順1406で初期化
コマンドを転送中に通信エラーが発生している。手順1
408で、タイムアウト発生後IrCOMMタスク30
4はTiny TPタスク305からTTP_切断指示
を受信しているが、すでに初期化指示をプリンタドライ
バ303に送信しているので、IrCOMM_切断指示
を送信しない。(プリンタドライバ303はすでにアイ
ドル状態になっているので、IrCOMM_切断指示を
受信すると通信異常が発生したとみなしてしまう。例え
ば、初期化されたはずなのに表示部107にエラーメッ
セージが表示されてしまう)。
In the procedure of FIG. 14, a communication error occurs during the transfer of the initialization command in procedure 1406. Step 1
At 408, after the timeout occurs, IrCOMM task 30
Although No. 4 has received the TTP_disconnection instruction from the Tiny TP task 305, since it has already transmitted the initialization instruction to the printer driver 303, it does not transmit the IrCOMM_disconnection instruction. (Because the printer driver 303 is already in the idle state, it is considered that a communication error has occurred when the IrCOMM_disconnect instruction is received. For example, although it should have been initialized, an error message is displayed on the display unit 107.) .

【0129】図14の手順1406で初期化コマンドを
含むTTP_データ要求を受信したPC側のTiny
TPタスク305は、IrLMPタスク306にLM_
データ要求を送信する。LM_データ要求を受信したI
rLMPタスク306は、IrLAPタスク307にI
rLAP_データ要求を送信する。IrLAP_データ
要求を受信したIrLAPタスク307は、UART1
08にIフレームを送信する。このIフレームは、赤外
線送信部111から赤外線で送信される。このとき、I
rLAPタスク307は、監視タイマを開始する。(こ
の監視タイマは、IrLAPタスク307がUART1
08から何かフレームを受信すると停止する)。
Tiny on the PC side that received the TTP_data request including the initialization command in step 1406 of FIG.
The TP task 305 notifies the IrLMP task 306 of LM_
Send a data request. I received the LM_DATA request
The rLMP task 306 sends the IrLAP task 307 an I
Send rLAP_DATA REQUEST. Upon receiving the IrLAP_data request, the IrLAP task 307 executes UART1.
I frame is transmitted to 08. This I frame is transmitted by infrared rays from the infrared transmitter 111. At this time, I
The rLAP task 307 starts a watch timer. (This monitoring timer is set by IrLAP task 307 as UART1.
It stops when it receives any frame from 08).

【0130】手順1407でTTP_切断要求を受信し
たPC側のTiny TPタスク305は、IrLMP
タスク306にLM_切断要求を送信する。LM_切断
要求を受信したIrLMPタスク306は、IrLAP
タスク307にIrLAP_切断要求を送信する。Ir
LAP_切断要求を受信したIrLAPタスク307
は、UART108にDISCフレームを送信する。こ
のDISCフレームは、赤外線送信部111から赤外線
で送信される。このとき、IrLAPタスク307は、
監視タイマを停止して再び開始する。
The Tiny TP task 305 on the PC side, which has received the TTP_disconnection request in step 1407, uses IrLMP.
Send LM_Disconnect request to task 306. Upon receiving the LM_disconnection request, the IrLMP task 306 sets the IrLAP task
Send an IrLAP_disconnect request to task 307. Ir
IrLAP task 307 that received the LAP_disconnect request
Sends a DISC frame to the UART 108. This DISC frame is transmitted by infrared rays from the infrared transmitter 111. At this time, the IrLAP task 307
Stop the watch timer and start it again.

【0131】手順1408でIrLAPタスク307が
何も受信せずに監視タイマがタイムアップすると、Ir
LAPタスク307は通信エラーとしてIrLMPタス
ク306にIrLAP_切断樹脂を送信する。IrLA
P_切断指示を受信したIrLMPタスク306は、T
iny TPタスク305にLM_切断指示を送信す
る。LM_切断指示を受信したTiny TPタスク3
05は、IrCOMMタスク304にTTP_切断指示
を送信する。
In step 1408, when the IrLAP task 307 does not receive anything and the monitoring timer times out, Ir
The LAP task 307 sends IrLAP_cut resin to the IrLMP task 306 as a communication error. IrLA
The IrLMP task 306 that has received the P_disconnect instruction
The LM_disconnect instruction is transmitted to the iny TP task 305. Tiny TP task 3 that received the LM_disconnect instruction
05 sends a TTP_disconnect instruction to the IrCOMM task 304.

【0132】図14の手順1405でIフレームを受信
したアダプタ側のIrLAPタスク407は、IrLM
Pタスク406にIrLAP_データ指示を送信する。
IrLAP_データ指示を受信したIrLMPタスク4
06は、Tiny TPタスク405にLM_データ指
示を送信する。LM_データ指示を受信したTinyT
Pタスク405はIrCOMMタスク404にTTP_
データ指示を送信する。このとき、IrLAPタスク4
07は、監視タイマを開始する。(この監視タイマは、
IrLAPタスク407がUART208から何かフレ
ームを受信すると停止する)。
The IrLAP task 407 on the adapter side which has received the I frame in step 1405 of FIG.
Send IrLAP_DATA instruction to P-task 406.
IrLMP task 4 which received the IrLAP_DATA instruction
06 sends an LM_DATA instruction to the Tiny TP task 405. TinyT that received the LM_DATA instruction
The P task 405 notifies the IrCOMM task 404 of TTP_
Send data instructions. At this time, IrLAP task 4
07 starts the monitoring timer. (This monitoring timer is
It stops when IrLAP task 407 receives any frame from UART 208).

【0133】手順1408でIrLAPタスク407が
何も受信せずに監視タイマがタイムアップすると、Ir
LAPタスク407は通信エラーとしてIrLMPタス
ク406にIrLAP_切断指示を送信する。IrLA
P_切断指示を受信したIrLMPタスク406は、T
iny TPタスク405にLM_切断指示を送信す
る。LM_切断指示を受信したTiny TPタスク4
05は、IrCOMMタスク404にTTP_切断指示
を送信する。
In step 1408, when the IrLAP task 407 receives nothing and the monitoring timer times out, Ir
The LAP task 407 transmits an IrLAP_disconnection instruction to the IrLMP task 406 as a communication error. IrLA
The IrLMP task 406 that has received the P_disconnect instruction
The LM_disconnect instruction is transmitted to the iny TP task 405. Tiny TP task 4 that received the LM_disconnect instruction
05 sends a TTP_disconnect instruction to the IrCOMM task 404.

【0134】図15は、本発明の第3の発明の実施の形
態のPC101のROM103に格納されたプログラム
の内、IrCOMMタスク304で実行されるフローチ
ャートである。本フローチャートは、IrCOMMタス
ク304で繰り返し実行される。
FIG. 15 is a flow chart executed by the IrCOMM task 304 in the program stored in the ROM 103 of the PC 101 according to the third embodiment of the present invention. This flowchart is repeatedly executed by the IrCOMM task 304.

【0135】ステップ1501から1511は、ステッ
プ802からステップ811と同じである。
Steps 1501 to 1511 are the same as steps 802 to 811.

【0136】ステップ1512で、変数initFla
gに値FALSEをセットして、終了する。
In step 1512, the variable initFla
Set the value FALSE to g and end.

【0137】ステップ1513で、変数initFla
gに値TRUEをセットとして、終了する。
In step 1513, the variable initFla
Set the value TRUE to g and end.

【0138】ステップ1514で、Tiny TPタス
ク305からTTP_切断指示を受信したとき、ステッ
プ1515に進む。そうでないなら、終了する。
When the TTP_disconnect instruction is received from the Tiny TP task 305 in step 1514, the process proceeds to step 1515. If not, exit.

【0139】ステップ1515で、変数initFla
gの値がFALSEのとき、ステップ1516に進む。
そうでないなら、終了する。
In step 1515, the variable initFla
When the value of g is FALSE, the process proceeds to step 1516.
If not, exit.

【0140】ステップ1516で、プリンタドライバ3
03にIrCOMM_切断指示を送信して、終了する。
In step 1516, the printer driver 3
Send an IrCOMM_disconnect instruction to 03 and end.

【0141】IrCOMMタスク404で実行されるフ
ローチャートは、図9と同じである。
The flowchart executed by the IrCOMM task 404 is the same as that shown in FIG.

【0142】制御タスク403で実行されるフローチャ
ートは、図10と同じである。
The flowchart executed by the control task 403 is the same as that shown in FIG.

【0143】(第4の発明の実施の形態)本発明の第4
の発明の実施の形態を図にしたがって説明する。
(Embodiment of Fourth Invention) Fourth Embodiment of the Present Invention
Embodiments of the invention will be described with reference to the drawings.

【0144】本発明は、PCおよびプリンタからなる。
PCとプリンタは、IrDAで通信する。
The present invention comprises a PC and a printer.
The PC and the printer communicate by IrDA.

【0145】PCのブロック図は、図1と同じである。The block diagram of the PC is the same as that of FIG.

【0146】図16は、本発明におけるプリンタのブロ
ック図である。
FIG. 16 is a block diagram of the printer according to the present invention.

【0147】1601は、プリンタ全体、1602は、
プリンタ全体1601を制御するCPU、1603は、
CPU1602で実行されるプログラムを格納するRO
M、1604は、CPU1602で使用されるデータを
格納するRAM、1605は、印字ヘッド、キャリッジ
モータおよび紙送りモータなどからなる印刷部、160
6は、プリンタの操作を行うためのボタンやスイッチな
どからなる操作部、1607は、LEDやLCDなどか
らなる表示部、1608は、CPU1602に対してシ
リアル・データ・チャネルを提供するUART(Rni
versalAsynchronous Receiv
er/Transmitter)、1609は、UAR
T1608から赤外線送信部1611への信号を変換す
る変調部、1610は、赤外線受信部1612からUA
RT1608への信号を変換する復調部、1611は、
赤外線を送信するLEDとそのドライバなどからなる赤
外線送信部、1612は、赤外線を受信するphoto
detectorとそのドライバなどからなる赤外線
受信部、1613は、構成ブロック1602から160
8を接続するバスである。
Reference numeral 1601 denotes the entire printer, and 1602,
The CPU, 1603, which controls the entire printer 1601,
RO storing the program executed by the CPU 1602
M, 1604 is a RAM for storing data used by the CPU 1602, 1605 is a printing unit including a print head, a carriage motor, a paper feed motor, and the like, 160
Reference numeral 6 is an operation unit including buttons and switches for operating the printer, 1607 is a display unit including LEDs and LCDs, and 1608 is a UART (Rni (Rni) that provides a serial data channel to the CPU 1602).
versaL Asynchronous Receive
er / Transmitter), 1609 is UAR
A modulation unit 1610 for converting a signal from the T1608 to the infrared transmission unit 1611 is provided from the infrared reception unit 1612 to the UA.
A demodulator 1611 for converting a signal to the RT 1608,
An infrared transmitter 1612, which includes an LED for transmitting infrared rays and a driver for the LED, is a photo for receiving infrared rays.
An infrared receiving unit 1613 including a detector and its driver, and the like, 1613 includes configuration blocks 1602 to 160.
It is a bus that connects eight.

【0148】図16において、プリンタ1601は赤外
線送信部1611および赤外線受信部1612により図
1に示すPCと通信する。
In FIG. 16, the printer 1601 communicates with the PC shown in FIG. 1 by the infrared transmitter 1611 and the infrared receiver 1612.

【0149】PCプログラムのブロック図は、図3と同
じである。
The block diagram of the PC program is the same as that shown in FIG.

【0150】図17は、本発明におけるプリンタ160
1のCPU1602上で実行されるプログラムのブロッ
ク図である。
FIG. 17 shows a printer 160 according to the present invention.
3 is a block diagram of a program executed on the first CPU 1602. FIG.

【0151】1701は、プリンタプログラム全体、1
702は、制御タスクから受信した印刷データを印刷部
1605に出力する印刷タスク、1703は、プリンタ
1601全体を制御する制御タスク、1704から17
15は404から415と同じである。
Reference numeral 1701 denotes the entire printer program, 1
Reference numeral 702 denotes a print task that outputs the print data received from the control task to the printing unit 1605, 1703 denotes a control task that controls the entire printer 1601, and 1704 to 17
15 is the same as 404 to 415.

【0152】フレームの形式は、図5と同じである。The frame format is the same as that shown in FIG.

【0153】通信手順は、図6および図7と同じであ
る。
The communication procedure is the same as in FIGS. 6 and 7.

【0154】IrCOMMタスク304で実行されるフ
ローチャートは、図8と同じである。
The flowchart executed by the IrCOMM task 304 is the same as that shown in FIG.

【0155】IrCOMMタスク704で実行されるフ
ローチャートは図9と同じである。
The flowchart executed by the IrCOMM task 704 is the same as that shown in FIG.

【0156】図18は、本発明のプリンタ1601のR
OM1603に格納されたプログラムの内、制御タスク
1703で実行されるフローチャートである。本フロー
チャートは、制御タスク1703で繰り返し実行され
る。
FIG. 18 shows an R of the printer 1601 of the present invention.
16 is a flowchart executed by a control task 1703 of the programs stored in the OM 1603. This flowchart is repeatedly executed by the control task 1703.

【0157】ステップ1801で、IrCOMM_タス
ク1704からIrCOMM_接続指示を受信したと
き、ステップ1802に進む。そうでないなら、ステッ
プ1803に進む。
In step 1801, when the IrCOMM_connection instruction is received from the IrCOMM_task 1704, the process proceeds to step 1802. Otherwise, proceed to step 1803.

【0158】ステップ1802で、IrCOMM_タス
ク1704にIrCOMM_接続応答を送信して、終了
する。
At step 1802, the IrCOMM_connection response is sent to the IrCOMM_task 1704, and the processing is terminated.

【0159】ステップ1803で、IrCOMM_タス
ク1704からIrCOMM_データ指示を受信したと
き、ステップ1804に進む。そうでないなら、ステッ
プ1005に進む。
When an IrCOMM_data instruction is received from the IrCOMM_task 1704 in step 1803, the process proceeds to step 1804. Otherwise, proceed to step 1005.

【0160】ステップ1804で、印刷タスク1702
により印刷部1605に印刷データを出力して、終了す
る。
In step 1804, the print task 1702
Then, the print data is output to the printing unit 1605, and the process ends.

【0161】ステップ1805で、IrCOMM_タス
ク1704からIrCOMM_切断指示を受信したと
き、終了する。そうでないなら、ステップ1806に進
む。
When the IrCOMM_disconnect instruction is received from the IrCOMM_task 1704 in step 1805, the process ends. Otherwise, proceed to step 1806.

【0162】ステップ1806で、IrCOMM_タス
ク1704から初期化指示を受信したとき、ステップ1
807に進む。そうでないなら、終了する。
When the initialization instruction is received from the IrCOMM_task 1704 in step 1806, step 1
Proceed to 807. If not, exit.

【0163】ステップ1807で、印刷タスク1702
により印刷部1605を初期化(印刷データのクリアや
排紙など)して、終了する。
In step 1807, the print task 1702
Then, the printing unit 1605 is initialized (clearing print data, ejecting paper, etc.), and the process ends.

【0164】(第5の発明の実施の形態)本発明の第5
の発明の実施の形態を図にしたがって説明する。
(Embodiment of Fifth Invention) Fifth Embodiment of the Present Invention
Embodiments of the invention will be described with reference to the drawings.

【0165】本発明は、PCおよびプリンタからなる。
PCとプリンタは、IrDAで通信する。
The present invention comprises a PC and a printer.
The PC and the printer communicate by IrDA.

【0166】PCのブロック図は、図1と同じである。The block diagram of the PC is the same as that of FIG.

【0167】プリンタのブロック図は、図16と同じで
ある。
The block diagram of the printer is the same as that of FIG.

【0168】PCプログラムのブロック図は、図3と同
じである。
The block diagram of the PC program is the same as FIG.

【0169】プリンタプログラムのブロック図は、図1
7と同じである。
A block diagram of the printer program is shown in FIG.
Same as 7.

【0170】フレームの形式は、図5と同じである。The frame format is the same as in FIG.

【0171】通信手順は、図6および図7と同じであ
る。
The communication procedure is the same as in FIGS.

【0172】IrCOMMタスク304で実行されるフ
ローチャートは、図11と同じである。
The flowchart executed by the IrCOMM task 304 is the same as that shown in FIG.

【0173】IrLAPタスク1707で実行されるフ
ローチャートは、図12と同じである。本フローチャー
トは、IrLAPタスク1707で繰り返し実行され
る。
The flowchart executed by the IrLAP task 1707 is the same as that shown in FIG. This flowchart is repeatedly executed by the IrLAP task 1707.

【0174】ステップ1201で、UART1608か
ら初期化コマンドを含むIフレームを受信したとき、ス
テップ1202に進む。そうでないなら、ステップ12
03に進む。ここで、Iフレームの形式は、図5と同じ
である。
When the I frame including the initialization command is received from the UART 1608 in step 1201, the process proceeds to step 1202. If not, step 12
Go to 03. Here, the format of the I frame is the same as in FIG.

【0175】ステップ1202で、受信バッファ171
2から1714をクリアする。
In step 1202, the reception buffer 171
Clear 2 to 1714.

【0176】ステップ1203で、通常のIrLAP処
理を行い、終了する。
At step 1203, a normal IrLAP process is performed and the process ends.

【0177】図12では、ステップ1203でIrLM
Pタスク1706に初期化コマンドを送信する前に、ス
テップ1202で受信バッファ1712から1714を
クリアする。このため、本実施例では受信バッファ17
12から1714に印刷データが滞留しているときで
も、ただちに初期化コマンドを受信してプリンタを初期
化できる。
In FIG. 12, in step 1203, IrLM is used.
Before transmitting the initialization command to the P task 1706, the reception buffers 1712 to 1714 are cleared in step 1202. Therefore, in this embodiment, the reception buffer 17
Even when the print data is accumulated in 12 to 1714, the printer can be initialized by receiving the initialization command immediately.

【0178】IrCOMMタスク1704で実行される
フローチャートは、図9と同じである。
The flowchart executed by the IrCOMM task 1704 is the same as that shown in FIG.

【0179】制御タスク1703で実行されるフローチ
ャートは、図18と同じである。
The flowchart executed by the control task 1703 is the same as that shown in FIG.

【0180】(他の発明の実施の形態) (1)第1から第4の発明の実施の形態では、光空間通
信方式としてIrDAを使用しているが、ASK(Am
plitude Shift keying)方式など
の他の光空間通信方式でも実施できる。これは、初期化
コマンドに対応するフィールトを通信フレームに追加す
ることで容易に実施できる。
(Embodiment of Another Invention) (1) In the embodiments of the first to fourth inventions, IrDA is used as the optical space communication system, but ASK (Am
Other optical space communication methods such as a graduated shift keying method can also be used. This can be easily performed by adding a field corresponding to the initialization command to the communication frame.

【0181】(2)第1から第4の発明の実施の形態で
は、光空間通信方式を使用しているが、スペクトラム拡
散方式などの電磁波による無線通信方式でも実施でき
る。これは、初期化コマンドに対応するフィールドを通
信フレームに追加することで容易に実施できる。
(2) In the embodiments of the first to fourth inventions, the optical space communication system is used, but it is also possible to use a wireless communication system using electromagnetic waves such as a spread spectrum system. This can be easily done by adding a field corresponding to the initialization command to the communication frame.

【0182】(3)第1から第3の発明の実施の形態で
はアダプタとプリンタをセントロニクスで接続している
が、IEEE1284のような双方向セントロニクスで
も容易に実施できる。また、RS−232C、USB
(Universal Serial Bus)または
IEEE1394のようなシリアルI/Fでも容易に実
施できる。
(3) In the embodiments of the first to third inventions, the adapter and the printer are connected by Centronics, but it can be easily implemented by bidirectional Centronics such as IEEE1284. Also, RS-232C, USB
(Universal Serial Bus) or a serial I / F such as IEEE1394 can be easily implemented.

【0183】(4)第1から第4の発明の実施の形態で
は印刷データの送信元としてコンピュータを使用してい
るが、PDA(携帯型情報端末)やスチルカメラのよう
な印刷機能をもったホストでも容易に実施できる。
(4) Although the computer is used as the transmission source of the print data in the embodiments of the first to fourth inventions, it has a print function like a PDA (portable information terminal) or a still camera. It can be easily implemented by the host.

【0184】[0184]

【発明の効果】以上説明したように、本発明によれば、
無線通信で接続されるシステムにおいてコンピュータか
らアダプタにプリンタを初期化するための信号を送信で
きる効果がある。
As described above, according to the present invention,
There is an effect that a signal for initializing the printer can be transmitted from the computer to the adapter in the system connected by wireless communication.

【0185】また、バッファをクリアすることにより高
速に初期化処理を行うことができる。
Also, the initialization process can be performed at high speed by clearing the buffer.

【0186】また、通信断の内容に対応して適切な処理
を実行できる。
Further, appropriate processing can be executed in accordance with the contents of communication interruption.

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

【図1】本発明におけるPCのブロック図である。FIG. 1 is a block diagram of a PC according to the present invention.

【図2】本発明におけるアダプタのブロック図である。FIG. 2 is a block diagram of an adapter according to the present invention.

【図3】本発明におけるPC101のCPU102上で
実行されるプログラムのブロック図である。
FIG. 3 is a block diagram of a program executed on the CPU 102 of the PC 101 according to the present invention.

【図4】本発明におけるアダプタ201のCPU202
上で実行されるプログラムのブロック図である。
FIG. 4 is a CPU 202 of an adapter 201 according to the present invention.
FIG. 7 is a block diagram of a program executed above.

【図5】本発明のフレームの形式である。FIG. 5 is a frame format of the present invention.

【図6】PC101とアダプタ201の間の通常の通信
手順である。
FIG. 6 shows a normal communication procedure between a PC 101 and an adapter 201.

【図7】PC101が途中で印刷を中止するときの通信
手順である。
FIG. 7 shows a communication procedure when the PC 101 cancels printing halfway.

【図8】本発明のPC101のROM103に格納され
たプログラムの内、IrCOMMタスク304で実行さ
れるフローチャートである。
FIG. 8 is a flowchart executed by an IrCOMM task 304 of the programs stored in the ROM 103 of the PC 101 of the present invention.

【図9】本発明のアダプタ201のROM203に格納
されたプログラムの内、IrCOMMタスク404で実
行されるフローチャートである。
FIG. 9 is a flowchart executed by an IrCOMM task 404 of the programs stored in the ROM 203 of the adapter 201 of the present invention.

【図10】本発明のアダプタ201のROM203に格
納されたプログラムの内、制御タスク403で実行され
るフローチャートである。
FIG. 10 is a flowchart executed by a control task 403 of the programs stored in the ROM 203 of the adapter 201 of the present invention.

【図11】本発明の第2の発明の実施の形態でPC10
1のROM103に格納されたプログラムの内、IrC
OMMタスク304で実行されるフローチャートであ
る。
FIG. 11 shows the PC 10 according to the second embodiment of the present invention.
IrC among the programs stored in the ROM 103 of No. 1
6 is a flowchart executed by an OMM task 304.

【図12】本発明の第2の発明の実施の形態でアダプタ
201のROM203に格納されたプログラムの内、I
rLAPタスク407で実行されるフローチャートであ
る。
FIG. 12 is a diagram showing an example of I among the programs stored in the ROM 203 of the adapter 201 according to the second embodiment of the present invention.
6 is a flowchart executed by an rLAP task 407.

【図13】PC101とアダプタ201の間の通信エラ
ー時の通信手順である。
13 is a communication procedure at the time of a communication error between the PC 101 and the adapter 201. FIG.

【図14】印刷中止時に通信エラーが発生したときの通
信手順である。
FIG. 14 is a communication procedure when a communication error occurs when printing is stopped.

【図15】本発明の第3の発明の実施の形態でPC10
1のROM103に格納されたプログラムの内、IrC
OMMタスク304で実行されるフローチャートであ
る。
FIG. 15 shows the PC 10 according to the third embodiment of the present invention.
IrC among the programs stored in the ROM 103 of No. 1
6 is a flowchart executed by an OMM task 304.

【図16】本発明におけるプリンタのブロック図であ
る。
FIG. 16 is a block diagram of a printer according to the present invention.

【図17】本発明におけるプリンタ1601のCPU1
602上で実行されるプログラムのブロック図である。
FIG. 17 is a CPU 1 of the printer 1601 according to the present invention.
FIG. 6 is a block diagram of a program executed on 602.

【図18】本発明のプリンタ1601のROM1603
に格納されたプログラムの内、制御タスク1703で実
行されるフローチャートである。
FIG. 18 is a ROM 1603 of the printer 1601 according to the present invention.
7 is a flowchart executed by a control task 1703 of the program stored in FIG.

【図19】IrDAでコンピュータとプリンタを接続す
る従来例である。
FIG. 19 is a conventional example in which a computer and a printer are connected by IrDA.

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

101 PC全体 102 PC全体101を制御するCPU 103 CPU102で実行されるプログラムを格納す
るROM 104 CPU102で使用されるデータを格納するR
AM 105 CPU102で使用されるファイルを格納する
磁気ディスクなどからなる外部記憶装置 106 PCの操作を行うためのキーボードやマウスな
どからなる操作部 107 CRTやLCDなどからなる表示部 108 CPU102に対してシリアル・データ・チャ
ネルを提供するUART(Universal Asy
nchronous Receiver/Transm
itter) 109 UART108から赤外線送信部111への信
号を変換する変調部 110 赤外線受信部112からUART108への信
号を変換する復調部 111 赤外線を送信するLEDとそのドライバなどか
らなる赤外線送信部 112 赤外線を受信するphoto detecto
rとそのドライバなどからなる赤外線受信部 113 構成ブロック102から108を接続するバス
101 whole PC 102 CPU controlling the whole PC 101 ROM 103 storing a program executed by the CPU 102 R storing data used by the CPU 102
AM 105 External storage device including a magnetic disk for storing files used in CPU 102 106 Operation unit including a keyboard and mouse for operating a PC 107 Display unit including CRT and LCD 108 Serial to CPU 102 · UART (Universal Asy) that provides a data channel
nchronous Receiver / Transm
Itter) 109 Modulation unit 110 that converts a signal from the UART 108 to the infrared transmission unit 111 110 Demodulation unit that converts a signal from the infrared reception unit 112 to the UART 108 111 Infrared transmission unit 112 including an LED that transmits infrared light and its driver 112 Receive photo detecto
Infrared receiver 113 consisting of r and its driver, etc. Bus for connecting the constituent blocks 102 to 108

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.6 識別記号 庁内整理番号 FI 技術表示箇所 G06F 3/00 B41J 29/00 E 13/00 351 G06F 1/00 350A H04B 10/105 H04B 9/00 R 10/10 H04L 11/00 310B 10/22 H04L 12/28 (72)発明者 山本 忠 東京都大田区下丸子3丁目30番2号キヤノ ン株式会社内─────────────────────────────────────────────────── ─── Continuation of the front page (51) Int.Cl. 6 Identification code Internal reference number FI Technical display location G06F 3/00 B41J 29/00 E 13/00 351 G06F 1/00 350A H04B 10/105 H04B 9 / 00 R 10/10 H04L 11/00 310B 10/22 H04L 12/28 (72) Inventor Tadashi Yamamoto 3-30-2 Shimomaruko, Ota-ku, Tokyo Canon Inc.

Claims (28)

【特許請求の範囲】[Claims] 【請求項1】 コンピュータと無線通信で接続され、プ
リンタと有線通信で接続されるアダプタにおいて、 コンピュータから初期化コマンドを受信する手段と、 前記初期化コマンドの受信に基づきプリンタに初期化信
号を出力する手段とを設けたことを特徴とするアダプ
タ。
1. An adapter, which is connected to a computer by wireless communication and is connected to a printer by wire communication, means for receiving an initialization command from the computer, and outputting an initialization signal to the printer based on the reception of the initialization command. An adapter that is provided with a means for performing.
【請求項2】 前記初期化コマンドの受信に基づき、バ
ッファに記憶されている印刷データをクリアする手段を
設けたことを特徴とする請求項1記載のアダプタ。
2. The adapter according to claim 1, further comprising means for clearing the print data stored in the buffer when the initialization command is received.
【請求項3】 アダプタを経由してコンピュータとプリ
ンタを接続する印刷システムにおいて、 コンピュータとアダプタを無線通信で接続する手段と、 アダプタとプリンタを有線通信で接続する手段と、 コンピュータからアダプタに初期化コマンドを送信する
手段と、 この初期化コマンドを受信したアダプタがプリンタに初
期化信号を出力する手段とを設けたことを特徴とする印
刷システム。
3. A printing system for connecting a computer and a printer via an adapter, means for connecting the computer and the adapter by wireless communication, means for connecting the adapter and the printer by wired communication, and initialization from the computer to the adapter. A printing system, characterized in that means for transmitting a command and means for outputting an initialization signal to a printer by an adapter receiving the initialization command are provided.
【請求項4】 コンピュータとプリンタを接続する印刷
システムにおいて、 コンピュータとプリンタを無線通信で接続する手段と、 コンピュータからプリンタに初期化コマンドを送信する
手段と、 この初期化コマンドを受信したプリンタが初期化処理を
実行する手段とを設けたことを特徴とする印刷システ
ム。
4. In a printing system for connecting a computer and a printer, a means for connecting the computer and the printer by wireless communication, a means for transmitting an initialization command from the computer to the printer, and a printer for receiving the initialization command is initialized. A printing system, which is provided with a means for executing a digitization process.
【請求項5】 前記無線通信は光空間通信であることを
特徴とする請求項3ないし4記載の印刷システム。
5. The printing system according to claim 3, wherein the wireless communication is optical space communication.
【請求項6】 前記無線通信はIrDAの規格に基づく
通信であることを特徴とする請求項3ないし4記載の印
刷システム。
6. The printing system according to claim 3, wherein the wireless communication is a communication based on the IrDA standard.
【請求項7】 前記有線通信はセントロニクスの規格に
基づく通信であることを特徴とする請求項3ないし6記
載の印刷システム。
7. The printing system according to claim 3, wherein the wired communication is communication based on Centronics standard.
【請求項8】 前記初期化コマンドは、IrDAのIr
COMMの制御パラメータに追加したコマンドであるこ
とを特徴とする請求項6記載の印刷システム。
8. The initialization command is IrDA IrDA.
7. The printing system according to claim 6, wherein the command is a command added to a control parameter of COMM.
【請求項9】 コンピュータが初期化コマンドを送信し
た後に切断要求を送信する手段を設けたことを特徴とす
る請求項3ないし8記載の印刷システム。
9. The printing system according to claim 3, further comprising means for transmitting a disconnection request after the computer transmits the initialization command.
【請求項10】 アダプタが初期化コマンドの後に受信
した切断指示を無視する手段を設けたことを特徴とする
請求項3記載の印刷システム。
10. The printing system according to claim 3, further comprising means for ignoring a disconnection instruction received by the adapter after the initialization command.
【請求項11】 プリンタが初期化コマンドの後に受信
した切断指示を無視する手段を設けたことを特徴とする
請求項3記載の印刷システム。
11. The printing system according to claim 3, further comprising means for ignoring a disconnection instruction received by the printer after the initialization command.
【請求項12】 コンピュータが初期化コマンドを送信
する前に印刷データを格納した送信バッファをクリアす
る手段を設けたことを特徴とする請求項3記載の印刷シ
ステム。
12. The printing system according to claim 3, further comprising means for clearing a transmission buffer storing print data before the computer transmits the initialization command.
【請求項13】 アダプタが初期化コマンドを受信した
ときに印刷データを格納した受信バッファをクリアする
手段を設けたことを特徴とする請求項3記載の印刷シス
テム。
13. The printing system according to claim 3, further comprising means for clearing a reception buffer storing print data when the adapter receives the initialization command.
【請求項14】 プリンタが初期化コマンドを受信した
ときに印刷データを格納した受信バッファをクリアする
手段を設けたことを特徴とする請求項3記載の印刷シス
テム。
14. The printing system according to claim 3, further comprising means for clearing a reception buffer storing print data when the printer receives the initialization command.
【請求項15】 コンピュータが初期化コマンドを送信
した後に通信エラーが発生したとき切断指示を受信する
手段と、 この切断指示を無視する手段とを設けたことを特徴とす
る請求項3記載の印刷システム。
15. The printing method according to claim 3, further comprising means for receiving a disconnection instruction when a communication error occurs after the computer has transmitted the initialization command, and means for ignoring the disconnection instruction. system.
【請求項16】 アダプタを経由して無線通信でコンピ
ュータと有線通信でプリンタを接続する印刷システムの
印刷方法において、 コンピュータからアダプタに初期化コマンドを送信する
ステップと、 この初期化コマンドを受信したアダプタがプリンタに初
期化信号を出力するステップとを設けたことを特徴とす
る印刷方法。
16. A printing method of a printing system in which a printer is connected to a computer by wire communication by wireless communication via an adapter, a step of transmitting an initialization command from the computer to the adapter, and an adapter receiving the initialization command. And a step of outputting an initialization signal to the printer.
【請求項17】 コンピュータとプリンタ無線通信で接
続する印刷システムの印刷方法において、 コンピュータからプリンタに初期化コマンドを送信する
ステップと、 この初期化コマンドを受信したプリンタが初期化処理を
実行するステップとを設けたことを特徴とする印刷方
法。
17. A printing method of a printing system which is connected to a computer by wireless communication with a printer, the step of transmitting an initialization command from the computer to the printer, and the step of executing initialization processing by the printer receiving the initialization command. A printing method comprising:
【請求項18】 前記無線通信は光空間通信であること
を特徴とする請求項16ないし17記載の印刷方法。
18. The printing method according to claim 16, wherein the wireless communication is optical space communication.
【請求項19】 前記無線通信はIrDAの規格に基づ
く通信であることを特徴とする請求項16ないし17記
載の印刷方法。
19. The printing method according to claim 16, wherein the wireless communication is a communication based on the IrDA standard.
【請求項20】 前記有線通信はセントロニクスの規格
に基づく通信であることを特徴とする請求項16ないし
19記載の印刷方法。
20. The printing method according to claim 16, wherein the wired communication is communication based on the Centronics standard.
【請求項21】 前記初期化コマンドは、IrDAのI
rCOMMの制御パラメータに追加したコマンドである
ことを特徴とする請求項19記載の印刷方法。
21. The initialization command is an IrDA I
20. The printing method according to claim 19, wherein the command is a command added to a control parameter of rCOMM.
【請求項22】 コンピュータが初期化コマンドを送信
した後に切断要求を送信するステップを設けたことを特
徴とする請求項16ないし20記載の印刷方法。
22. The printing method according to claim 16, further comprising a step of transmitting a disconnection request after the computer transmits the initialization command.
【請求項23】 アダプタが初期化コマンドの後に受信
した切断指示を無視するステップを設けたことを特徴と
する請求項16記載の印刷方法。
23. The printing method according to claim 16, further comprising a step of ignoring a disconnection instruction received by the adapter after the initialization command.
【請求項24】 プリンタが初期化コマンドの後に受信
した切断指示を無視するステップを設けたことを特徴と
する請求項16記載の印刷方法。
24. The printing method according to claim 16, further comprising a step of ignoring a disconnection instruction received by the printer after the initialization command.
【請求項25】 コンピュータが初期化コマンドを送信
する前に印刷データを格納した送信バッファをクリアす
るステップを設けたことを特徴とする請求項16記載の
印刷方法。
25. The printing method according to claim 16, further comprising the step of clearing a transmission buffer storing print data before the computer transmits an initialization command.
【請求項26】 アダプタが初期化コマンドを受信した
ときに印刷データを格納した受信バッファをクリアする
ステップを設けたことを特徴とする請求項16記載の印
刷方法。
26. The printing method according to claim 16, further comprising a step of clearing a reception buffer storing print data when the adapter receives the initialization command.
【請求項27】 プリンタが初期化コマンドを受信した
ときに印刷データを格納した受信バッファをクリアする
ステップを設けたことを特徴とする請求項16記載の印
刷方法。
27. The printing method according to claim 16, further comprising the step of clearing a reception buffer storing print data when the printer receives an initialization command.
【請求項28】 コンピュータか初期化コマンドを送信
した後に通信エラーが発生したとき切断指示を受信する
ステップと、 この切断指示を無視するステップとを設けたことを特徴
とする請求項16記載の印刷方法。
28. The printing method according to claim 16, further comprising: a step of receiving a disconnection instruction when a communication error occurs after transmitting the initialization command from the computer, and a step of ignoring the disconnection instruction. Method.
JP12158996A 1996-05-16 1996-05-16 Adapter, printing system and printing method Withdrawn JPH09305341A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP12158996A JPH09305341A (en) 1996-05-16 1996-05-16 Adapter, printing system and printing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP12158996A JPH09305341A (en) 1996-05-16 1996-05-16 Adapter, printing system and printing method

Publications (1)

Publication Number Publication Date
JPH09305341A true JPH09305341A (en) 1997-11-28

Family

ID=14814994

Family Applications (1)

Application Number Title Priority Date Filing Date
JP12158996A Withdrawn JPH09305341A (en) 1996-05-16 1996-05-16 Adapter, printing system and printing method

Country Status (1)

Country Link
JP (1) JPH09305341A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7227652B2 (en) 2002-10-17 2007-06-05 Lexmark International, Inc. Switching power supply, method of operation and device-and-power-supply assembly

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7227652B2 (en) 2002-10-17 2007-06-05 Lexmark International, Inc. Switching power supply, method of operation and device-and-power-supply assembly

Similar Documents

Publication Publication Date Title
JP3017925B2 (en) Mobile communication terminal and mobile communication method
US6819677B1 (en) Method and apparatus for recovering data that was transported utilizing multiple data transport protocols
US7685339B2 (en) Remote control system and method thereof
KR100577660B1 (en) A communication adapter and method
WO2004055638A2 (en) Wireless communication between computing devices
KR19990023310A (en) How to establish a connection between a wireless device and a wireless device
US7924767B2 (en) Control and status protocol
KR20030035228A (en) Integrated wired and wireless local area network
US20080069026A1 (en) Repeater for WUSB applications
EP2045724A1 (en) Wireless universal serial bus system and driving method thereof
JPH09305341A (en) Adapter, printing system and printing method
CN111182517A (en) CAN and Bluetooth data conversion system and data transmission method thereof
US9619005B2 (en) Apparatus and method for saving power of USB device
US5923443A (en) Infrared communication port fax software legacy flow control emulation
JP3512146B2 (en) Device driver device
US20040185894A1 (en) Method for providing connections on a portable device, a portable device, and a wireless station
JPH09128311A (en) System, equipment and method for radio wave communication
CN112905303B (en) Non-perception network bridging method and device based on wired network card
JP2737692B2 (en) Data transmission / reception system
JPH08298532A (en) Data transmission system and signal selection connection device
JP2658938B2 (en) Digital mobile data communication switching system, and digital mobile communication switching equipment and digital mobile data communication protocol converter provided therein
EP1927223B1 (en) Fsk data communications using voice modem
KR20050054787A (en) Method and apparatus for matching ports between computer and printer
US7072351B1 (en) Collision recovery interface support in a home phoneline networking alliance media access controller (HPNA MAC) operating in accordance with at least two different data rate standards
JPH11187023A (en) Data communication system and its method

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20030805