JPH0461376B2 - - Google Patents
Info
- Publication number
- JPH0461376B2 JPH0461376B2 JP58077857A JP7785783A JPH0461376B2 JP H0461376 B2 JPH0461376 B2 JP H0461376B2 JP 58077857 A JP58077857 A JP 58077857A JP 7785783 A JP7785783 A JP 7785783A JP H0461376 B2 JPH0461376 B2 JP H0461376B2
- Authority
- JP
- Japan
- Prior art keywords
- printer
- interrupt
- printing
- control
- 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
Links
Landscapes
- Record Information Processing For Printing (AREA)
- Calculators And Similar Devices (AREA)
Description
【発明の詳細な説明】
(a) 技術分野
この発明はECRやクレジツトカード取引処理
装置など、制御部にCPUを使用したプリンタ付
き電子機器の割込み制御方法に関する。DETAILED DESCRIPTION OF THE INVENTION (a) Technical Field The present invention relates to an interrupt control method for electronic equipment with a printer, such as an ECR or a credit card transaction processing device, which uses a CPU as a control unit.
(b) 従来技術とその欠点
制御部にCPUを備え、入出力部に入力キー,
表示部,プリンタなどを備えるプリンタ付き電子
機器においては、通常、CPUに対して一定のタ
イミングパルスを割込み信号として与えるタイマ
が設けられ、入力キー部や表示部の制御は、その
タイマからCPUに対して出力されるタイミング
パルスによる割込み処理によつて行わせるように
している。この場合、表示制御やキー入力制御な
どは機械的動作が伴わないために、CPUの制御
と表示部、入力キー部の動作との間に同期を取る
必要がない。したがつて非印字モード、すなわち
表示モード,入力モードなどにおいては、表示制
御やキー入力制御の動作と全く非同期である上記
タイマからのタイミングパルスによつて割込み処
理を行うようにしても全く問題が生じない。しか
し機械的動作を伴う印字モードにおいては、プリ
ンタの印字動作タイミングが通常バラついている
故、CPUにおいて非同期で印字コイル動作制御
処理を行おうとすると、プリンタに対して印字内
容を出力しても機械的動作が正常に追随しない場
合が生じ、追随機能が極端に悪化すると印字ずれ
を起こす可能性が生じてくる。(b) Conventional technology and its drawbacks The control section is equipped with a CPU, and the input/output section has input keys,
Electronic devices with printers, such as displays and printers, are usually equipped with a timer that sends a constant timing pulse to the CPU as an interrupt signal, and the control of the input keys and display is controlled by the timer. This is done by interrupt processing using timing pulses output by the CPU. In this case, since display control, key input control, etc. do not involve mechanical operations, there is no need to synchronize the control of the CPU with the operations of the display section and input key section. Therefore, in non-printing modes, ie, display mode, input mode, etc., there is no problem at all even if interrupt processing is performed using timing pulses from the above-mentioned timer, which are completely asynchronous with display control and key input control operations. Does not occur. However, in printing modes that involve mechanical operations, the printer's printing operation timing usually varies, so if you try to control the printing coil operation asynchronously in the CPU, even if the printing contents are output to the printer, the mechanical There may be cases where the operation does not follow normally, and if the tracking function deteriorates extremely, there is a possibility that printing misalignment will occur.
(c) 発明の目的
この発明の目的は、プリンタで印字される度に
発生する印字同期パルスをCPUに割込み信号と
して入力させることによつて、CPUの印字コイ
ル動作制御処理とプリンタの印字動作とを同期さ
せるようにし、印字モードにおいて表示制御等の
通常割込み処理に影響を及ぼさないで常にプリン
タが正常に動作する割込み制御方法を提供するこ
とにある。(c) Purpose of the Invention The purpose of the present invention is to input a print synchronization pulse generated each time a printer prints to the CPU as an interrupt signal, thereby controlling the printing coil operation control processing of the CPU and the printing operation of the printer. An object of the present invention is to provide an interrupt control method in which a printer always operates normally without affecting normal interrupt processing such as display control in print mode.
(d) 発明の構成および効果
この発明は要約すれば、CPUの割込み入力端
子に、タイマからの一定のタイミングパルスとと
もにプリンタに接続されるI/Oインターフエイ
スを介してプリンタからの印字同期パルスを与
え、非印字モード時にはタイマからのタイミング
パルスで表示制御を含む通常割込み処理を行い、
印字モード時には前記タイマからのタイミングパ
ルスを無効にして前記印字同期パルスで通常割込
み処理およびプリンタの印字コイル動作制御処理
を行うようにしたことを特徴とする。このような
割込み制御方法を実施すると、印字モード時に
は、CPUはプリンタからの印字同期パルスが入
力すると直に割込み処理モードに移つて印字命令
あるいは印字データをI/Oインターフエイスに
送出する。したがつて、プリンタの動作と完全に
同期してCPUの印字制御が実行される。なお、
この場合の表示制御やキー入力制御はプリンタに
対する印字制御と同様に印字同期パルスによる割
込み処理によつて行われるが、表示部がキー入力
制御には機械的動作を伴わず、さらに、タイマか
らのタイミングパルスの周期より印字同期パルス
の周期が長くても、その周期は人間の目の感応速
度あるいは入力キーに対する操作速度等に比べて
非常に短いのが一般的であるから、表示部,キー
入力部における機能上の問題は殆ど生じない。(d) Structure and Effects of the Invention In summary, the present invention provides a method for transmitting a print synchronization pulse from a printer to an interrupt input terminal of a CPU via an I/O interface connected to the printer together with a constant timing pulse from a timer. When in non-printing mode, normal interrupt processing including display control is performed using timing pulses from the timer.
In the print mode, the timing pulse from the timer is disabled and the print synchronization pulse is used to perform normal interrupt processing and print coil operation control processing of the printer. When such an interrupt control method is implemented, in the print mode, the CPU immediately shifts to the interrupt processing mode upon input of a print synchronization pulse from the printer, and sends a print command or print data to the I/O interface. Therefore, print control by the CPU is executed in complete synchronization with printer operations. In addition,
In this case, display control and key input control are performed by interrupt processing using print synchronization pulses in the same way as print control for printers, but the display section does not involve mechanical movement for key input control, and furthermore, Even if the period of the print synchronization pulse is longer than the period of the timing pulse, the period is generally very short compared to the sensitivity speed of the human eye or the operation speed of input keys, so the display section, key input There are almost no functional problems in the department.
以上のようにこの発明によれば、CPUの割込
み入力端子にタイマからのタイミングパルスとと
もにプリンタからの印字同期パルスを与え、非印
字モード時においてはタイマからのタイミングパ
ルスで通常割込み処理を行うとともに、印字モー
ド時においては印字同期パルスで通常割込み処理
およびプリンタの印字コイル動作制御処理をとも
に行うようにしたため、印字モード時においては
表示制御などの通常割込み処理に悪影響を与える
ことなく常に適正なプリンタの印字動作を確保す
ることができ、印字ずれなどの印字不良の発生を
完全に防止することができる。 As described above, according to the present invention, the timing pulse from the timer and the print synchronization pulse from the printer are applied to the interrupt input terminal of the CPU, and in the non-printing mode, normal interrupt processing is performed using the timing pulse from the timer. In print mode, the print synchronization pulse is used to perform both normal interrupt processing and printer print coil operation control processing. Therefore, in print mode, the printer is always properly operated without adversely affecting normal interrupt processing such as display control. Printing operation can be ensured, and printing defects such as printing misalignment can be completely prevented from occurring.
(e) 実施例
第1図はこの発明の割込み制御方法を実施する
プリンタ付き電子機器の要部ブロツク図である。(e) Embodiment FIG. 1 is a block diagram of the main parts of an electronic device with a printer that implements the interrupt control method of the present invention.
図において、データバスおよびアドレスバスを
含むCPUバス1にはCPU2,メモリ3,表示制
御部4,プログラマブルタイヤ(PTM)5,
I/Oインターフエイスであるペリフエラルイン
ターフエイスアダプタ(PIA)6がそれぞれ接続
されている。CPU2のクロツク入力端子EXTAL
にはクロツク発振器(CLK)7から基本クロツ
クが入力する。CLK7からの基本クロツクはさ
らにカウンタ8に入力し、ここで一定の周期のパ
ルスに変換されてPTM5に入力する。PTM5は
このカウンタ8の出力パルスをトリガとして周期
T=800μsのタイミングパルスをCPU2の割込み
入力端子に割込み信号として出力する。PIA
6にはプリンタ制御回路9が接続され、PIA6の
データ出力端子PB0〜PB7はプリンタ制御回路
9のデータ入力端子DOT1〜DOT7,DTに接
続され、またPIA6の制御端子PA0,PA1はそ
れぞれプリンタ制御回路9の制御端子R,Tに接
続されている。PIA6の割込み入力端子CA1は、
プリンタ10の印字動作に同期して印字同期パル
スを出力するプリンタ制御回路9の端子Tに接続
され、PIA6に対してプリンタ制御回路9からの
周期T′≒800μsの印字同期パルスが割込み信号と
して入力するようにしている。PIA6は割込み入
力端子CA1に入力した印字同期パルスを同じ周
期のタイミングT′の印字同期パルスとしてCPU
2の割込み入力端子に出力する。PIA6から
CPU2の割込み入力端子に対して与えられ
る印字同期パルスと、PTM5からCPU2の割込
み入力端子に対して与えられるタイミングパ
ルスとはワイヤドオアされている。またプリンタ
10には、その印字動作に伴う印字同期パルス
T′の周期が上記タイミングパルスの周期Tに略
等しい800μsに設定されているものを使用する。
上記表示制御部4によつてセグメント制御が行わ
れる多桁数字表示部11は、CPU2の表示制御
処理によつてダイナミツク表示制御される。そし
て、その表示制御はPTM5またはPIA6からの
タイミングパルスまたは印字同期パルスによる割
込み時に行われる。なお、入力キー部は図示して
いないが、上記表示部11と同様にPTM5また
はPIA6からのタイミングパルスまたは印字同期
パルスによる割込み時に制御されるようになつて
いる。 In the figure, a CPU bus 1 including a data bus and an address bus includes a CPU 2, a memory 3, a display control unit 4, a programmable tire (PTM) 5,
A peripheral interface adapter (PIA) 6, which is an I/O interface, is connected to each. CPU2 clock input terminal EXTAL
A basic clock is input from a clock oscillator (CLK) 7. The basic clock from CLK7 is further input to a counter 8, where it is converted into pulses with a constant period and input to PTM5. The PTM 5 uses the output pulse of the counter 8 as a trigger and outputs a timing pulse with a period T=800 μs to the interrupt input terminal of the CPU 2 as an interrupt signal. PIA
6 is connected to the printer control circuit 9, data output terminals PB0 to PB7 of PIA6 are connected to data input terminals DOT1 to DOT7, DT of the printer control circuit 9, and control terminals PA0 and PA1 of PIA6 are connected to the printer control circuit, respectively. It is connected to control terminals R and T of 9. The interrupt input terminal CA1 of PIA6 is
It is connected to the terminal T of the printer control circuit 9 which outputs a print synchronization pulse in synchronization with the printing operation of the printer 10, and the print synchronization pulse with a period T'≒800 μs from the printer control circuit 9 is input as an interrupt signal to the PIA 6. I try to do that. PIA6 uses the print synchronization pulse input to the interrupt input terminal CA1 as the print synchronization pulse at timing T' of the same cycle to the CPU.
Output to interrupt input terminal 2. From PIA6
The print synchronization pulse applied to the interrupt input terminal of the CPU 2 and the timing pulse applied from the PTM 5 to the interrupt input terminal of the CPU 2 are wired-ORed. The printer 10 also has a print synchronization pulse associated with its printing operation.
The period T' is set to 800 μs, which is approximately equal to the period T of the timing pulse.
The multi-digit number display section 11, which is subjected to segment control by the display control section 4, is dynamically controlled for display by the display control processing of the CPU 2. The display control is performed at the time of interruption by a timing pulse or a print synchronization pulse from the PTM 5 or PIA 6. Although the input key section is not shown, it is controlled in the same way as the display section 11 when interrupted by a timing pulse or print synchronization pulse from the PTM 5 or PIA 6.
次に以上の構成からなるプリンタ付き電子機器
の割込み時の動作を第2図を参照して説明する。
同図Aはメインルーチンの一部を示すフローチヤ
ート、同図Bは割込み時のフローチヤートを示
す。 Next, the operation of the printer-equipped electronic device having the above configuration at the time of an interrupt will be explained with reference to FIG.
Figure A shows a flowchart showing part of the main routine, and Figure B shows a flowchart at the time of an interrupt.
電子機器が動作を開始し、ステツプniにおいて
所定のプログラム処理の実行を完了すると、ni+
1において、印字モードに移行するかどうかはを
判定する。プログラム処理の結果、印字モードに
移行しないときにはni+2へ進み、PIA6の割込
み信号出力端子をマスクするコマンドをPIA
6に対して送出する。またプログラム処理の結
果、印字モードに移行するときにはni+1→ni+
3と進み、PTM5の割込み信号出力端子を
マスクするコマンドをPTM5に対して送出する。
したがつて、非印字モードにおいてはCPU2は
PTM5からのタイミングパルスを割込み信号と
して受け付け、それによつて表示制御などの通常
割込み処理を実行する。また印字モードにおいて
はPTM5からのタイミングパルスを無効にし、
PIM6からの印字同期パルスを割込み信号とし
て受け付け、割込み処理によつて表示制御を含む
通常割込み処理とともにプリンタの印字コイル動
作制御処理を実行する。 When the electronic device starts operating and completes the specified program processing in step ni, ni+
In step 1, it is determined whether to shift to print mode. As a result of program processing, if the mode does not change to print mode, proceed to ni+2 and issue a command to mask the interrupt signal output terminal of PIA6.
Send to 6. Also, as a result of program processing, when transitioning to print mode, ni+1 → ni+
3, and sends a command to the PTM5 to mask the interrupt signal output terminal of the PTM5.
Therefore, in non-printing mode, CPU2
The timing pulse from the PTM 5 is accepted as an interrupt signal, and normal interrupt processing such as display control is executed accordingly. Also, in print mode, the timing pulse from PTM5 is disabled,
The print synchronization pulse from the PIM 6 is accepted as an interrupt signal, and the interrupt processing executes normal interrupt processing including display control as well as printing coil operation control processing of the printer.
CPU2がPTM5またはPIA6から割込み信号
を受け付けると第2図Bのn10へ進む。n10では
まず、マスクされている割込み信号出力端子が
PTM5のものであるかPIA6のものであるかを
判定する。PIA6の割込み出力端子がマスク
されているときにはn11で表示部11に対するダ
イナミツク表示制御を行い、さらにn12にてキー
入力制御などの他の通常割込み処理を実行してリ
ターンする。一方、PTM5の割込み信号出力端
子がマスクされているときにはn13,n14で
上記n11,n12と同様に表示制御およびその他の
通常割込み処理を行い、さらにn15へ進んでプリ
ンタの印字コイル動作制御処理を実行してリター
ンする。 When the CPU 2 receives an interrupt signal from the PTM 5 or PIA 6, the process proceeds to n10 in FIG. 2B. On the n10, first, the masked interrupt signal output pin is
Determine whether it is PTM5 or PIA6. When the interrupt output terminal of the PIA 6 is masked, dynamic display control is performed on the display unit 11 at n11, and other normal interrupt processing such as key input control is executed at n12, and the process returns. On the other hand, when the interrupt signal output terminal of PTM5 is masked, display control and other normal interrupt processing are performed in n13 and n14 in the same way as n11 and n12 above, and then the process proceeds to n15 to execute printer printing coil operation control processing. and return.
以上のようにして実行モードが非印字モードに
あるときにはPTM5からのタイミングパルスを
割込み信号として受け付け、また印字モードにあ
るときにはPIA6からの印字同期パルスを割込み
信号として受け付けることによつて、印字モード
時には、プリンタ10の印字コイル動作制御をプ
リンタの機械的動作に同期した状態で行うことが
できる。この場合、表示制御を含む通常割込み処
理も印字同期パルスの割込み処理によつて行われ
ることになるが、それらの通常割込み処理には機
械的動作が全く伴わず、また割込みタイミングの
間隔が多少ずれても表示状態が大きくちらつくよ
うになつたり、あるいはキー操作に対する応答が
大幅に悪くなるというようなことがないために、
非印字モードから印字モードに変わつた場合でも
表示状態などの印字モードのときと全く同じであ
る。 As described above, when the execution mode is in the non-printing mode, the timing pulse from the PTM5 is accepted as an interrupt signal, and when the execution mode is in the printing mode, the print synchronization pulse from the PIA6 is accepted as an interrupt signal. , the printing coil operation of the printer 10 can be controlled in synchronization with the mechanical operation of the printer. In this case, normal interrupt processing including display control is also performed by print synchronization pulse interrupt processing, but these normal interrupt processing do not involve any mechanical operation, and the intervals between interrupt timings may be slightly different. This prevents the display from flickering significantly or the response to key operations to deteriorate significantly.
Even when changing from non-printing mode to printing mode, the display state and the like are exactly the same as in printing mode.
なお、上記実施例のようにPTM5からのタイ
ミングパルスの周期TとPIA6からの印字同期パ
ルスの周期T′とを略同じにすることによつて、
印字モード時においても非印字モード時において
もCPU2の動作を略同じ状態にすることができ、
表示状態のちらつきの発生防止などをより一層完
全化することができる。 Note that by making the period T of the timing pulse from the PTM 5 and the period T' of the print synchronization pulse from the PIA 6 substantially the same as in the above embodiment,
The operation of CPU2 can be made almost the same in both printing mode and non-printing mode.
It is possible to further improve the prevention of flickering in the display state.
第1図はこの発明に係る割込み制御方法を実施
するプリンタ付き電子機器の要部ブロツク図であ
る。また第2図A,Bは同プリンタ付き電子機器
の動作手順を示すメインルーチンの一部のフロー
チヤート,割込み時のフローチヤートである。
1……CPUバス、2……CPU、5……プログ
ラマブルタイマ、6……ペリフエラルインターフ
エイスアダプタ(I/Oインターフエイス)、9
……プリンタ制御回路、10……プリンタ、
(CPU2の)……割込み入力端子。
FIG. 1 is a block diagram of the main parts of an electronic device with a printer that implements the interrupt control method according to the present invention. Further, FIGS. 2A and 2B are a flowchart of a part of the main routine and a flowchart at the time of an interrupt, showing the operating procedure of the electronic device with the printer. 1...CPU bus, 2...CPU, 5...Programmable timer, 6...Peripheral interface adapter (I/O interface), 9
... printer control circuit, 10 ... printer,
(CPU2)...Interrupt input terminal.
Claims (1)
CPUに与えるタイマと、CPUバスに接続されプ
リンタ制御回路に対して印字コイル動作制御処理
に係る印字データを送出するI/Oインターフエ
イスとを備え、前記タイミングパルスによる割込
み時に表示制御等の通常割込み処理を行うように
したプリンタ付き電子機器の制御装置において、 前記CPUの割込み入力端子に、前記タイマか
らのタイミングパルスとともに前記I/Oインタ
ーフエイスを介してプリンタからの印字同期パル
スを与え、非印字モード時には前記タイマからの
タイミングパルスで通常割込み処理を行うととも
に、印字モード時には前記タイマからのタイミン
グパルスを無効にして前記プリンタからの印字同
期パルスで通常割込み処理およびプリンタの印字
コイル動作制御処理に係る印字データの送出を行
うようにしたことを特徴とするプリンタ付き電子
機器の割込み制御方法。 2 前記印字同期パルスの周期を前記タイミング
パルスの周期と略同一に設定した特許請求の範囲
第1項記載のプリンタ付き電子機器の割り込み制
御方法。[Claims] 1. Using a constant timing pulse as an interrupt signal
It is equipped with a timer that is given to the CPU, and an I/O interface that is connected to the CPU bus and sends print data related to print coil operation control processing to the printer control circuit, and when interrupted by the timing pulse, normal interrupts such as display control etc. In a control device for an electronic device equipped with a printer that performs processing, a timing pulse from the timer and a print synchronization pulse from the printer are applied to an interrupt input terminal of the CPU via the I/O interface, and a non-printing In the printing mode, the timing pulse from the timer is used to perform normal interrupt processing, and in the print mode, the timing pulse from the timer is disabled and the printing synchronization pulse from the printer is used to perform normal interrupt processing and print coil operation control processing of the printer. An interrupt control method for an electronic device equipped with a printer, characterized in that printing data is transmitted. 2. The interrupt control method for an electronic device with a printer according to claim 1, wherein the cycle of the print synchronization pulse is set to be substantially the same as the cycle of the timing pulse.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP58077857A JPS59202537A (en) | 1983-05-02 | 1983-05-02 | Interruption control method of electronic instrument with printer |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP58077857A JPS59202537A (en) | 1983-05-02 | 1983-05-02 | Interruption control method of electronic instrument with printer |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS59202537A JPS59202537A (en) | 1984-11-16 |
| JPH0461376B2 true JPH0461376B2 (en) | 1992-09-30 |
Family
ID=13645729
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP58077857A Granted JPS59202537A (en) | 1983-05-02 | 1983-05-02 | Interruption control method of electronic instrument with printer |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS59202537A (en) |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US4277191A (en) * | 1980-01-28 | 1981-07-07 | International Business Machines Corporation | Printer system having microprocessor control |
-
1983
- 1983-05-02 JP JP58077857A patent/JPS59202537A/en active Granted
Also Published As
| Publication number | Publication date |
|---|---|
| JPS59202537A (en) | 1984-11-16 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US4095267A (en) | Clock pulse control system for microcomputer systems | |
| EP0215236B1 (en) | Data processing machine | |
| JPH05244145A (en) | Variable timing signal generating circuit | |
| JPH04257932A (en) | Chip for emulation for digital signal processor | |
| JP2563679B2 (en) | Bidirectional input / output signal separation circuit | |
| KR960016809B1 (en) | Trigger signal generating circuit with trigger masking function | |
| US5371770A (en) | Pulse generating circuit for microcomputers | |
| JPS59202537A (en) | Interruption control method of electronic instrument with printer | |
| US4138841A (en) | Electronic timepiece | |
| GB1564587A (en) | Control arrangements for electronic apparatus including plural circuit means | |
| JP3314791B2 (en) | Synchronization method for multiprocessor systems | |
| JPH05333805A (en) | Display controller | |
| US5210857A (en) | Data processing apparatus with noise avoidance | |
| JPH0752384B2 (en) | Printer device | |
| JPS60181812A (en) | Keyboard controller | |
| JPH0573296A (en) | Microcomputer | |
| JP2513032B2 (en) | Microcomputer input control circuit | |
| JPH0532719B2 (en) | ||
| JPH02128287A (en) | Microcomputer | |
| JPS649393A (en) | Electronic timepiece | |
| SU877549A1 (en) | System for data processing with checking | |
| JP3088407B2 (en) | In-circuit emulator and in-circuit emulation method | |
| JPS5816319A (en) | Time controller of computer system | |
| JPH0427730B2 (en) | ||
| JPH04135268A (en) | Multi-cpu system |