JP2002041269A - Printer, method of controlling printer and recording medium recorded program therefor - Google Patents

Printer, method of controlling printer and recording medium recorded program therefor

Info

Publication number
JP2002041269A
JP2002041269A JP2000220582A JP2000220582A JP2002041269A JP 2002041269 A JP2002041269 A JP 2002041269A JP 2000220582 A JP2000220582 A JP 2000220582A JP 2000220582 A JP2000220582 A JP 2000220582A JP 2002041269 A JP2002041269 A JP 2002041269A
Authority
JP
Japan
Prior art keywords
data
interface circuit
reception
error
received
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
JP2000220582A
Other languages
Japanese (ja)
Inventor
Hiroyuki Watanabe
辺 博 之 渡
Motohiro Nakamaki
▲槇▼ 基 裕 中
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2000220582A priority Critical patent/JP2002041269A/en
Publication of JP2002041269A publication Critical patent/JP2002041269A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Accessory Devices And Overall Control Thereof (AREA)
  • Record Information Processing For Printing (AREA)

Abstract

PROBLEM TO BE SOLVED: To reduce CPU's load during the process which stores received data on receiving buffer. SOLUTION: In the case that any receiving error exists on the received data, the received data producing receiving error are canceled and replace it with an error letter '*' in an data receiving process to a serial interface circuit 20 which is executed on a CPU 60. And the error letter '*' is output from the interface circuit 20 as print data. Thus the data, which is output from the interface circuit 20, can be stored on the receiving buffer 49 by just transferring it.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、プリンタ、プリン
タの制御方法、及び、そのためのプログラムを記録した
記録媒体に関し、特に、インターフェース回路で受信し
た受信データを受信バッファに転送する機能を有するプ
リンタ、プリンタの制御方法、及び、そのためのプログ
ラムを記録した記録媒体に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a printer, a method of controlling the printer, and a recording medium on which a program for recording the program is recorded, and more particularly to a printer having a function of transferring received data received by an interface circuit to a receiving buffer. The present invention relates to a method for controlling a printer and a recording medium on which a program for the method is recorded.

【0002】[0002]

【従来の技術】図5は、従来のプリンタ100の内部的
ハードウェア構成を示すブロック図である。この図5に
示すように、プリンタ100は、シリアルインターフェ
ース回路110と、CPU(Central Processing Uni
t)112と、受信バッファ114と、印刷実行部11
6とを備えている。
2. Description of the Related Art FIG. 5 is a block diagram showing an internal hardware configuration of a conventional printer 100. As shown in FIG. 5, the printer 100 includes a serial interface circuit 110 and a CPU (Central Processing Unit).
t) 112, the reception buffer 114, and the print execution unit 11
6 is provided.

【0003】シリアルインターフェース回路110に
は、このプリンタ100に接続されているコンピュータ
から、印刷用のデータとしてのシリアル信号が入力され
る。このシリアルインターフェース回路110に受信さ
れた受信データは、印刷データとして、CPU112を
介して、受信バッファ114に転送される。
A serial signal as printing data is input to a serial interface circuit 110 from a computer connected to the printer 100. The received data received by the serial interface circuit 110 is transferred to the reception buffer 114 via the CPU 112 as print data.

【0004】すなわち、シリアルインターフェース回路
110は、正常に印刷用のデータを受信した場合には、
1バイト分のデータを受信データとして転送レジスタに
格納し、CPU112に対して、データレディ割り込み
要求を出力する。CPU112では、このデータレディ
割り込み要求に基づいて、転送処理が起動され、転送レ
ジスタに格納された1バイト分の受信データを読み込ん
で、印刷データとして受信バッファ114に転送する。
That is, when the serial interface circuit 110 normally receives data for printing,
One byte of data is stored in the transfer register as received data, and a data ready interrupt request is output to the CPU 112. The CPU 112 starts transfer processing based on the data ready interrupt request, reads one byte of received data stored in the transfer register, and transfers the read data to the reception buffer 114 as print data.

【0005】しかし、シリアルインターフェース回路1
10において、受信データが正常に受信できていない場
合も存在する。例えば、受信データに付与されているパ
リティービットでエラーの存否を判断した結果、受信デ
ータに誤りがあることが判明することがある。つまり、
シリアルインターフェース回路110において、パリテ
ィーエラーが発生する場合がある。また、受信データを
受信した際に、受信フレームの容量をオーバーしてしま
い、フレームオーバランエラーが発生する場合もある。
However, the serial interface circuit 1
In 10, there may be cases where the received data is not normally received. For example, as a result of determining the presence or absence of an error based on the parity bit added to the received data, it may be found that the received data has an error. That is,
In the serial interface circuit 110, a parity error may occur. Further, upon receiving the received data, the capacity of the received frame may be exceeded, and a frame overrun error may occur.

【0006】このような受信エラーが発生した場合、シ
リアルインターフェース回路110は、受信データを転
送レジスタに格納するとともに、データレディ割り込み
要求と受信エラー割り込み要求とをCPU112に送信
する。ここで、データレディ割り込み要求よりも、受信
エラー割り込み要求の方が、割り込み優先度が高くなっ
ている。このため、CPU112では、この受信エラー
割り込み要求に基づく処理が行われる。具体的には、受
信エラーの発生した1バイト分の受信データを破棄し
て、代わりの印刷データであるエラー文字「*」に置換
する。そして、このエラー文字「*」を印刷用の印刷デ
ータとして、受信バッファ114に格納する。
When such a reception error occurs, the serial interface circuit 110 stores the reception data in the transfer register and transmits a data ready interrupt request and a reception error interrupt request to the CPU 112. Here, the reception error interrupt request has a higher interrupt priority than the data ready interrupt request. Therefore, the CPU 112 performs a process based on the reception error interrupt request. Specifically, the received data of one byte in which the reception error has occurred is discarded and replaced with the error character “*” which is the substitute print data. Then, the error character “*” is stored in the reception buffer 114 as print data for printing.

【0007】印刷実行部116は、この受信バッファ1
14に格納されている印刷データを順次読み出して、実
際の印刷を行う。
[0007] The print execution unit 116 receives the
14 is sequentially read out and the actual printing is performed.

【0008】1つの例を説明すると、例えば「PEN」
と印刷されるべき受信データを、インターフェース回路
110で正常に受信した場合、印刷実行部116では、
「PEN」という印刷データが受信バッファ114に格
納されているので、「PEN」という印刷を実行する。
一方、例えば、「PEN」の「E」をインターフェース
回路110で受信した際に、何らかの受信エラーが発生
した場合、受信バッファ114には「P*N」という印
刷データが格納されるので、印刷実行部116は「P*
N」という印刷を実行する。
[0008] To explain one example, for example, "PEN"
When the reception data to be printed is normally received by the interface circuit 110, the print execution unit 116
Since the print data “PEN” is stored in the reception buffer 114, the print “PEN” is executed.
On the other hand, for example, if any reception error occurs when “E” of “PEN” is received by the interface circuit 110, the print data “P * N” is stored in the reception buffer 114, so The part 116 has “P *
N ".

【0009】上述した受信データを印刷データとして受
信バッファに格納する処理を、詳しく説明する。まず、
図6に基づいて、シリアルインターフェース回路110
について行われるデータ受信処理を詳しく説明する。こ
のデータ受信処理は、データ受信タスクという形式で実
現されるとともに、CPU112でこのデータ受信タス
クは実行される。
The process of storing the above-mentioned received data as print data in the receive buffer will be described in detail. First,
Based on FIG. 6, the serial interface circuit 110
Will be described in detail. This data receiving process is realized in the form of a data receiving task, and the CPU 112 executes the data receiving task.

【0010】図6に示すように、データ受信処理では、
まず、何からの受信エラーが発生したかどうかを判断す
る(ステップS100)。受信エラーが発生していない
場合(ステップS100:No)は、その1バイト分の
受信データを出力する(ステップS101)。すなわ
ち、1バイト分の受信データを転送レジスタに格納する
とともに、データレディ割り込み要求をCPU112に
出力する。これにより、このデータ受信処理が終了す
る。
As shown in FIG. 6, in the data receiving process,
First, it is determined whether any reception error has occurred (step S100). If no reception error has occurred (step S100: No), the received data of one byte is output (step S101). That is, it stores the received data for one byte in the transfer register and outputs a data ready interrupt request to the CPU 112. Thus, the data receiving process ends.

【0011】一方、受信エラーが発生した場合(ステッ
プS100:Yes)には、受信エラー割り込み要求を
CPU112に出力する(ステップS102)。続い
て、1バイト分の受信データをCPU112に出力する
(ステップS101)。すなわち、1バイト分の受信デ
ータを転送レジスタに格納するとともに、データレディ
割り込み要求をCPU112に出力する。これにより、
このデータ受信処理が終了する。
On the other hand, if a reception error has occurred (step S100: Yes), a reception error interrupt request is output to the CPU 112 (step S102). Subsequently, one byte of received data is output to the CPU 112 (step S101). That is, it stores the received data for one byte in the transfer register and outputs a data ready interrupt request to the CPU 112. This allows
This data reception processing ends.

【0012】次に、図7に基づいて、CPU112で行
われるエラー転送処理について詳しく説明する。このエ
ラー転送処理は、エラー転送タスクという形式で実現さ
れるとともに、CPU112でこのエラー転送タスクは
実行される。また、このエラー転送処理は、シリアルイ
ンターフェース回路110が受信エラー割り込み要求を
出力した場合に割り込みコントローラ(ハンドラー)に
より起動される割り込み処理である。
Next, the error transfer process performed by the CPU 112 will be described in detail with reference to FIG. The error transfer process is realized in the form of an error transfer task, and the CPU 112 executes the error transfer task. The error transfer process is an interrupt process started by an interrupt controller (handler) when the serial interface circuit 110 outputs a reception error interrupt request.

【0013】図7に示すように、CPU112は、1バ
イト分の受信データを転送レジスタから読み込む(ステ
ップS110)。続いて、CPU112は、この1バイ
ト分の受信データを破棄する(ステップS111)。
As shown in FIG. 7, the CPU 112 reads one byte of received data from the transfer register (step S110). Subsequently, the CPU 112 discards the received data of one byte (step S111).

【0014】次に、CPU112は、受信バッファ11
4にエラー文字「*」を書き込む(ステップS11
2)。続いて、データレディ割り込み要求をクリアする
(ステップS113)。
Next, the CPU 112
4 is written with an error character "*" (step S11).
2). Subsequently, the data ready interrupt request is cleared (step S113).

【0015】[0015]

【発明が解決しようとする課題】上述したところから分
かるように、従来のプリンタ100においては、シリア
ルインターフェース回路110で受信した受信データ
を、CPU112を介して、受信バッファ114に印刷
データとして転送していた。しかし、CPU112は、
これらの受信処理以外にも多くの処理を行わなければな
らないため、できるかぎりその負荷を軽減した方が望ま
しい。
As can be seen from the above description, in the conventional printer 100, the received data received by the serial interface circuit 110 is transferred to the receiving buffer 114 via the CPU 112 as print data. Was. However, the CPU 112
Since many processes other than these receiving processes have to be performed, it is desirable to reduce the load as much as possible.

【0016】そこで、本発明は、前記課題に鑑みてなさ
れたものであり、印刷用のデータを受信するインターフ
ェース回路で、受信データに何らかの受信エラーが発生
した場合には、このインターフェース回路の処理部分で
受信データをエラー識別情報に置換した上で出力するこ
とにより、インターフェース回路から受信バッファへの
データ転送を簡易化できるようにすることを目的とす
る。
SUMMARY OF THE INVENTION The present invention has been made in view of the above-mentioned problems, and has been developed in consideration of the above-described problem. It is an object of the present invention to simplify the data transfer from the interface circuit to the reception buffer by outputting the received data after replacing it with the error identification information.

【0017】[0017]

【課題を解決するための手段】上記課題を解決するた
め、本発明に係る外部からの印刷用のデータを受信デー
タとして受信する、インターフェース回路と、前記イン
ターフェース回路で受信した前記受信データに何らかの
受信エラーが発生した場合には、前記受信エラーの発生
した受信データを、エラー識別情報に置換した上で、印
刷データとして前記インターフェース回路から出力す
る、置換出力手段と、前記インターフェース回路で受信
した前記受信データに受信エラーが発生しなかった場合
には、その受信データを印刷データとして前記インター
フェース回路から出力する、受信データ出力手段と、を
備えることを特徴とする。これにより、インターフェー
ス回路から出力されたデータを、受信エラーに対する置
換処理が行われた印刷データとすることができる。
In order to solve the above-mentioned problems, an interface circuit according to the present invention for receiving external print data as reception data, and an interface circuit for receiving reception data received by the interface circuit. When an error has occurred, the reception data in which the reception error has occurred is replaced with error identification information, and then output as print data from the interface circuit. And receiving data output means for outputting the received data as print data from the interface circuit when no reception error has occurred in the data. Thus, the data output from the interface circuit can be used as the print data on which the replacement process for the reception error has been performed.

【0018】さらに、前記インターフェース回路から出
力された前記印刷データを受信バッファに転送する、転
送手段を、備えるようにしてもよい。この場合、転送手
段は、受信エラーに対する置換処理が行われた印刷デー
タを、単に受信バッファへ転送するだけで足りる。
[0018] Further, a transfer means for transferring the print data output from the interface circuit to a reception buffer may be provided. In this case, it is sufficient for the transfer means to simply transfer the print data subjected to the replacement process for the reception error to the reception buffer.

【0019】このため、前記転送手段は、ダイレクト・
メモリ・アクセス・コントローラで構成することも可能
となり、演算処理装置の付加を軽減できる。但し、前記
転送手段は、演算処理装置により実行されるタスクであ
ってもよい。
For this reason, the transfer means is a direct
It is also possible to configure with a memory access controller, and the addition of an arithmetic processing unit can be reduced. However, the transfer means may be a task executed by an arithmetic processing device.

【0020】また、前記エラー識別情報は、前記インタ
ーフェース回路における置換レジスタに格納されてお
り、前記置換出力手段は受信エラーが発生した際に、こ
の置換レジスタからエラー識別情報を取得するようにし
てもよい。
Further, the error identification information is stored in a replacement register in the interface circuit, and the replacement output means acquires the error identification information from the replacement register when a reception error occurs. Good.

【0021】さらに、前記エラー識別情報は、1バイト
分の特定の文字から構成されるようにしてもよい。これ
により、ユーザは特定の文字が印刷されることにより、
受信エラーが発生したことを知徳することができるよう
になる。
Further, the error identification information may be constituted by a specific character of one byte. This allows the user to print specific characters,
It becomes possible to know that a reception error has occurred.

【0022】また、前記受信エラーは、前記受信データ
にデータ誤りがある場合に発生するエラーであってもよ
い。受信データにデータ誤りがある場合には、その受信
データは信用できないため、エラー識別情報に置き換え
ることにより、ユーザに受信エラーが発生したことを知
らせることができる。
Further, the reception error may be an error that occurs when the reception data has a data error. If there is a data error in the received data, the received data cannot be trusted. Therefore, by replacing the received data with error identification information, the user can be notified that a reception error has occurred.

【0023】[0023]

【発明の実施の形態】本発明は、印刷データを受信した
際に受信エラーが発生した場合には、シリアルインター
フェース回路で該当する文字を「*」に置換した上で、
DMA転送により、印刷データとして受信バッファに格
納するようにしたものである。そして、これにより、C
PUを介在させずに受信データを、印刷データとして受
信バッファに格納し得るようにしたものである。より詳
しくを、以下に説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS According to the present invention, when a reception error occurs when print data is received, the corresponding character is replaced with "*" by a serial interface circuit,
The print data is stored in a reception buffer by DMA transfer. And this gives C
The reception data can be stored in the reception buffer as print data without the intervention of the PU. This will be described in more detail below.

【0024】図1は、本発明の一実施形態に係るプリン
タ10のハードウェア構成を示すブロック図である。こ
の図1に示すように、プリンタ10は、シリアルインタ
ーフェース回路20と、DMA(Direct Memory Acces
s)コントローラ30と、受信バッファ40と、印刷実
行部50と、CPU(Central Processing Unit)60
とを、備えて構成されている。CPU60が、本実施形
態における演算処理装置を構成する。
FIG. 1 is a block diagram showing a hardware configuration of a printer 10 according to one embodiment of the present invention. As shown in FIG. 1, the printer 10 includes a serial interface circuit 20 and a DMA (Direct Memory Acceses).
s) Controller 30, reception buffer 40, print execution unit 50, CPU (Central Processing Unit) 60
And are provided. The CPU 60 constitutes an arithmetic processing device according to the present embodiment.

【0025】シリアルインターフェース回路20には、
図示しないコンピュータから印刷用のデータが入力され
る。本実施形態では、この印刷データは、シリアルデー
タ信号として、シリアルインターフェース回路20に入
力される。
The serial interface circuit 20 includes:
Printing data is input from a computer (not shown). In the present embodiment, the print data is input to the serial interface circuit 20 as a serial data signal.

【0026】シリアルインターフェース回路20に入力
された印刷データが、正常に受信できた場合には、シリ
アルインターフェース回路20を制御するデータ受信処
理において、その受信データが印刷データとしてDMA
コントローラ30に送信される。すなわち、1バイト分
の受信データが印刷データとして転送レジスタに格納さ
れた上で、データレディ割り込み要求がDMAコントロ
ーラ30に出力される。
If the print data input to the serial interface circuit 20 is normally received, the received data is used as print data in a DMA reception process for controlling the serial interface circuit 20.
Sent to controller 30. That is, after one byte of received data is stored in the transfer register as print data, a data ready interrupt request is output to the DMA controller 30.

【0027】一方、シリアルインターフェース回路20
に入力された印刷データに、何らかの受信エラーが発生
した場合には、シリアルインターフェース回路20を制
御するデータ受信処理において、該当する1バイト分の
受信データを置換レジスタ22に格納されているエラー
文字に置換した上で、印刷データとしてDMAコントロ
ーラ30に出力される。本実施形態においては、置換レ
ジスタ22にエラー文字として「*」が格納されてい
る。このため、1バイト分の印刷データとして「*」が
転送レジスタに格納された上で、データレディ割り込み
要求がDMAコントローラ30に出力される。
On the other hand, the serial interface circuit 20
If any reception error occurs in the print data input to the printer, the received data corresponding to one byte is replaced with the error character stored in the replacement register 22 in the data reception processing for controlling the serial interface circuit 20. After the replacement, the data is output to the DMA controller 30 as print data. In the present embodiment, “*” is stored in the replacement register 22 as an error character. Therefore, “*” is stored in the transfer register as one-byte print data, and then a data ready interrupt request is output to the DMA controller 30.

【0028】DMAコントローラ30は、CPU60を
介さずにメモリアクセスすることを可能にするダイレク
ト・メモリ・アクセス実現のためのコントローラであ
る。したがって、データレディ割り込み要求を受けたD
MAコントローラ30は、転送レジスタから1バイト分
の印刷データを取り出して、そのまま受信バッファ40
に格納する。印刷実行部50は、受信バッファ40に格
納されている印刷データを順次読み出して、必要な言語
解釈を行い、ビットイメージに展開した上で、印刷のた
めのヘッドを駆動して、実際に印刷用紙に印刷を行う。
この印刷を行うために必要な制御や処理は、CPU60
において実行される。
The DMA controller 30 is a controller for realizing direct memory access which enables memory access without the intervention of the CPU 60. Therefore, D which receives the data ready interrupt request
The MA controller 30 fetches one byte of print data from the transfer register, and
To be stored. The print execution unit 50 sequentially reads out the print data stored in the reception buffer 40, performs a necessary language interpretation, develops the image into a bit image, and drives a print head to actually print a print sheet. Print on.
The control and processing required to perform this printing are performed by the CPU 60.
Executed in

【0029】次に、図2に基づいて、シリアルインター
フェース回路20について行われるデータ受信処理を詳
しく説明する。このデータ受信処理は、データ受信タス
クという形式で実現されるとともに、CPU60でこの
データ受信タスクは実行される。
Next, the data reception processing performed by the serial interface circuit 20 will be described in detail with reference to FIG. The data receiving process is realized in the form of a data receiving task, and the CPU 60 executes the data receiving task.

【0030】図2に示すように、データ受信処理では、
まず、何からの受信エラーが発生したかどうかを判断す
る(ステップS10)。受信エラーが発生していない場
合(ステップS10:No)は、その1バイト分の受信
データをDMAコントローラ30に出力する(ステップ
S11)。すなわち、1バイト分の印刷データを転送レ
ジスタに格納するとともに、データレディ割り込み要求
をDMAコントローラ30に出力する。これにより、デ
ータ受信処理が終了する。
As shown in FIG. 2, in the data receiving process,
First, it is determined whether any reception error has occurred (step S10). If no reception error has occurred (step S10: No), the received data of one byte is output to the DMA controller 30 (step S11). That is, the print data for one byte is stored in the transfer register, and a data ready interrupt request is output to the DMA controller 30. Thus, the data receiving process ends.

【0031】一方、受信エラーが発生した場合(ステッ
プS10:Yes)には、その1バイト分の受信データ
を破棄して、置換レジスタ22に格納されているエラー
文字「*」と入れ換える(ステップS12)。そして、
この置換したエラー文字「*」を、印刷データとしてD
MAコントローラ30に出力する(ステップS11)。
すなわち、印刷データとしてエラー文字「*」を転送レ
ジスタに格納するとともに、データレディ割り込み要求
をDMAコントローラ30に出力する。これにより、デ
ータ受信処理が終了する。
On the other hand, if a reception error has occurred (step S10: Yes), the received data of one byte is discarded and replaced with the error character "*" stored in the replacement register 22 (step S12). ). And
This replaced error character "*" is used as print data in D
Output to MA controller 30 (step S11).
That is, the error character "*" is stored in the transfer register as print data, and a data ready interrupt request is output to the DMA controller 30. Thus, the data receiving process ends.

【0032】次に、図3に基づいて、DMAコントロー
ラ30で行われる転送処理について詳しく説明する。こ
の図3は、DMAコントローラ30で行われる転送処理
を説明するフローチャートであり、CPU60が関与せ
ずに実行される。また、この転送処理は、シリアルイン
ターフェース回路20からデータレディ割り込み要求を
DMAコントローラ30が受信した場合に、起動され
る。
Next, the transfer process performed by the DMA controller 30 will be described in detail with reference to FIG. FIG. 3 is a flowchart for explaining the transfer processing performed by the DMA controller 30, and is executed without involving the CPU 60. This transfer process is started when the DMA controller 30 receives a data ready interrupt request from the serial interface circuit 20.

【0033】図3に示すように、DMAコントローラ3
0は、転送レジスタに格納されている印刷データを、1
バイト分読み込む(ステップS20)。そして、DMA
コントローラ30は、この印刷データを受信バッファ4
0に書き込む(ステップS21)。これにより、転送処
理が終了する。
As shown in FIG. 3, the DMA controller 3
0 indicates that the print data stored in the transfer register is 1
The bytes are read (step S20). And DMA
The controller 30 sends the print data to the reception buffer 4
Write to 0 (step S21). Thus, the transfer process ends.

【0034】以上のように、本実施形態に係るプリンタ
10によれば、シリアルインターフェース回路20を制
御するデータ受信処理において、受信データに受信エラ
ーが発生した場合には、その該当する文字については、
エラー文字「*」で置換することとしたので、プリンタ
10はこのデータ受信処理で出力されたデータを印刷デ
ータとして、単純に受信バッファ40に格納するだけで
よいことになる。
As described above, according to the printer 10 of the present embodiment, when a reception error occurs in the reception data in the data reception processing for controlling the serial interface circuit 20, the corresponding character is
Since the error character "*" has been replaced, the printer 10 simply stores the data output in this data reception process as print data in the reception buffer 40.

【0035】このため、シリアルインターフェース回路
20から受信バッファ40へのデータ転送を、DMAコ
ントローラ30によるDMA転送にすることができる。
このように、DMA転送にすることにより、CPU60
がこのデータ転送に関与する必要がなくなり、CPU6
0の負荷を軽減することができる。
Therefore, data transfer from the serial interface circuit 20 to the reception buffer 40 can be performed by DMA transfer by the DMA controller 30.
As described above, the DMA transfer enables the CPU 60
Need not be involved in this data transfer.
0 can be reduced.

【0036】なお、本発明は上記実施形態に限定されず
種々に変形可能である。例えば、上述した実施形態にお
いては、プリンタ10がシリアルインターフェース回路
20を有する場合を例に説明したが、何らかの受信エラ
ーの発生し得る、パラレルインターフェース回路等の他
のインターフェース回路を有するプリンタに対しても同
様に適用できる。例えば、コンピュータからプリンタ1
0に入力されるデータ信号が、パリティビットを備えて
おり、これによりパリティエラーが発生し得るパラレル
インターフェース回路を有するプリンタに対し適用する
ことができる。
The present invention is not limited to the above embodiment, but can be variously modified. For example, in the above-described embodiment, the case where the printer 10 has the serial interface circuit 20 has been described as an example. However, the present invention can be applied to a printer having another interface circuit such as a parallel interface circuit which may cause some reception error. The same applies. For example, from the computer to the printer 1
The data signal input to 0 has a parity bit, which can be applied to a printer having a parallel interface circuit in which a parity error can occur.

【0037】また、上述した実施形態では、シリアルイ
ンターフェース回路20から受信バッファ40へのデー
タ転送を、DMAコントローラ30で行うこととした
が、図4に示すようにプリンタを構成することにより、
CPU60で実行されるタスクで行うようにしてもよ
い。さらに、上述した実施形態においては、受信エラー
が発生した場合でも、シリアルインターフェース回路2
0からDMAコントローラ30に受信エラー割り込み要
求を送信しないこととしたが、この受信エラー割り込み
要求を送信するようにしてもよい。
Further, in the above-described embodiment, the data transfer from the serial interface circuit 20 to the reception buffer 40 is performed by the DMA controller 30, but by configuring the printer as shown in FIG.
The task may be performed by the CPU 60. Further, in the above-described embodiment, even when a reception error occurs, the serial interface circuit 2
Although the reception error interrupt request is not transmitted from 0 to the DMA controller 30, the reception error interrupt request may be transmitted.

【0038】さらに、上述した実施形態では、受信エラ
ーが発生した場合には、その受信データの代わりに印刷
するエラー識別情報として、エラー文字「*」を印刷す
ることとしたが、他の情報を印刷するようにしてもよ
い。
Further, in the above-described embodiment, when a reception error occurs, an error character "*" is printed as error identification information to be printed instead of the received data. You may make it print.

【0039】また、上述の実施形態で説明した図2のデ
ータ受信処理ついては、及び、図3の転送処理をCPU
60で実行される処理として実現する場合においては、
これら各処理を実行するためのプログラムをフロッピー
(登録商標)ディスク、CD−ROM(Compact Disc-R
ead Only Memory)、ROM、メモリカード等の記録媒
体に記録して、記録媒体の形で頒布することが可能であ
る。この場合、このプログラムが記録された記録媒体を
プリンタ10に読み込ませ、実行させることにより、上
述した実施形態を実現することができる。
The data reception processing of FIG. 2 described in the above embodiment and the transfer processing of FIG.
In the case of realizing as the process executed in 60,
Programs for executing these processes are stored on a floppy (registered trademark) disk, CD-ROM (Compact Disc-R
It can be recorded on a recording medium such as an ead only memory (ROM), a ROM, or a memory card and distributed in the form of a recording medium. In this case, the above-described embodiment can be realized by causing the printer 10 to read the recording medium on which the program is recorded and to execute the program.

【0040】また、プリンタ10は、オペレーティング
システムや別のアプリケーションプログラム等の他のプ
ログラムを備える場合がある。この場合、プリンタ10
の備える他のプログラムを活用し、記録媒体にはそのプ
リンタ10が備えるプログラムの中から、本実施形態と
同等の処理を実現するプログラムを呼び出すような命令
を記録するようにしてもよい。
The printer 10 may include another program such as an operating system or another application program. In this case, the printer 10
By utilizing another program included in the printer 10, an instruction to call a program for realizing the same processing as that of the present embodiment from among the programs included in the printer 10 may be recorded on the recording medium.

【0041】さらに、このようなプログラムは、記録媒
体の形ではなく、ネットワークを通じて搬送波として頒
布することも可能である。ネットワーク上を搬送波の形
で伝送されたプログラムは、プリンタ10に取り込まれ
て、このプログラムを実行することにより上述した実施
形態を実現することができる。
Further, such a program can be distributed not as a recording medium but as a carrier through a network. The program transmitted on the network in the form of a carrier wave is taken into the printer 10, and the above-described embodiment can be realized by executing the program.

【0042】また、記録媒体にプログラムを記録する際
や、ネットワーク上を搬送波として伝送される際に、プ
ログラムの暗号化や圧縮化がなされている場合がある。
この場合には、これら記録媒体や搬送波からプログラム
を読み込んだプリンタ10は、そのプログラムの復号化
や伸張化を行った上で、実行する必要がある。
Further, when a program is recorded on a recording medium or transmitted as a carrier wave over a network, the program may be encrypted or compressed.
In this case, the printer 10 that has read the program from the recording medium or the carrier wave needs to execute the program after decoding and decompressing the program.

【0043】[0043]

【発明の効果】以上説明したように、本発明によれば、
受信エラーが発生した場合に、インターフェース回路か
ら受信データをエラー識別情報に置換した印刷データを
出力することとしたので、インターフェース回路から出
力したデータを受信バッファに格納する処理を簡素化す
ることができる。
As described above, according to the present invention,
When a reception error occurs, the print data in which the reception data is replaced with the error identification information is output from the interface circuit, so that the process of storing the data output from the interface circuit in the reception buffer can be simplified. .

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

【図1】本発明の一実施形態に係るプリンタのハードウ
ェア構成を示すブロック図。
FIG. 1 is a block diagram showing a hardware configuration of a printer according to an embodiment of the present invention.

【図2】シリアルインターフェース回路に対して行われ
るデータ受信処理の内容を説明するフローチャートを示
す図。
FIG. 2 is a flowchart illustrating the contents of a data reception process performed on a serial interface circuit.

【図3】DMAコントローラで実行される転送処理の内
容を説明するフローチャートを示す図。
FIG. 3 is a flowchart illustrating the contents of a transfer process executed by a DMA controller.

【図4】本発明の変形例を示す図。FIG. 4 is a diagram showing a modification of the present invention.

【図5】従来のプリンタのハードウェア構成を示すブロ
ック図。
FIG. 5 is a block diagram illustrating a hardware configuration of a conventional printer.

【図6】従来のプリンタで実行される、シリアルインタ
ーフェース回路に対するデータ受信処理の内容を説明す
るフローチャートを示す図
FIG. 6 is a flowchart illustrating the contents of data reception processing for a serial interface circuit, which is executed by a conventional printer.

【図7】従来のプリンタにおけるCPUで実行される、
エラー転送処理の内容を説明するフローチャートを示す
FIG. 7 is executed by a CPU in a conventional printer;
FIG. 6 is a flowchart illustrating the contents of an error transfer process.

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

10 プリンタ 20 シリアルインターフェース 22 置換レジスタ 30 DMAコントローラ 40 受信バッファ 50 印刷実行部 60 CPU 10 Printer 20 Serial Interface 22 Replacement Register 30 DMA Controller 40 Receive Buffer 50 Print Execution Unit 60 CPU

───────────────────────────────────────────────────── フロントページの続き Fターム(参考) 2C061 AP01 HH01 HJ06 HV05 HV40 HV47 2C087 AB05 BD01 BD41 BD46 BD53 5B021 AA01 BB01 BB10 DD01 NN16 ──────────────────────────────────────────────────続 き Continued on the front page F term (reference) 2C061 AP01 HH01 HJ06 HV05 HV40 HV47 2C087 AB05 BD01 BD41 BD46 BD53 5B021 AA01 BB01 BB10 DD01 NN16

Claims (9)

【特許請求の範囲】[Claims] 【請求項1】外部からの印刷用のデータを受信データと
して受信する、インターフェース回路と、 前記インターフェース回路で受信した前記受信データに
何らかの受信エラーが発生した場合には、前記受信エラ
ーの発生した受信データを、エラー識別情報に置換した
上で、印刷データとして前記インターフェース回路から
出力する、置換出力手段と、 前記インターフェース回路で受信した前記受信データに
受信エラーが発生しなかった場合には、その受信データ
を印刷データとして前記インターフェース回路から出力
する、受信データ出力手段と、 を備えることを特徴とするプリンタ。
An interface circuit for receiving print data from the outside as received data, and in the case where any received error occurs in the received data received by the interface circuit, the reception in which the reception error has occurred. Replacing the data with the error identification information and outputting the print data as print data from the interface circuit; and replacing the received data received by the interface circuit if no reception error has occurred. A receiving data output unit that outputs data from the interface circuit as print data.
【請求項2】前記インターフェース回路から出力された
前記印刷データを受信バッファに転送する、転送手段
を、さらに備えることを特徴とする請求項1に記載のプ
リンタ。
2. The printer according to claim 1, further comprising a transfer unit that transfers the print data output from the interface circuit to a reception buffer.
【請求項3】前記転送手段は、ダイレクト・メモリ・ア
クセス・コントローラである、ことを特徴とする請求項
2に記載のプリンタ。
3. The printer according to claim 2, wherein said transfer means is a direct memory access controller.
【請求項4】前記転送手段は、演算処理装置により実行
されるタスクである、ことを特徴とする請求項2に記載
のプリンタ。
4. The printer according to claim 2, wherein said transfer means is a task executed by an arithmetic processing unit.
【請求項5】前記エラー識別情報は、前記インターフェ
ース回路における置換レジスタに格納されており、前記
置換出力手段は受信エラーが発生した際に、この置換レ
ジスタからエラー識別情報を取得する、ことを特徴とす
る請求項1乃至請求項4のいずれかに記載のプリンタ。
5. The method according to claim 1, wherein said error identification information is stored in a replacement register in said interface circuit, and said replacement output means acquires error identification information from said replacement register when a reception error occurs. The printer according to any one of claims 1 to 4, wherein
【請求項6】前記エラー識別情報は、1バイト分の特定
の文字から構成されている、ことを特徴とする請求項1
乃至請求項5のいずれかに記載のプリンタ。
6. The apparatus according to claim 1, wherein the error identification information is composed of a specific character of one byte.
A printer according to any one of claims 5 to 5.
【請求項7】前記受信エラーは、前記受信データにデー
タ誤りがある場合に発生するエラーである、ことを特徴
とする請求項1乃至請求項6のいずれかに記載のプリン
タ。
7. The printer according to claim 1, wherein the reception error is an error that occurs when there is a data error in the reception data.
【請求項8】外部からの印刷用のデータを受信データと
して受信する、インターフェース回路を有するプリンタ
の制御方法であって、 前記インターフェース回路で受信した前記受信データに
何らかの受信エラーが発生した場合には、前記受信エラ
ーの発生した受信データを、エラー識別情報に置換した
上で、印刷データとして前記インターフェース回路から
出力する、置換出力工程と、 前記インターフェース回路で受信した前記受信データに
受信エラーが発生しなかった場合には、その受信データ
を印刷データとして前記インターフェース回路から出力
する、受信データ出力工程と、 を備えることを特徴とするプリンタの制御方法。
8. A control method of a printer having an interface circuit for receiving print data from the outside as reception data, wherein when any reception error occurs in the reception data received by the interface circuit. Replacing the reception data in which the reception error has occurred with error identification information and outputting the print data as print data from the interface circuit; anda reception error occurs in the reception data received by the interface circuit. A receiving data output step of outputting the received data as print data from the interface circuit when there is no printer data.
【請求項9】外部からの印刷用のデータを受信データと
して受信する、インターフェース回路を有するプリンタ
を制御するためのプログラムが記録された記録媒体であ
って、 前記インターフェース回路で受信した前記受信データに
何らかの受信エラーが発生した場合には、前記受信エラ
ーの発生した受信データを、エラー識別情報に置換した
上で、印刷データとして前記インターフェース回路から
出力する、置換出力ステップと、 前記インターフェース回路で受信した前記受信データに
受信エラーが発生しなかった場合には、その受信データ
を印刷データとして前記インターフェース回路から出力
する、受信データ出力ステップと、 を備えるプログラムが記録されたことを特徴とする記録
媒体。
9. A recording medium on which a program for controlling a printer having an interface circuit for receiving external print data as received data is recorded, wherein the received data received by the interface circuit is stored in a storage medium. When any reception error has occurred, the reception data in which the reception error has occurred is replaced with error identification information, and then output as print data from the interface circuit. A receiving data output step of outputting the received data as print data from the interface circuit when a reception error does not occur in the received data, wherein a program is recorded.
JP2000220582A 2000-07-21 2000-07-21 Printer, method of controlling printer and recording medium recorded program therefor Withdrawn JP2002041269A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000220582A JP2002041269A (en) 2000-07-21 2000-07-21 Printer, method of controlling printer and recording medium recorded program therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000220582A JP2002041269A (en) 2000-07-21 2000-07-21 Printer, method of controlling printer and recording medium recorded program therefor

Publications (1)

Publication Number Publication Date
JP2002041269A true JP2002041269A (en) 2002-02-08

Family

ID=18715163

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000220582A Withdrawn JP2002041269A (en) 2000-07-21 2000-07-21 Printer, method of controlling printer and recording medium recorded program therefor

Country Status (1)

Country Link
JP (1) JP2002041269A (en)

Similar Documents

Publication Publication Date Title
US7675643B2 (en) Print controller, control method therefor and program
JPH01277928A (en) Printer
EP1347373A2 (en) Apparatus for processing instructions of different instruction set architectures
JP4881140B2 (en) Data transfer device, data transfer control method, and data transfer control program
JPH10334037A (en) Communication dma device
JP2002041269A (en) Printer, method of controlling printer and recording medium recorded program therefor
JPH1078856A (en) Interruption by priority printing method and system therefor
JP4400097B2 (en) Printing apparatus, printing control method, program, and recording medium
JP2000148663A (en) Dma device and image forming device using the dma device
JP2003248558A (en) Method and device for data transfer
JPH0542749A (en) Printing suspension processing device
JP5004322B2 (en) Data transfer control method, apparatus, and image forming apparatus
JP2022122677A (en) Information processor and method for controlling information processor
JP3069867U (en) Electronic equipment
JP2000181810A (en) Peripheral control processor
JP3248796B2 (en) Network printer system
JPH10278364A (en) Page printer
JPH11203059A (en) Image input and output device and its memory access method, and storage medium storing computer readable program
JPH07320066A (en) Image processor
JP2870200B2 (en) Data processing device
JPH10283285A (en) High-speed data transfer device
JP2002292943A (en) Printer and data transfer method in printer
JPH11134202A (en) Task switching device
JPH06155820A (en) Data management system for printer
JP2516810C (en)

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20071002