JP3235941B2 - Printer device - Google Patents

Printer device

Info

Publication number
JP3235941B2
JP3235941B2 JP03410895A JP3410895A JP3235941B2 JP 3235941 B2 JP3235941 B2 JP 3235941B2 JP 03410895 A JP03410895 A JP 03410895A JP 3410895 A JP3410895 A JP 3410895A JP 3235941 B2 JP3235941 B2 JP 3235941B2
Authority
JP
Japan
Prior art keywords
voltage
reference voltage
host device
power supply
external host
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 - Fee Related
Application number
JP03410895A
Other languages
Japanese (ja)
Other versions
JPH08224944A (en
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.)
Star Micronics Co Ltd
Original Assignee
Star Micronics 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 Star Micronics Co Ltd filed Critical Star Micronics Co Ltd
Priority to JP03410895A priority Critical patent/JP3235941B2/en
Priority to US08/607,257 priority patent/US5720560A/en
Priority to EP96301199A priority patent/EP0729114A3/en
Publication of JPH08224944A publication Critical patent/JPH08224944A/en
Application granted granted Critical
Publication of JP3235941B2 publication Critical patent/JP3235941B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Accessory Devices And Overall Control Thereof (AREA)

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、記録媒体に文字や図形
などの画像を形成するためのプリンタ装置に関し、特に
外部ホスト装置の電源状態を監視することができるプリ
ンタ装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a printer for forming an image such as a character or a graphic on a recording medium, and more particularly to a printer capable of monitoring a power supply state of an external host device.

【0002】[0002]

【従来の技術】従来、シリアルドットプリンタ等のプリ
ンタは、ワードプロセッサ等のようにホスト装置と一体
化した内蔵型と、別体のホスト装置と信号ケーブルで接
続される外付け型に大別される。内蔵型のプリンタは、
電源回路を共有しているものが一般的であり、ホスト装
置の電源を切るとプリンタ装置の電源も自動的に遮断さ
れる。一方、外付け型のプリンタは専用の電源回路を内
蔵しており、ホスト装置の電源操作とプリンタの電源操
作とは別個に行う必要があり、ホスト装置をオフにして
もプリンタは自動的にオフにならない。
2. Description of the Related Art Conventionally, printers such as serial dot printers are roughly classified into a built-in type integrated with a host device such as a word processor and an external type connected to a separate host device by a signal cable. . The built-in printer is
Generally, the power supply circuit is shared, and when the host device is turned off, the printer device is automatically turned off. On the other hand, an external type printer has a dedicated power supply circuit built in, and the power operation of the host device and the power operation of the printer must be performed separately. Even if the host device is turned off, the printer automatically turns off. do not become.

【0003】プリンタはホスト装置からの指令で動作す
るオンラインモードで運転されることが多く、使用者は
プリンタを直接操作する機会が少ない。そのためホスト
装置の電源オフの際にプリンタの電源切り忘れが多々あ
り、省エネルギーの点で好ましくない。
In many cases, the printer is operated in an online mode operated by a command from a host device, and a user rarely operates the printer directly. For this reason, when the power of the host device is turned off, the user often forgets to turn off the power of the printer, which is not preferable in terms of energy saving.

【0004】このような問題を解決する先行技術とし
て、電力消費の低減を図ったデータ端末装置(特開昭5
7−155633号公報)やプリンタ装置(特開平4−
354017号公報)が開示されている。
As a prior art for solving such a problem, a data terminal device (Japanese Patent Laid-Open No.
7-155633) and a printer device (Japanese Unexamined Patent Publication No.
No. 354017).

【0005】図9は、従来のプリンタ装置の電気的構成
の一例を示すブロック図である。このプリンタ装置は、
装置全体の動作を管理するCPU(中央処理装置)51
と、不揮発性メモリであるROM(リードオンリメモ
リ)52と、データの書替えが可能なRAM(ランダム
アクセスメモリ)53と、外部ホスト装置50と接続す
るためのインタフェイス(I/F)57と、操作スイッ
チ等の信号入力手段や表示LED(発光ダイオード)や
ブザー等の信号表示手段が組み込まれたパネル部58
と、記録媒体に画像を形成するための画像形成部59
と、画像形成部59を制御するための制御回路54など
で構成される。
FIG. 9 is a block diagram showing an example of an electrical configuration of a conventional printer. This printer device
CPU (Central Processing Unit) 51 for managing the operation of the entire apparatus
A ROM (read only memory) 52 which is a nonvolatile memory, a RAM (random access memory) 53 capable of rewriting data, an interface (I / F) 57 for connecting to the external host device 50, Panel unit 58 incorporating signal input means such as operation switches and signal display means such as display LEDs (light emitting diodes) and buzzers.
And an image forming unit 59 for forming an image on a recording medium
And a control circuit 54 for controlling the image forming section 59.

【0006】CPU51は、ROM52に格納されたプ
ログラムに従って、データ入出力、データ転送、演算等
の信号処理を行う。ROM52は、CPU51の動作に
必要なプログラムおよびデータや文字コードや文字フォ
ントなど印字に必要なデータを格納している。RAM5
3は、CPU51のワークエリア、外部ホスト装置から
の受信データの一時保管や文書データの展開などに使用
される。インタフェイス57は、外部ホスト装置との間
でデータの授受を行う。このようなCPU51、ROM
52、RAM53、インタフェイス57、パネル部58
および制御回路54はアドレスバス、データバス、コン
トロールバス等から成るバスBUSによって相互に接続
されている。また、CPU51の内部には、動作タイミ
ングを決めるクロック信号66を発生するクロック回路
(不図示)が内蔵されており、制御回路54にも供給さ
れている。
[0006] The CPU 51 performs signal processing such as data input / output, data transfer, and calculation according to a program stored in the ROM 52. The ROM 52 stores programs and data necessary for the operation of the CPU 51, and data necessary for printing such as character codes and character fonts. RAM5
Reference numeral 3 is used for a work area of the CPU 51, temporary storage of data received from an external host device, expansion of document data, and the like. The interface 57 exchanges data with an external host device. Such CPU 51, ROM
52, RAM 53, interface 57, panel unit 58
The control circuit 54 is mutually connected by a bus BUS including an address bus, a data bus, a control bus, and the like. Further, a clock circuit (not shown) for generating a clock signal 66 for determining an operation timing is built in the CPU 51, and is also supplied to the control circuit 54.

【0007】画像形成部59は、駆動部56とドライブ
回路55を有する。駆動部56は、記録媒体に印字を行
う印字ヘッドや、印字ヘッドを搭載したキャリッジ(C
R)を記録媒体の幅方向に移送するCRモータや、記録
媒体を一定量ずつ搬送するPF(ペーパフィード)モー
タなどの駆動ユニットを有する。ドライブ回路55は、
制御回路54からの制御信号に基づいて画像形成部59
の各駆動ユニットを駆動する。
The image forming section 59 has a drive section 56 and a drive circuit 55. The drive unit 56 includes a print head that prints on a recording medium and a carriage (C
A drive unit such as a CR motor that transports R) in the width direction of the recording medium and a PF (paper feed) motor that transports the recording medium by a fixed amount. The drive circuit 55
Image forming section 59 based on a control signal from control circuit 54
Are driven.

【0008】このプリンタ装置には、デジタル信号を扱
うロジック系の回路に電力を供給するロジック電源61
と、モータ等の比較的大電力を必要とするユニットに電
力を供給するドライブ電源60とが設けられ、いずれも
商用電源へスイッチ等を介さずに接続される。ドライブ
電源60は電源ラインVcc3を介して画像形成部59
に電力を供給している。
The printer includes a logic power supply 61 for supplying power to a logic circuit for handling digital signals.
And a drive power supply 60 for supplying electric power to a unit requiring relatively large electric power, such as a motor, are connected to a commercial power supply without a switch or the like. The drive power supply 60 is connected to the image forming unit 59 via a power supply line Vcc3.
Power.

【0009】一方、ロジック電源61はたとえばTTL
やCMOSに適合する直流5Vを電源ラインVcc1に
出力し、CPU51、ROM52、RAM53、インタ
フェイス57、パネル部58、制御回路54およびリレ
ー等から成る電源切断回路62に供給している。また、
電源ラインVcc1の一部は電源切断回路62を介して
電源ラインVcc2となって、パネル部58および制御
回路54の一部に接続されている。電源切断回路62
は、制御回路54からの節電信号67がハイレベルであ
るとき電源ラインVcc2へ電力を供給し、一方、節電
信号67がローレベルであるとき電源ラインVcc2へ
の電力供給を遮断する。
On the other hand, the logic power supply 61 is, for example, TTL
And a DC 5V suitable for CMOS and CMOS is output to a power supply line Vcc1, and supplied to a CPU 51, a ROM 52, a RAM 53, an interface 57, a panel unit 58, a control circuit 54, and a power supply disconnecting circuit 62 including a relay and the like. Also,
A part of the power supply line Vcc1 becomes a power supply line Vcc2 via a power supply cutoff circuit 62, and is connected to a panel part 58 and a part of the control circuit. Power-off circuit 62
Supplies power to the power supply line Vcc2 when the power saving signal 67 from the control circuit 54 is at a high level, and shuts off power supply to the power supply line Vcc2 when the power saving signal 67 is at a low level.

【0010】図10は、インタフェイス57の一例を示
すブロック図である。外部ホスト装置50とインタフェ
イス57とはコネクタ71を介して接続されており、こ
こではセントロニクス準拠などのパラレルインタフェイ
ス方式を用いており、代表的な信号線として、データ信
号Data1〜8(正論理)、ビジー信号BUSY(正
論理)、ストローブ信号STROBE(負論理)、アク
ノリッジ信号ACK(負論理)等が規定されている。
FIG. 10 is a block diagram showing an example of the interface 57. The external host device 50 and the interface 57 are connected via a connector 71. Here, a parallel interface system such as Centronics compliant is used, and data signals Data1 to Data8 (positive logic) are used as representative signal lines. ), A busy signal BUSY (positive logic), a strobe signal STROBE (negative logic), an acknowledge signal ACK (negative logic), and the like.

【0011】データラッチ回路72は、データ信号Da
ta1〜8を介して外部ホスト装置50から送信される
印字コードや印字制御コードを8ビット単位で格納する
ものであり、ストローブ信号の立下り時にデータをラッ
チする。ビジーフラグ73は、フリップフロップ等で構
成され、ストローブ信号の立下りでハイレベルとなり、
そのままビジー信号として外部ホスト装置50へ出力す
るとともに、汎用入出力回路(I/O)74を経由して
CPU51に取り込まれる。外部ホスト装置50は、絶
えずビジー信号を監視しており、ローレベルになるまで
次のデータ送信を待機している。データラッチ回路72
にラッチされたデータがバスを介してCPU51に取り
込まれると、CPU51は汎用入出力回路74を介して
クリア信号CLEARを出力してビジーフラグ73をロ
ーレベルに反転させる。なお、CPU51は時間計測用
のタイマーTAを有する。
The data latch circuit 72 has a data signal Da.
The print code and print control code transmitted from the external host device 50 via ta1 to ta8 are stored in units of 8 bits, and the data is latched when the strobe signal falls. The busy flag 73 is constituted by a flip-flop or the like, and becomes a high level at the falling of the strobe signal.
The signal is output as it is to the external host device 50 as it is, and is taken into the CPU 51 via the general-purpose input / output circuit (I / O) 74. The external host device 50 constantly monitors the busy signal, and waits for the next data transmission until it goes low. Data latch circuit 72
Is latched by the CPU 51 via the bus, the CPU 51 outputs a clear signal CLEAR via the general-purpose input / output circuit 74 to invert the busy flag 73 to a low level. Note that the CPU 51 has a timer TA for measuring time.

【0012】図11は、外部ホスト装置とプリンタ装置
との接続方式の一例を示す回路図であり、外部ホスト装
置の電源が切られていて、プリンタ装置が通電している
場合の入力信号の等価回路を示す図である。外部ホスト
装置50とプリンタ装置とはコネクタ71を介して接続
され、インタフェイス57の入力側には入力バッファQ
1(たとえばTTL−IC型番「LS14」等)が設け
られる。各信号線は、ノイズ防止のためにプルアップ抵
抗R1(たとえば1.5kΩ〜4.7kΩ)で電源ライ
ン(たとえば5V)に接続されている。同様に、外部ホ
スト装置の出力側も、各信号線にプルアップ抵抗および
プルダウン抵抗が接続されており、等価回路的にはそれ
らを合成インピーダンスZで表せる。
FIG. 11 is a circuit diagram showing an example of a connection system between the external host device and the printer device. The power supply of the external host device is turned off and the equivalent of input signals when the printer device is energized. It is a figure showing a circuit. The external host device 50 and the printer device are connected via a connector 71, and an input buffer Q is provided on the input side of the interface 57.
1 (for example, TTL-IC model number “LS14”). Each signal line is connected to a power supply line (for example, 5 V) by a pull-up resistor R1 (for example, 1.5 kΩ to 4.7 kΩ) to prevent noise. Similarly, also on the output side of the external host device, pull-up resistors and pull-down resistors are connected to each signal line, and these can be represented by a combined impedance Z in an equivalent circuit.

【0013】したがって、外部ホスト装置が通電してい
る場合には、信号線の電圧レベルは外部ホスト装置から
の出力によってハイレベルまたはローレベルに安定して
いる。また、外部ホスト装置と接続していない場合に
は、プルアップ抵抗R1の存在によって信号線はハイレ
ベルに安定する。しかし、外部ホスト装置が通電してお
らず、かつプリンタ装置が通電している状態では、図1
1に示すようにホスト装置の出力側は合成インピーダン
スZを通して接地しているとみなせる。したがって、信
号線の電圧レベルはプルアップ抵抗R1および合成イン
ピーダンスZの分圧比で決まるため、ハイレベルとロー
レベルの中間的な値となる。
Therefore, when the external host device is energized, the voltage level of the signal line is stabilized at the high level or the low level by the output from the external host device. When not connected to an external host device, the signal line is stabilized at a high level by the presence of the pull-up resistor R1. However, when the external host device is not energized and the printer device is energized, FIG.
As shown in FIG. 1, the output side of the host device can be regarded as being grounded through the combined impedance Z. Therefore, since the voltage level of the signal line is determined by the voltage division ratio of the pull-up resistor R1 and the combined impedance Z, the voltage level is an intermediate value between the high level and the low level.

【0014】図12(a)はストローブ信号の電圧変化
の一例を示すグラフである。外部ホスト装置50とプリ
ンタ装置が接続された状態で、外部ホスト装置がデータ
送信を行っていない場合には、ストローブ信号はハイレ
ベル(図12では5Vを示す)に保持されている。この
状態で外部ホスト装置の電源がオフになると、電源電圧
の低下に伴って信号の電圧レベルは指数関数的に減少
し、プルアップ抵抗R1および合成インピーダンスZの
分圧比で決まる中間電位(図12では約1.8Vを示
す)に落ち着く。次に、外部ホスト装置が再び通電する
と、信号レベルは中間電位からハイレベルに向かって上
昇し、一定電圧に安定する。
FIG. 12A is a graph showing an example of a voltage change of the strobe signal. When the external host device is not transmitting data while the external host device 50 is connected to the printer device, the strobe signal is held at a high level (5 V in FIG. 12). When the power supply of the external host device is turned off in this state, the voltage level of the signal decreases exponentially as the power supply voltage decreases, and the intermediate potential determined by the voltage division ratio of the pull-up resistor R1 and the combined impedance Z (FIG. 12). At about 1.8V). Next, when the external host device is energized again, the signal level rises from the intermediate potential to the high level and stabilizes at a constant voltage.

【0015】このように外部ホスト装置がオフである場
合、合成インピーダンスZが一定の値を持つため、中間
電位として1.5V〜4Vの範囲内に収まるのが一般的
である。入力バッファQ1がTTL−ICである場合、
ローレベルの閾値は0.8V〜1.1Vである。そのた
め外部ホスト装置がオフになってもストローブ信号はロ
ーレベルにならず、プリンタ装置が誤ってデータを受信
するという事態は回避できている。
As described above, when the external host device is off, since the combined impedance Z has a constant value, the intermediate potential generally falls within the range of 1.5 V to 4 V. When the input buffer Q1 is a TTL-IC,
The low level threshold is 0.8V to 1.1V. Therefore, even when the external host device is turned off, the strobe signal does not become low level, so that a situation in which the printer device receives data by mistake can be avoided.

【0016】図12(b)はストローブ信号の電圧変化
の他の例を示すグラフである。外部ホスト装置50の機
種によっては、電源がオンまたはオフになると瞬間的に
ローレベル(図12では約0.2V)を出力するものが
存在する。これは外部ホスト装置の電源がオン時または
オフ時にパワーオンリセットが動作して、そのときスト
ローブ信号を一瞬ローレベルにすることが原因と推測さ
れる。図12(b)に示す波形を見ると、プリンタ装置
が通常のデータ転送時に受け取るストローブ信号の波形
と区別するのが困難であり、外部ホスト装置のオン時ま
たはオフ時にデータ信号Data1〜8から誤ったデー
タを受信してしまう。
FIG. 12B is a graph showing another example of a voltage change of the strobe signal. Some external host devices 50 output a low level (approximately 0.2 V in FIG. 12) momentarily when the power is turned on or off. This is presumably due to the fact that the power-on reset operates when the power of the external host device is turned on or off, and the strobe signal is momentarily set to the low level at that time. Looking at the waveform shown in FIG. 12B, it is difficult to distinguish the waveform from the strobe signal received by the printer device at the time of normal data transfer. Received data.

【0017】特に、外部ホスト装置の電源オフ時におい
てストローブ信号の波形は、0V近傍まで低下した後、
一転して急激に上昇している。このパルス幅は、外部ホ
スト装置の電源容量や出力バッファの特性に左右される
が、数百μ秒程度かかることがある。また、電圧変化カ
ーブは分圧比に決まる電圧を多少越えたところに小さな
ピークを持ち、このピーク電圧が入力バッファQ1のハ
イレベル閾値を越えなければ、外部ホスト装置が通電を
再開するまでストローブ信号はローレベルが持続してい
ると判断される。
In particular, when the power of the external host device is turned off, the waveform of the strobe signal drops to near 0 V,
On the other hand, it is rising rapidly. This pulse width depends on the power supply capacity of the external host device and the characteristics of the output buffer, but may take several hundreds of microseconds. Further, the voltage change curve has a small peak slightly above the voltage determined by the voltage division ratio, and if this peak voltage does not exceed the high level threshold of the input buffer Q1, the strobe signal is not changed until the external host device re-energizes. It is determined that the low level has been maintained.

【0018】図13は、従来のプリンタ装置の動作を示
すフローチャートである。まずプリンタ装置の電源が投
入されると、ステップS101においてRAM53、イ
ンタフェイス57、パネル部58および制御回路54の
初期設定を行って、次のステップS102において制御
回路54を介してドライブ回路55および駆動部56を
動作させ、印字位置や印字条件等を初期化する初期動作
を行って、印字スタンバイの状態になる。この状態で外
部ホスト装置50からの印字命令を受信すると、印字動
作を開始することができる。
FIG. 13 is a flowchart showing the operation of the conventional printer. First, when the power of the printer is turned on, the RAM 53, the interface 57, the panel unit 58, and the control circuit 54 are initialized in step S101, and the drive circuit 55 and the drive circuit 55 are driven via the control circuit 54 in the next step S102. The unit 56 is operated to perform an initial operation for initializing a printing position, printing conditions, and the like, and a printing standby state is set. When a print command is received from the external host device 50 in this state, the printing operation can be started.

【0019】次にステップS103においてビジーフラ
グ73が立っているか否かを判定して、ストローブ信号
のレベル変化の有無を検知している。ビジーフラグ73
がセットされるまでループするとともに、一旦セットさ
れるとステップS104へ進んでタイマーTAをスター
トして、ステップS105で一定時間経過するまで待機
する。この待機時間は、ストローブ信号のパルス幅が通
常数μ秒程度であることから、余裕を見込んで100μ
秒程度に設定している。
Next, in step S103, it is determined whether or not the busy flag 73 is set, thereby detecting whether or not the level of the strobe signal has changed. Busy flag 73
Is set, and once set, the process proceeds to step S104 to start the timer TA and waits for a predetermined time to elapse in step S105. The standby time is set to 100 μm in consideration of a margin since the pulse width of the strobe signal is usually about several μsec.
Set to about seconds.

【0020】一定時間を経過すると、ステップ106で
タイマーTAを停止し、ステップS107で汎用入出力
回路74を介してストローブ信号を直接取り込んで、レ
ベルを判定する。ストローブ信号がハイレベル「H」に
戻っていれば、データ入力があったと判断して、データ
ラッチ回路72でラッチされた受信データを読み込んで
RAM53の印字バッファに格納する。次のステップS
109でビジーフラグ73をクリアした後、ステップS
110で印字バッファがデータで一杯になるなど印字開
始条件が整ったか否かを判定し、印字開始条件が整うま
でステップS103〜S110を繰り返す。印字開始条
件が満足されると、ステップS111で印字バッファ内
のデータをドットパターンに展開し、画像形成部59を
駆動して記録媒体に印字を行う。その後、ステップS1
03に戻る。
After a lapse of a predetermined time, the timer TA is stopped in step 106, and the level is determined by directly taking in the strobe signal via the general-purpose input / output circuit 74 in step S107. If the strobe signal has returned to the high level "H", it is determined that data has been input, and the received data latched by the data latch circuit 72 is read and stored in the print buffer of the RAM 53. Next step S
After clearing the busy flag 73 at 109, step S
At 110, it is determined whether or not the print start condition is satisfied, such as when the print buffer is full of data, and steps S103 to S110 are repeated until the print start condition is satisfied. When the print start condition is satisfied, the data in the print buffer is developed into a dot pattern in step S111, and the image forming unit 59 is driven to perform printing on the recording medium. Then, step S1
Return to 03.

【0021】一方、ステップS107において、ビジー
フラグ73が立ってから一定時間経過してもストローブ
信号がローレベル「L」のままであれば、外部ホスト装
置50の電源オフに起因するものの判断して、ステップ
S112へ移行して節電信号67をローレベルにして電
源切断回路62を動作させ、電源ラインVcc2への電
力供給を停止する。
On the other hand, in step S107, if the strobe signal remains at the low level "L" after a certain period of time has elapsed since the busy flag 73 is set, it is determined that the strobe signal is caused by powering off of the external host device 50. In step S112, the power saving signal 67 is set to low level to operate the power supply disconnecting circuit 62, and the power supply to the power supply line Vcc2 is stopped.

【0022】こうしてストローブ信号のレベル反転によ
ってビジーフラグがセットされてから一定時間経過後に
ストローブ信号の電圧状態を監視することによって、通
常印字動作と電源オフ動作とを切り替えている。
The normal printing operation and the power-off operation are switched by monitoring the voltage state of the strobe signal after a predetermined time has passed since the busy flag is set by the level inversion of the strobe signal.

【0023】[0023]

【発明が解決しようとする課題】従来の手法は図12
(b)に示す波形に対しては有効であるが、図12
(a)に示す波形に対しては確実な判定ができない。図
12(a)の場合、入力バッファQ1のローレベル閾値
を下回るほどストローブ信号の電圧が降下していないの
で、ビジーフラグがセットされていないことになる。こ
のように外部ホスト装置の機種によって電源オフ時のス
トローブ信号波形は多種多様であるため、より確実な判
定方法が望まれている。たとえば、図12(b)に示す
波形のうち小さなピークがもう少し高くなって汎用入出
力回路74のハイレベル閾値を越えてしまう可能性もあ
り、誤判断のおそれがある。
The conventional method is shown in FIG.
Although effective for the waveform shown in FIG.
A reliable determination cannot be made for the waveform shown in FIG. In the case of FIG. 12A, since the voltage of the strobe signal does not drop below the low-level threshold of the input buffer Q1, the busy flag is not set. As described above, since the strobe signal waveform when the power is turned off varies depending on the type of the external host device, a more reliable determination method is desired. For example, there is a possibility that a small peak in the waveform shown in FIG. 12B becomes slightly higher and exceeds the high level threshold value of the general-purpose input / output circuit 74, which may cause an erroneous determination.

【0024】本発明の目的は、外部ホスト装置の電源状
態を確実に判定することができるプリンタ装置を提供す
ることである。
An object of the present invention is to provide a printer capable of reliably determining the power state of an external host device.

【0025】[0025]

【課題を解決するための手段】本発明は、外部ホスト装
置から出力されるホスト側信号を受信するためのインタ
フェイス手段と、記録媒体に画像を形成するための画像
形成手段と、インタフェイス手段および画像形成手段と
の間で信号を送受し、所定のプログラムに従って信号処
理を行う主制御手段とを備えたプリンタ装置において、
インタフェイス手段に供給される電源電圧より低く設定
される第1基準電圧および、ローレベルの論理閾値より
高くかつ前記第1基準電圧より低く設定された第2基準
電圧により、ホスト側信号の電圧を監視する電圧監視手
段を備え、該ホスト側信号が第1基準電圧以下かつ第2
基準電圧以上である場合に、外部ホスト装置の電源が遮
断状態であると判断することを特徴とするプリンタ装置
である。また本発明は、前記電圧監視手段は、アナログ
デジタル変換器であることを特徴とする。また本発明
は、前記電圧監視手段は、ウインドウコンパレータであ
ることを特徴とする。また本発明は、外部ホスト装置か
ら出力されるホスト側信号を受信するためのインタフェ
イス手段と、記録媒体に画像を形成するための画像形成
手段と、インタフェイス手段および画像形成手段との間
で信号を送受し、所定のプログラムに従って信号処理を
行う主制御手段とを備えたプリンタ装置において、ホス
ト側信号の電圧を監視する電圧監視手段と、タイマーと
を備え、外部ホスト装置からのデータ入力が無く、かつ
ホスト側信号がローレベルの論理閾値より高く設定され
た第1基準電圧以下となった後、所定時間経過後に該ホ
スト側信号が第1基準電圧以下である場合に、外部ホス
ト装置の電源が遮断状態であると判断することを特徴と
するプリンタ装置である。また本発明は、前記電圧監視
手段は、コンパレータであることを特徴とする。また本
発明は、前記電圧監視手段は、アナログデジタル変換器
であることを特徴とする。また本発明は、第1基準電圧
が自動調整可能であることを特徴とする。
SUMMARY OF THE INVENTION The present invention provides an interface means for receiving a host-side signal output from an external host device, an image forming means for forming an image on a recording medium, and an interface means. And a main control unit for transmitting and receiving signals to and from the image forming unit and performing signal processing according to a predetermined program,
The first reference voltage set lower than the power supply voltage supplied to the interface means and the second reference voltage set higher than the low-level logic threshold and lower than the first reference voltage reduce the voltage of the host-side signal. Voltage monitoring means for monitoring, wherein the host-side signal is equal to or lower than the first reference voltage and
A printer device that determines that the power supply of an external host device is in a cut-off state when the voltage is equal to or higher than a reference voltage. Further, the invention is characterized in that the voltage monitoring means is an analog-to-digital converter. Further, the invention is characterized in that the voltage monitoring means is a window comparator. Further, according to the present invention, an interface unit for receiving a host-side signal output from an external host device, an image forming unit for forming an image on a recording medium, and the interface unit and the image forming unit In a printer device including a main control unit that transmits and receives a signal and performs signal processing according to a predetermined program, the printer device includes a voltage monitoring unit that monitors a voltage of a host-side signal, and a timer, and receives data from an external host device. After a predetermined time has elapsed after the absence of the host-side signal and the host-side signal has become equal to or lower than the first reference voltage set higher than the low-level logic threshold, the external host device A printer device that determines that a power supply is in an interrupted state. Further, the invention is characterized in that the voltage monitoring means is a comparator. Further, the invention is characterized in that the voltage monitoring means is an analog-to-digital converter. Further, the invention is characterized in that the first reference voltage can be automatically adjusted.

【0026】[0026]

【作用】本発明に従えば、ホスト側信号の電圧を監視
し、2つの基準電圧と比較することによって、ハイレベ
ルおよびローレベル以外の中間電位である場合も検知可
能となる。こうしてホスト側信号が第1基準電圧以下か
つ第2基準電圧以上である場合に、外部ホスト装置の電
源が遮断状態であることを確実にかつ高速に判断するこ
とができる。なお、ホスト側信号としてストローブ信号
だけでなく、外部ホスト装置が通電状態にあるときハイ
レベルまたはローレベルであることが確実な信号で、電
源遮断状態であるとき中間電位となる信号を監視対象に
することができる。
According to the present invention, by monitoring the voltage of the host-side signal and comparing the voltage with the two reference voltages, it is possible to detect the intermediate potential other than the high level and the low level. Thus, when the host-side signal is equal to or lower than the first reference voltage and equal to or higher than the second reference voltage, it is possible to reliably and quickly determine that the power supply of the external host device is in the cutoff state. In addition to the strobe signal as the host-side signal, a signal that is sure to be at a high level or a low level when the external host device is in an energized state, and a signal that has an intermediate potential when the power supply is in a cut-off state are monitored. can do.

【0027】また、電圧監視手段としてアナログデジタ
ル変換器を用いることによって、主制御手段での信号処
理が容易になり、ホスト側信号の電圧変化を極め細かく
監視することができる。
Also, by using an analog-to-digital converter as the voltage monitoring means, the signal processing in the main control means becomes easy, and the voltage change of the host-side signal can be monitored very finely.

【0028】また、電圧監視手段としてウインドウコン
パレータを用いることによって、ホスト側信号の電圧変
化を精度よくかつ迅速に監視することができる。
Further, by using a window comparator as the voltage monitoring means, it is possible to accurately and quickly monitor the voltage change of the host-side signal.

【0029】また本発明に従えば、ホスト側信号の電圧
を監視して、論理閾値より高く設定された第1基準電圧
と比較することによって、ホスト側信号が中間電位であ
る状態を確実に検知できる。さらに、ホスト側信号のレ
ベル反転から所定時間経過後に電圧監視手段の出力を判
定することによって、ホスト側信号のレベル反転がデー
タ転送に起因するものか、それとも外部ホスト装置の電
源状態変化に起因するものかを明確に判別することがで
きる。
According to the present invention, by monitoring the voltage of the host signal and comparing it with the first reference voltage set higher than the logical threshold value, it is possible to reliably detect the state where the host signal is at the intermediate potential. it can. Further, by judging the output of the voltage monitoring means after a lapse of a predetermined time from the level inversion of the host-side signal, whether the level inversion of the host-side signal is caused by data transfer or by a change in the power supply state of the external host device. Can be clearly determined.

【0030】また、電圧監視手段としてコンパレータを
用いることによって、ホスト側信号の電圧変化を精度よ
くかつ迅速に監視することができる。
Further, by using a comparator as the voltage monitoring means, it is possible to accurately and quickly monitor a change in the voltage of the host-side signal.

【0031】また、電圧監視手段としてアナログデジタ
ル変換器を用いることによって、主制御手段での信号処
理が容易になり、ホスト側信号の電圧変化を極め細かく
監視することができる。
Further, by using an analog-to-digital converter as the voltage monitoring means, the signal processing in the main control means becomes easy, and the voltage change of the host side signal can be monitored very finely.

【0032】また、第1基準電圧が自動調整可能である
ことによって、外部ホスト装置の出力側のインピーダン
スが機種ごとに大きく異なる場合に、確実な判定が可能
な基準電圧を設定できる。
Further, since the first reference voltage can be automatically adjusted, it is possible to set a reference voltage that can be reliably determined when the impedance on the output side of the external host device greatly differs depending on the model.

【0033】[0033]

【実施例】【Example】

(第1実施例)図1は、本発明の第1実施例の電気的構
成を示すブロック図である。このプリンタ装置は、装置
全体の動作を管理するCPU(中央処理装置)1と、不
揮発性メモリであるROM(リードオンリメモリ)2
と、データの書替えが可能なRAM(ランダムアクセス
メモリ)3と、外部ホスト装置19と接続するためのイ
ンタフェイス(I/F)7と、操作スイッチ等の信号入
力手段や表示LED(発光ダイオード)やブザー等の信
号表示手段が組み込まれたパネル部8と、記録媒体に画
像を形成するための画像形成部9と、画像形成部9を制
御するための制御回路4などで構成される。
(First Embodiment) FIG. 1 is a block diagram showing an electrical configuration of a first embodiment of the present invention. This printer device has a CPU (Central Processing Unit) 1 for managing the operation of the entire device, and a ROM (Read Only Memory) 2 which is a nonvolatile memory.
A data rewritable RAM (random access memory) 3, an interface (I / F) 7 for connecting to an external host device 19, signal input means such as operation switches, and a display LED (light emitting diode). It comprises a panel unit 8 in which signal display means such as a printer and a buzzer are incorporated, an image forming unit 9 for forming an image on a recording medium, a control circuit 4 for controlling the image forming unit 9, and the like.

【0034】CPU1は、ROM2に格納されたプログ
ラムに従って、データ入出力、データ転送、演算等の信
号処理を行う。ROM2は、CPU1の動作に必要なプ
ログラムおよびデータや文字コードや文字フォントなど
印字に必要なデータを格納している。RAM3は、CP
U1のワークエリア、外部ホスト装置からの受信データ
の一時保管や文書データの展開などに使用される。イン
タフェイス7は、外部ホスト装置19との間でデータの
授受を行う。さらに、インタフェイス7には、ストロー
ブ信号のレベル変化を監視する電圧監視回路15が設け
られる。
The CPU 1 performs signal processing such as data input / output, data transfer, and operation in accordance with a program stored in the ROM 2. The ROM 2 stores programs and data necessary for the operation of the CPU 1, and data necessary for printing such as character codes and character fonts. RAM3 is CP
It is used for temporarily storing received data from the work area of U1 and the external host device and for expanding document data. The interface 7 exchanges data with the external host device 19. Further, the interface 7 is provided with a voltage monitoring circuit 15 for monitoring a level change of the strobe signal.

【0035】このようなCPU1、ROM2、RAM
3、インタフェイス7、パネル部8および制御回路4は
アドレスバス、データバス、コントロールバス等から成
るバスBUSによって相互に接続されている。また、C
PU1の内部には、動作タイミングを決めるクロック信
号16を発生するクロック回路(不図示)が内蔵されて
おり、制御回路4にも供給されている。
Such a CPU 1, ROM 2, RAM
3, the interface 7, the panel unit 8, and the control circuit 4 are mutually connected by a bus BUS including an address bus, a data bus, a control bus and the like. Also, C
A clock circuit (not shown) for generating a clock signal 16 for determining an operation timing is built in the PU 1, and is also supplied to the control circuit 4.

【0036】画像形成部9は、駆動部6とドライブ回路
5を有する。駆動部6は、記録媒体に印字を行う印字ヘ
ッドや、印字ヘッドを搭載したキャリッジ(CR)を記
録媒体の幅方向に移送するCRモータや、記録媒体を一
定量ずつ搬送するPF(ペーパフィード)モータなどの
駆動ユニットを有する。ドライブ回路5は、制御回路4
からの制御信号に基づいて画像形成部9の各駆動ユニッ
トを駆動する。
The image forming section 9 has a drive section 6 and a drive circuit 5. The drive unit 6 includes a print head that prints on a recording medium, a CR motor that moves a carriage (CR) on which the print head is mounted in the width direction of the recording medium, and a PF (paper feed) that conveys the recording medium by a fixed amount. It has a drive unit such as a motor. The drive circuit 5 includes the control circuit 4
The respective driving units of the image forming section 9 are driven based on the control signal from the CPU.

【0037】このプリンタ装置には、デジタル信号を扱
うロジック系の回路に電力を供給するロジック電源11
と、モータ等の比較的大電力を必要とするユニットに電
力を供給するドライブ電源10とが設けられ、いずれも
商用電源へスイッチ等を介さずに接続される。ドライブ
電源10は電源ラインVcc3を介して画像形成部9に
電力を供給している。
The printer includes a logic power supply 11 for supplying power to a logic circuit for handling digital signals.
And a drive power supply 10 for supplying electric power to a unit requiring relatively large electric power, such as a motor, are connected to a commercial power supply without a switch or the like. The drive power supply 10 supplies power to the image forming unit 9 via a power supply line Vcc3.

【0038】一方、ロジック電源11はたとえばTTL
やCMOSに適合する直流5Vを電源ラインVcc1に
出力し、CPU1、ROM2、RAM3、インタフェイ
ス7、パネル部8、制御回路4およびリレー等から成る
電源切断回路12に供給している。また、電源ラインV
cc1の一部は電源切断回路12を介して電源ラインV
cc2となって、パネル部8および制御回路4の一部に
接続されている。電源切断回路12は、制御回路4から
の節電信号17がハイレベルであるとき電源ラインVc
c2へ電力を供給し、一方、節電信号17がローレベル
であるとき電源ラインVcc2への電力供給を遮断す
る。
On the other hand, the logic power supply 11 is, for example, TTL
And a DC 5 V suitable for CMOS and CMOS is output to a power supply line Vcc1 and supplied to a power supply disconnection circuit 12 including a CPU 1, a ROM 2, a RAM 3, an interface 7, a panel unit 8, a control circuit 4, a relay, and the like. In addition, the power supply line V
A part of cc1 is supplied to the power supply line V via the power supply disconnection circuit 12.
cc2, which is connected to the panel unit 8 and a part of the control circuit 4. When the power saving signal 17 from the control circuit 4 is at a high level, the power supply disconnecting circuit 12
Power is supplied to c2, while when the power saving signal 17 is at low level, power supply to the power supply line Vcc2 is cut off.

【0039】図2は、第1実施例のインタフェイス7を
示すブロック図である。外部ホスト装置19とインタフ
ェイス7とはコネクタ21を介して接続されており、こ
こではセントロニクス準拠などのパラレルインタフェイ
ス方式を用いており、代表的な信号線として、データ信
号Data1〜8(正論理)、ビジー信号BUSY(正
論理)、ストローブ信号STROBE(負論理)、アク
ノリッジ信号ACK(負論理)等が規定されている。
FIG. 2 is a block diagram showing the interface 7 of the first embodiment. The external host device 19 and the interface 7 are connected via a connector 21. Here, a parallel interface system such as Centronics compliant is used, and data signals Data1 to 8 (positive logic) are used as representative signal lines. ), A busy signal BUSY (positive logic), a strobe signal STROBE (negative logic), an acknowledge signal ACK (negative logic), and the like.

【0040】データラッチ回路22は、データ信号Da
ta1〜8を介して外部ホスト装置19から送信される
印字コードや印字制御コードを8ビット単位で格納する
ものであり、ストローブ信号の立下り時にデータをラッ
チする。ビジーフラグ23は、フリップフロップ等で構
成され、ストローブ信号の立下りでハイレベルとなり、
そのままビジー信号として外部ホスト装置19へ出力す
るとともに、汎用入出力回路(I/O)24を経由して
CPU1に取り込まれる。外部ホスト装置19は、絶え
ずビジー信号を監視しており、ローレベルになるまで次
のデータ送信を待機している。データラッチ回路22に
ラッチされたデータがバスを介してCPU1に取り込ま
れると、CPU1は汎用入出力回路24を介してクリア
信号CLEARを出力してビジーフラグ23をローレベ
ルに反転させる。
The data latch circuit 22 outputs the data signal Da
The print code and the print control code transmitted from the external host device 19 via ta1 to ta8 are stored in units of 8 bits, and the data is latched when the strobe signal falls. The busy flag 23 is constituted by a flip-flop or the like, and becomes a high level at the falling of the strobe signal.
It is output as it is to the external host device 19 as a busy signal, and is taken into the CPU 1 via the general-purpose input / output circuit (I / O) 24. The external host device 19 constantly monitors the busy signal, and waits for the next data transmission until the signal becomes low. When the data latched by the data latch circuit 22 is taken into the CPU 1 via the bus, the CPU 1 outputs the clear signal CLEAR via the general-purpose input / output circuit 24 and inverts the busy flag 23 to a low level.

【0041】さらに、ストローブ信号の電圧レベル変化
を監視するため、たとえば8ビット構成のA−Dコンバ
ータ(アナログデジタル変換器)15aを含む電圧監視
回路15が設けられ、デジタル出力はバスを介してCP
U1に取込まれる。なお、A−Dコンバータ15aとし
て逐次変換型のものなどが使用できる。
Further, in order to monitor the change in the voltage level of the strobe signal, there is provided a voltage monitoring circuit 15 including an AD converter (analog-to-digital converter) 15a having, for example, an 8-bit configuration.
Captured by U1. Note that a successive conversion type or the like can be used as the AD converter 15a.

【0042】図3は、第1実施例の動作を示すフローチ
ャートである。まずプリンタ装置の電源が投入される
と、ステップS201においてRAM3、インタフェイ
ス7、パネル部8および制御回路4の初期設定を行っ
て、次のステップS202において制御回路4を介して
ドライブ回路5および駆動部6を動作させ、印字位置や
印字条件等を初期化する初期動作を行って、印字スタン
バイの状態になる。この状態で外部ホスト装置19から
の印字命令を受信すると、印字動作を開始することがで
きる。
FIG. 3 is a flowchart showing the operation of the first embodiment. First, when the power of the printer is turned on, initialization of the RAM 3, the interface 7, the panel unit 8, and the control circuit 4 is performed in step S201, and the drive circuit 5 and the drive circuit 5 are controlled via the control circuit 4 in the next step S202. The unit 6 is operated to perform an initial operation for initializing a printing position, a printing condition, and the like, and a printing standby state is set. When a print command is received from the external host device 19 in this state, a print operation can be started.

【0043】次にステップS203においてビジーフラ
グ23が立っているか否かを判定して、ストローブ信号
のレベル変化の有無を検知している。ビジーフラグ23
がセットされているとデータ入力があったと判断して、
ステップS204へ進んでデータラッチ回路22でラッ
チされた受信データを読み込んでRAM3の印字バッフ
ァに格納する。次のステップS205でビジーフラグ2
3をクリアした後、ステップS206において印字バッ
ファがデータで一杯になるなど印字開始条件が整ったか
否かを判定し、印字開始条件が整うまでステップS20
3〜S206を繰り返す。印字開始条件が満足される
と、ステップS207で印字バッファ内のデータをドッ
トパターンに展開し、画像形成部9を駆動して記録媒体
に印字を行う。その後、ステップS203に戻る。
Next, in step S203, it is determined whether or not the busy flag 23 is set, thereby detecting whether or not the level of the strobe signal has changed. Busy flag 23
Is set, it is determined that there is data input,
In step S204, the received data latched by the data latch circuit 22 is read and stored in the print buffer of the RAM 3. Busy flag 2 in next step S205
After clearing No. 3, it is determined in step S206 whether or not the print start condition such as the print buffer being full of data is satisfied, and step S20 is performed until the print start condition is satisfied.
3 to S206 are repeated. When the print start condition is satisfied, the data in the print buffer is developed into a dot pattern in step S207, and the image forming unit 9 is driven to perform printing on the recording medium. Then, the process returns to step S203.

【0044】一方、ステップS203でビジーフラグ2
3が立っていなければ、ステップS208へ移行して、
A−Dコンバータ15aの動作を開始して、ステップ2
09でA−D変換が終了するまで待機する。A−D変換
に要する時間は、変換出力のビット数と比較動作用のク
ロック周波数で決定され、8ビット分解能であれば20
μ秒程度の待機時間になる。
On the other hand, in step S203, the busy flag 2
If 3 does not stand, the process proceeds to step S208,
The operation of the AD converter 15a is started,
In step 09, the process waits until the AD conversion is completed. The time required for the AD conversion is determined by the number of bits of the conversion output and the clock frequency for the comparison operation.
The waiting time is about μ seconds.

【0045】次にステップS210でA−Dコンバータ
15aのデジタル出力と第1基準電圧V1と比較する。
第1基準電圧V1の値は、ROM2やRAM3に予め記
憶されており、外部ホスト装置19の出力側インピーダ
ンスが比較的高い場合を考慮すると、V1の値が電源電
圧の5Vに近いほど中間電位の検出マージンが大きくな
るが、電源電圧変動などを考慮して、たとえば80%の
4V程度に設定するのが好ましい。
Next, in step S210, the digital output of the AD converter 15a is compared with the first reference voltage V1.
The value of the first reference voltage V1 is stored in advance in the ROM 2 or the RAM 3, and in consideration of the case where the output impedance of the external host device 19 is relatively high, the closer the value of V1 is to 5V of the power supply voltage, the more the intermediate potential becomes. Although the detection margin becomes large, it is preferable to set the voltage to, for example, about 4 V of 80% in consideration of power supply voltage fluctuation and the like.

【0046】A−Dコンバータ15aのデジタル出力が
第1基準電圧V1より高い場合は、外部ホスト装置19
が通電状態であると判断できるため、プリンタ装置は印
字準備状態を継続するためステップ203に戻る。デジ
タル出力が第1基準電圧値V1以下である場合はステッ
プS211において、今度は第2基準電圧値V2と比較
する。第2基準電圧V2の値は、ROM2やRAM3に
予め記憶されており、グランド電圧の0Vに近いほど中
間電位の検出マージンが大きくなるが、電圧変動などを
考慮して、たとえば20%の1V程度に設定するのが好
ましい。A−Dコンバータ15aのデジタル出力が第2
基準電圧V2より低い場合は、外部ホスト装置19が通
電状態であると判断できるため、ステップ203に戻
る。デジタル出力が第2基準電圧V2以上である場合
は、結局、ストローブ信号の電圧が第1基準電圧V1と
第2基準電圧V2との間の中間電位にあることになり、
外部ホスト装置19の電源が遮断した状態であると判断
でき、ステップS212へ移行して節電信号17をロー
レベルにして電源切断回路12を動作させ、電源ライン
Vcc2への電力供給を停止し、省電力モードに突入す
る。
When the digital output of the AD converter 15a is higher than the first reference voltage V1, the external host device 19
Can be determined to be in the energized state, and the printer apparatus returns to step 203 to continue the print preparation state. If the digital output is equal to or less than the first reference voltage value V1, in step S211, the digital output is compared with the second reference voltage value V2. The value of the second reference voltage V2 is stored in advance in the ROM 2 or the RAM 3, and the detection margin of the intermediate potential becomes larger as the ground voltage becomes closer to 0V. It is preferable to set The digital output of the AD converter 15a is the second
When the voltage is lower than the reference voltage V2, it can be determined that the external host device 19 is in the energized state. When the digital output is equal to or higher than the second reference voltage V2, the voltage of the strobe signal is at an intermediate potential between the first reference voltage V1 and the second reference voltage V2.
It can be determined that the power of the external host device 19 has been cut off, the process proceeds to step S212, the power saving signal 17 is set to low level, the power supply disconnection circuit 12 is operated, and the power supply to the power supply line Vcc2 is stopped to save power. Enter power mode.

【0047】なお、図12(b)に示す例では、信号が
急激に変化した後の電圧を測定してしまう可能性がある
が、このときビジーフラグ23は立っているため、ステ
ップS203〜S206を実行した後、ステップ208
以降のA−D変換処理に移り、ストローブ信号の電圧が
第1基準電圧V1と第2基準電圧V2との間に落ち着く
までステップS203およびS208以降を繰り返し、
中間電位になるとステップS212に移行してプリンタ
装置は省電力モードに入る。
In the example shown in FIG. 12 (b), there is a possibility that the voltage after a sudden change in the signal may be measured. At this time, since the busy flag 23 is set, steps S203 to S206 are performed. After execution, step 208
The processing shifts to the subsequent A / D conversion processing, and steps S203 and S208 and thereafter are repeated until the voltage of the strobe signal is settled between the first reference voltage V1 and the second reference voltage V2.
When the potential reaches the intermediate potential, the process proceeds to step S212, and the printer enters a power saving mode.

【0048】外部ホスト装置19の電源がオンである場
合は、通常、ストローブ信号の電圧は第1基準電圧V1
より高いと説明したが、例外的に外部ホスト装置19が
データ転送している場合が存在する。データ転送の途中
でストローブ信号がローレベルの時には第1基準電圧V
1以下になるが、ビジーフラグ23の判断がA−D変換
処理より優先して行われるため、ステップS203〜S
206の処理を行い、通常のデータ転送では、この処理
中に次のストローブ信号が発生してビジーフラグ23が
立つことから、データ転送中にA−D変換処理に移行す
ることは皆無である。偶然のタイミングでA−D変換処
理に入る可能性もあるが、データ転送中のストローブ信
号は中間電位にならないため、ステップS210または
S211で除外されることになる。
When the power supply of the external host device 19 is on, the voltage of the strobe signal is usually equal to the first reference voltage V1.
Although described as higher, there is a case where the external host device 19 is transferring data exceptionally. When the strobe signal is low during data transfer, the first reference voltage V
1 or less, but since the determination of the busy flag 23 is performed prior to the A / D conversion processing, the steps S203 to S203 are performed.
In the normal data transfer, the next strobe signal is generated during this process and the busy flag 23 is set, so that there is no transition to the A / D conversion process during the data transfer. Although there is a possibility that the A / D conversion process may be started at an accidental timing, the strobe signal during data transfer does not reach the intermediate potential, and thus is excluded in step S210 or S211.

【0049】こうしてホスト側信号の電圧を監視して、
第1基準電圧V1以下かつ第2基準電圧V2以上である
場合に、外部ホスト装置の電源が遮断状態であることを
確実にかつ高速に判断することができる。また、本実施
例では、データ受信ルーチンとは別のルーチンで判定し
ているため、データ受信の高速化が図られている。
In this way, the voltage of the host-side signal is monitored,
When the voltage is equal to or lower than the first reference voltage V1 and equal to or higher than the second reference voltage V2, it is possible to reliably and quickly determine that the power supply of the external host device is in the cutoff state. Further, in this embodiment, since the determination is made in a routine different from the data reception routine, the speed of data reception is increased.

【0050】以上の説明では、プリンタ装置の電源がオ
ンになる前に外部ホスト装置19の電源がオンである場
合を示している。次に、外部ホスト装置19の電源がオ
フ状態のときにプリンタ装置の電源をオンにする場合を
説明する。この場合ステップS201、S202の処理
を同様に行い、ステップS203でビジーフラグ23の
判定を行う。ここで、外部ホスト装置19はオフである
ため、ビジーフラグ23はセットされることが無い。そ
の後ステップS208以降へ移り、ストローブ信号は第
1基準電圧V1以下かつ第2基準電圧V2以上の中間電
圧となり、ステップS212でプリンタ電源はオフにな
る。したがって、外部ホスト装置がオフ状態のときにプ
リンタの電源がオンされても、所定の処理終了後にプリ
ンタは確実に電源がオフされる。
The above description shows a case where the power of the external host device 19 is turned on before the power of the printer device is turned on. Next, a case where the power of the printer device is turned on when the power of the external host device 19 is off will be described. In this case, the processes in steps S201 and S202 are performed in the same manner, and the busy flag 23 is determined in step S203. Here, since the external host device 19 is off, the busy flag 23 is not set. Thereafter, the process proceeds to step S208 and thereafter, the strobe signal becomes an intermediate voltage equal to or lower than the first reference voltage V1 and equal to or higher than the second reference voltage V2, and the printer power is turned off in step S212. Therefore, even if the power of the printer is turned on while the external host device is off, the printer is surely turned off after the predetermined processing is completed.

【0051】(第2実施例)図4は、本発明の第2実施
例に係るインタフェイス7を示すブロック図である。な
お、本実施例のプリンタ装置の全体構成は、第1実施例
のものと同様であるため重複説明を省く。また、本実施
例のインタフェイス7は、電圧監視回路15として2つ
のコンパレータ15b、15cから成るウインドウコン
パレータを使用しており、その他の構成は第1実施例と
同様である。
(Second Embodiment) FIG. 4 is a block diagram showing an interface 7 according to a second embodiment of the present invention. Note that the overall configuration of the printer device of the present embodiment is the same as that of the first embodiment, and will not be described repeatedly. Further, the interface 7 of this embodiment uses a window comparator composed of two comparators 15b and 15c as the voltage monitoring circuit 15, and the other configuration is the same as that of the first embodiment.

【0052】ストローブ信号の電圧レベル変化を監視す
るため、第1基準電圧V1と比較するコンパレータ15
bと、第2基準電圧V2と比較するコンパレータ15c
とが設けられ、各出力はオープンコレクタ型式で電源ラ
インにプルアップされている。第1基準電圧V1および
第2基準電圧V2は、図示しない基準電源から供給さ
れ、第1実施例と同様に、4Vおよび1Vにそれぞれ設
定される。
In order to monitor the change in the voltage level of the strobe signal, the comparator 15 compares the voltage with the first reference voltage V1.
b and a comparator 15c for comparing with the second reference voltage V2
Each output is an open collector type and is pulled up to a power supply line. The first reference voltage V1 and the second reference voltage V2 are supplied from a reference power supply (not shown), and are set to 4V and 1V, respectively, as in the first embodiment.

【0053】ストローブ信号の電圧が、1)第1基準電
圧V1より高い場合はコンパレータ15bの出力はロー
レベルになり、2)第1基準電圧V1以下で第2基準電
圧以上である場合はコンパレータ15b、15cの出力
はハイレベルになり、3)第2基準電圧V2より低い場
合はコンパレータ15cの出力がローレベルになる。こ
うしてウインドウコンパレータが構成され、その出力は
汎用入出力回路24を介してCPU1に読み込まれる。
When the voltage of the strobe signal is 1) higher than the first reference voltage V1, the output of the comparator 15b goes low. 2) When the voltage of the strobe signal is lower than the first reference voltage V1 and higher than the second reference voltage, the comparator 15b. , 15c go to a high level, and 3) when it is lower than the second reference voltage V2, the output of the comparator 15c goes to a low level. Thus, a window comparator is formed, and its output is read into the CPU 1 via the general-purpose input / output circuit 24.

【0054】図5は、第2実施例の動作を示すフローチ
ャートである。ここで、ステップS301〜S307
は、第1実施例のS201〜S207と同様であるた
め、重複説明を省く。電源投入後の初期化処理を終えて
から、ステップS303においてビジーフラグ23が立
っていなければ、ステップS308へ移行して、図4に
示すウインドウコンパレータの出力を判定して、ストロ
ーブ信号の電圧が第1基準電圧V1以上または第2基準
電圧V2以下の場合、外部ホスト装置19が通電状態で
あると判断できるため、プリンタ装置は印字準備状態を
継続するためステップ303に戻る。
FIG. 5 is a flowchart showing the operation of the second embodiment. Here, steps S301 to S307
Are the same as S201 to S207 in the first embodiment, and a duplicate description will be omitted. If the busy flag 23 is not set in step S303 after the initialization processing after power-on, the process proceeds to step S308 to determine the output of the window comparator shown in FIG. When the voltage is equal to or higher than the reference voltage V1 or equal to or lower than the second reference voltage V2, it can be determined that the external host device 19 is in the energized state.

【0055】一方、ストローブ信号の電圧が第1基準電
圧V1より低く第2基準電圧より高い場合は、外部ホス
ト装置19の電源が遮断した状態であると判断でき、ス
テップS309へ移行して節電信号17をローレベルに
して電源切断回路12を動作させ、電源ラインVcc2
への電力供給を停止し、省電力モードに突入する。
On the other hand, when the voltage of the strobe signal is lower than the first reference voltage V1 and higher than the second reference voltage, it can be determined that the power supply of the external host device 19 has been shut off, and the flow shifts to step S309 to shift to the power saving signal. 17 to a low level to operate the power supply disconnection circuit 12, and the power supply line Vcc2
To stop power supply and enter power saving mode.

【0056】このように電源監視回路15としてウイン
ドウコンパレータを使用することによって、CPU1の
プログラムが簡単になり、しかもAD変換等のデータ変
換が不要となって電源監視ルーチンの高速化が図られ
る。
The use of the window comparator as the power supply monitoring circuit 15 simplifies the program for the CPU 1 and eliminates the need for data conversion such as AD conversion, thereby speeding up the power supply monitoring routine.

【0057】(第3実施例)図6は、本発明の第3実施
例に係るインタフェイス7を示すブロック図である。な
お、本実施例のプリンタ装置の全体構成は、第1実施例
のものと同様であるため重複説明を省く。また、本実施
例のインタフェイス7は、電圧監視回路15として1つ
のコンパレータ15bを使用しており、その他の構成は
第1実施例と同様である。
(Third Embodiment) FIG. 6 is a block diagram showing an interface 7 according to a third embodiment of the present invention. Note that the overall configuration of the printer device of the present embodiment is the same as that of the first embodiment, and will not be described repeatedly. Further, the interface 7 of this embodiment uses one comparator 15b as the voltage monitoring circuit 15, and the other configuration is the same as that of the first embodiment.

【0058】ストローブ信号の電圧レベル変化を監視す
るため、第1基準電圧V1と比較するコンパレータ15
bが設けられ、その出力はオープンコレクタ型式で電源
ラインにプルアップされている。第1基準電圧V1は、
図示しない基準電源から供給され、第1実施例と同様
に、4V程度に設定される。
In order to monitor the change in the voltage level of the strobe signal, the comparator 15 compares the voltage with the first reference voltage V1.
b is provided, the output of which is an open collector type and is pulled up to a power supply line. The first reference voltage V1 is
The voltage is supplied from a reference power supply (not shown), and is set to about 4 V as in the first embodiment.

【0059】ストローブ信号の電圧が、1)第1基準電
圧V1より高い場合はコンパレータ15bの出力はロー
レベルになり、2)第1基準電圧V1より低い場合はコ
ンパレータ15bの出力がハイレベルになる。その出力
は汎用入出力回路24を介してCPU1に読み込まれ
る。
When the voltage of the strobe signal is 1) higher than the first reference voltage V1, the output of the comparator 15b goes low, and 2) when the voltage of the strobe signal is lower than the first reference voltage V1, the output of the comparator 15b goes high. . The output is read into the CPU 1 via the general-purpose input / output circuit 24.

【0060】図7は、第3実施例の動作を示すフローチ
ャートである。まずプリンタ装置の電源が投入される
と、ステップS401においてRAM3、インタフェイ
ス7、パネル部8および制御回路4の初期設定を行っ
て、次のステップS402において制御回路4を介して
ドライブ回路5および駆動部6を動作させ、印字位置や
印字条件等を初期化する初期動作を行って、印字スタン
バイの状態になる。この状態で外部ホスト装置19から
の印字命令を受信すると、印字動作を開始することがで
きる。
FIG. 7 is a flowchart showing the operation of the third embodiment. First, when the power of the printer is turned on, initialization of the RAM 3, the interface 7, the panel unit 8, and the control circuit 4 is performed in step S401, and the drive circuit 5 and the drive circuit 5 are driven via the control circuit 4 in the next step S402. The unit 6 is operated to perform an initial operation for initializing a printing position, a printing condition, and the like, and a printing standby state is set. When a print command is received from the external host device 19 in this state, a print operation can be started.

【0061】次にステップS403においてビジーフラ
グ23が立っているか否かを判定して、ストローブ信号
のレベル変化の有無を検知している。ビジーフラグ23
がセットされていると、データ入力があったと判断し
て、ステップS404〜S407までは第1実施例のス
テップS204〜S207と同様の処理を行う。一方、
ステップS403においてビジーフラグ23が立ってい
なければ、ステップS408で汎用入出力回路24を介
してコンパレータ15bの出力を取り込む。ストローブ
信号の電圧がV1より低くない場合はステップS403
に戻って、ビジーフラグ23がセットされるまでループ
する。ここで、電圧が第1基準電圧V1より低ければ、
ステップS409でタイマーTAをスタートして、ステ
ップS410で一定時間経過するまで待機する。この待
機時間は、ストローブ信号のパルス幅が通常数μ秒であ
ることから、余裕を見込んで100μ秒程度に設定して
いる。一定時間を経過すると、ステップS411でタイ
マーTAを停止し、ステップS412で、もう一度電圧
の確認を行う。ストローブ信号が第1基準電圧V1より
高ければ、データ入力のあった可能性があるので、ステ
ップS403に戻る。しかし、一定時間経過してもスト
ローブ信号の電圧がV1よりも低ければ、外部ホスト装
置19の電源オフに起因するものと判断して、ステップ
S413へ移行し、節電信号17をローレベルにして電
源切断回路12を動作させ、電源ラインVcc2への電
力供給を停止する。
Next, in step S403, it is determined whether or not the busy flag 23 is set, thereby detecting whether or not the level of the strobe signal has changed. Busy flag 23
Is set, it is determined that data has been input, and the same processing as in steps S204 to S207 of the first embodiment is performed in steps S404 to S407. on the other hand,
If the busy flag 23 is not set in step S403, the output of the comparator 15b is fetched via the general-purpose input / output circuit 24 in step S408. If the voltage of the strobe signal is not lower than V1, step S403
To loop until the busy flag 23 is set. Here, if the voltage is lower than the first reference voltage V1,
In step S409, the timer TA is started, and in step S410, the process waits until a predetermined time has elapsed. The standby time is set to about 100 μsec with a margin, since the pulse width of the strobe signal is usually several μsec. After a lapse of a predetermined time, the timer TA is stopped in step S411, and the voltage is checked again in step S412. If the strobe signal is higher than the first reference voltage V1, there is a possibility that data has been input, and the process returns to step S403. However, if the voltage of the strobe signal is lower than V1 even after a certain period of time, it is determined that the strobe signal is caused by turning off the power of the external host device 19, and the flow shifts to step S413 to set the power saving signal 17 to low level and turn off the power. The cutting circuit 12 is operated to stop supplying power to the power supply line Vcc2.

【0062】こうしてデータ転送が行われていない間、
ストローブ信号の電圧を常に論理閾値より高く設定され
た第1基準電圧V1と比較して、ホスト装置19の電源
オフを監視し、オフの可能性があれば、一定時間経過後
にもう一度確認することで、ホスト側信号が中間電位で
ある状態を確実に検知できる。
While data transfer is not being performed,
The power of the host device 19 is monitored by comparing the voltage of the strobe signal with the first reference voltage V1 which is always set to be higher than the logical threshold value. Thus, the state where the host-side signal is at the intermediate potential can be reliably detected.

【0063】(第4実施例)本実施例のプリンタ装置の
全体構成は、第1実施例のものと同様であるため重複説
明を省く。また、本実施例のインタフェイス7は、第1
実施例と同様に、電圧監視回路15としてA−Dコンバ
ータ15aを使用しており、ここではストローブ信号の
時間的変化を監視して1つの基準電圧と比較判定してお
り、さらに基準電圧を自動的に調整している。
(Fourth Embodiment) The overall configuration of a printer according to the present embodiment is the same as that of the first embodiment, and will not be described repeatedly. Further, the interface 7 of the present embodiment is the first interface.
As in the embodiment, an A / D converter 15a is used as the voltage monitoring circuit 15. In this case, the temporal change of the strobe signal is monitored and compared with one reference voltage, and the reference voltage is automatically determined. Is adjusted.

【0064】図8は、本発明の第4実施例の動作を示す
フローチャートである。まずプリンタ装置の電源が投入
されると、ステップS501においてRAM3、インタ
フェイス7、パネル部8および制御回路4の初期設定を
行って、次のステップS502において制御回路4を介
してドライブ回路5および駆動部6を動作させ、印字位
置や印字条件等を初期化する初期動作を行って、印字ス
タンバイの状態になる。この状態で外部ホスト装置19
からの印字命令を受信すると、印字動作を開始すること
ができる。
FIG. 8 is a flowchart showing the operation of the fourth embodiment of the present invention. First, when the power of the printer is turned on, initialization of the RAM 3, the interface 7, the panel unit 8, and the control circuit 4 is performed in step S501, and the drive circuit 5 and the drive circuit 5 are driven via the control circuit 4 in the next step S502. The unit 6 is operated to perform an initial operation for initializing a printing position, a printing condition, and the like, and a printing standby state is set. In this state, the external host device 19
When the printing command is received from the printer, the printing operation can be started.

【0065】次にステップS503において、A−Dコ
ンバータ15aの動作を開始してストローブ信号の電圧
を測定し、ステップS504でROM2やRAM3に予
め記憶されている基準電圧V1と比較する。実施例の場
合、V1は4V程度に設定されている。測定値がV1よ
り大きければ、ステップS505で測定値を第1基準電
圧V1としてRAM3に記憶する。
Next, in step S503, the operation of the AD converter 15a is started to measure the voltage of the strobe signal, and in step S504, the voltage is compared with the reference voltage V1 stored in the ROM 2 or the RAM 3 in advance. In the case of the embodiment, V1 is set to about 4V. If the measured value is larger than V1, the measured value is stored in the RAM 3 as the first reference voltage V1 in step S505.

【0066】ステップS506においてビジーフラグ2
3が立っているか否かを判定して、ストローブ信号のレ
ベル変化の有無を検知している。ビジーフラグ23がセ
ットされているとデータ入力があったと判断して、第1
実施例のS203〜S207と同様に、ステップS50
6〜510において、データ読出、ビジーフラグ23の
クリア、印字開始条件の有無および印字処理を行う。
In step S506, busy flag 2
3 to determine whether or not there is a change in the level of the strobe signal. If the busy flag 23 is set, it is determined that data has been input, and the first
As in steps S203 to S207 of the embodiment, step S50
In steps 6 to 510, data reading, clearing of the busy flag 23, presence / absence of a printing start condition, and printing processing are performed.

【0067】一方、ステップS506でビジーフラグ2
3が立っていなければ、ステップS511へ移行して、
A−Dコンバータ15aを動作させる。ステップS51
2において、A−Dコンバータ15aの測定値とRAM
3に記憶された第1基準電圧V1と比較する。今回の測
定値が第1基準電圧V1より大きい場合は、第1基準電
圧V1を更新するためステップS505に戻る。
On the other hand, in step S506, the busy flag 2
If 3 does not stand, the process proceeds to step S511,
The A / D converter 15a is operated. Step S51
2, the measured value of the A / D converter 15a and the RAM
3 is compared with the first reference voltage V1. If the current measurement value is higher than the first reference voltage V1, the process returns to step S505 to update the first reference voltage V1.

【0068】今回の測定値が第1基準電圧V1以下であ
る場合は、ステップS513へ進み、今回の測定値と第
1基準電圧V1との差を算出して、RAM3に別途設定
された許容基準値Vmと比較する。許容基準値Vmは、
電源電圧の変動を考慮して決定され、たとえば0.5V
程度に予め選ばれている。今回の測定値と第1基準電圧
V1との差が許容基準値以下であれば、ストローブ信号
のレベルが安定していることになり、外部ホスト装置1
9は通電状態であると判断して、ステップS505に戻
る。
If the current measurement value is equal to or lower than the first reference voltage V1, the process proceeds to step S513, where the difference between the current measurement value and the first reference voltage V1 is calculated, and an allowable reference value separately set in the RAM 3 is calculated. Compare with value Vm. The allowable reference value Vm is
Determined in consideration of the fluctuation of the power supply voltage, for example, 0.5 V
The degree is pre-selected. If the difference between the current measurement value and the first reference voltage V1 is equal to or less than the allowable reference value, the level of the strobe signal is stable, and the external host device 1
No. 9 determines that the power is on, and returns to step S505.

【0069】一方、今回の測定値と第1基準電圧V1と
の差が許容基準値Vmより大きければ、データ転送など
ストローブ信号が刻々と変化していることになり、ステ
ップS514へ進む。次に、タイマーをスタートさせて
ステップS515で一定時間待機する。待機時間は、デ
ータ転送状態を判定するため、100μ秒程度に選ばれ
る。
On the other hand, if the difference between the current measured value and the first reference voltage V1 is larger than the permissible reference value Vm, the strobe signal such as data transfer is changing every moment, and the process proceeds to step S514. Next, a timer is started, and a predetermined time is waited in step S515. The waiting time is selected to be about 100 μsec to determine the data transfer state.

【0070】次にステップS516でA−Dコンバータ
15aを再度動作させ、ステップS517においてこの
測定値とRAM3に設定された第1基準電圧V1と比較
する。測定値が第1基準電圧V1から許容基準値Vmを
引いた値以上であれば、外部ホスト装置19は通電状態
であると判断して、ステップS506に戻る。
Next, at step S516, the A / D converter 15a is operated again. At step S517, the measured value is compared with the first reference voltage V1 set in the RAM 3. If the measured value is equal to or greater than the value obtained by subtracting the allowable reference value Vm from the first reference voltage V1, the external host device 19 determines that the power is on, and returns to step S506.

【0071】一方、測定値が第1基準電圧V1から許容
基準値Vmを引いた値より小さければ、外部ホスト装置
19の電源が遮断した状態であると判断でき、ステップ
S518で省電力モードに突入して終了する。
On the other hand, if the measured value is smaller than the value obtained by subtracting the allowable reference value Vm from the first reference voltage V1, it can be determined that the power of the external host device 19 has been cut off, and the power-saving mode is entered in step S518. And exit.

【0072】以上の説明では、プリンタ装置の電源がオ
ンになる前に外部ホスト装置19の電源がオンである場
合を示している。次に、外部ホスト装置19の電源がオ
フ状態のときにプリンタ装置の電源をオンにする場合を
説明する。この場合ステップS501〜S505の処理
を同様に行い、ステップS505でビジーフラグ23の
判定を行う。ここで、外部ホスト装置19はオフである
ため、ビジーフラグ23はセットされることが無い。そ
の後ステップS511以降へ進み、一定時間後も外部ホ
スト装置19の電源がONされてなければ、ステップS
518で省電力モードに入って終了する。ここで、ステ
ップS516以前にホストの電源がオンされると、ステ
ップS517の分岐によってステップS506に戻り、
ステップS511でA−D変換を行うと、ステップS5
12で測定値が高くなり、ステップ505へ戻ってこの
測定値が第1基準電圧V1として記憶される。以後、外
部ホスト装置19が通電状態である場合と同様な処理を
行う。
In the above description, the case where the power of the external host device 19 is turned on before the power of the printer device is turned on is shown. Next, a case where the power of the printer device is turned on when the power of the external host device 19 is off will be described. In this case, the processes in steps S501 to S505 are performed in the same manner, and the busy flag 23 is determined in step S505. Here, since the external host device 19 is off, the busy flag 23 is not set. After that, the process proceeds to step S511 and thereafter.
At 518, the apparatus enters the power saving mode and ends. If the host is turned on before step S516, the process returns to step S506 by branching to step S517.
When AD conversion is performed in step S511, step S5
At 12, the measured value increases, and the process returns to step 505, where the measured value is stored as the first reference voltage V1. Thereafter, the same processing as when the external host device 19 is energized is performed.

【0073】このように第1基準電圧を自動的に調整す
ることによって、より信頼性ある判定が可能になる。
By automatically adjusting the first reference voltage in this manner, a more reliable determination can be made.

【0074】以上、第4実施例において第1基準電圧V
1を自動的に調整する方法を説明したが、第1実施例に
示すように第1基準電圧V1と第2基準電圧V2を備え
る場合にも、同様の手順で第1基準電圧V1を自動調整
することが可能である。
As described above, in the fourth embodiment, the first reference voltage V
The method for automatically adjusting the first reference voltage V1 has been described. However, even when the first reference voltage V1 and the second reference voltage V2 are provided as shown in the first embodiment, the first reference voltage V1 is automatically adjusted in the same procedure. It is possible to

【0075】なお、以上の実施例において、監視するホ
スト側信号としてストローブ信号を用いる例を説明した
が、外部ホスト装置が通電状態にあるときハイレベルま
たはローレベルであることが確実な信号で、電源遮断状
態であるとき中間電位となる信号であれば監視対象とし
て用いることができる。
In the above embodiment, an example has been described in which a strobe signal is used as a host-side signal to be monitored. However, when the external host device is energized, it is a signal that is sure to be at a high level or a low level. Any signal that has an intermediate potential when in the power-off state can be used as a monitoring target.

【0076】[0076]

【発明の効果】以上詳説したように本発明によれば、2
つの基準電圧を用いて比較することによって、ホスト側
信号の電圧がハイレベルおよびローレベル以外の中間電
位である場合も検知可能となるため、外部ホスト装置の
電源状態を確実にかつ高速に判断することができる。
As described in detail above, according to the present invention, 2
By comparing using the two reference voltages, even when the voltage of the host-side signal is at an intermediate potential other than the high level and the low level, it is possible to detect the power supply state of the external host device reliably and at high speed. be able to.

【0077】さらに、ホスト側信号のレベル反転から所
定時間経過後に、ホスト側信号の電圧と論理閾値より高
く設定された第1基準電圧とを比較することによって
も、外部ホスト装置の電源状態を確実にかつ高速に判断
することができる。
Further, after a lapse of a predetermined time from the inversion of the level of the host signal, the voltage of the host signal is compared with the first reference voltage set higher than the logical threshold value, so that the power supply state of the external host device can be ensured. Can be determined quickly and quickly.

【0078】また、電圧監視手段としてアナログデジタ
ル変換器を用いることによって、主制御手段での信号処
理が容易になり、ホスト側信号の電圧変化を極め細かく
監視することができる。
Further, by using the analog-to-digital converter as the voltage monitoring means, the signal processing in the main control means becomes easy, and the voltage change of the host side signal can be monitored very finely.

【0079】また、電圧監視手段としてウインドウコン
パレータを用いることによって、ホスト側信号の電圧変
化を精度よくかつ迅速に監視することができる。
Further, by using a window comparator as the voltage monitoring means, it is possible to accurately and quickly monitor a voltage change of the host-side signal.

【0080】また、第1基準電圧が自動調整可能である
ことによって、外部ホスト装置の機種が変わっても、確
実な判定が可能になる。
Further, since the first reference voltage can be automatically adjusted, a reliable determination can be made even if the type of the external host device changes.

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

【図1】本発明の第1実施例の電気的構成を示すブロッ
ク図である。
FIG. 1 is a block diagram showing an electrical configuration of a first embodiment of the present invention.

【図2】第1実施例のインタフェイス7を示すブロック
図である。
FIG. 2 is a block diagram showing an interface 7 of the first embodiment.

【図3】第1実施例の動作を示すフローチャートであ
る。
FIG. 3 is a flowchart showing the operation of the first embodiment.

【図4】本発明の第2実施例に係るインタフェイス7を
示すブロック図である。
FIG. 4 is a block diagram showing an interface 7 according to a second embodiment of the present invention.

【図5】第2実施例の動作を示すフローチャートであ
る。
FIG. 5 is a flowchart showing the operation of the second embodiment.

【図6】本発明の第3実施例に係るインタフェイス7を
示すブロック図である。
FIG. 6 is a block diagram showing an interface 7 according to a third embodiment of the present invention.

【図7】第3実施例の動作を示すフローチャートであ
る。
FIG. 7 is a flowchart showing the operation of the third embodiment.

【図8】図8は、本発明の第4実施例の動作を示すフロ
ーチャートである。まずプリン
FIG. 8 is a flowchart showing the operation of the fourth embodiment of the present invention. First pudding

【図9】従来のプリンタ装置の電気的構成の一例を示す
ブロック図である。
FIG. 9 is a block diagram illustrating an example of an electrical configuration of a conventional printer device.

【図10】図9のインタフェイス57の一例を示すブロ
ック図である。
FIG. 10 is a block diagram illustrating an example of an interface 57 of FIG. 9;

【図11】外部ホスト装置とプリンタ装置との接続方式
の一例を示す回路図である。
FIG. 11 is a circuit diagram illustrating an example of a connection method between an external host device and a printer device.

【図12】図12(a)はストローブ信号の電圧変化の
一例を示すグラフであり、図12(b)はストローブ信
号の電圧変化の他の例を示すグラフである。
FIG. 12A is a graph illustrating an example of a voltage change of a strobe signal, and FIG. 12B is a graph illustrating another example of a voltage change of a strobe signal.

【図13】従来のプリンタ装置の動作を示すフローチャ
ートである。
FIG. 13 is a flowchart showing the operation of a conventional printer device.

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

1 CPU 2 ROM 3 RAM 4 制御回路 5 ドライブ回路 6 駆動部 7 インタフェイス 8 パネル部 9 画像形成部 10 ドライブ電源 11 ロジック電源 12 電源遮断回路 15 電圧監視回路 15a A−Dコンバータ 15b、15c コンパレータ 16 クロック信号 17 節電信号 19 外部ホスト装置 22 データラッチ回路 23 ビジーフラグ 24 汎用入出力回路 Reference Signs List 1 CPU 2 ROM 3 RAM 4 Control circuit 5 Drive circuit 6 Drive unit 7 Interface 8 Panel unit 9 Image forming unit 10 Drive power supply 11 Logic power supply 12 Power supply cutoff circuit 15 Voltage monitoring circuit 15a A / D converter 15b, 15c Comparator 16 clock Signal 17 Power saving signal 19 External host device 22 Data latch circuit 23 Busy flag 24 General-purpose input / output circuit

Claims (7)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 外部ホスト装置から出力されるホスト側
信号を受信するためのインタフェイス手段と、 記録媒体に画像を形成するための画像形成手段と、 インタフェイス手段および画像形成手段との間で信号を
送受し、所定のプログラムに従って信号処理を行う主制
御手段とを備えたプリンタ装置において、 インタフェイス手段に供給される電源電圧より低く設定
される第1基準電圧および、ローレベルの論理閾値より
高くかつ前記第1基準電圧より低く設定された第2基準
電圧により、ホスト側信号の電圧を監視する電圧監視手
段を備え、 該ホスト側信号が第1基準電圧以下かつ第2基準電圧以
上である場合に、外部ホスト装置の電源が遮断状態であ
ると判断することを特徴とするプリンタ装置。
An interface unit for receiving a host-side signal output from an external host device; an image forming unit for forming an image on a recording medium; and an interface unit and the image forming unit. A main control means for transmitting and receiving signals and performing signal processing in accordance with a predetermined program, wherein a first reference voltage set lower than a power supply voltage supplied to the interface means and a low-level logic threshold Voltage monitoring means for monitoring the voltage of the host-side signal with a second reference voltage that is set higher and lower than the first reference voltage, wherein the host-side signal is equal to or lower than the first reference voltage and equal to or higher than the second reference voltage In this case, the printer device determines that the power supply of the external host device is in a cut-off state.
【請求項2】 前記電圧監視手段は、アナログデジタル
変換器であることを特徴とする請求項1記載のプリンタ
装置。
2. The printer according to claim 1, wherein said voltage monitoring means is an analog-to-digital converter.
【請求項3】 前記電圧監視手段は、ウインドウコンパ
レータであることを特徴とする請求項1記載のプリンタ
装置。
3. The printer according to claim 1, wherein said voltage monitoring means is a window comparator.
【請求項4】 外部ホスト装置から出力されるホスト側
信号を受信するためのインタフェイス手段と、 記録媒体に画像を形成するための画像形成手段と、 インタフェイス手段および画像形成手段との間で信号を
送受し、所定のプログラムに従って信号処理を行う主制
御手段とを備えたプリンタ装置において、 ホスト側信号の電圧を監視する電圧監視手段と、 タイマーとを備え、 外部ホスト装置からのデータ入力が無く、かつホスト側
信号がローレベルの論理閾値より高く設定された第1基
準電圧以下となった後、所定時間経過後に該ホスト側信
号が第1基準電圧以下である場合に、外部ホスト装置の
電源が遮断状態であると判断することを特徴とするプリ
ンタ装置。
4. An interface unit for receiving a host-side signal output from an external host device, an image forming unit for forming an image on a recording medium, and the interface unit and the image forming unit. A printer device having main control means for transmitting and receiving signals and performing signal processing according to a predetermined program, comprising: a voltage monitoring means for monitoring a voltage of a host-side signal; and a timer, and a data input from an external host device is provided. After a predetermined time has elapsed after the absence of the host-side signal and the host-side signal has become equal to or lower than the first reference voltage set higher than the low-level logic threshold, the external host device A printer device that determines that a power supply is in a cut-off state.
【請求項5】 前記電圧監視手段は、コンパレータであ
ることを特徴とする請求項4記載のプリンタ装置。
5. The printer according to claim 4, wherein said voltage monitoring means is a comparator.
【請求項6】 前記電圧監視手段は、アナログデジタル
変換器であることを特徴とする請求項4記載のプリンタ
装置。
6. The printer device according to claim 4, wherein said voltage monitoring means is an analog-to-digital converter.
【請求項7】 第1基準電圧が自動調整可能であること
を特徴とする請求項1もしくは4記載のプリンタ装置。
7. The printer according to claim 1, wherein the first reference voltage can be automatically adjusted.
JP03410895A 1995-02-22 1995-02-22 Printer device Expired - Fee Related JP3235941B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP03410895A JP3235941B2 (en) 1995-02-22 1995-02-22 Printer device
US08/607,257 US5720560A (en) 1995-02-22 1996-02-21 Printing apparatus
EP96301199A EP0729114A3 (en) 1995-02-22 1996-02-22 Printing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP03410895A JP3235941B2 (en) 1995-02-22 1995-02-22 Printer device

Publications (2)

Publication Number Publication Date
JPH08224944A JPH08224944A (en) 1996-09-03
JP3235941B2 true JP3235941B2 (en) 2001-12-04

Family

ID=12405091

Family Applications (1)

Application Number Title Priority Date Filing Date
JP03410895A Expired - Fee Related JP3235941B2 (en) 1995-02-22 1995-02-22 Printer device

Country Status (1)

Country Link
JP (1) JP3235941B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3478696B2 (en) 1997-02-28 2003-12-15 キヤノン株式会社 Image processing apparatus and control method thereof
JP4710891B2 (en) * 2007-09-19 2011-06-29 株式会社デンソー Electronic control unit
JP2011170616A (en) * 2010-02-18 2011-09-01 On Semiconductor Trading Ltd Capacitance type touch sensor

Also Published As

Publication number Publication date
JPH08224944A (en) 1996-09-03

Similar Documents

Publication Publication Date Title
US6393570B1 (en) Low-power apparatus for power management enabling
KR100495657B1 (en) Integrated circuit device with multiple communication modes and operating method thereof
US11188139B2 (en) Storage system, method of controlling same, information processing apparatus, and storage medium
US20170192475A1 (en) Host apparatus and expansion device
KR20140071189A (en) Method for sensing connection of USB device and image forming apparatus performing the same
US6697679B2 (en) Option-identifying system
JP3235941B2 (en) Printer device
TWI774145B (en) Host device and memory system
US8171193B2 (en) Master communication circuit, slave communication circuit, and data communicating method
KR100314413B1 (en) Internal Conditioning Device and Integrated Circuit Card
US5720560A (en) Printing apparatus
EP0370493A2 (en) Electric circuit device with an improved cartridge connection circuit
JP3235940B2 (en) Printer device
CN212276368U (en) Apparatus for power management
JP3154913B2 (en) Printer device
US20120063283A1 (en) Optical disc drive and control method thereof
JPH0612537A (en) Ic memory card
JP2002323941A (en) Peripheral device
CN113377699A (en) Electronic device and related control method
JPH07191789A (en) Discriminating method for off state of power source in device of communication source
JP3012378B2 (en) Printer interface circuit
JP4423124B2 (en) Information processing system and image forming apparatus
JP2002067449A (en) Imaging apparatus having backup means
JP5759774B2 (en) Electronic apparatus and image forming apparatus
US9747958B2 (en) Device soft-start management for enumeration problems with USB hosts

Legal Events

Date Code Title Description
S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313532

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees