JP3071608U - Printing device - Google Patents

Printing device

Info

Publication number
JP3071608U
JP3071608U JP2000001344U JP2000001344U JP3071608U JP 3071608 U JP3071608 U JP 3071608U JP 2000001344 U JP2000001344 U JP 2000001344U JP 2000001344 U JP2000001344 U JP 2000001344U JP 3071608 U JP3071608 U JP 3071608U
Authority
JP
Japan
Prior art keywords
event
register
group
bit
cpu
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP2000001344U
Other languages
Japanese (ja)
Inventor
忠久 橋本
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Funai Electric Co Ltd
Original Assignee
Funai Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Funai Electric Co Ltd filed Critical Funai Electric Co Ltd
Priority to JP2000001344U priority Critical patent/JP3071608U/en
Application granted granted Critical
Publication of JP3071608U publication Critical patent/JP3071608U/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Accessory Devices And Overall Control Thereof (AREA)

Abstract

(57)【要約】 【課題】CPUに対する割込みがあった場合の処理時間
を短縮して効率を向上させる。 【解決手段】発生する事象を複数にグループ化して記憶
した第1のレジスタ20と、各グループに含まれる個々
の事象をグループごとに記憶した第2のレジスタ21と
をASIC4に設ける。ASIC4からCPU5に対し
て割込みがかかると、CPU5は第1のレジスタ20を
参照して、発生した事象がどのグループに属するかを判
別する。そして、レジスタ22〜25のうち、そのグル
ープに対応するレジスタを参照して事象を判別する。
(57) [Summary] To improve the efficiency by shortening the processing time when there is an interrupt to the CPU. An ASIC (4) is provided with a first register (20) that stores events that occur in a plurality of groups and a second register (21) that stores individual events included in each group for each group. When an interrupt is issued from the ASIC 4 to the CPU 5, the CPU 5 refers to the first register 20 and determines to which group the generated event belongs. Then, the event is determined by referring to the register corresponding to the group among the registers 22 to 25.

Description

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

【0001】[0001]

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

本考案は、たとえばインクジェットプリンタのような印字装置に関し、特にC PUに対する割込み処理を効率良く行えるようにした印字装置に関するものであ る。 The present invention relates to a printing device such as an ink jet printer, and more particularly to a printing device capable of efficiently performing interrupt processing for a CPU.

【0002】[0002]

【従来の技術】[Prior art]

図7は、インクジェットプリンタの電気的構成を示すブロック図である。図に おいて、1は印字装置の一例であるインクジェットプリンタ(以下、単にプリン タという)、2はプリンタ1と接続された上位装置としてのパーソナルコンピュ ータ等からなるホスト装置(以下、単にホストという)、3はホスト2との間で データの送受を行うとともに印字動作の制御を行う制御部、4はホスト2と接続 されたASIC(Application Specific IC)、5はASIC4からの割込み 信号に基づいて所定の制御を行うCPU、6はCPU5の動作プログラム等が格 納されたROMや、ホスト2から送られてくるデータ等が一時的に格納されるR AMから構成されるメモリ、7はインクキャリアを搬送するためのキャリアモー タ、8は用紙を搬送するためのフィードモータ、9はインクカートリッジの印字 ヘッドからインクを吐出して用紙に印字を行う印字部、10はLEDランプ等か らなる表示部である。制御部3としては、ASIC4、CPU5およびメモリ6 をワンチップ化したものを用いることができる。 FIG. 7 is a block diagram illustrating an electrical configuration of the inkjet printer. In the figure, 1 is an inkjet printer (hereinafter simply referred to as a printer) as an example of a printing device, and 2 is a host device (hereinafter simply referred to as a host) including a personal computer or the like as an upper device connected to the printer 1. 3 is a control unit that sends and receives data to and from the host 2 and controls the printing operation, 4 is an ASIC (Application Specific IC) connected to the host 2, and 5 is based on an interrupt signal from the ASIC 4. A predetermined ROM, a CPU 6 for controlling the operation of the CPU 5, a ROM for temporarily storing data sent from the host 2, and a memory 7 for storing ink and the like. A carrier motor for transporting the carrier, 8 is a feed motor for transporting the paper, and 9 is ink from the print head of the ink cartridge. A printing unit 10 that prints on paper by ejecting an image is a display unit including an LED lamp and the like. As the control unit 3, an ASIC 4, a CPU 5, and a memory 6 which are integrated into one chip can be used.

【0003】 ホスト2からは、プリンタ1に対して指令やデータが送出され、制御部3は、 これらに基づいてキャリアモータ7やフィードモータ8を起動・停止したり、印 字部9によって用紙への印字を開始・停止したりする制御を行う。この場合、A SIC4はCPU5へ伝えるべき事象が発生すると、CPU5に対して割込みを かける。CPU5は、ASIC4から割込み信号を受け取ると、その割込みが何 の事象に関するものかを判別して、当該事象に対応した処理を実行する。たとえ ば、割込みがキャリアモータの停止という事象に関するものであれば、CPU5 はキャリアモータ7を停止させる制御を行う。このように、ASICからCPU に対して割込みをかけるようにした印字装置は、たとえば特開平9−24482 3号公報に記載されている。The host 2 sends commands and data to the printer 1, and the control unit 3 starts and stops the carrier motor 7 and the feed motor 8 based on the commands and data, and prints on paper by the printing unit 9. Control to start / stop printing of. In this case, the ASIC 4 interrupts the CPU 5 when an event to be transmitted to the CPU 5 occurs. When receiving the interrupt signal from the ASIC 4, the CPU 5 determines what event the interrupt relates to, and executes a process corresponding to the event. For example, if the interrupt is related to the event of stopping the carrier motor, the CPU 5 controls the carrier motor 7 to stop. A printing apparatus in which the ASIC interrupts the CPU as described above is described in, for example, Japanese Patent Application Laid-Open No. 9-244823.

【0004】 ところで、上記のような割込み信号は、各事象に対応して個別に用意されてい るわけではなく、CPU5がASIC4から受け取る割込み信号は1種類だけで ある。したがって、CPU5から見た場合、割込み信号によってある事象が発生 したことはわかるが、それがどのような内容の事象なのかは、割込み信号だけで はわからない。このため、ASIC4には発生する事象に対応してレジスタが設 けられており、割込み信号を受け取ったCPU5は、このレジスタを参照するこ とによって、発生した事象の内容を判別するようになっている。By the way, the above-mentioned interrupt signals are not individually prepared corresponding to each event, and the CPU 5 receives only one type of interrupt signal from the ASIC 4. Therefore, from the viewpoint of the CPU 5, it is known that a certain event has occurred due to the interrupt signal, but the content of the event cannot be understood only by the interrupt signal. For this reason, the ASIC 4 is provided with a register corresponding to the event that occurs, and the CPU 5 receiving the interrupt signal refers to this register to determine the content of the event that has occurred. I have.

【0005】 図8は、このようなASIC4に設けられたレジスタを示す図である。30は 割込みEventレジスタ(以下、単にレジスタという)であって、所定のビット数 、たとえば8ビットや16ビットからなるレジスタである。各ビット0,1,2 ,…は、それぞれ各事象に対応しており、たとえばビット0は印字データの書き 込み処理、ビット1はキャリアモータの加減速データの書き込み処理、ビット2 はフィードモータの加減速データの書き込み処理、ビット3は印字の終了、ビッ ト4はキャリアモータの停止という事象を表している。そして、これらのビット に「1」がセットされておればその事象が発生しており、「0」がセットされて おればその事象が発生していないことが判別される。FIG. 8 is a diagram showing a register provided in such an ASIC 4. Reference numeral 30 denotes an interrupt event register (hereinafter simply referred to as a register), which is a register having a predetermined number of bits, for example, 8 bits or 16 bits. Each bit 0, 1, 2,... Corresponds to each event. For example, bit 0 is print data write processing, bit 1 is carrier motor acceleration / deceleration data write processing, and bit 2 is feed motor write processing. Acceleration / deceleration data writing processing, bit 3 represents the end of printing, and bit 4 represents the event of stopping the carrier motor. If these bits are set to "1", it is determined that the event has occurred, and if "0" is set, it is determined that the event has not occurred.

【0006】 CPU5は、ASIC4からの割込み信号を受け取ると、上記レジスタ30を ビット0から最後のビットまで順に参照してゆき、「1」がセットされているビ ットを検索する。そして、「1」のセットされているビットを読み出して、当該 ビットに対応した処理を行う。たとえば、ビット4に「1」がセットされておれ ば、CPU5はキャリアモータ停止という事象が発生したと認識して、キャリア モータ7を停止させる制御を行う。このようにしてCPU5は、レジスタ30を 参照することによって、割込みが何の事象に関するものかを判別することができ る。When receiving the interrupt signal from the ASIC 4, the CPU 5 refers to the register 30 in order from bit 0 to the last bit, and searches for a bit in which “1” is set. Then, the bit in which "1" is set is read out, and processing corresponding to the bit is performed. For example, if "1" is set in the bit 4, the CPU 5 recognizes that the event of stopping the carrier motor has occurred, and controls the carrier motor 7 to stop. In this way, the CPU 5 can determine what event the interrupt relates to by referring to the register 30.

【0007】[0007]

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

しかしながら、従来の印字装置においては、レジスタ30のビットが個々の発 生事象に対応して設けられているため、CPU5は事象を判別するにあたって、 ビットの最初から最後まですべてのビットを参照する必要がある。したがって、 発生事象の種類が多くなるとそれに応じてビットの数も増大し、CPU5の検索 に時間がかかって割込み処理の効率が低下するという問題があった。 However, in the conventional printing apparatus, since the bits of the register 30 are provided corresponding to each of the occurrence events, the CPU 5 needs to refer to all the bits from the beginning to the end of the bits to determine the event. There is. Therefore, there is a problem in that the number of bits increases in accordance with the number of types of generated events, and it takes time to search the CPU 5 and the efficiency of interrupt processing is reduced.

【0008】 特に、コストダウンのためにASIC4として小型のものを用いた場合には、 その分CPU5の負担が増大して、CPU5への割込みが増えるため、事象の数 が多くなって、処理効率の低下が顕著となる。In particular, when a small ASIC 4 is used for cost reduction, the load on the CPU 5 increases and the number of interrupts to the CPU 5 increases, resulting in an increase in the number of events and an increase in processing efficiency. Is remarkable.

【0009】 本考案は上記のような問題点を解決するものであって、CPUに対する割込み があった場合の処理時間を短縮して効率を向上させた印字装置を提供することを 課題としている。The present invention solves the above-described problems, and an object of the present invention is to provide a printing apparatus in which the processing time when there is an interrupt to a CPU is shortened and the efficiency is improved.

【0010】[0010]

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

上記課題を解決するために、本考案は、発生する事象を複数にグループ化して 記憶した第1のレジスタと、各グループに含まれる個々の事象をグループごとに 記憶した第2のレジスタとを設けたものである。 In order to solve the above-described problem, the present invention provides a first register that stores a group of events that occur and stores a plurality of events, and a second register that stores individual events included in each group for each group. It is a thing.

【0011】 このようにすれば、CPUに対して割込みがあった場合には、まず第1のレジ スタを参照することで、発生した事象がどのグループに属する事象なのかが判別 され、ついで、第2のレジスタを参照することで、そのグループに属する個々の 事象が判別される。したがって、第2のレジスタを参照するにあたっては、第1 のレジスタで判別されたグループについてのみ検索を行なえばよく、第2のレジ スタを全部にわたって検索する必要がないので、検索に要する時間を短縮できる 。With this configuration, when an interrupt is issued to the CPU, first, the first register is referred to determine to which group the event that has occurred belongs. By referring to the second register, individual events belonging to the group are determined. Therefore, when referring to the second register, it is only necessary to search for the group determined by the first register, and it is not necessary to search the entire second register, so that the time required for the search is reduced. it can .

【0012】[0012]

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

以下、本考案をインクジェットプリンタに適用した場合の実施形態について説 明する。プリンタの全体構成は図7に示したブロック図と同じであるので、その 説明は省略し、図7を本考案の実施形態として引用する。 Hereinafter, an embodiment in which the present invention is applied to an ink jet printer will be described. Since the overall configuration of the printer is the same as the block diagram shown in FIG. 7, the description is omitted, and FIG. 7 is cited as an embodiment of the present invention.

【0013】 図1は、本考案の要部の構成を示す図であって、ASIC4に設けられたレジ スタを示したものである。レジスタは、割込みEvent Summaryレジスタからなる 第1のレジスタ20と、複数のEvent レジスタ22〜25からなる第2のレジス タ21とで構成されている。FIG. 1 is a diagram showing a configuration of a main part of the present invention, and shows a register provided in the ASIC 4. The register includes a first register 20 composed of an interrupt Event Summary register and a second register 21 composed of a plurality of Event registers 22 to 25.

【0014】 第1のレジスタ20は4ビットのレジスタであって、発生する事象を4種類に グループ化して記憶するようになっている。すなわち、ビット0はData Write E ventであって、これはデータの書き込みに関する事象(Event)を表している。 また、ビット1はMotor Move End Eventであって、これはモータの停止に関する 事象を表している。また、ビット2はParallel Eventであって、これはパラレル ポートを介してホスト2との間で行なわれるデータの送受に関する事象を表して いる。また、ビット3はTimer Eventであって、これはタイマー動作に関する事 象を表している。そして、これらのビットに「1」がセットされておればその事 象が発生しており、「0」がセットされておればその事象が発生していないこと を示している。The first register 20 is a 4-bit register, and stores generated events in four types. That is, bit 0 is Data Write Event, which represents an event related to data writing. Bit 1 is a Motor Move End Event, which indicates an event related to the stop of the motor. Bit 2 is a Parallel Event, which represents an event related to data transmission / reception performed with the host 2 via the parallel port. Bit 3 is a Timer Event, which indicates an event relating to the timer operation. If "1" is set in these bits, the event has occurred, and if "0" is set, the event has not occurred.

【0015】 一方、第2のレジスタ21を構成するEvent レジスタは、第1のレジスタにお ける4種類のグループに対応して4個のレジスタからなる。すなわち、22はDa ta Write Eventレジスタで、第1のレジスタ20のビット0のグループに対応し 、当該グループに含まれる3種類の事象をビット0〜ビット2で表すものである 。23はMotor Move End Eventレジスタで、第1のレジスタ20のビット1のグ ループに対応し、当該グループに含まれる3種類の事象をビット0〜ビット2で 表すものである。24はParallel Eventレジスタで、第1のレジスタ20のビッ ト2のグループに対応し、当該グループに含まれる2種類の事象をビット0〜ビ ット1で表すものである。25はTimer Eventレジスタで、第1のレジスタ20 のビット3のグループに対応し、当該グループに含まれる2種類の事象をビット 0〜ビット1で表すものである。On the other hand, the Event register constituting the second register 21 is composed of four registers corresponding to the four types of groups in the first register. That is, reference numeral 22 denotes a Data Write Event register, which corresponds to the group of bit 0 of the first register 20, and represents three types of events included in the group by bits 0 to 2. Reference numeral 23 denotes a Motor Move End Event register, which corresponds to the group of bit 1 of the first register 20, and represents three types of events included in the group by bits 0 to 2. Reference numeral 24 denotes a parallel event register, which corresponds to the group of bit 2 of the first register 20, and represents two types of events included in the group by bits 0 to 1. Reference numeral 25 denotes a Timer Event register, which corresponds to the group of bit 3 of the first register 20, and represents two types of events included in the group by bits 0 to 1.

【0016】 次に、各Eventレジスタ22〜25の詳細につき説明する。Data Write Event レジスタ22は3ビットのレジスタであって、ビット0の事象はPrint Data Wri teであり、これは印字データの書き込みを表す事象である。また、ビット1の事 象はCarrier Ramp Data Writeであり、これはキャリアモータ7の加減速データ の書き込みを表す事象である。また、ビット2の事象はFeed Ramp Data Writeで あり、これはフィードモータ8の加減速データの書き込みを表す事象である。Next, details of each of the Event registers 22 to 25 will be described. The Data Write Event register 22 is a 3-bit register, and the event of bit 0 is Print Data Write, which is an event representing the writing of print data. The event of bit 1 is Carrier Ramp Data Write, which is an event representing the writing of acceleration / deceleration data of the carrier motor 7. The event of bit 2 is Feed Ramp Data Write, which is an event indicating the writing of the acceleration / deceleration data of the feed motor 8.

【0017】 Motor Move End Eventレジスタ23も3ビットのレジスタであって、ビット0 の事象はCarrier Print Endであり、これは印字の終了を表す事象である。また 、ビット1の事象はCarrier Move End であり、これはキャリアモータ7の停止 を表す事象である。また、ビット2の事象はFeed Move End であり、これはフィ ードモータ8の停止を表す事象である。The Motor Move End Event register 23 is also a 3-bit register, and the event of bit 0 is Carrier Print End, which is an event indicating the end of printing. The event of bit 1 is Carrier Move End, which is an event indicating that the carrier motor 7 has stopped. The event of bit 2 is Feed Move End, which is an event indicating that the feed motor 8 is stopped.

【0018】 Parallel Eventレジスタ24は2ビットのレジスタであって、ビット0の事象 はCommand Event であり、これはホスト2からプリンタ1へのコマンド送信を表 す事象である。また、ビット1の事象はParallel Line Eventであり、これはプ リンタ1からホスト2へのデータ送信を表す事象である。The parallel event register 24 is a 2-bit register, and the event of bit 0 is a command event, which is an event representing a command transmission from the host 2 to the printer 1. The event of bit 1 is a Parallel Line Event, which is an event representing data transmission from the printer 1 to the host 2.

【0019】 Timer Eventレジスタ25も2ビットのレジスタであって、ビット0の事象はT imer 1 Eventであり、これはたとえば1msecの時間間隔をもった割込みであ ることを表す事象である。また、ビット1の事象はTimer 2 Eventであり、これ はたとえば25msecの時間間隔をもった割込みであることを表す事象である 。Timer 1 Eventはたとえばキー操作やセンサ出力を検出するためのサンプリン グの場合の割込みであり、Timer 2 Eventはたとえば表示部10のLEDランプ を点滅表示させる場合の割込みである。The Timer Event register 25 is also a two-bit register, and the event of bit 0 is Timer 1 Event, which is an event indicating that the interrupt has a time interval of, for example, 1 msec. The event of bit 1 is a Timer 2 Event, which is an event indicating that the interrupt has a time interval of, for example, 25 msec. Timer 1 Event is an interrupt for sampling for detecting a key operation or a sensor output, for example, and Timer 2 Event is an interrupt for blinking an LED lamp of the display unit 10, for example.

【0020】 第2のレジスタは以上のように構成されており、第1のレジスタ20と同様に 、各Eventレジスタ22〜25においてビットに「1」がセットされておればそ の事象が発生しており、「0」がセットされておればその事象が発生していない ことが判別される。The second register is configured as described above. As in the first register 20, if a bit is set to “1” in each of the event registers 22 to 25, the event occurs. If "0" is set, it is determined that the event has not occurred.

【0021】 図2〜図6は、上記構成からなるプリンタ1の割込み処理を示すフローチャー トである。以下、このフローチャートに従って割込み処理の動作を説明する。図 2において、CPU5はASIC4からの割込みがあるか否かを監視しており( ステップS1)、ASIC4から割込み信号を受け取ると(ステップS1YES )、ASIC4の第1のレジスタ20をビット0からビット3まで順に参照し( ステップS2)、事象が発生しているか否か、すなわち「1」がセットされてい るビットがあるか否かを検索する(ステップS3)。すべてのビットが「0」で あれば(ステップS3NO)、何もせずに終了し、「1」がセットされているビ ットがあれば(ステップS3YES)、そのビットに基づいて事象の種類を判別 する(ステップS4〜S6)。FIGS. 2 to 6 are flowcharts showing the interrupt processing of the printer 1 having the above configuration. Hereinafter, the operation of the interrupt processing will be described with reference to this flowchart. In FIG. 2, the CPU 5 monitors whether or not there is an interrupt from the ASIC 4 (step S1). When receiving an interrupt signal from the ASIC 4 (step S1 YES), the first register 20 of the ASIC 4 changes the bit 0 to the bit 3 (Step S2), and it is searched whether or not an event has occurred, that is, whether or not there is a bit in which "1" is set (Step S3). If all bits are “0” (step S3NO), the process ends without doing anything. If there is a bit with “1” set (step S3YES), the type of event is determined based on the bit. It is determined (steps S4 to S6).

【0022】 ビット0に「1」がセットされておれば、その事象がData Write Eventである と判断して(ステップS4YES)、図3のステップS11へ進む。ビット0に 「1」がセットされていなければ(ステップS4NO)、次に、その事象がMoto r Move End Eventか否かを判定する(ステップS5)。ビット1に「1」がセッ トされておれば、その事象がMotor Move End Eventであると判断して(ステップ S5YES)、図4のステップS21へ進む。ビット1に「1」がセットされて いなければ(ステップS5NO)、次に、その事象がParallel Eventか否かを判 定する(ステップS6)。ビット2に「1」がセットされておれば、その事象が Parallel Eventであると判断して(ステップS6YES)、図5のステップS3 1へ進む。ステップS6の判別結果がParallel Eventでもなければ(ステップS 6NO)、その事象はTimer Eventであると判断して、図6のステップS41へ 進む。If “1” is set in bit 0, it is determined that the event is a Data Write Event (step S4 YES), and the process proceeds to step S11 in FIG. If “1” is not set in bit 0 (NO in step S4), it is next determined whether or not the event is a Motor Move End Event (step S5). If "1" is set in bit 1, it is determined that the event is a Motor Move End Event (step S5YES), and the process proceeds to step S21 in FIG. If "1" is not set in bit 1 (step S5 NO), it is next determined whether or not the event is a Parallel Event (step S6). If "1" is set in bit 2, it is determined that the event is a parallel event (step S6 YES), and the process proceeds to step S31 in FIG. If the determination result in step S6 is not Parallel Event (NO in step S6), it is determined that the event is a Timer Event, and the process proceeds to step S41 in FIG.

【0023】 このようにして、CPU5はASIC4からの割込みがあった場合に、まず第 1のレジスタ20を参照して、発生した事象のグループを検索する。そして、グ ループがわかれば、次に、以下に述べる図3〜図6の手順に従って、そのグルー プに対応する第2のレジスタ21のEventレジスタ22〜25を参照し、事象の 検索を行なう。As described above, when there is an interrupt from the ASIC 4, the CPU 5 first refers to the first register 20 to search for a group of events that have occurred. Then, if the group is known, the event is searched for by referring to the Event registers 22 to 25 of the second register 21 corresponding to the group in accordance with the procedure of FIGS. 3 to 6 described below.

【0024】 図2のステップS4において、発生した事象のグループがData Write Eventで あれば、図3のステップS11へ進み、第2のレジスタ21におけるData Write Eventレジスタ22を参照し(ステップS11)、事象が発生しているか否か、 すなわち「1」がセットされているビットがあるか否かを検索する(ステップS 12)。すべてのビットが「0」であれば(ステップS12NO)、ステップS 3に戻り、「1」がセットされているビットがあれば(ステップS12YES) 、そのビットに基づいて事象を判別する(ステップS13、S15)。In step S 4 of FIG. 2, if the group of the occurred event is the Data Write Event, the process proceeds to step S 11 of FIG. 3, and the Data Write Event register 22 in the second register 21 is referred to (step S 11). It is searched whether or not an event has occurred, that is, whether or not there is a bit in which "1" is set (step S12). If all bits are "0" (NO in step S12), the process returns to step S3. If there is a bit in which "1" is set (YES in step S12), an event is determined based on the bit (step S13). , S15).

【0025】 ビット0に「1」がセットされておれば、その事象がPrint Data Writeである と判断して(ステップS13YES)、印字データの書込み処理を行ない(ステ ップS14)、その後ビット0をリセットして(ステップS18)、ステップS 3に戻る。事象がPrint Data Writeでなければ(ステップS13NO)、次に、 Carrier Ramp Data Writeか否かを判別する(ステップS15)。ビット1に「 1」がセットされておれば、その事象がCarrier Ramp Data Writeであると判断 して(ステップS15YES)、キャリアモータ7の加減速データの書き込み処 理を実行し(ステップS16)、その後ビット1をリセットして(ステップS1 8)、ステップS3に戻る。ステップS15で、Carrier Ramp Data Writeでは ないと判断されれば、その事象はFeed Ramp Data Writeであると判断して(ステ ップS15NO)、フィードモータ8の加減速データの書き込み処理を実行し( ステップS17)、その後ビット2をリセットして(ステップS18)、ステッ プS3に戻る。なお、ビット0〜ビット2のリセットに連動して、第1のレジス タ20のビット0もリセットされる。If “0” is set in bit 0, it is determined that the event is Print Data Write (step S 13 YES), and print data writing processing is performed (step S 14). Is reset (step S18), and the process returns to step S3. If the event is not Print Data Write (step S13: NO), then it is determined whether or not it is Carrier Ramp Data Write (step S15). If "1" is set in bit 1, it is determined that the event is Carrier Ramp Data Write (step S15 YES), and the acceleration / deceleration data write processing of carrier motor 7 is executed (step S16). Thereafter, bit 1 is reset (step S18), and the process returns to step S3. If it is determined in step S15 that the event is not Carrier Ramp Data Write, the event is determined to be Feed Ramp Data Write (step S15NO), and the acceleration / deceleration data writing process of the feed motor 8 is executed (step S15). (Step S17) After that, the bit 2 is reset (Step S18), and the process returns to Step S3. Note that bit 0 of the first register 20 is also reset in conjunction with the reset of bits 0 to 2.

【0026】 このようにして、発生した事象のグループがData Write Eventの場合は、CP U5はそのグループに対応するData Write Eventレジスタ22のみを参照すれば よく、他のEventレジスタ23〜25を参照する必要はない。したがって、発生 した事象の検索を短時間で効率よく行なうことができる。As described above, when the group of the generated event is the Data Write Event, the CPU 5 only needs to refer to the Data Write Event register 22 corresponding to the group, and refer to the other Event registers 23 to 25. do not have to. Therefore, it is possible to efficiently search for the occurred event in a short time.

【0027】 次に、図2のステップS5において、発生した事象のグループがMotor Move E nd Eventであれば、図4のステップS21へ進み、第2のレジスタ21における Motor Move End Eventレジスタ23を参照し(ステップS21)、事象が発生し ているか否か、すなわち「1」がセットされているビットがあるか否かを検索す る(ステップS22)。すべてのビットが「0」であれば(ステップS22NO )、ステップS3に戻り、「1」がセットされているビットがあれば(ステップ S22YES)、そのビットに基づいて事象を判別する(ステップS23、S2 5)。Next, in step S 5 in FIG. 2, if the group of the occurred event is Motor Move End Event, the process proceeds to step S 21 in FIG. 4, and refer to the Motor Move End Event register 23 in the second register 21. Then, whether or not an event has occurred, that is, whether or not there is a bit in which "1" is set is searched (step S22). If all bits are "0" (step S22NO), the process returns to step S3, and if there is a bit in which "1" is set (step S22YES), an event is determined based on the bit (step S23, S25).

【0028】 ビット0に「1」がセットされておれば、その事象がCarrier Print Endであ ると判断して(ステップS23YES)、印字終了処理を行ない(ステップS2 4)、その後ビット0をリセットして(ステップS28)、ステップS3に戻る 。事象がCarrier Print Endでなければ(ステップS23NO)、次に、Carrier Move Endか否かを判別する(ステップS25)。ビット1に「1」がセットさ れておれば、その事象がCarrier Move Endであると判断して(ステップS25Y ES)、キャリアモータ7の停止処理を実行し(ステップS26)、その後ビッ ト1をリセットして(ステップS28)、ステップS3に戻る。ステップS25 で、Carrier Move Endではないと判断されれば、その事象はFeed Move Endであ ると判断して(ステップS25NO)、フィードモータ8の停止処理を実行し( ステップS27)、その後ビット2をリセットして(ステップS28)、ステッ プS3に戻る。なお、ビット0〜ビット2のリセットに連動して、第1のレジス タ20のビット1もリセットされる。If “0” is set in bit 0, it is determined that the event is Carrier Print End (step S 23 YES), a print end process is performed (step S 24), and then bit 0 is reset. Then (step S28), the process returns to step S3. If the event is not Carrier Print End (step S23 NO), it is next determined whether or not it is Carrier Move End (step S25). If "1" is set in bit 1, it is determined that the event is Carrier Move End (step S25ES), and the stop process of the carrier motor 7 is executed (step S26). Is reset (step S28), and the process returns to step S3. If it is determined in step S25 that the event is not Carrier Move End, the event is determined to be Feed Move End (step S25 NO), and the stop process of the feed motor 8 is executed (step S27). Is reset (step S28), and the process returns to step S3. Note that bit 1 of the first register 20 is also reset in conjunction with the reset of bits 0 to 2.

【0029】 このようにして、発生した事象のグループがMotor Move End Eventの場合は、 CPU5はそのグループに対応するMotor Move End Eventレジスタ23のみを参 照すればよく、他のEventレジスタ22,24、25を参照する必要はない。し たがって、発生した事象の検索を短時間で効率よく行なうことができる。As described above, when the group of the generated event is the Motor Move End Event, the CPU 5 only needs to refer to the Motor Move End Event register 23 corresponding to the group, and the other Event registers 22 and 24 , 25 need not be referred to. Therefore, it is possible to efficiently search for the occurred event in a short time.

【0030】 次に、図2のステップS6において、発生した事象のグループがParallel Eve ntであれば、図5のステップS31へ進み、第2のレジスタ21におけるParall el Eventレジスタ24を参照し(ステップS31)、事象が発生しているか否か 、すなわち「1」がセットされているビットがあるか否かを検索する(ステップ S32)。すべてのビットが「0」であれば(ステップS32NO)、ステップ S3に戻り、「1」がセットされているビットがあれば(ステップS32YES )、そのビットに基づいて事象を判別する(ステップS33)。Next, in step S 6 of FIG. 2, if the group of the occurred event is Parallel Event, the process proceeds to step S 31 of FIG. 5, and the parallel event register 24 in the second register 21 is referred to (step S 6). S31), whether or not an event has occurred, that is, whether or not there is a bit in which "1" is set is searched (step S32). If all the bits are "0" (step S32 NO), the process returns to step S3, and if there is a bit with "1" set (step S32 YES), an event is determined based on the bit (step S33). .

【0031】 ビット0に「1」がセットされておれば、その事象がCommand Eventであると 判断して(ステップS33YES)、ホスト2からのコマンド受信を実行し(ス テップS34)、その後ビット0をリセットして(ステップS36)、ステップ S3に戻る。事象がCommand Eventでなければ、その事象がParallel Line Event であると判断して(ステップS33NO)、ホスト2へのデータ送信を実行し( ステップS35)、その後ビット1をリセットして(ステップS36)、ステッ プS3に戻る。なお、ビット0,ビット1のリセットに連動して、第1のレジス タ20のビット2もリセットされる。If “1” is set in bit 0, it is determined that the event is a Command Event (step S33 YES), and a command is received from the host 2 (step S34). Is reset (step S36), and the process returns to step S3. If the event is not a Command Event, it is determined that the event is a Parallel Line Event (step S33 NO), data transmission to the host 2 is executed (step S35), and then bit 1 is reset (step S36). Then, the process returns to step S3. Note that, in conjunction with the reset of the bit 0 and the bit 1, the bit 2 of the first register 20 is also reset.

【0032】 このようにして、発生した事象のグループがParallel Eventの場合は、CPU 5はそのグループに対応するParallel Eventレジスタ24のみを参照すればよく 、他のEventレジスタ22,23、25を参照する必要はない。したがって、発 生した事象の検索を短時間で効率よく行なうことができる。As described above, when the group of the occurred event is the Parallel Event, the CPU 5 only needs to refer to the Parallel Event register 24 corresponding to the group, and refer to the other Event registers 22, 23, and 25. do not have to. Therefore, it is possible to efficiently search for the occurred event in a short time.

【0033】 次に、図2のステップS6において、発生した事象のグループがParallel Eve ntでなければ、図6のステップS41へ進み、第2のレジスタ21におけるTime r Eventレジスタ25を参照し(ステップS41)、事象が発生しているか否か 、すなわち「1」がセットされているビットがあるか否かを検索する(ステップ S42)。すべてのビットが「0」であれば(ステップS42NO)、ステップ S3に戻り、「1」がセットされているビットがあれば(ステップS42YES )、そのビットに基づいて事象を判別する(ステップS43)。Next, in step S 6 of FIG. 2, if the group of the occurred event is not Parallel Event, the process proceeds to step S 41 of FIG. 6, and the timer event register 25 in the second register 21 is referred to (step S 6). S41), whether or not an event has occurred, that is, whether or not there is a bit in which "1" is set is searched (step S42). If all the bits are "0" (NO in step S42), the process returns to step S3, and if there is a bit in which "1" is set (step S42 YES), an event is determined based on the bit (step S43). .

【0034】 ビット0に「1」がセットされておれば、その事象がTimer 1 Eventであると 判断して(ステップS43YES)、たとえば1msecごとの割込み処理を実 行し(ステップS44)、その後ビット0をリセットして(ステップS46)、 ステップS3に戻る。事象がTimer 1 Eventでなければ、その事象がTimer 2 Eve ntであると判断して(ステップS43NO)、たとえば25msecごとの割込 み処理を実行し(ステップS45)、その後ビット1をリセットして(ステップ S46)、ステップS3に戻る。なお、ビット0,ビット1のリセットに連動し て、第1のレジスタ20のビット3もリセットされる。If “0” is set in bit 0, it is determined that the event is a Timer 1 event (step S43 YES), and interrupt processing is executed, for example, every 1 msec (step S44). 0 is reset (step S46), and the process returns to step S3. If the event is not a Timer 1 Event, it is determined that the event is a Timer 2 Event (NO in step S43), and an interrupt process is performed, for example, every 25 msec (step S45), and then bit 1 is reset. (Step S46), returning to step S3. Note that, in conjunction with the reset of the bit 0 and the bit 1, the bit 3 of the first register 20 is also reset.

【0035】 このようにして、発生した事象のグループがTimer Eventの場合は、CPU5 はそのグループに対応するTimer Eventレジスタ25のみを参照すればよく、他 のEventレジスタ22〜24を参照する必要はない。したがって、発生した事象 の検索を短時間で効率よく行なうことができる。As described above, when the group of the occurred event is the Timer Event, the CPU 5 only needs to refer to the Timer Event register 25 corresponding to the group, and need not refer to the other Event registers 22 to 24. Absent. Therefore, it is possible to efficiently search for the occurred event in a short time.

【0036】 なお、上記実施形態においては、印字装置としてインクジェットプリンタを例 に挙げたが、本考案はこれに限らず、レーザプリンタやインクリボン式プリンタ など各種の印字装置に適用することが可能である。In the above embodiment, an ink jet printer has been described as an example of a printing device. However, the present invention is not limited to this, and can be applied to various printing devices such as a laser printer and an ink ribbon printer. is there.

【0037】[0037]

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

本考案によれば、発生事象をグループ化することにより、そのグループに絞っ て個々の事象を検索すればよいので、レジスタの全領域を参照する必要がなくな り、検索時間が短縮されて処理効率を向上させることができる。 According to the present invention, by grouping events that occur, it is only necessary to search for individual events by focusing on the group.Therefore, it is not necessary to refer to the entire area of the register, and the search time is reduced and processing is performed. Efficiency can be improved.

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

【図1】本考案の要部の構成を示す図である。FIG. 1 is a diagram showing a configuration of a main part of the present invention.

【図2】本考案の動作を示すフローチャートである。FIG. 2 is a flowchart showing the operation of the present invention.

【図3】本考案の動作を示すフローチャートである。FIG. 3 is a flowchart showing the operation of the present invention.

【図4】本考案の動作を示すフローチャートである。FIG. 4 is a flowchart showing the operation of the present invention.

【図5】本考案の動作を示すフローチャートである。FIG. 5 is a flowchart showing the operation of the present invention.

【図6】本考案の動作を示すフローチャートである。FIG. 6 is a flowchart showing the operation of the present invention.

【図7】プリンタの電気的構成を示すブロック図であ
る。
FIG. 7 is a block diagram illustrating an electrical configuration of the printer.

【図8】従来例における割込み処理を説明する図であ
る。
FIG. 8 is a diagram illustrating an interrupt process in a conventional example.

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

1 プリンタ(印字装置) 2 ホスト 3 制御部 4 ASIC 5 CPU 6 メモリ 7 キャリアモータ 8 フィードモータ 9 印字部 10 表示部 20 第1のレジスタ 21 第2のレジスタ 22 Data Write Eventレジスタ 23 Motor Move End Eventレジスタ 24 Parallel Eventレジスタ 25 Timer Eventレジスタ REFERENCE SIGNS LIST 1 printer (printing device) 2 host 3 control unit 4 ASIC 5 CPU 6 memory 7 carrier motor 8 feed motor 9 printing unit 10 display unit 20 first register 21 second register 22 Data Write Event register 23 Motor Move End Event register 24 Parallel Event register 25 Timer Event register

Claims (4)

【実用新案登録請求の範囲】[Utility model registration claims] 【請求項1】上位装置との間でデータを送受する制御部
を有し、この制御部により印字動作の制御を行う印字装
置において、 前記制御部は、CPUと、このCPUに対する割込みの
事象を記憶したレジスタとを備え、 前記レジスタは、発生する事象を複数にグループ化して
記憶した第1のレジスタと、各グループに含まれる個々
の事象をグループごとに記憶した第2のレジスタとから
なることを特徴とする印字装置。
1. A printing apparatus having a control unit for transmitting and receiving data to and from a higher-level device, wherein the control unit controls a printing operation. The control unit includes a CPU and an interrupt event for the CPU. A first register that stores a group of events that occur, and a second register that stores individual events included in each group for each group. A printing device characterized by the above-mentioned.
【請求項2】前記CPUは、割込みがあった場合に第1
のレジスタを参照して発生した事象のグループを判別
し、第2のレジスタのうち前記グループに対応するグル
ープのレジスタを参照して発生した事象の内容を判別す
る請求項1に記載の印字装置。
2. The method according to claim 1, wherein the CPU is configured to perform a first
The printing apparatus according to claim 1, wherein the group of the generated event is determined by referring to the register of the second register, and the content of the generated event is determined by referring to the register of the group corresponding to the group among the second registers.
【請求項3】上位装置との間でデータを送受するととも
にCPUに対して割込みをかけるASICを備え、前記
第1および第2のレジスタは前記ASICに設けられて
いる請求項2に記載の印字装置。
3. The printing apparatus according to claim 2, further comprising an ASIC for transmitting / receiving data to / from a higher-level device and interrupting a CPU, wherein said first and second registers are provided in said ASIC. apparatus.
【請求項4】前記第1のレジスタのグループは、データ
の書込みに関する事象のグループと、モータの停止に関
する事象のグループと、ホストとの間のデータ送受に関
する事象のグループと、タイマー動作に関する事象のグ
ループとを含む請求項1ないし3のいずれかに記載の印
字装置。
4. The first group of registers includes a group of events relating to data writing, a group of events relating to motor stoppage, a group of events relating to data transmission / reception with the host, and an event relating to timer operation. 4. The printing apparatus according to claim 1, further comprising a group.
JP2000001344U 2000-03-09 2000-03-09 Printing device Expired - Lifetime JP3071608U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000001344U JP3071608U (en) 2000-03-09 2000-03-09 Printing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000001344U JP3071608U (en) 2000-03-09 2000-03-09 Printing device

Publications (1)

Publication Number Publication Date
JP3071608U true JP3071608U (en) 2000-09-14

Family

ID=43204945

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000001344U Expired - Lifetime JP3071608U (en) 2000-03-09 2000-03-09 Printing device

Country Status (1)

Country Link
JP (1) JP3071608U (en)

Similar Documents

Publication Publication Date Title
JP3071608U (en) Printing device
JP4174169B2 (en) Print control apparatus and print control method
JPH1170676A (en) Hammer driving device for printing apparatus
JPH0359835B2 (en)
JP2006198794A (en) Power consumption control method of printer and printer
JP2656954B2 (en) Printer print head control method
JPH11192728A (en) Ink jet recorder, information processor, print control method, and memory medium
JP2001010178A (en) Record control device and method, and storage medium storing program readable by computer
JP3301337B2 (en) Inkjet printer
JPH01103466A (en) Control in page-type printer device
JP3183188B2 (en) Inkjet printer
JP2002316428A (en) Printer and printer information processing method
JPH061045A (en) Printer device
JPH09216424A (en) Printer
JPH1110962A (en) Printer and printing method
JP3303264B2 (en) Printer device
JPH10283131A (en) Printer
JPS62152040A (en) Data transfer system for serial printer
JP2002137460A (en) Print system and storage control method
JPH02134276A (en) Control apparatus of dot printer
JP2767245B2 (en) Printhead print control method
JPH02148130A (en) Printing system
JP2000198254A (en) Printing apparatus and its control method, and, information-recording medium
JPS61195080A (en) Image data printing system
JPH03147854A (en) Split printing

Legal Events

Date Code Title Description
R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

EXPY Cancellation because of completion of term