JPH04313117A - Printer - Google Patents

Printer

Info

Publication number
JPH04313117A
JPH04313117A JP3003954A JP395491A JPH04313117A JP H04313117 A JPH04313117 A JP H04313117A JP 3003954 A JP3003954 A JP 3003954A JP 395491 A JP395491 A JP 395491A JP H04313117 A JPH04313117 A JP H04313117A
Authority
JP
Japan
Prior art keywords
program
control
printer
control code
print
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP3003954A
Other languages
Japanese (ja)
Inventor
Shuji Otsuka
大 塚 修 司
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 JP3003954A priority Critical patent/JPH04313117A/en
Publication of JPH04313117A publication Critical patent/JPH04313117A/en
Pending legal-status Critical Current

Links

Landscapes

  • Accessory Devices And Overall Control Thereof (AREA)

Abstract

PURPOSE:To simply change a control program according to the change of a control code system for a printer. CONSTITUTION:A printer is provided to control a printer mechanism 9 in accordance with the control code give from the outside when a CPU 23 carries out a control program stored previously. Then the printer is provided with a 1st nonvolatile program memory 33 which stores a 1st part where the program that is forcibly changed with the change of a control code system is included and the program used for control of a printer mechanism is not included and 2nd nonvolatile program memory 31 which stores a 2nd part where excluding the 1st part. The memory 33 can be electrically rewritten.

Description

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

【0001】0001

【産業上の利用分野】本発明はコンピュータのような情
報処理機器と組み合わせて使用されるプリンタに関わり
、特にその制御プログラムの記憶と書き替えとに関する
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a printer used in combination with an information processing device such as a computer, and particularly to storage and rewriting of a control program therefor.

【0002】0002

【従来の技術】プリンタの制御プログラムはEPROM
またはマスクROMに記憶されるか、プログラムROM
が内蔵可能なシングルチップCPU内に記憶され、回路
基板上に搭載される。製品完成後における制御プログラ
ムの変更は原則として不可能であるため、変更の必要が
生じないよう、制御プログラムの内容には必要の可能性
が考えられるあらゆる仕様が盛り込まれる。
[Prior Art] Printer control programs are stored in EPROM.
Or stored in mask ROM or program ROM
is stored in a single-chip CPU that can be built in, and mounted on a circuit board. In principle, it is impossible to change the control program after the product is completed, so all possible specifications that may be necessary are included in the contents of the control program to avoid the need for changes.

【0003】ところで、異メーカからの複数種のホスト
コンピュータに接続可能であるプリンタが知られている
。通常、メーカ毎に使用する制御コード体系が異なるた
め、こうしたタイプのプリンタは複数の制御コード体系
のいずれに対しても動作することが要求される。そのた
め、そのようなプリンタの制御プログラムでは、その制
御コード解析部分が、それら複数の制御コード体系の全
てに対応するために、通常のプリンタ複数台分のプログ
ラム容量を必要とする。しかし、このような大容量のプ
ログラムは、その容量の多さと複雑さ故に、その開発に
要する手間と時間が多大である。さらに、制御コード解
析の複雑化がプリンタのスループットの低下につながる
By the way, printers that can be connected to a plurality of types of host computers from different manufacturers are known. Typically, different manufacturers use different control code systems, so these types of printers are required to operate with any of a plurality of control code systems. Therefore, in a control program for such a printer, the control code analysis portion thereof requires a program capacity equivalent to that of a plurality of normal printers in order to support all of the plurality of control code systems. However, such a large-capacity program requires a great deal of effort and time to develop because of its large capacity and complexity. Furthermore, the complexity of control code analysis leads to a decrease in printer throughput.

【0004】或いは、共通のハードウェアに異なった制
御プログラムを搭載することにより、異なった制御コー
ド体系に各々対応する複数の派生機器を製造する場合が
ある。このような場合、機種が多種に亘りかつ各機種台
数が少数となったときには、製造と管理とに無駄が生じ
る。
Alternatively, a plurality of derivative devices each corresponding to different control code systems may be manufactured by installing different control programs on common hardware. In such a case, if there are many different models and the number of each model is small, there will be waste in manufacturing and management.

【0005】さらには、アディショナルプログラムが接
続できるハードウェアを搭載し、オプションのカートリ
ッジまたはカードとして、異なった制御コード体系の制
御プログラムをサポートすることも考えられる。しかし
、この場合は、そうした付加機能のためにコストアップ
を生じる。
Furthermore, it is also conceivable to install hardware to which additional programs can be connected, and to support control programs with different control code systems as an optional cartridge or card. However, in this case, such additional functions increase costs.

【0006】[0006]

【発明が解決しようとする課題】本発明の目的は、プリ
ンタにおいて、異なる制御コード体系に対応するための
制御プログラムの変更が簡単に行えるようにすることに
ある。
SUMMARY OF THE INVENTION An object of the present invention is to enable a printer to easily change a control program to accommodate different control code systems.

【0007】[0007]

【課題を解決するための手段】本発明は、予め記憶して
ある制御プログラムをCPUが外部から与えられる制御
コードに応じて実行することによりプリンタメカニズム
を制御するプリンタであって、制御プログラムのうち、
制御コード体系の変更によって変更を強いられるプログ
ラムを含み且つプリンタメカニズムの制御のためのプロ
グラムを含まない第一の部分を記憶した不揮発性の第一
のプログラムメモリと、第一の部分を除いた部分である
第二の部分を記憶した不揮発性の第二のプログラムメモ
リとを有し、第一のプログラムメモリは電気的に書き替
えが可能であるプリンタを提供する。
[Means for Solving the Problems] The present invention is a printer that controls a printer mechanism by having a CPU execute a control program stored in advance in response to a control code given from the outside. ,
a nonvolatile first program memory that stores a first portion that includes a program that is forced to change due to a change in the control code system and does not include a program for controlling the printer mechanism; and a portion that excludes the first portion. and a non-volatile second program memory storing a second portion, the first program memory being electrically rewritable.

【0008】[0008]

【作用】使用する制御コード体系が変更された場合は、
第一のプログラムメモリ内のプログラム部分のみを書き
替えることにより、容易に対応できる。しかも、プロン
タメカニズムの制御のためのプログラムは変更されない
から、上記書き替えに万一ミスがあっても、安全が保証
される。
[Effect] If the control code system used is changed,
This can be easily handled by rewriting only the program portion in the first program memory. Moreover, since the program for controlling the prompter mechanism is not changed, safety is guaranteed even if there is an error in the above rewriting.

【0009】[0009]

【実施例】図1は本発明に係るプリンタの一実施例の全
体のハードウェア構成を示す。
DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 1 shows the overall hardware configuration of an embodiment of a printer according to the present invention.

【0010】図1において、キャリッジモータ1、紙送
りモータ3、プリントヘッド5および用紙センサや温度
センサ等のセンサ群7を含むプリンタメカニズム9と、
操作スイッチやLED表示器を含むオペレーションパネ
ル11とがそれぞれ、ドライバ13、15、17および
インタフェース回路19、21を介して、このプリンタ
全体の制御を司るCPU23に接続されている。また、
このCPU23はCPUバス25を介して、ホストコン
ピュータ27との通信のためのインタフェース回路29
、制御プログラムを格納したPROM31とEEPRO
M33、ワークRAM35およびキャラクタパターンを
格納したキャラクタジェネレータROM37に接続され
ている。
In FIG. 1, a printer mechanism 9 includes a carriage motor 1, a paper feed motor 3, a print head 5, and a group of sensors 7 such as a paper sensor and a temperature sensor;
An operation panel 11 including operation switches and an LED display is connected to a CPU 23 that controls the entire printer via drivers 13, 15, 17 and interface circuits 19, 21, respectively. Also,
This CPU 23 has an interface circuit 29 for communicating with a host computer 27 via a CPU bus 25.
, PROM31 and EEPRO that store the control program
M33, a work RAM 35, and a character generator ROM 37 that stores character patterns.

【0011】CPU23を動作させるための制御プログ
ラムはPROM31とEEPROM33とに分けて格納
されている。
A control program for operating the CPU 23 is stored separately in a PROM 31 and an EEPROM 33.

【0012】PROM31に格納された制御プログラム
部分は、 ■  メカニズム9の制御 ■  オペレーションパネル11の制御■  リセット
時のイニシャライズ動作■  センサ群5とのインタフ
ェース ■  ホストコンピュータ27からのデータ受信(セン
トロニクス・インタフェース、RS−232Cインタフ
ェース等)のプロトコルやデータバッファリング制御等
のようなハードウェアの制御とプリンタの基本動作とに
関わる部分、並びにEEPROM33の書き替えに関す
る部分を含む。
The control program portion stored in the PROM 31 includes: ■ Control of the mechanism 9 ■ Control of the operation panel 11 ■ Initialization operation at reset ■ Interface with the sensor group 5 ■ Data reception from the host computer 27 (Centronics interface, RS-232C interface, etc.), hardware control such as data buffering control, basic operations of the printer, and rewriting of the EEPROM 33.

【0013】一方、EEOROM33に格納された制御
プログラム部分は、 ■  ホストコンピュータ27により異なる制御コード
の解析とその実行 ■  オペレーションパネル11の操作スイッチや表示
装置の機能等に関する部分を含む。
On the other hand, the control program portion stored in the EEOROM 33 includes portions related to (1) analysis and execution of different control codes by the host computer 27, and (2) functions of the operation switches of the operation panel 11 and the display device.

【0014】要するに、制御プログラムのうちプリンタ
のハードウェアに依存する部分はPROM31に、ホス
トコンピュータに依存する部分、特に制御コードの解析
に関わる部分はEEPROM33に格納される。そして
、ホストコンピュータ27の種類が変更されて制御コー
ド体系が変わるときには、EEPROM33に格納され
たプログラム部分を書き替えることにより対応すること
ができる。その場合、万が一その書き替えにミスが発生
しても、メカニズムの制御に関わるプログラム部分は不
変であるため、例えばモータやヘッドに大電流が流れる
等の事態が生じるおそれはなく、安全な動作が保証され
る。
In short, the portion of the control program that depends on the printer hardware is stored in the PROM 31, and the portion that depends on the host computer, particularly the portion related to control code analysis, is stored in the EEPROM 33. When the type of host computer 27 is changed and the control code system is changed, this can be handled by rewriting the program portion stored in the EEPROM 33. In that case, even if a mistake occurs in the rewriting, the program part related to the control of the mechanism remains unchanged, so there is no risk of situations such as large current flowing to the motor or head, and safe operation is possible. Guaranteed.

【0015】図2はこの実施例におけるメモリマッピン
グの一例を示す。
FIG. 2 shows an example of memory mapping in this embodiment.

【0016】図示のように、CPU23のアドレス空間
のうちプログラム記憶用のアドレス空間は2つに区分さ
れ、一つはPROM31に、もう一つはEEPOM33
に割り付けられる。そして、プログラムのスタート番地
はPROM31の方に置かれる。つまり、制御プログラ
ムがスタートするときは、必ずPROM31内のプログ
ラムからスタートする。
As shown in the figure, the address space for program storage in the address space of the CPU 23 is divided into two parts, one for the PROM 31 and the other for the EEPOM 33.
assigned to. The start address of the program is placed in the PROM 31. That is, when the control program starts, it always starts from the program in PROM 31.

【0017】図3は図1の実施例において制御プログラ
ムをCPU23が実行することによって実現される機能
の詳細を、プリンタ内の他のハードウェアとの関連と共
に示したものである。
FIG. 3 shows the details of the functions realized by the CPU 23 executing the control program in the embodiment shown in FIG. 1, together with the relationship with other hardware within the printer.

【0018】図3を参照して、まずハードウェアの構成
を解説する。すでに説明したように、プリンタメカニズ
ム9として、プリントヘッド5、キャリッジモータ1、
紙送りモータ3、およびヘッド温度センサや用紙センサ
等のセンサ群7が存在する。それらは、ヘッドドライバ
17、キャリッジモータドライバ13、紙送りモータド
ライバ15およびセンサインタフェース回路19にそれ
ぞれ接続されている。また、オペレーションパネル11
は各種の操作スイッチ群39とLED表示器41とを含
み、それらはスイッチインタフェース回路43および表
示器ドライバ45にそれぞれ接続されている。さらに、
すでに説明したホストコンピュータ27に対するインタ
フェース回路29やキャラクタジェネレータROM37
の他、電力供給のための電源回路47、電源ON時やリ
セット要求発生時にリセット動作を行うためのリセット
回路49、メカニズム9(主としてヘッド5)への供給
電圧の低下を検出するための電圧監視回路51等がハー
ドウェアとして存在する。
Referring to FIG. 3, the hardware configuration will first be explained. As already explained, the printer mechanism 9 includes the print head 5, the carriage motor 1,
There is a paper feed motor 3 and a sensor group 7 such as a head temperature sensor and a paper sensor. These are connected to a head driver 17, a carriage motor driver 13, a paper feed motor driver 15, and a sensor interface circuit 19, respectively. In addition, the operation panel 11
includes a group of various operation switches 39 and an LED display 41, which are connected to a switch interface circuit 43 and a display driver 45, respectively. moreover,
The interface circuit 29 and character generator ROM 37 for the host computer 27 that have already been explained
In addition, there is a power supply circuit 47 for power supply, a reset circuit 49 for performing a reset operation when the power is turned on or when a reset request occurs, and a voltage monitor for detecting a drop in the voltage supplied to the mechanism 9 (mainly the head 5). A circuit 51 and the like exist as hardware.

【0019】前述のように、制御プログラムは、プリン
タのハードウェア50に依存する部分と、ホストコンピ
ュータ27(制御コード)に依存する部分とに2分され
、前者はPROM31に格納され、後者は書き替え可能
なようにEEPROM33に格納されている。図3では
、前者のプログラムの実行によって実現される機能をブ
ロック52内に、後者のプログムの実行によって実現さ
れる機能をブロック54内に示してある。
As described above, the control program is divided into two parts: a part that depends on the printer hardware 50 and a part that depends on the host computer 27 (control code), the former being stored in the PROM 31 and the latter being written. It is stored in the EEPROM 33 so that it can be changed. In FIG. 3, the functions realized by executing the former program are shown in block 52, and the functions realized by executing the latter program are shown in block 54.

【0020】ハードウェア50に依存するプログラムに
よ実現される機能ブロック52には、例えば次のような
ものが含まれる。インタフェースプロトコル制御部53
は、バッファ状態や装置状態に応じてエラー、ビジー等
の状態情報をインタフェース回路29に送ってインタフ
ェース回路29を制御しつつ、ホストコンピュータ27
からの入力データをこのインタフェース回路29から取
り込むものである。データ入力バッファ制御部55は、
インタフェースプロトコル制御部53によって取り込ま
れた入力データのバッファとして機能し、そのバッファ
状態はインタフェースプロトコル制御部53に通知され
る。伸長処理部57は、キャラクタジェネレータRAM
37から指定された文字コードの圧縮されたパターンデ
ータを読出し、これに伸長処理を施すものである。パネ
ル制御部59は、スイッチ状態や表示制御の情報をパネ
ルインタフェース回路21と通信するものである。セン
サ制御部61は、センサインタフェース回路19や電圧
監視回路51からの検出情報を受け、装置状態の正常/
異常を判断するものである。また、紙送り制御部63は
紙送りモータドライバ15に紙送りのためのモータ制御
信号を送るものである。キャリッジ速度制御部65は、
キャリッジモータドライバ13にキャリッジ走行のため
のモータ制御信号を送るものである。さらに、印字位置
制御部67は、左マージン等の印字開始位置を規定する
情報に基づいて印字開始タイミングを決定するものであ
る。印字制御部69は、印字位置制御部67により決定
された印字開始タイミングに従って印字制御を開始して
、印字密度に基づき決定した印字タイミングと印字デー
タとをヘッドドライバ17に与えてこれを制御するもの
である。
The functional blocks 52 implemented by programs that depend on the hardware 50 include, for example, the following. Interface protocol control unit 53
The host computer 27 controls the interface circuit 29 by sending status information such as errors and busy to the interface circuit 29 according to the buffer status and device status.
The input data from the interface circuit 29 is taken in from the interface circuit 29. The data input buffer control unit 55
It functions as a buffer for input data taken in by the interface protocol control unit 53, and the buffer status is notified to the interface protocol control unit 53. The decompression processing unit 57 is a character generator RAM.
The compressed pattern data of the designated character code is read out from 37 and subjected to decompression processing. The panel control unit 59 communicates switch status and display control information with the panel interface circuit 21. The sensor control unit 61 receives detection information from the sensor interface circuit 19 and the voltage monitoring circuit 51, and determines whether the device status is normal or not.
This is used to determine abnormalities. Further, the paper feed control section 63 sends a motor control signal for paper feeding to the paper feed motor driver 15. The carriage speed control section 65 is
It sends a motor control signal for carriage movement to the carriage motor driver 13. Furthermore, the print position control section 67 determines the print start timing based on information defining the print start position, such as the left margin. The print control unit 69 starts printing control according to the print start timing determined by the print position control unit 67, and controls the head driver 17 by giving the print timing and print data determined based on the print density to the head driver 17. It is.

【0021】一方、制御コードに依存するプログラムに
より実現される機能ブロック54には、例えば次のよう
なものを含まれる。コマンド解析部71は、データ入力
バッファ制御部55から入力データを受け、これをデコ
ードしてイメージデータとコマンドと文字コードとに識
別する。イメージデータ処理部73は、コマンド解析部
71からイメージデータを受けてこれをイメージデータ
バッファ75に書き込む。コマンド実行部77は、コマ
ンド解析部71からコマンドを、またデータ入力バッフ
ァ制御部55からはパラメータを受け、コマンドを実行
するための制御情報を生成する。この制御情報としては
、例えば、タブを実行する場合のように、イメージデー
タバッファ75内の各ビットと印字位置との関係を規定
するための印字位置制御情報、左マージンのような印字
開始位置を指定するための印字開始位置情報、印字密度
や印字速度を指定するための印字モード情報、および垂
直タブやラインスペーシングを実行する場合のように、
紙送りの制御により行位置を制御するための行位置制御
情報、等がある。文字コード処理部79は、コマンド解
析部71から文字コードを受け、これに基づいてアドレ
ス指定をキャラクタジェネレータROM37に与え、そ
れにより読出された文字パターンデータを伸長圧縮処理
部57から受けてイメージデータバッファ75に書き込
むものである。イメージデータバッファ75は、コマン
ド実行部77から印字位置制御情報を受け、そこに書き
込まれているイメージデータや文字パターンを読出し印
字データとして印字制御部69に与えるものである。印
字モード制御部81は、コマンド実行部71から印字モ
ード情報を受け、印字密度を印字制御部69に指定した
り、キャリッジの走行速度をキャリッジ速度制御部65
に指定したりするものである。また、スイッチ機能判断
部83は、パネル制御部59から操作スイッチの状態情
報を受けて、紙送り制御部63にラインフィードやフォ
ームフィードの要求を与えたり、状態制御部85に停止
要求を発したりするものである。状態制御部85は、セ
ンサ制御部61やスイッチ機能判断部83の出力情報を
受けて、インタフェースプロトコル解析部53に対する
エラーやビジー等の装置状態の通知、コマンド解析部7
1への実行停止要求、パネル制御部59への表示要求、
等を行うものである。
On the other hand, the functional block 54 implemented by a program depending on the control code includes, for example, the following. The command analysis section 71 receives input data from the data input buffer control section 55, decodes it, and distinguishes it into image data, commands, and character codes. The image data processing section 73 receives image data from the command analysis section 71 and writes it into the image data buffer 75. The command execution unit 77 receives a command from the command analysis unit 71 and parameters from the data input buffer control unit 55, and generates control information for executing the command. This control information includes, for example, print position control information for defining the relationship between each bit in the image data buffer 75 and the print position, such as when executing a tab, and print start position such as the left margin. Print start position information for specifying, print mode information for specifying print density and print speed, and vertical tabs and line spacing, etc.
There is line position control information for controlling line position by controlling paper feed, etc. The character code processing unit 79 receives the character code from the command analysis unit 71, gives address designation to the character generator ROM 37 based on the character code, receives the read character pattern data from the expansion/compression processing unit 57, and stores it in the image data buffer. 75. The image data buffer 75 receives print position control information from the command execution section 77, reads out the image data and character patterns written therein, and supplies them as print data to the print control section 69. The print mode control unit 81 receives print mode information from the command execution unit 71, and specifies the print density to the print control unit 69, and controls the traveling speed of the carriage to the carriage speed control unit 65.
It is something that can be specified. Further, the switch function determining unit 83 receives the state information of the operation switch from the panel control unit 59, and issues a line feed or form feed request to the paper feed control unit 63, a stop request to the state control unit 85, etc. It is something to do. The state control unit 85 receives the output information from the sensor control unit 61 and the switch function determination unit 83, and notifies the interface protocol analysis unit 53 of the device status such as error or busy, and the command analysis unit 7.
1 to stop execution, a display request to the panel control unit 59,
etc.

【0022】次に、このように構成された実施例の動作
を、左マージン(印字開始位置)の設定と、イメージデ
ータの印字とを例にとって説明する。
Next, the operation of the embodiment configured as described above will be explained, taking as examples the setting of the left margin (printing start position) and the printing of image data.

【0023】左マージンを設定する制御コードは、現在
実用されている2つの異なる制御コード体系に従ってこ
れを示すと例えば次のようになる。 ■  第一の制御コード体系 ESC  “l”  n これは、n×現在の文字サイズ、が左マージンとなるこ
とを意味する。 ■  第二の制御コード体系 ESC  “L”  n1   n2   n3 これ
は、{(n1 −30H )×100+(n2 −30
H )×10+(n3 −30H )}×現在の文字サ
イズ、が左マージンとなることを意味する。
The control code for setting the left margin can be expressed as follows, for example, according to two different control code systems currently in use. ■ First control code system ESC "l" n This means that n x current character size becomes the left margin. ■ Second control code system ESC “L” n1 n2 n3 This is {(n1 −30H )×100+(n2 −30
H)×10+(n3−30H)}×current character size is the left margin.

【0024】この制御コードは、図3を参照して、ホス
トコンピュータ27からインタフェース回路29に入力
され、インタフェースプロトコル制御部53およびデー
タ入力バッファ制御部55を通じて、そのコマンド部分
(「ESC  “l”」または「ESC  “L”」)
はコマンド解析部71に、そのパラメータ部分(「n」
または「n1   n2   n3 」)はコマンド実
行部77に与えられる。
Referring to FIG. 3, this control code is input from the host computer 27 to the interface circuit 29, and is passed through the interface protocol control section 53 and data input buffer control section 55 to the command portion ("ESC "l""). or “ESC “L””)
The command analysis unit 71 inputs its parameter part (“n”
or “n1 n2 n3”) is given to the command execution unit 77.

【0025】この場合のコマンド解析部71とコマンド
実行部77の動作を図4および図5のフローチャートに
示す。ここで、図4のフローはEEPROM33内の制
御プログラムが第一の制御コード体系に対応している場
合、図5のフローは第二の制御コード体系に対応してい
る場合である。
The operations of the command analysis section 71 and command execution section 77 in this case are shown in the flowcharts of FIGS. 4 and 5. Here, the flow in FIG. 4 corresponds to the case where the control program in the EEPROM 33 corresponds to the first control code system, and the flow in FIG. 5 corresponds to the case to the second control code system.

【0026】図4、5に示すように、コマンド解析部7
1は制御コードのコマンド部分から左マージン設定が要
求されたことを認識し、するとコマンド実行部77がパ
ラメータから印字開始位置Nを算出する。
As shown in FIGS. 4 and 5, the command analysis section 7
1 recognizes that a left margin setting is requested from the command part of the control code, and then the command execution unit 77 calculates the print start position N from the parameters.

【0027】算出された印字開始位置Nは、図3を参照
して、印字位置制御部67に与えられ、印字制御部69
を通じてヘッドドライバ17に伝えられる。
Referring to FIG. 3, the calculated print start position N is given to the print position control section 67, and
The signal is transmitted to the head driver 17 through the signal.

【0028】次に、イメージデータの印字の場合の制御
コード例を下に示す。 ■  第一の制御コード体系 ESC  *  27H   n1   n2   デ
ータこれは、n2 に引き続く(n2 ×256+n1
 )×3バイトのデータをMSBを上にしてイメージと
して印字することを意味する。 ■  第二の制御コード体系 ESC  J  n1   n2   n3   n4
   データこれは、n4 に引き続く{(n1 −3
0H )×1000+(n2 −30H )×100+
(n3 −30H )×10+(n4 −30H )}
×3バイトのデータをMSBを下にしてイメージとして
印字することを意味する。
Next, an example of a control code for printing image data is shown below. ■ First control code system ESC * 27H n1 n2 data This follows n2 (n2 × 256 + n1
) x 3 bytes of data is printed as an image with the MSB at the top. ■ Second control code system ESC J n1 n2 n3 n4
Data This is n4 followed by {(n1 −3
0H )×1000+(n2 −30H)×100+
(n3 - 30H) x 10 + (n4 - 30H)}
This means that x3 byte data is printed as an image with the MSB at the bottom.

【0029】この制御コードも、上の例と同様に、コマ
ンド部分(「ESC  *27H 」または「ESC 
 J」)はコマンド解析部71に、パラメータ部分(「
n1 n2 」または「n1   n2   n3  
 n4 」)はコマンド実行部77に与えられる。そし
て、イメージデータは、コマンド処理部77の制御下で
イメージデータ処理部75を通じてイメージデータバッ
ファ75に書き込まれ、そして印字制御部69を通じて
ヘッドドライバ17に伝えられる。この動作を示したの
が図6および図7のフローチャートであり、図6は第一
の制御コード体系に対応する場合、図7は第二の制御コ
ード体系に対応する場合である。
Similar to the above example, this control code also includes the command part (“ESC *27H” or “ESC
J") is sent to the command analysis section 71, and the parameter part ("
n1 n2” or “n1 n2 n3
n4'') is given to the command execution unit 77. The image data is then written into the image data buffer 75 through the image data processing section 75 under the control of the command processing section 77, and then transmitted to the head driver 17 through the print control section 69. This operation is shown in the flowcharts of FIGS. 6 and 7, in which FIG. 6 corresponds to the first control code system and FIG. 7 corresponds to the second control code system.

【0030】このように、制御コード体系によって、制
御コードに対する処理内容が異なるが、その異なる処理
を司る制御プログラム部分はEEPROM33に格納さ
れて書き替え可能であるため、異なる制御コード体系に
対する対応が容易である。
As described above, the processing content for the control code differs depending on the control code system, but since the control program portion that controls the different processing is stored in the EEPROM 33 and can be rewritten, it is easy to deal with different control code systems. It is.

【0031】次に、EEPROM33の書き替えについ
て説明する。
Next, rewriting of the EEPROM 33 will be explained.

【0032】この書き替えを行うためのプログラムは予
めPROM31内に格納しておく。この書き替えプログ
ラムの起動方法としては、例えば、電源投入をオペレー
ションパネル11上の任意のスイッチを押しながら行な
う、或いは、ホストコンピュータ27から書き替えのた
めの所定コマンドを入力する、等が考えられる。この書
き替えプログラムが起動ると書き替えモードに入り、ホ
ストコンピュータ27から新しい制御プログラム部分の
データを取り込んでRAM35に蓄える。一定量(例え
ば、256Kビット)のデータを受け取るまでこのモー
ドが続き、一定量を全部受け取ると、次にそのRAM3
5内のデータが正しいか否かチェックする。このチェッ
クは、例えばそのプログラム部分の所定番地に書かれて
いる適応機種名やバージョン名が適当か否かをチェック
することにより行う。チェックが完了すると、RAM3
5のデータをEEPROM33に書き込む。これにより
、書き替えが完了する。
A program for performing this rewriting is stored in the PROM 31 in advance. Possible methods for starting this rewriting program include, for example, turning on the power while pressing any switch on the operation panel 11, or inputting a predetermined command for rewriting from the host computer 27. When this rewriting program is started, it enters a rewriting mode, takes in data of a new control program part from the host computer 27, and stores it in the RAM 35. This mode continues until a certain amount of data (for example, 256K bits) is received, and then the RAM3
Check whether the data in 5 is correct. This check is performed, for example, by checking whether the applicable model name and version name written in a predetermined location of the program part are appropriate. When the check is completed, RAM3
Write the data of 5 to EEPROM33. This completes the rewriting.

【0033】尚、書き替えるプログラムデータをRAM
35に一旦蓄えるのは、上記チェックのための他、EE
PROM33の書き込み速度がホストからのデータ入力
速度よりも遅いため、通信エラー等が起きた場合に無駄
にEEPROM33のデータを破壊しないようにするた
め、等の意味がある。
[0033] Note that the program data to be rewritten is
In addition to checking the above, the reason for storing it in 35 is for EE
Since the write speed of the PROM 33 is slower than the data input speed from the host, this is to prevent data in the EEPROM 33 from being needlessly destroyed in the event of a communication error or the like.

【0034】[0034]

【発明の効果】以上説明したように、本発明によれば、
制御プログラムのうち、制御コード体系の変更により変
更を強いられるプログラムを含み且つメカニズムの制御
のためのプログラムを含まない部分を電気的な書き替え
が可能な不揮発性メモリに格納したため、異なる制御コ
ード体系に対する対応が容易であると共に、書き替えに
ミスが生じても安全が保証される。
[Effects of the Invention] As explained above, according to the present invention,
Among the control programs, the parts that include programs that are forced to change due to changes in the control code system and do not include programs for controlling mechanisms are stored in electrically rewritable nonvolatile memory, so different control code systems can be used. It is easy to deal with this problem, and safety is guaranteed even if a mistake occurs in rewriting.

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

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

【図2】図1の実施例におけるメモリマッピング図。FIG. 2 is a memory mapping diagram in the embodiment of FIG. 1;

【図3】図1の実施例における制御プログラムにより実
現される機能を、ハードウェアとの関係と共に示したブ
ロック線図。
FIG. 3 is a block diagram showing the functions realized by the control program in the embodiment of FIG. 1, together with the relationship with hardware.

【図4】図1の実施例の動作例を示すフローチャート。FIG. 4 is a flowchart showing an example of the operation of the embodiment of FIG. 1;

【図5】図1の実施例の別の動作例を示すフローチャー
ト。
FIG. 5 is a flowchart showing another example of the operation of the embodiment of FIG. 1;

【図6】図1の実施例のさらに別の動作例を示すフロー
チャート。
FIG. 6 is a flowchart showing yet another example of the operation of the embodiment of FIG. 1;

【図7】図1の実施例のさらにまた別の動作例を示すフ
ローチャート。
FIG. 7 is a flowchart showing yet another example of operation of the embodiment of FIG. 1;

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

9  プリンタメカニズム 11  オペレーションパネル 23  CPU 31  プログラム用PROM 33  プログラム用EEPROM 9 Printer mechanism 11 Operation panel 23 CPU 31 Program PROM 33 Program EEPROM

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】予め記憶してある制御プログラムをCPU
が外部から与えられる制御コードに応じて実行すること
によりプリンタメカニズムを制御するプリンタにおいて
、前記制御プログラムのうち、前記制御コードの体系の
変更によって変更を強いられるプログラムを含み且つ前
記プリンタメカニズムの制御のためのプログラムを含ま
ない第一の部分を記憶した不揮発性の第一のプログラム
メモリと、前記制御プログラムのうち、前記第一の部分
を除いた部分である第二の部分を記憶した不揮発性の第
二のプログラムメモリとを有し、前記第一のプログラム
メモリは電気的に書き替えが可能であること特徴とする
プリンタ。
Claim 1: A control program stored in advance is transmitted to a CPU.
A printer that controls a printer mechanism by executing it in response to a control code given from the outside, the control program includes a program that is forced to be changed due to a change in the system of the control code, and that controls the control of the printer mechanism. a non-volatile first program memory that stores a first part that does not include a program for the control program; and a non-volatile first program memory that stores a second part that is a part of the control program excluding the first part. a second program memory, the first program memory being electrically rewritable.
【請求項2】請求項1記載のプリンタにおいて、前記C
PUのプログラムスタートアドレスが前記第二のプログ
ラムメモリに割り付けられていることを特徴とするプリ
ンタ。
2. The printer according to claim 1, wherein the C
A printer characterized in that a program start address of a PU is allocated to the second program memory.
【請求項3】請求項1記載のプリンタにおいて、前記制
御プログラムの前記第二の部分には、前記CPUに前記
第一のプログラムメモリの書き替えを行わせるための書
き替えプログラムが含まれていることを特徴とするプリ
ンタ。
3. The printer according to claim 1, wherein the second portion of the control program includes a rewriting program for causing the CPU to rewrite the first program memory. A printer characterized by:
【請求項4】請求項2記載のプリンタにおいて、前記C
PUに所定のコマンドを与えるための操作スイッチを有
し、前記書き替えプログラムの起動は、前記操作スイッ
チの所定の操作によって行われることを特徴とするプリ
ンタ。
4. The printer according to claim 2, wherein the C
A printer comprising an operation switch for giving a predetermined command to a PU, wherein the rewriting program is started by a predetermined operation of the operation switch.
【請求項5】請求項2記載のプリンタにおいて、前記書
き替えプログラムの起動は、外部から前記制御コードと
して所定のコードが入力されたことにより行われること
を特徴とするプリンタ。
5. The printer according to claim 2, wherein the rewriting program is activated by inputting a predetermined code as the control code from the outside.
JP3003954A 1991-01-17 1991-01-17 Printer Pending JPH04313117A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3003954A JPH04313117A (en) 1991-01-17 1991-01-17 Printer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3003954A JPH04313117A (en) 1991-01-17 1991-01-17 Printer

Publications (1)

Publication Number Publication Date
JPH04313117A true JPH04313117A (en) 1992-11-05

Family

ID=11571499

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3003954A Pending JPH04313117A (en) 1991-01-17 1991-01-17 Printer

Country Status (1)

Country Link
JP (1) JPH04313117A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06227060A (en) * 1993-02-01 1994-08-16 Star Micronics Co Ltd Printing device
JPH0830408A (en) * 1994-05-13 1996-02-02 Canon Inc Printer and system and its control method
JP2008119520A (en) * 2008-02-12 2008-05-29 Sophia Co Ltd Game machine

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06227060A (en) * 1993-02-01 1994-08-16 Star Micronics Co Ltd Printing device
JPH0830408A (en) * 1994-05-13 1996-02-02 Canon Inc Printer and system and its control method
JP2008119520A (en) * 2008-02-12 2008-05-29 Sophia Co Ltd Game machine

Similar Documents

Publication Publication Date Title
US8330987B2 (en) Printing apparatus, data storage medium, interface device, printer control method, and interface control method
US5933595A (en) Computer apparatus having electrically rewritable nonvolatile memory, and nonvolatile semiconductor memory
JPH04313117A (en) Printer
JPH06314202A (en) Image-forming device
JP2593007B2 (en) Program embedded device
JP2006510966A (en) Encapsulation hardware configuration / control
JPH11232183A (en) Printer control information managing device and recording medium for recording control information management program
JPH1011277A (en) Computer device with electrically rewritable nonvolatile memory and nonvolatile semiconductor memory
JP3001213B2 (en) Printer control device
JP2812285B2 (en) Network interface card for printer
JP2007261044A (en) Printer device
JP2571860Y2 (en) Printer device
JP2666534B2 (en) Print control circuit of printer
JPH09160769A (en) Device and method for information processing
JPH03230989A (en) Printing operation controller
JP2000020262A (en) Printer device
JPH01159262A (en) Printer
JP2716552B2 (en) Printer connection method
JPH11345103A (en) Printer device
JPH09131950A (en) Printer system device
JP3192563B2 (en) Information processing apparatus and information processing method
JPH068534A (en) Printer
JP2004021582A (en) Information processing system, rewriting method of firmware, rewriting program and recording medium
JPH09222963A (en) Printer system
JPH07323640A (en) Printer