JP6277866B2 - Charging device and electronic device - Google Patents
Charging device and electronic device Download PDFInfo
- Publication number
- JP6277866B2 JP6277866B2 JP2014110292A JP2014110292A JP6277866B2 JP 6277866 B2 JP6277866 B2 JP 6277866B2 JP 2014110292 A JP2014110292 A JP 2014110292A JP 2014110292 A JP2014110292 A JP 2014110292A JP 6277866 B2 JP6277866 B2 JP 6277866B2
- Authority
- JP
- Japan
- Prior art keywords
- power
- time
- circuit
- printer
- host device
- 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.)
- Active
Links
Landscapes
- Charge And Discharge Circuits For Batteries Or The Like (AREA)
Description
本発明は、パーソナルコンピューター(PC)等の外部装置から電源供給を受けて充電式の電池に充電する充電装置及びその充電装置を備えた電子機器に関する。 The present invention relates to a charging device that receives a power supply from an external device such as a personal computer (PC) and charges a rechargeable battery, and an electronic device including the charging device.
例えば特許文献1には、USB端子部がホスト装置(第2種の装置の一例)と接続された場合、ホスト装置からの電源供給でバッテリー(充電式の電池)を充電する電子機器の一例として携帯電話機が開示されている。この携帯電話機は、USB端子部を介してホスト装置との間でデータ転送を行うことによって初期処理(エニュメレーション)を開始すると共に第1電力でバッテリーへの充電を行う。USB端子部がホスト装置に接続されてから所定時間以内に初期処理が完了した場合はその初期処理に基づいた処理を行う。一方、USB端子部がホスト装置に接続されてから所定時間以内に初期処理が完了しなかった場合は、第1電力よりも大きい第2電力でバッテリーへの充電を行う。 For example, Patent Document 1 discloses an example of an electronic device that charges a battery (rechargeable battery) by supplying power from the host device when the USB terminal unit is connected to the host device (an example of the second type device). A mobile phone is disclosed. This cellular phone starts initial processing (enumeration) by transferring data to and from the host device via the USB terminal unit, and charges the battery with the first power. When the initial processing is completed within a predetermined time after the USB terminal unit is connected to the host device, processing based on the initial processing is performed. On the other hand, when the initial processing is not completed within a predetermined time after the USB terminal unit is connected to the host device, the battery is charged with the second power larger than the first power.
また、USB端子部にUSBバッテリーチャージャー等の電源アダプター(第1種の装置の一例)が接続された場合、電子機器(デバイス機器)は電源アダプターから供給される電力でバッテリーを充電する。 In addition, when a power adapter (an example of the first type device) such as a USB battery charger is connected to the USB terminal unit, the electronic device (device device) charges the battery with power supplied from the power adapter.
ところで、電子機器の電源オフ状態において、ホスト装置とUSB接続された場合は、制御回路を構成するCPUがホスト装置と充電のための通信を確立するために起動され、ホスト装置との間で初期処理(エニュメレーション)を行う。このような電源オフ状態の下でUSB接続されて充電を目的とする場合、電子機器は初期処理においてホスト装置に対して第1電力(例えば電流値100mA)よりも大きな第2電力(例えば電流値500mA)での電源供給を要求する。 By the way, when the electronic device is powered off and connected to the host device via USB, the CPU constituting the control circuit is started up to establish communication with the host device for charging, and is initially connected with the host device. Perform processing (enumeration). When the USB device is connected for the purpose of charging under such a power-off state, the electronic device uses a second power (for example, a current value) larger than the first power (for example, a current value of 100 mA) to the host device in the initial process. The power supply at 500 mA) is requested.
しかし、ホスト装置は電子機器から要求された第2電力で電源供給ができない場合がある。例えばホスト装置と電子機器とがバスパワーで動作するハブを経由して接続されている場合が挙げられる。この場合、電子機器が初期処理において要求電流値(例えば500mA)及びクラス情報を含むディスクリプターと呼ばれる構成情報を送信しても、ホスト装置は第2電力(電流値で500mA)での電源供給が不可能なハブ経由であることを認識し、その構成情報を設定しない。このため、ホスト装置から電子機器に対して、構成情報の設定を通知する初期処理完了通知(設定完了通知)は送信されない。この結果、電子機器はホスト装置から送信されることのない初期処理完了通知を待つことになり、CPUは起動状態のまま放置される。 However, the host device may not be able to supply power with the second power requested from the electronic device. For example, the host device and the electronic device may be connected via a hub that operates on bus power. In this case, even if the electronic device transmits configuration information called a descriptor including a required current value (for example, 500 mA) and class information in the initial processing, the host device can supply power at the second power (current value: 500 mA). Recognize that it is via an impossible hub and do not set its configuration information. For this reason, the initial processing completion notification (setting completion notification) for notifying the setting of the configuration information is not transmitted from the host device to the electronic device. As a result, the electronic device waits for an initial processing completion notification that is not transmitted from the host device, and the CPU is left in an activated state.
また、例えばホスト装置がバッテリー駆動であるときに電力の消費を抑えるため、最大供給電力(例えば電流値500mA)未満の第3電力でしか電源供給を許可しない設定がなされている場合がある。電子機器からこの種のホスト装置に第3電力より大きな第2電力を要求した場合、ホスト装置は第2電力での電源供給ができないので、この場合もホスト装置から電子機器に対して初期処理完了通知が送信されない。このため、電子機器はホスト装置から送信されることのない初期処理完了通知を待つことになり、この場合もCPUは起動状態のまま放置される。 For example, when the host device is driven by a battery, in order to suppress power consumption, there is a case where power supply is permitted only with the third power less than the maximum supply power (for example, a current value of 500 mA). When the second power larger than the third power is requested from the electronic device to the host device of this type, the host device cannot supply power with the second power. In this case, the initial processing is completed from the host device to the electronic device. Notifications are not sent. For this reason, the electronic device waits for an initial processing completion notification that is not transmitted from the host device, and in this case, the CPU is left in an activated state.
これらの場合、ホスト装置から通信ケーブルを通じて初期処理前の第1電力(例えば保証電流値100mA)で電源供給がなされるものの、電子機器のCPUが消費する電気は無駄遣いである。特に、電子機器のCPUが初期処理完了通知を待っている状態で消費する電力が第1電力より大きければ、電池の残量が徐々に減少してしまう。このように上記二つのケースを一例とする何らかの原因で、ホスト装置が電子機器に対して第2電力で電源供給できない場合、電子機器の電源オフ状態の下で起動された制御回路のCPU等の電力消費により、電池の残量が徐々に減少してしまう。なお、上記の課題は、携帯電話機等の電子機器に限らず、プリンター(複合機を含む。)、スキャナー、プロジェクター、デジタルカメラ(撮影装置)、オーディオ装置(音響機器)など、ホスト装置(外部装置)と電源オフ状態の下で接続されたときに、ホスト装置からの電源供給で電池を充電する電子機器において概ね共通する。 In these cases, power is supplied from the host device through the communication cable with the first power before the initial processing (for example, a guaranteed current value of 100 mA), but the electricity consumed by the CPU of the electronic device is wasted. In particular, if the power consumed by the CPU of the electronic device is larger than the first power while waiting for the notification of completion of the initial process, the remaining amount of the battery gradually decreases. As described above, when the host device cannot supply power to the electronic device with the second power for some reason taking the above two cases as an example, the CPU or the like of the control circuit activated under the power-off state of the electronic device The remaining battery level gradually decreases due to power consumption. Note that the above-described problems are not limited to electronic devices such as mobile phones, but include host devices (external devices) such as printers (including multifunction devices), scanners, projectors, digital cameras (imaging devices), audio devices (acoustic devices), and the like. ) And an electronic device that charges a battery by supplying power from the host device when connected in a power-off state.
本発明の目的は、電源オフ状態の下で第2種の装置に接続されて起動された電子機器の制御回路が第2種の装置との初期処理を失敗しても、制御回路の起動による電気の浪費を抑制することができる充電装置及び電子機器を提供することにある。 The object of the present invention is to start the control circuit even if the control circuit of the electronic device that is connected to the second type device and started up under the power off state fails in the initial processing with the second type device. An object of the present invention is to provide a charging device and an electronic apparatus that can suppress waste of electricity.
以下、上記課題を解決するための手段及びその作用効果について記載する。
上記課題を解決する充電装置は、外部装置と接続して、通信を行うとともに電力供給を受ける通信回路と、制御回路と、電源スイッチと、を備え、前記電源スイッチがオフ状態で前記通信回路が外部装置と接続した場合に、前記制御回路は、前記通信回路が接続している相手が第1種の装置であれば、初期処理を行わずに前記通信回路が受け取った電力で充電式の電池に充電を行い、前記通信回路が接続している相手が第2種の装置であれば、初期処理を行い、当該初期処理が完了した後に、前記電池に充電を行い、前記通信回路が接続している相手が第2種の装置であり、初期処理に失敗したときは、前記電池に充電を行わない。
Hereinafter, means for solving the above-described problems and the effects thereof will be described.
A charging device that solves the above problem includes a communication circuit that is connected to an external device to perform communication and receive power supply, a control circuit, and a power switch, and the communication circuit is in an off state when the power switch is off. When connected to an external device, the control circuit is a rechargeable battery using the power received by the communication circuit without performing initial processing if the counterpart to which the communication circuit is connected is the first type device. If the other party to which the communication circuit is connected is the second type device, an initial process is performed. After the initial process is completed, the battery is charged and the communication circuit is connected. If the other party is the second type device and the initial process fails, the battery is not charged.
この構成によれば、電源スイッチがオフ状態で通信回路が外部装置と接続した場合に、制御回路は、通信回路が接続している相手が第1種の装置であれば、初期処理を行わずに通信回路が受け取った電力で充電式の電池に充電が行われる。また、通信回路が接続している相手が第2種の装置であれば、制御回路が電源オン状態に起動されて初期処理が行われ、その初期処理が完了した後に、電池に充電が行われる。一方、通信回路が接続している相手が第2種の装置であり、初期処理に失敗したときは、電池に充電が行われない。すなわち、初期処理に失敗したときは、制御回路が起動状態(電源オン状態)からオフすることができ、電池への充電をその充電の開始前に中止できる。このため、初期処理が完了せず長時間に亘って制御回路が起動状態のまま放置されることによる電気の浪費や電池の残量の低減を抑制することができる。つまり、電源オフ状態の下で第2種の装置に接続されて起動された電子機器の制御回路が第2種の装置との初期処理を失敗しても、制御回路の起動による電気の浪費や電池の残量減少を抑制することができる。 According to this configuration, when the communication circuit is connected to an external device while the power switch is off, the control circuit does not perform the initial process if the counterpart to which the communication circuit is connected is the first type device. The rechargeable battery is charged with the power received by the communication circuit. In addition, if the partner to which the communication circuit is connected is the second type device, the control circuit is activated in the power-on state, the initial process is performed, and the battery is charged after the initial process is completed. . On the other hand, when the other party to which the communication circuit is connected is the second type device and the initial process fails, the battery is not charged. That is, when the initial process fails, the control circuit can be turned off from the activated state (power-on state), and the charging of the battery can be stopped before the start of the charging. For this reason, it is possible to suppress the waste of electricity and the reduction of the remaining amount of the battery due to the control circuit being left in the activated state for a long time without completing the initial process. In other words, even if the control circuit of the electronic device that is connected to the second type device and started up under the power-off state fails in the initial processing with the second type device, the waste of electricity due to the activation of the control circuit A decrease in the remaining amount of the battery can be suppressed.
上記充電装置では、前記制御回路は、前記通信回路が接続している相手を判定する判定回路と、前記初期処理の少なくとも一部を実行する処理回路と、を備え、前記処理回路が動作する場合には、前記通信回路が初期処理前に受け取る電力以上の電力を消費し、前記電源スイッチがオフ状態で前記通信回路が外部装置と接続した場合に、前記判定回路は前記通信回路が初期処理前に受け取る電力によって動作して前記通信回路が接続している相手を判定し、前記通信回路が接続している相手が第1種の装置と判定すれば、前記処理回路を電源オフ状態に維持し、前記通信回路が接続している相手が第2種の装置と判定すれば、前記処理回路を電源オン状態に移行させることが好ましい。 In the charging apparatus, the control circuit includes a determination circuit that determines a partner to which the communication circuit is connected and a processing circuit that executes at least a part of the initial processing, and the processing circuit operates. In the case where the communication circuit consumes more power than the power received before the initial process, and the communication circuit is connected to an external device while the power switch is off, the determination circuit is If the other party to which the communication circuit is connected is determined to be the first type device, the processing circuit is maintained in a power-off state. If the partner to which the communication circuit is connected is determined to be the second type device, the processing circuit is preferably shifted to a power-on state.
この構成によれば、電源スイッチがオフ状態で通信回路が外部装置と接続した場合に、判定回路は通信回路が初期処理前に受け取る電力によって動作して通信回路が接続している相手を判定する。通信回路が接続している相手が第1種の装置と判定すれば、処理回路を電源オフ状態に維持し、通信回路が接続している相手が第2種の装置と判定すれば、処理回路を電源オン状態に移行させる。このため、通信回路が接続している相手が第2種の装置の場合に、電源オン状態に移行した処理回路は第2種の装置との間で初期処理を行うことができる。 According to this configuration, when the communication circuit is connected to an external device while the power switch is off, the determination circuit operates based on the power received by the communication circuit before the initial processing and determines the partner to which the communication circuit is connected. . If the partner to which the communication circuit is connected is determined to be the first type device, the processing circuit is maintained in the power-off state, and if the partner to which the communication circuit is connected is determined to be the second type device, the processing circuit To the power-on state. For this reason, when the other party to which the communication circuit is connected is the second type device, the processing circuit that has shifted to the power-on state can perform initial processing with the second type device.
上記充電装置では、前記制御回路は、前記第2種の装置との初期処理においてタイムアウトが発生した場合に、前記初期処理に失敗したと判断することが好ましい。
この構成によれば、制御回路は、第2種の装置との初期処理においてタイムアウトが発生した場合に、初期処理に失敗したと判断する。タイムアウトを考慮することなく初期処理の完了まで待機する構成に比べ、初期処理が失敗であるときの制御回路の電源オン時間(起動時間)を短くすることができる。よって、初期処理を失敗して充電不可能であるにも拘らず、制御回路が電源オン状態(起動状態)に放置されて二次電池の電力が不要に消費される事態を抑制できる。
In the charging device, it is preferable that the control circuit determines that the initial processing has failed when a timeout occurs in the initial processing with the second type device.
According to this configuration, the control circuit determines that the initial process has failed when a timeout occurs in the initial process with the second type device. Compared to a configuration that waits until the completion of the initial process without considering the timeout, the power-on time (start-up time) of the control circuit when the initial process is unsuccessful can be shortened. Therefore, it is possible to suppress a situation in which the power of the secondary battery is unnecessarily consumed because the control circuit is left in the power-on state (start-up state) even though the initial process fails and charging is impossible.
上記充電装置では、前記制御回路は、前記第2種の装置から定期的に送られてくるはずの信号が送られてこなくなったことで、初期処理に失敗したと判断することが好ましい。
この構成によれば、制御回路は、第2種の装置から定期的に送られてくるはずの信号が送られてこなくなったことで、初期処理に失敗したと判断する。よって、初期処理に失敗したと判断した時点で、電池の充電をしない選択をし、制御回路を電源オフ状態にすることができる。このため、制御回路が初期処理の失敗が分からず電源オン状態のまま放置される事態を回避できる。また、例えばタイムアウトの発生を初期処理の失敗と判断する場合に比べ、初期処理失敗時点で比較的早期に制御回路を電源オフ状態にすることができる。このため、初期処理が失敗であるときの制御回路の電源オン時間(起動時間)をより短くすることができる。
In the charging device, it is preferable that the control circuit determines that the initial process has failed because a signal that should be periodically sent from the second type device is not sent.
According to this configuration, the control circuit determines that the initial processing has failed because the signal that should be sent periodically from the second type device is not sent. Therefore, when it is determined that the initial process has failed, the battery can be selected not to be charged, and the control circuit can be turned off. For this reason, it is possible to avoid a situation where the control circuit is left in a power-on state without knowing the failure of the initial processing. Further, for example, the control circuit can be turned off relatively early at the time of the initial process failure as compared with the case where the occurrence of the timeout is determined to be the failure of the initial process. For this reason, the power-on time (start-up time) of the control circuit when the initial process is unsuccessful can be further shortened.
上記充電装置では、前記制御回路は、前記タイムアウトと判定する際に用いるタイムアウト時間を、前記第2種の装置の起動所要時間に応じて設定することが好ましい。
この構成によれば、制御回路は、タイムアウトと判定する際に用いるタイムアウト時間を、第2種の装置の起動所要時間に応じて設定する。よって、通信回路が接続している相手が第2種の装置であるときに、その第2種の装置が起動途中の状態にあっても、その起動後の第2種の装置と初期処理を行って第2種の装置から通信回路が受け取った電力で電池を充電することができる。
In the charging device, it is preferable that the control circuit sets a time-out time used when determining the time-out as a time required for starting the second type device.
According to this configuration, the control circuit sets the time-out time used when determining the time-out according to the time required for starting the second type device. Therefore, when the other party to which the communication circuit is connected is the second type device, even if the second type device is in the middle of starting, the initial processing with the second type device after the startup is performed. The battery can be charged with the power received by the communication circuit from the second type device.
上記充電装置では、データの入力のために操作される操作部を備え、前記制御回路が、前記タイムアウトと判定する際に用いるタイムアウト時間は、前記操作部の操作に基づいて設定されることが好ましい。 Preferably, the charging device includes an operation unit operated for data input, and the control circuit determines that the timeout time used when determining the timeout is set based on the operation of the operation unit. .
この構成によれば、制御回路がタイムアウトの発生を判定する際に用いるタイムアウト時間は、操作部の操作に基づいて設定される。よって、ユーザーの使用環境(使用される第2種の装置の起動所要時間等)に合った適切なタイムアウト時間を設定できる。このため、第2種の装置の起動所要時間に合っていない短過ぎるタイムアウト時間が設定されているために、第2種の装置の起動途中でタイムアウトと判定されてしまい充電できたにも拘らず充電されない不都合を減らすことができる。したがって、電池が充電される頻度を高めることができる。 According to this configuration, the timeout time used when the control circuit determines occurrence of timeout is set based on the operation of the operation unit. Therefore, it is possible to set an appropriate time-out period suitable for the user's usage environment (the time required for starting the second type device used). For this reason, since a timeout time that is too short that does not match the time required for starting the second type device is set, charging is performed even though the second type device is determined to have timed out during the start and can be charged. Inconvenience that is not done can be reduced. Therefore, the frequency with which the battery is charged can be increased.
上記充電装置では、前記制御回路は、前記通信回路に接続された前記外部装置が前記第2種の装置である場合、当該第2種の装置の起動所要時間を取得し、前記タイムアウトの発生を判定する際に用いるタイムアウト時間を前記起動所要時間に応じた値に設定することが好ましい。 In the charging device, when the external device connected to the communication circuit is the second type device, the control circuit obtains the time required for starting the second type device, and generates the timeout. It is preferable to set the time-out time used for the determination to a value corresponding to the required startup time.
この構成によれば、制御回路は、第2種の装置に接続されたときは、第2種の装置の起動所要時間を取得し、その起動所要時間に応じたタイムアウト時間を設定する。よって、ユーザーの使用環境(使用される第2種の装置の起動所要時間等)に合った適切なタイムアウト時間を設定することができる。このため、第2種の装置の起動所要時間に合っていない短過ぎるタイムアウト時間が使用されたことが原因で、第2種の装置の起動途中でタイムアウトとなり、充電できたにも拘らず充電されない不都合を減らすことができる。したがって、電池が充電される頻度を高めることができる。 According to this configuration, when connected to the second type device, the control circuit acquires the time required for starting the second type device, and sets the time-out time corresponding to the time required for the start. Therefore, it is possible to set an appropriate timeout time suitable for the user's usage environment (the time required for starting the second type device to be used). For this reason, due to the use of a too short time-out time that does not match the time required for starting the second type device, a time-out occurs during the start-up of the second type device. Can be reduced. Therefore, the frequency with which the battery is charged can be increased.
上記充電装置では、前記制御回路は、前記電池の残量又は残量の変化を示す値を計測し、前記電池の残量又は残量の変化を示す値が閾値を超えると、初期処理に失敗したと判断することが好ましい。 In the charging apparatus, the control circuit measures a value indicating the remaining amount of the battery or a change in the remaining amount, and fails when the value indicating the change in the remaining amount of the battery or the remaining amount exceeds a threshold value. It is preferable to judge that it was.
この構成によれば、制御回路は、電池の残量又は残量の変化を示す値が閾値を超えたことをもって初期処理の失敗を判断するので、タイマー等の計時手段を用いなくても、あるいは第2種の装置から送られてくるはずの信号を監視しなくても、初期処理の失敗を判断することができる。 According to this configuration, the control circuit determines the failure of the initial process when the value indicating the remaining amount of the battery or the change in the remaining amount exceeds the threshold value. The failure of the initial process can be determined without monitoring the signal that should be sent from the second type device.
上記課題を解決する電子機器は、上記の充電装置を備えている。この構成によれば、電子機器により、充電装置と同様の作用効果を得ることができる。 An electronic device that solves the above problem includes the above-described charging device. According to this structure, the same effect as a charging device can be acquired with an electronic device.
以下、印刷システムの一実施形態について、図面を参照して説明する。
図1に示すように、電子機器の一例としてのプリンター11(印刷装置)は、USB(Universal Serial Bus)規格上のUSBデバイス11A(図5参照)として機能する。図1に示すプリンター11は、USBホスト30Aとして機能するホスト装置30とUSBケーブル等の通信ケーブル35を通じて通信可能に接続するためにそのコネクター35A(端子)が挿抜可能に接続されるUSBコネクター12を備えている。USBコネクター12は、電源供給路としての電源線(+−)(P,G)と、データを送受信するためのデータ線(D+,D−)とを備えている。通信ケーブル35のコネクター35AがUSBコネクター12に接続された場合、データ線及び電源線のそれぞれ同じ極同士が接続され、ホスト装置30とデータの送受信及びホスト装置30からの電源供給が可能になる。USBコネクター12は、電源線とデータ線と各種の素子(例えば抵抗)等とを含む通信用の電気回路を有している。この点において、本実施形態では、USBコネクター12により、通信回路の一例が構成される。
Hereinafter, an embodiment of a printing system will be described with reference to the drawings.
As shown in FIG. 1, a printer 11 (printing apparatus) as an example of an electronic device functions as a USB device 11A (see FIG. 5) based on the USB (Universal Serial Bus) standard. The printer 11 shown in FIG. 1 has a USB connector 12 to which a connector 35A (terminal) is detachably connected in order to be communicably connected to a host device 30 functioning as a USB host 30A through a communication cable 35 such as a USB cable. I have. The USB connector 12 includes power supply lines (+ −) (P, G) as power supply paths and data lines (D +, D−) for transmitting and receiving data. When the connector 35 </ b> A of the communication cable 35 is connected to the USB connector 12, the same poles of the data line and the power line are connected to each other, and data transmission / reception with the host device 30 and power supply from the host device 30 are possible. The USB connector 12 has an electric circuit for communication including a power line, a data line, various elements (for example, resistors), and the like. In this regard, in this embodiment, the USB connector 12 constitutes an example of a communication circuit.
ホスト装置30は、例えばパーソナルコンピューター(PC)により構成されるが、USBホスト30Aとして機能する限りにおいて、携帯情報端末(PDA(Personal Digital Assistants))、タブレットPC等のコンピューター類であってもよい。さらにホスト装置30は、USBホスト機能を有するプリンターであってもよい。ホスト装置30は、図1に示すUSBホスト30A及びCPU30Bを備えている。USBホスト30Aのソフトウェア部分の少なくとも一部は例えばCPU30BがUSB用プログラムを実行することで構築される。なお、本実施形態では、USB規格として例えばUSB2.0を用いている。 The host device 30 is configured by, for example, a personal computer (PC), but may be a computer such as a personal digital assistant (PDA (Personal Digital Assistants)) or a tablet PC as long as it functions as the USB host 30A. Further, the host device 30 may be a printer having a USB host function. The host device 30 includes a USB host 30A and a CPU 30B shown in FIG. At least a part of the software portion of the USB host 30A is constructed, for example, by the CPU 30B executing a USB program. In this embodiment, for example, USB 2.0 is used as the USB standard.
図1に示すように、プリンター11は、USBコネクター12と電源供給路12Aとデータ線12Bで接続された制御回路13を備えている。また、プリンター11は、制御回路13により充電制御される充電式の電池の一例としての二次電池14と、制御回路13からの指示を受け付ける駆動回路15と、制御回路13の指示によって駆動回路15を介して制御される印刷機構16とを備えている。 As shown in FIG. 1, the printer 11 includes a control circuit 13 connected by a USB connector 12, a power supply path 12A, and a data line 12B. The printer 11 includes a secondary battery 14 as an example of a rechargeable battery whose charge is controlled by the control circuit 13, a drive circuit 15 that receives an instruction from the control circuit 13, and a drive circuit 15 according to an instruction from the control circuit 13. And a printing mechanism 16 controlled via the printer.
図1に示すように、USBコネクター12には、充電用のUSBバッテリーチャージャー40(電源アダプター)のコネクター40A(端子)が挿抜可能に接続される。また、プリンター11は、USBコネクター12に加え、補助的に電源供給するための外部電源コネクター17を備えている。外部電源コネクター17は、制御回路13と電源供給路17A及びデータ線17Bを通じて接続されている。外部電源コネクター17には、ACアダプター50(電源アダプター)のコネクター50A(端子)が挿抜可能に接続される。ACアダプター50のコネクター50Aは、他の一般的なACアダプターのコネクターの形状と同様の円筒形状を有している。なお、本実施形態では、ホスト装置30及びUSBバッテリーチャージャー40により、外部装置の一例が構成される。また、USBバッテリーチャージャー40により第1種の装置の一例が構成され、ホスト装置30により第2種の装置の一例が構成される。 As shown in FIG. 1, a connector 40A (terminal) of a charging USB battery charger 40 (power adapter) is detachably connected to the USB connector 12. In addition to the USB connector 12, the printer 11 includes an external power connector 17 for supplying power supplementarily. The external power connector 17 is connected to the control circuit 13 through a power supply path 17A and a data line 17B. A connector 50A (terminal) of an AC adapter 50 (power adapter) is detachably connected to the external power connector 17. The connector 50A of the AC adapter 50 has a cylindrical shape similar to the shape of other general AC adapter connectors. In the present embodiment, the host device 30 and the USB battery charger 40 constitute an example of an external device. The USB battery charger 40 constitutes an example of the first type device, and the host device 30 constitutes an example of the second type device.
また、図1に示すように、プリンター11の本体11aには、操作パネル19が設けられている。操作パネル19は、プリンター11に各種の指示等を入力するために操作される操作スイッチ群20と、各種メニューや動作状況のメッセージ等が表示される表示部21とを備えている。操作スイッチ群20は制御回路13と電気的に接続されている。また、表示部21は制御回路13に対して表示駆動回路18を介して電気的に接続されている。 As shown in FIG. 1, an operation panel 19 is provided on the main body 11 a of the printer 11. The operation panel 19 includes an operation switch group 20 that is operated to input various instructions and the like to the printer 11 and a display unit 21 that displays various menus, messages of operation statuses, and the like. The operation switch group 20 is electrically connected to the control circuit 13. The display unit 21 is electrically connected to the control circuit 13 via the display drive circuit 18.
操作スイッチ群20は、電源スイッチ20Aと、各種の指示入力や選択操作等によってデータの入力のために操作される操作スイッチ20Bとを備えている。電源スイッチ20Aが操作されることで、プリンター11の電源のオンとオフが切り替えられる。つまり、プリンター11は、電源オフ状態の下で電源スイッチ20Aが操作されると電源オン状態に切り替わり、電源オン状態の下で電源スイッチ20Aが操作されると電源オフ状態に切り替わる。また、例えば表示部21に表示されるメニューにおいてユーザーが操作スイッチ20Bを操作して各種の項目を選択することで、制御回路13はその選択結果を受け付けて印刷条件等を設定する。 The operation switch group 20 includes a power switch 20A and an operation switch 20B operated for inputting data by various instruction inputs, selection operations, and the like. By operating the power switch 20A, the printer 11 is turned on and off. That is, the printer 11 switches to the power-on state when the power switch 20A is operated under the power-off state, and switches to the power-off state when the power switch 20A is operated under the power-on state. Further, for example, when the user selects various items by operating the operation switch 20B in the menu displayed on the display unit 21, the control circuit 13 accepts the selection result and sets the printing conditions and the like.
制御回路13は、プリンター11の電源オフ中に、USBコネクター12が接続している相手がホスト装置30又はUSBバッテリーチャージャー40である場合、充電モードになり、ホスト装置30又はUSBバッテリーチャージャー40からUSBコネクター12を通じて供給される電力で二次電池14を充電する充電制御を司る。但し、制御回路13は、プリンター11の電源オフ中に外部電源コネクター17にACアダプター50が接続されている場合は、ACアダプター50からの供給電力による二次電池14の充電を優先し、ホスト装置30又はUSBバッテリーチャージャー40からの供給電力に基づく充電は行わない。 The control circuit 13 enters the charging mode when the partner to which the USB connector 12 is connected is the host device 30 or the USB battery charger 40 while the printer 11 is turned off. It controls charge control for charging the secondary battery 14 with power supplied through the connector 12. However, if the AC adapter 50 is connected to the external power connector 17 while the printer 11 is powered off, the control circuit 13 gives priority to charging the secondary battery 14 with the power supplied from the AC adapter 50, and the host device 30 or charging based on the power supplied from the USB battery charger 40 is not performed.
また、制御回路13は、プリンター11の電源オン中に、ホスト装置30から受信した印刷ジョブデータに基づく文書や画像を用紙等の印刷媒体に印刷する印刷制御を司る。プリンター11の電源オン中に、外部電源コネクター17にACアダプター50が接続されている場合は、ACアダプター50から供給される電力によりプリンター11は動作する。さらに制御回路13は、外部電源コネクター17にACアダプター50が接続されていないプリンター11の電源オン状態においては、USBコネクター12が接続している相手がホスト装置30であっても非充電モードにあり、二次電池14の充電を行わないうえ、二次電池14を電源としてプリンター11を動作させる。また、プリンター11の電源オン状態においてはUSBコネクター12が接続している相手がUSBバッテリーチャージャー40であっても、制御回路13は非充電モードにあり、二次電池14の充電を行わないうえ、USBバッテリーチャージャー40からの電力でプリンター11を動作させる。 The control circuit 13 also controls print control for printing a document or image based on print job data received from the host device 30 on a print medium such as paper while the printer 11 is powered on. When the AC adapter 50 is connected to the external power connector 17 while the printer 11 is powered on, the printer 11 is operated by the power supplied from the AC adapter 50. Further, the control circuit 13 is in the non-charging mode when the printer 11 in which the AC adapter 50 is not connected to the external power connector 17 is in the power-on state, even if the partner to which the USB connector 12 is connected is the host device 30. The secondary battery 14 is not charged and the printer 11 is operated using the secondary battery 14 as a power source. Further, in the power-on state of the printer 11, even if the other party to which the USB connector 12 is connected is the USB battery charger 40, the control circuit 13 is in the non-charging mode and does not charge the secondary battery 14. The printer 11 is operated with power from the USB battery charger 40.
本実施形態の印刷機構16は、用紙等の印刷媒体にインクで記録する不図示の印刷ヘッドと、印刷媒体を搬送する不図示の搬送装置とを備える。印刷ヘッドは、印刷媒体の搬送方向と交差する走査方向にヘッドを往復移動させつつ印刷するシリアル方式でもよいし、搬送方向と交差する幅方向の印刷幅を一度で印刷可能な長さのヘッドにより一定速度で搬送される印刷媒体に印刷するラインヘッド方式でもよい。また、印刷ヘッドの方式は、インクジェット方式、ドットインパクト方式及び電子写真式のいずれであってもよい。また、インクジェット方式の場合、インクを噴射する圧力を発生させる駆動素子には、圧力板を撓ませて圧力を発生させる圧電素子や静電素子、あるいは熱等を利用して瞬間的に気泡を発生させるバブル素子を使用することができる。また、プリンター11は印刷に用いる印刷ジョブデータを有線と無線の少なくとも一方で受信できるうえ、メモリーカード等の記憶媒体から印刷に用いるデータを読み取るものでもよい。 The printing mechanism 16 of the present embodiment includes a print head (not shown) that records ink on a print medium such as paper and a transport device (not shown) that transports the print medium. The print head may be a serial system that prints while reciprocating the head in a scanning direction that intersects the conveyance direction of the print medium, or a print head having a length that can be printed at one time in the width direction that intersects the conveyance direction. A line head system for printing on a printing medium conveyed at a constant speed may also be used. Further, the print head method may be any of an ink jet method, a dot impact method, and an electrophotographic method. In addition, in the case of an ink jet system, bubbles are instantaneously generated by using a piezoelectric element or an electrostatic element that generates pressure by bending a pressure plate, or heat, etc., for a driving element that generates pressure for ejecting ink. A bubble element can be used. Further, the printer 11 may receive print job data used for printing at least one of wired and wireless, and may read data used for printing from a storage medium such as a memory card.
図1に示すように、制御回路13は、制御IC22、電源回路23、CPU24及びメモリー25を備えている。制御IC22は、充電制御を行う集積回路である。なお、制御回路13内にCPU24に加え、ASIC(Application Specific IC(特定用途向けIC))を備え、印刷機構16のうち一部(例えば印刷ヘッド)の制御をASICが行ってもよい。 As shown in FIG. 1, the control circuit 13 includes a control IC 22, a power supply circuit 23, a CPU 24, and a memory 25. The control IC 22 is an integrated circuit that performs charge control. The control circuit 13 may include an ASIC (Application Specific IC) in addition to the CPU 24, and the ASIC may control a part of the printing mechanism 16 (for example, a print head).
USBコネクター12の電源供給路12A及びデータ線12Bは、制御回路13内の制御IC22に接続されている。また、外部電源コネクター17の電源供給路17A及びデータ線17Bは、制御IC22に接続されている。制御IC22は、各コネクター12,17への外部装置の接続を検出する接続検出機能、その検出された接続相手(外部装置)を判定する判定機能を有する。さらに制御IC22は、充電モードにおいて二次電池14に対する充電制御を行うとともに、CPU24及び駆動回路15等に電源電力を供給する電源供給路12A,17Aの管理、及びCPU24等にデータを送信するデータ線12B,17Bの管理を行う。 The power supply path 12 </ b> A and the data line 12 </ b> B of the USB connector 12 are connected to the control IC 22 in the control circuit 13. The power supply path 17A and the data line 17B of the external power connector 17 are connected to the control IC 22. The control IC 22 has a connection detection function for detecting connection of an external device to each of the connectors 12 and 17 and a determination function for determining the detected connection partner (external device). Further, the control IC 22 performs charge control for the secondary battery 14 in the charge mode, manages the power supply paths 12A and 17A for supplying power to the CPU 24 and the drive circuit 15 and the like, and a data line for transmitting data to the CPU 24 and the like. 12B and 17B are managed.
制御IC22は、ホスト装置30からの通信ケーブル35のコネクター35A又はUSBバッテリーチャージャー40のコネクター40A等のいずれかがUSBコネクター12に接続されると、USB接続を検出する。制御IC22は、USB接続を検出すると、例えばデータ線12B(D+,D−)について、(D+)≠(D−)である場合にUSBコネクター12がコンピューター類であるホスト装置30に接続されていると判断し、一方、(D+)=(D−)である場合にUSBコネクター12がUSBバッテリーチャージャー40に接続されていると判断する。つまり、制御IC22は、USBコネクター12に接続されている接続相手(接続先)が、ホスト装置30であるか、USBバッテリーチャージャー40であるかを判定可能である。この点において、本実施形態では、制御IC22により、接続相手を判定する判定回路の一例が構成される。なお、制御IC22は、他の判定手法により接続相手を判定してもよい。 The control IC 22 detects the USB connection when either the connector 35A of the communication cable 35 from the host device 30 or the connector 40A of the USB battery charger 40 is connected to the USB connector 12. When the control IC 22 detects the USB connection, for example, when the data line 12B (D +, D−) is (D +) ≠ (D−), the USB connector 12 is connected to the host device 30 that is a computer. On the other hand, if (D +) = (D−), it is determined that the USB connector 12 is connected to the USB battery charger 40. That is, the control IC 22 can determine whether the connection partner (connection destination) connected to the USB connector 12 is the host device 30 or the USB battery charger 40. In this regard, in the present embodiment, the control IC 22 constitutes an example of a determination circuit that determines a connection partner. The control IC 22 may determine the connection partner using another determination method.
電源供給路12Aにおける制御IC22とCPU24との間の部分には、電源回路23が直列に介在されている。電源回路23は、入力した直流電圧を必要に応じて変圧して制御IC22及びCPU24に必要な駆動電圧(例えば3〜6Vの範囲内の所定電圧)、印刷機構16を構成する印刷ヘッドの駆動に必要な駆動電圧、用紙等の印刷媒体を搬送する搬送装置の動力源となる搬送モーターの駆動に必要な駆動電圧等を生成する。二次電池14は、電源供給路12Aにおける制御IC22と電源回路23との間の部分に対して第1スイッチ26を介して接続されている。この第1スイッチ26は制御IC22によりオン・オフ制御される。第1スイッチ26がオンになって導通しているときに電源供給路12Aからの電源電力によって二次電池14が充電される。 A power supply circuit 23 is interposed in series between the control IC 22 and the CPU 24 in the power supply path 12A. The power supply circuit 23 transforms the input DC voltage as necessary to drive the drive voltage necessary for the control IC 22 and the CPU 24 (for example, a predetermined voltage within a range of 3 to 6 V) and the print head constituting the printing mechanism 16. A necessary drive voltage, a drive voltage necessary for driving a conveyance motor that is a power source of a conveyance device that conveys a print medium such as paper, and the like are generated. The secondary battery 14 is connected to a portion between the control IC 22 and the power supply circuit 23 in the power supply path 12 </ b> A via the first switch 26. The first switch 26 is on / off controlled by the control IC 22. When the first switch 26 is on and conducting, the secondary battery 14 is charged by the power supplied from the power supply path 12A.
また、電源供給路12Aにおける電源回路23とCPU24との間の部分には、プッシュ式の第2スイッチ27と、半導体スイッチで構成される第3スイッチ28とが互いに並列な状態で介在している。プッシュ式の第2スイッチ27は、電源スイッチ20Aの操作に連動して機械的に押下され、電源スイッチ20Aの操作中のみオンし、電源スイッチ20Aの操作が止められるとオフする。また、電源回路23と駆動回路15とを接続する電源供給路12C上には第4スイッチ29が介在している。 Further, a push-type second switch 27 and a third switch 28 formed of a semiconductor switch are interposed in parallel with each other between the power supply circuit 23 and the CPU 24 in the power supply path 12A. . The push-type second switch 27 is mechanically pressed in conjunction with the operation of the power switch 20A, is turned on only during the operation of the power switch 20A, and is turned off when the operation of the power switch 20A is stopped. A fourth switch 29 is interposed on the power supply path 12 </ b> C connecting the power supply circuit 23 and the drive circuit 15.
制御IC22は、その判断結果に基づいて第3スイッチ28のオン(導通)とオフ(非導通)の切替え、データ線12B上の不図示のスイッチのオン(導通)とオフ(非導通)の切替え、第1スイッチ26のオン(導通)とオフ(非導通)の切替えを制御している。 The control IC 22 switches the third switch 28 on (conductive) and off (non-conductive) based on the determination result, and switches on (conductive) and off (non-conductive) a switch (not shown) on the data line 12B. The first switch 26 is controlled to be switched on (conducting) and off (non-conducting).
プリンター11の起動のトリガーとするのは、プッシュ式の第2スイッチ27であり、プリンター11の電源オフ状態の下で電源スイッチ20Aが押下されて第2スイッチ27がオンされると、制御IC22は第3スイッチ28をオン状態に維持する。詳しくは、プッシュ式の第2スイッチ27がオンした際のオン信号はCPU24に入力される。CPU24は第2スイッチ27からオン信号を入力すると、制御IC22に対してプリンター11の電源のオンとオフの切替えを指示する。制御IC22は、プリンター11の電源オフ状態でCPU24から電源の切替え指示を受け付けると、第3スイッチ28及び第4スイッチ29をオンさせ、プリンター11の電源オン状態でCPU24から電源の切替え指示を受け付けると、第3スイッチ28及び第4スイッチ29をオフさせる。 The trigger for starting the printer 11 is the push-type second switch 27. When the power switch 20A is pressed and the second switch 27 is turned on under the power-off state of the printer 11, the control IC 22 The third switch 28 is kept on. Specifically, an on signal when the push-type second switch 27 is turned on is input to the CPU 24. When the CPU 24 inputs an ON signal from the second switch 27, the CPU 24 instructs the control IC 22 to switch the printer 11 on and off. When the control IC 22 receives a power supply switching instruction from the CPU 24 while the printer 11 is in a power-off state, the control IC 22 turns on the third switch 28 and the fourth switch 29 and receives a power supply switching instruction from the CPU 24 while the printer 11 is in a power-on state. Then, the third switch 28 and the fourth switch 29 are turned off.
第3スイッチ28がオンされることで電源回路23からCPU24へ必要な電力が供給され、第3スイッチ28がオフされることで電源回路23からCPU24への電力の供給が遮断される。また、第4スイッチ29がオンされることで電源回路23から駆動回路15へ必要な電力が供給され、第4スイッチ29がオフされることで電源回路23から駆動回路15への電力供給が遮断される。なお、第4スイッチ29は電圧別の電力を供給するためのスイッチ群により構成されてもよい。 When the third switch 28 is turned on, necessary power is supplied from the power supply circuit 23 to the CPU 24, and when the third switch 28 is turned off, supply of power from the power supply circuit 23 to the CPU 24 is interrupted. Further, when the fourth switch 29 is turned on, necessary power is supplied from the power supply circuit 23 to the drive circuit 15, and when the fourth switch 29 is turned off, power supply from the power supply circuit 23 to the drive circuit 15 is cut off. Is done. The fourth switch 29 may be configured by a switch group for supplying power by voltage.
プリンター11の電源オフ状態では、第3スイッチ28及び第4スイッチ29が共にオフ状態にある。また、この電源オフ状態において外部電源コネクター17にACアダプター50が接続されておらず、USBコネクター12にホスト装置30とUSBバッテリーチャージャー40のどちらも接続されていなければ、第1スイッチ26はオフ状態にある。 In the power-off state of the printer 11, both the third switch 28 and the fourth switch 29 are in the off state. Further, in this power-off state, if the AC adapter 50 is not connected to the external power connector 17 and neither the host device 30 nor the USB battery charger 40 is connected to the USB connector 12, the first switch 26 is in the off state. It is in.
制御IC22は、プリンター11の電源オフ状態であって、かつACアダプター50が接続されていない状態において、USBコネクター12へのUSB接続を検出したときにその接続先がホスト装置30(USBホスト30A)であり、そのとき二次電池14の充電が必要であれば、それまでオフ状態にあった第3スイッチ28をオンさせる。制御IC22は、第3スイッチ28のオンによって、二次電池14の充電に先立ちホスト装置30との間でエニュメレーションと呼ばれる初期処理を実行させるためにCPU24を起動させる。このとき、制御IC22は、内部のスイッチをオンさせてCPU24を、データ線12Bを通じたデータの送受信が可能な状態にする。 When the control IC 22 detects the USB connection to the USB connector 12 in a state where the printer 11 is powered off and the AC adapter 50 is not connected, the connection destination is the host device 30 (USB host 30A). If the secondary battery 14 needs to be charged at that time, the third switch 28 that has been in the off state is turned on. When the third switch 28 is turned on, the control IC 22 activates the CPU 24 in order to execute an initial process called enumeration with the host device 30 prior to charging of the secondary battery 14. At this time, the control IC 22 turns on an internal switch so that the CPU 24 can transmit and receive data through the data line 12B.
電源スイッチ20Aがオフ状態の下でUSBコネクター12が外部装置と接続した場合、制御IC22は、USBコネクター12が初期処理の前に受け取る第1電力(例えば保証電流値100mA)を二次電池14と共に電源の一部としてUSBコネクター12が接続している相手を判定する。また、CPU24は初期処理を行うことによって、USBコネクター12が受け取る第1電力以上の電力を消費する。このため、CPU24がホスト装置30から初期処理完了通知を受信することなく初期処理の途中で待機状態のまま放置された場合、その待機時間のうちにCPU24の起動中の消費電力により二次電池14の残量が低減してしまう。ここで、保証電力とは、USB規格上、USB接続されたUSBデバイスに供給しなければならない電力であり、USB規格では例えば100mAに定められている。 When the USB connector 12 is connected to an external device while the power switch 20A is off, the control IC 22 receives the first power (for example, a guaranteed current value of 100 mA) received by the USB connector 12 before the initial processing together with the secondary battery 14. The other party to which the USB connector 12 is connected as part of the power supply is determined. In addition, the CPU 24 consumes power equal to or higher than the first power received by the USB connector 12 by performing the initial processing. For this reason, when the CPU 24 is left in a standby state in the middle of the initial process without receiving an initial process completion notification from the host device 30, the secondary battery 14 is caused by the power consumption during the startup of the CPU 24 during the standby time. The remaining amount of will be reduced. Here, the guaranteed power is power that must be supplied to a USB connected USB device in the USB standard, and is set to 100 mA in the USB standard, for example.
なお、本実施形態では、プリンター11が電源オフ中にホスト装置30とUSB接続されたときに、二次電池14の充電に必要な初期処理を行わせるためのCPU24の起動を、「充電起動」と呼ぶ。また、制御IC22が第3スイッチ28をオンさせてCPU24を起動させることを「充電起動オン」、第3スイッチ28をオフさせて起動中のCPU24を電源オフさせることを「充電起動オフ」と呼ぶ場合がある。 In the present embodiment, when the printer 11 is connected to the host device 30 via the USB while the power is off, the CPU 24 is activated to perform initial processing necessary for charging the secondary battery 14. Call it. In addition, turning on the third switch 28 and starting the CPU 24 by the control IC 22 is called “charging start-on”, and turning off the third switch 28 and turning off the activated CPU 24 is called “charging start-off”. There is a case.
また、制御IC22は、プリンター11が電源オン状態の下でACアダプター50又はUSBバッテリーチャージャー40に接続されているときは、第1スイッチ26をオフ状態、各スイッチ28,29をオン状態とすることにより電源アダプターから供給される電力でCPU24及び駆動回路15を動作させる。一方、制御IC22は、プリンター11が電源オフ状態の下でACアダプター50又はUSBバッテリーチャージャー40に接続されているときは、第1スイッチ26をオン状態、各スイッチ28,29をオフ状態とすることにより電源アダプターから供給される電力で二次電池14を充電する。 In addition, when the printer 11 is connected to the AC adapter 50 or the USB battery charger 40 under the power-on state, the control IC 22 turns off the first switch 26 and turns on the switches 28 and 29. The CPU 24 and the drive circuit 15 are operated with the power supplied from the power adapter. On the other hand, when the printer 11 is connected to the AC adapter 50 or the USB battery charger 40 with the power off, the control IC 22 turns on the first switch 26 and turns off the switches 28 and 29. The secondary battery 14 is charged with the electric power supplied from the power adapter.
制御IC22は、プリンター11が電源オフ状態の下でACアダプター50又はUSBバッテリーチャージャー40からの電力で二次電池14を充電する際は、初期処理を行う必要がないので、CPU24は起動されない。なお、USBバッテリーチャージャー40及びACアダプター50は、AC電源のコンセントに繋がっているものに限らず、DCバッテリーに繋がっているものも含む。 When the control IC 22 charges the secondary battery 14 with the power from the AC adapter 50 or the USB battery charger 40 when the printer 11 is powered off, the CPU 24 is not activated because it does not need to perform initial processing. The USB battery charger 40 and the AC adapter 50 are not limited to those connected to an AC power outlet, but also include those connected to a DC battery.
CPU24に接続されているメモリー25には、ホスト装置30と電源供給能力のネゴシエーションを含むエニュメレーションと呼ばれる初期処理を行うためのUSB通信用プログラムが記憶されている。USBコネクター12にホスト装置30の接続が検出された場合、CPU24は初期処理(エニュメレーション)をホスト装置30との間で行う。本実施形態では、CPU24が初期処理の全てを実行するが、初期処理の一部をCPU24が実行し他の一部をASIC又は制御IC22が実行する構成としてもよい。なお、本実施形態では、CPU24により、初期処理の少なくとも一部を実行する処理回路の一例が構成される。 The memory 25 connected to the CPU 24 stores a USB communication program for performing an initial process called enumeration including negotiation of the power supply capability with the host device 30. When connection of the host device 30 to the USB connector 12 is detected, the CPU 24 performs initial processing (enumeration) with the host device 30. In the present embodiment, the CPU 24 executes all of the initial processing, but the CPU 24 may execute a part of the initial processing and the ASIC or the control IC 22 may execute the other part. In the present embodiment, the CPU 24 configures an example of a processing circuit that executes at least a part of the initial processing.
また、図1に示すCPU24はタイマー24Aを備えている。タイマー24Aは、例えばCPU24内のカウンターにより構成され、クロック信号のパルスを計数することでタイマーとして機能する。CPU24は、充電起動時点からの経過時間を計時時間Tとしてタイマー24Aに計時させる。メモリー25には、初期処理が失敗であるか否かを判定する際に用いられる設定タイムアウト時間T1(以下、単に「タイムアウト時間T1」ともいう。)が記憶されている。CPU24は、タイマー24Aの計時時間Tが、ホスト装置30から初期処理完了通知を受信することなく、タイムアウト時間T1に達してタイムアウトになると、制御IC22に充電起動オフを指示し、電源オフすることで、初期処理を充電開始前に中止する。一方、CPU24は、タイマー24Aの計時時間Tがタイムアウト時間T1に達する前に、ホスト装置30から初期処理完了通知を受信すると、制御IC22に充電開始を指示して第1スイッチ26をオンさせることで、ホスト装置30からの電源電力による二次電池14の充電を開始させる。なお、タイマー24Aは、プログラムにより計時処理を行うソフトウェアで構成してもよいし、CPU24に替え、制御IC22又はASICに設けられてもよい。 Further, the CPU 24 shown in FIG. 1 includes a timer 24A. The timer 24A is constituted by a counter in the CPU 24, for example, and functions as a timer by counting clock signal pulses. The CPU 24 causes the timer 24 </ b> A to count the elapsed time from the start of charging as the time T. The memory 25 stores a set timeout time T1 (hereinafter also simply referred to as “timeout time T1”) used when determining whether or not the initial process has failed. When the time T of the timer 24A reaches the timeout time T1 without receiving the initial process completion notification from the host device 30, the CPU 24 instructs the control IC 22 to turn off the charging and turns off the power. , Stop the initial process before starting charging. On the other hand, when the CPU 24 receives the initial processing completion notification from the host device 30 before the time T of the timer 24A reaches the timeout time T1, the CPU 24 instructs the control IC 22 to start charging and turns on the first switch 26. Then, charging of the secondary battery 14 by the power source from the host device 30 is started. Note that the timer 24 </ b> A may be configured by software that performs timing processing by a program, or may be provided in the control IC 22 or ASIC instead of the CPU 24.
ここで、タイムアウト時間T1は、使用が想定される複数種のホスト装置30のうちBIOS(Basic Input/Output System)起動所要時間が最長であるホスト装置30のBIOS起動所要時間以上、かつこのホスト装置30のBIOS起動所要時間にマージン時間を加えた時間以下の値に設定されている。タイムアウト時間T1は、一例として30〜120秒の範囲内の所定値に設定されている。もちろん、タイムアウト時間T1は、上記の範囲に限らず、BIOS起動所要時間と関連付けてあるいはBIOS起動所要時間と無関係に、例えば10秒や20秒などのより短い時間、あるいは3分や5分などのより長い時間とすることもできる。 Here, the timeout time T1 is equal to or longer than the BIOS startup time of the host device 30 having the longest BIOS (Basic Input / Output System) startup time among a plurality of types of host devices 30 expected to be used, and this host device. It is set to a value equal to or less than the time required for adding 30 margins to the BIOS startup time. As an example, the timeout time T1 is set to a predetermined value within a range of 30 to 120 seconds. Of course, the time-out time T1 is not limited to the above range, and is associated with the BIOS start time or regardless of the BIOS start time, for example, a shorter time such as 10 seconds or 20 seconds, or 3 minutes or 5 minutes. A longer time can be used.
次に図2及び図3を参照して、プリンター11の電源オフ状態の下でホスト装置30と通信接続状態を確立するために初期処理として実行されるエニュメレーション及びタイマー24Aによるタイムアウト処理を伴う充電処理について説明する。 Next, referring to FIG. 2 and FIG. 3, enumeration executed as an initial process to establish a communication connection state with the host device 30 under the power-off state of the printer 11 and a timeout process by the timer 24A are involved. The charging process will be described.
図2に示すように、プリンター11がホスト装置30との間でUSB接続されると、このUSB接続を検出したホスト装置30とプリンター11との間で初期処理としてエニュメレーションが実行される。 As shown in FIG. 2, when the printer 11 is USB-connected to the host device 30, enumeration is executed as an initial process between the host device 30 that has detected this USB connection and the printer 11.
図2に示すように、エニュメレーションでは、まずプリンター11は、ホスト装置30からエニュメレーション開始に当たりリセット処理(バスリセット)を指示する「USB BusReset」を受信する。次にディスクリプターと呼ばれる構成情報を要求する「GetDescriptor」を受信する。そして、プリンター11はこの要求に応答して構成情報としてプリンター情報をホスト装置30へ応答する。プリンター情報には、プリンター11のクラス情報と、ホスト装置30に要求する電源供給の要求電力値情報とが含まれる。ここで、プリンター11の電源オフ時は、クラス情報は例えば「ヒューマンインターフェイスデバイス(HID)クラス」とされる。また、プリンター11の電源オン時は、クラス情報は例えば「プリンタークラス」とされる。 As shown in FIG. 2, in the enumeration, first, the printer 11 receives “USB BusReset” instructing reset processing (bus reset) from the host device 30 at the start of enumeration. Next, a “GetDescriptor” requesting configuration information called a descriptor is received. In response to this request, the printer 11 returns printer information as configuration information to the host device 30. The printer information includes class information of the printer 11 and required power value information of power supply requested to the host device 30. Here, when the printer 11 is powered off, the class information is, for example, “human interface device (HID) class”. When the printer 11 is powered on, the class information is “printer class”, for example.
また、要求電力値情報として、第1電力(保証電力(例えば電流値100mA))よりも大きな第2電力が設定される。要求電力値情報は、所定の電源電圧(例えば5ボルト)の下で電流値を要求する要求電流値情報で示される。第2電力を要求する要求電流値情報は、USB規格で供給可能な最大電力に相当する例えば「500mA」とされる。なお、第2電力は、最大電力に限らず、二次電池14への充電が可能な電力であればよく、第1電力より大きくかつ最大電力未満の電力でもよい。 Further, as the required power value information, a second power larger than the first power (guaranteed power (for example, current value 100 mA)) is set. The required power value information is indicated by required current value information that requests a current value under a predetermined power supply voltage (for example, 5 volts). The requested current value information for requesting the second power is, for example, “500 mA” corresponding to the maximum power that can be supplied by the USB standard. The second power is not limited to the maximum power, but may be any power that can charge the secondary battery 14, and may be a power that is larger than the first power and less than the maximum power.
そして、ホスト装置30は、クラス情報(例えば「HID」)に基づいてUSB接続されたUSBデバイスがヒューマンインターフェイスデバイスであると認識する。また、ホスト装置30は、要求電流値情報(例えば500mA)に基づいて、その要求された第2電力での電源供給が可能であるか否かを判断し、第2電力での電源供給が可能であれば、そのプリンター情報を設定するとともに、初期処理完了通知(設定完了通知)である「SetConfiguration」をプリンター11に送信する。 Then, the host device 30 recognizes that the USB device connected by USB based on the class information (for example, “HID”) is a human interface device. Further, the host device 30 determines whether or not power supply with the requested second power is possible based on the requested current value information (for example, 500 mA), and power supply with the second power is possible. If so, the printer information is set and “SetConfiguration” which is an initial processing completion notification (setting completion notification) is transmitted to the printer 11.
図2に示すように、エニュメレーションにおいてプリンター11から要求した第2電力での電源供給が許可されて初期処理完了通知「SetConfiguration」を受信するまでは、充電不可能な状態にある。そして、初期処理完了通知を受信した場合に、ホスト装置30からプリンター11に要求した第2電力で電源供給されて二次電池14の充電が可能になる。 As shown in FIG. 2, charging is not possible until the power supply with the second power requested from the printer 11 in the enumeration is permitted and the initial processing completion notification “SetConfiguration” is received. When the initial processing completion notification is received, the secondary battery 14 can be charged by being supplied with the second power requested from the host device 30 to the printer 11.
本実施形態では、プリンター11の電源オフ状態かつACアダプター50が非接続の状態の下でUSB接続が検出されたときの接続相手がホスト装置30である場合、プリンター11内のCPU24が起動される(充電起動オン)。このCPU24の充電起動とほぼ同時にCPU24はタイマー24Aによる計時を開始させる。CPU24は、その起動時点からの経過時間をタイマー24Aで計時し、その計時時間Tがタイムアウト時間T1に達したか否かを判断する。計時時間Tがタイムアウト時間T1に達する前に初期処理完了通知「SetConfiguration」を受信すれば、ホスト装置30から第2電力(例えば電流値で500mA)での電源供給が開始されるため、その供給される第2電力で二次電池14を充電する。 In this embodiment, when the USB device is detected when the printer 11 is powered off and the AC adapter 50 is not connected, the CPU 24 in the printer 11 is activated when the connection partner is the host device 30. (Charge start-up is on). At substantially the same time as the start of charging of the CPU 24, the CPU 24 starts measuring time by the timer 24A. The CPU 24 measures the elapsed time from the activation time by the timer 24A, and determines whether or not the time T has reached the timeout time T1. If the initial processing completion notification “SetConfiguration” is received before the time T reaches the timeout time T1, power supply at the second power (for example, 500 mA in current value) is started from the host device 30. The secondary battery 14 is charged with the second electric power.
一方、図3に示すように、プリンター11とホスト装置30とのUSB接続が検出され、プリンター11内のCPU24が起動(充電起動オン)されて開始した初期処理において、プリンター11が送信したプリンター情報がホスト装置30で許可されない場合、プリンター11は初期処理完了通知「SetConfiguration」を受信できない。この場合、プリンター11では、初期処理完了通知を受信することなく、タイマー24Aの計時時間Tが、タイムアウト時間T1に達する。このように初期処理完了通知「SetConfiguration」を受信することなく、計時時間Tがタイムアウト時間T1に達すると、プリンター11は充電を目的に内部的に電源オンさせたCPU24の電源をオフにすることで、充電起動をオフにする(電源オフ)。 On the other hand, as shown in FIG. 3, the printer information transmitted by the printer 11 in the initial process started when the USB connection between the printer 11 and the host device 30 is detected and the CPU 24 in the printer 11 is activated (charging activation is turned on). Is not permitted by the host device 30, the printer 11 cannot receive the initial processing completion notification “SetConfiguration”. In this case, in the printer 11, the time T of the timer 24A reaches the timeout time T1 without receiving the initial process completion notification. As described above, when the time T reaches the timeout time T1 without receiving the initial process completion notification “SetConfiguration”, the printer 11 turns off the power of the CPU 24 that is internally turned on for the purpose of charging. , Turn off charging start (power off).
ここで、タイムアウト時間T1を経過しても初期処理完了通知を受信できない例として、以下の場合が挙げられる。例えば図5に示すように、ホスト装置30とプリンター11とがバスパワーで動作しているハブ60(分岐装置)を経由して接続されている構成では、ハブ60のポート60aが例えばNポート(図5の例では5ポート)である場合、1ポート当たり500/N(mA)の電流値(図5の例では100mA)でしか電源供給ができない。そのため、プリンター11がクラス情報及び要求電流値情報(例えば500mA)を含むプリンター情報を送信しても、ホスト装置30はハブ経由であることの認識をもって、第2電力(例えば電流値で500mA)での電源供給ができないと判断する。このため、ホスト装置30は、要求された第2電力での電源供給を許可できないため、プリンター情報を設定しない。この結果、図3に示すように、ホスト装置30は、初期処理完了通知「SetConfiguration」をプリンター11に送信しない。このため、プリンター11はホスト装置30から送信されることのない初期処理完了通知「SetConfiguration」の受信を待つ待機状態となる。 Here, as an example in which the initial processing completion notification cannot be received even after the time-out period T1 has elapsed, the following cases may be mentioned. For example, as shown in FIG. 5, in a configuration in which the host device 30 and the printer 11 are connected via a hub 60 (branch device) operating with bus power, the port 60a of the hub 60 is, for example, an N port ( In the example of FIG. 5, power can be supplied only at a current value of 500 / N (mA) per port (100 mA in the example of FIG. 5). Therefore, even if the printer 11 transmits printer information including class information and requested current value information (for example, 500 mA), the host device 30 recognizes that it is via a hub and uses the second power (for example, 500 mA for the current value). It is determined that the power cannot be supplied. For this reason, since the host apparatus 30 cannot permit the power supply with the requested second power, the printer information is not set. As a result, as illustrated in FIG. 3, the host device 30 does not transmit the initial processing completion notification “SetConfiguration” to the printer 11. For this reason, the printer 11 enters a standby state waiting for reception of the initial processing completion notification “SetConfiguration” that is not transmitted from the host device 30.
また、ホスト装置30がバッテリー駆動時にUSBデバイス(プリンター11)への電源供給が最大電力(例えば電流値で500mA)未満の所定電力以下に制限する設定がなされている場合がある。このようなホスト装置30では、プリンター11から要求された第2電力での電源供給ができないため、ホスト装置30からプリンター11へ初期処理完了通知「SetConfiguration」が送信されない。この場合も、プリンター11はホスト装置30から送信されることのない初期処理完了通知「SetConfiguration」の受信を待つ待機状態となる。 In some cases, the host device 30 is set to limit power supply to the USB device (printer 11) to a predetermined power less than the maximum power (for example, a current value of 500 mA) when the battery is driven. In such a host device 30, the power supply with the second power requested from the printer 11 cannot be performed, and thus the initial processing completion notification “SetConfiguration” is not transmitted from the host device 30 to the printer 11. Also in this case, the printer 11 is in a standby state waiting for reception of an initial processing completion notification “SetConfiguration” that is not transmitted from the host device 30.
この待機状態においてCPU24は起動状態(充電起動オン状態)で待機するため、二次電池14の電力を消費する。この待機状態においてプリンター11はホスト装置30から通信ケーブル35を通じて第1電力(電流値で例えば100mA)で電源供給を受けるものの、起動中のCPU24が初期処理で消費する電力が、第1電力を上回るため、待機時間の経過と共に二次電池14の残量が徐々に低下してしまう。 In this standby state, the CPU 24 waits in an activated state (charging activation on state), and thus consumes the power of the secondary battery 14. In this standby state, the printer 11 receives power supply from the host device 30 through the communication cable 35 with the first power (current value is, for example, 100 mA). However, the power consumed by the activated CPU 24 in the initial process exceeds the first power. Therefore, the remaining amount of the secondary battery 14 gradually decreases as the standby time elapses.
そこで、本実施形態では、前述のタイムアウト時間T1を設定し、初期処理完了通知を受信することなく計時時間Tがタイムアウト時間T1に達してタイムアウトになると、ホスト装置30に応答したプリンター情報に含まれる要求が許可されず初期処理を失敗したとみなして、CPU24は電源をオフにする(充電起動オフ)。そして、タイムアウト時間T1を、USBコネクター12への接続が想定される複数種のホスト装置30のうち最長のBIOS起動所要時間に応じた値に設定しているので、ホスト装置30のBIOS起動を待つにほぼ十分な時間を待った後にタイムアウトとなる。このため、待機すれば充電できたにも拘らず短過ぎるタイムアウト時間によりタイムアウトになってしまい、二次電池14の充電ができなくなる不都合を回避し易いタイムアウト時間T1に設定されている。 Therefore, in the present embodiment, the above-described timeout time T1 is set, and when the measured time T reaches the timeout time T1 and times out without receiving the initial processing completion notification, it is included in the printer information responding to the host device 30. Assuming that the request is not permitted and the initial process has failed, the CPU 24 turns off the power (charge activation off). The timeout time T1 is set to a value corresponding to the longest BIOS startup time among a plurality of types of host devices 30 that are assumed to be connected to the USB connector 12, and the host device 30 waits for BIOS startup. It will time out after waiting for almost enough time. For this reason, the timeout time T1 is set to easily avoid the inconvenience that the secondary battery 14 cannot be charged due to a timeout due to a timeout time that is too short even if the battery can be charged.
また、プリンター11は、図4にフローチャートで示される充電処理用プログラムを記憶している。なお、このプログラムは制御IC22に書き込まれた部分(ステップS11〜S16)と、メモリー25に記憶されてCPU24により実行される部分(ステップS17〜S23)とを含んでいる。 Further, the printer 11 stores a charging processing program shown in the flowchart of FIG. This program includes a part written in the control IC 22 (steps S11 to S16) and a part stored in the memory 25 and executed by the CPU 24 (steps S17 to S23).
次に図4を参照してプリンター11の作用を説明する。すなわち、プリンター11内の制御IC22及びCPU24が実行する充電処理について説明する。図4に示す充電処理は、プリンター11が電源オフ状態にあり、かつACアダプター50が接続されておらずACアダプター50による二次電池14への充電が行われていない状態の下で行われる。USBコネクター12に何らかのコネクターが接続され、USB接続を検出すると、図4に示す充電処理のプログラムが実行される。 Next, the operation of the printer 11 will be described with reference to FIG. That is, a charging process executed by the control IC 22 and the CPU 24 in the printer 11 will be described. The charging process illustrated in FIG. 4 is performed in a state where the printer 11 is in a power-off state and the AC adapter 50 is not connected and the secondary battery 14 is not charged by the AC adapter 50. When any connector is connected to the USB connector 12 and the USB connection is detected, the charging process program shown in FIG. 4 is executed.
まずステップS11では、制御ICを起動する。
次のステップS12では、接続先がホスト装置であるか否かを判断する。すなわち、制御IC22は、接続先がUSBホスト30Aとして機能するホスト装置30であるかUSBバッテリーチャージャー40等の電源アダプターであるかを判定する。例えばデータ線が(D+)≠(D−)である場合は接続先がホスト装置30であると判断し、(D+)=(D−)である場合は接続先が電源アダプターであると判断する。接続先がホスト装置30ではなく電源アダプターであればステップS13に進み、ホスト装置30であればステップS14に進む。
First, in step S11, the control IC is activated.
In the next step S12, it is determined whether or not the connection destination is a host device. That is, the control IC 22 determines whether the connection destination is the host device 30 that functions as the USB host 30A or a power adapter such as the USB battery charger 40. For example, when the data line is (D +) ≠ (D−), it is determined that the connection destination is the host device 30, and when (D +) = (D−), it is determined that the connection destination is the power adapter. . If the connection destination is not the host device 30 but the power adapter, the process proceeds to step S13. If the connection destination is the host apparatus 30, the process proceeds to step S14.
ステップS13では、電源アダプターで充電を開始する。本例の場合、USBバッテリーチャージャー40からの電力で二次電池14を充電する。
ステップS14では、二次電池の残量が閾値未満であるか否かを判断する。すなわち、二次電池14の残量が、初期処理を行ううえで十分な残量である閾値未満であるか否かを判断する。二次電池14の残量が閾値未満であればステップS15に進み、閾値未満でなければステップS16に進む。
In step S13, charging is started with the power adapter. In this example, the secondary battery 14 is charged with power from the USB battery charger 40.
In step S14, it is determined whether or not the remaining amount of the secondary battery is less than a threshold value. That is, it is determined whether or not the remaining amount of the secondary battery 14 is less than a threshold value that is sufficient for performing the initial process. If the remaining amount of the secondary battery 14 is less than the threshold value, the process proceeds to step S15, and if not, the process proceeds to step S16.
ステップS15では、二次電池を第1電力(例えば100mA)で充電する。USB規格では第1電力での電源供給は保証されているので、二次電池14を第1電力でその残量が閾値に達するまで充電する。そして、二次電池14がその残量が閾値以上になるまで充電されると(S14で否定判定)、ステップS16に進む。 In step S15, the secondary battery is charged with the first power (for example, 100 mA). In the USB standard, power supply with the first power is guaranteed, so the secondary battery 14 is charged with the first power until the remaining amount reaches a threshold value. And if the secondary battery 14 is charged until the remaining amount becomes more than a threshold value (it is negative determination by S14), it will progress to step S16.
ステップS16では、CPUを起動させる(充電起動オン)。すなわち、制御IC22は、第3スイッチ28をオフからオンに切り替えることでCPU24を起動させる。このように二次電池14の充電を開始する前に必要なホスト装置30との初期処理を行わせるためにCPU24を起動させる。 In step S16, the CPU is activated (charging activation is on). That is, the control IC 22 activates the CPU 24 by switching the third switch 28 from off to on. In this way, the CPU 24 is activated in order to perform necessary initial processing with the host device 30 before starting the charging of the secondary battery 14.
ステップS17では、タイマーの計時を開始する。すなわち、CPU24はタイマー24Aの計時を開始する。この結果、タイマー24AはCPU24の起動時点からの経過時間(計時時間T)を計時する。 In step S17, the timer starts counting. That is, the CPU 24 starts measuring the timer 24A. As a result, the timer 24 </ b> A measures the elapsed time (timed time T) from the activation point of the CPU 24.
次のステップS18では、プルアップを行う。すなわち、CPU24は、データ線D+,D−の電圧を変動させてプルアップを行う。このプルアップによりホスト装置30はUSBデバイス11A(プリンター11)の接続を検出し、初期処理(エニュメレーション)(図2、図3を参照)を開始する。なお、タイマー24Aによる計時開始処理(S17)とプルアップ処理(S18)との処理の順番は逆でもよい。 In the next step S18, pull-up is performed. That is, the CPU 24 performs pull-up by changing the voltages of the data lines D + and D−. By this pull-up, the host device 30 detects the connection of the USB device 11A (printer 11) and starts an initial process (enumeration) (see FIGS. 2 and 3). It should be noted that the processing order of the timing start process (S17) and the pull-up process (S18) by the timer 24A may be reversed.
ステップS19では、初期処理を行い、ホスト装置30からの要求に対してプリンター情報を送信する。プリンター情報にはクラス情報と要求電力情報とが含まれる。本例のプリンター11では、充電モードにおいて要求電力情報は第2電力(電流値で例えば500mA)に設定されている。このため、プリンター11はプリンター情報を通じてホスト装置30に対して第2電力を要求する。 In step S19, initial processing is performed, and printer information is transmitted in response to a request from the host device 30. The printer information includes class information and required power information. In the printer 11 of this example, the required power information is set to the second power (for example, 500 mA in current value) in the charging mode. For this reason, the printer 11 requests the second power from the host device 30 through the printer information.
こうして図2に示すように、プルアップによりUSB接続が検出されると、ホスト装置30とプリンター11との間で初期処理としてエニュメレーションが行われる。すなわち、まずホスト装置30からプリンター11に対してバスリセットを指示する「USB BusReset」が送信され、次に構成情報(ディスクリプター)を要求する「GetDescriptor」が送信される。「GetDescriptor」を受信したプリンター11は、構成情報としてクラス情報(例えば「HID」)と要求電力情報(第2電力)とを含むプリンター情報を送信する。 As shown in FIG. 2, when USB connection is detected by pull-up, enumeration is performed as an initial process between the host device 30 and the printer 11. That is, first, “USB BusReset” for instructing bus reset to the printer 11 is transmitted from the host device 30, and then “GetDescriptor” for requesting configuration information (descriptor) is transmitted. The printer 11 that has received “GetDescriptor” transmits printer information including class information (for example, “HID”) and requested power information (second power) as configuration information.
ホスト装置30が第2電力でプリンター11に電源供給できる場合、図2に示すように、ホスト装置30からプリンター11へ初期処理完了通知「SetConfiguration」が送信される。 When the host device 30 can supply power to the printer 11 with the second power, an initial processing completion notification “SetConfiguration” is transmitted from the host device 30 to the printer 11 as shown in FIG.
一方、図5に示すように、ホスト装置30とプリンター11とがバスパワーハブ経由で接続されている場合、プリンター11がクラス情報及び要求電力情報(第2電力)を含むプリンター情報を送信しても、ホスト装置30はハブ経由であるとの認識から、要求された第2電力での電源供給を許可しない。このため、図3に示すように、ホスト装置30から初期処理完了通知「SetConfiguration」は送信されない。よって、プリンター11は、ホスト装置30から送信されることのない初期処理完了通知「SetConfiguration」を起動状態のまま待機することになる。この待機中は起動中(充電起動オン状態)のCPU24により、二次電池14の電力が消費される。 On the other hand, as shown in FIG. 5, when the host device 30 and the printer 11 are connected via a bus power hub, the printer 11 transmits printer information including class information and required power information (second power). However, the host device 30 does not permit the power supply with the requested second power because it recognizes that it is via the hub. Therefore, as shown in FIG. 3, the initial processing completion notification “SetConfiguration” is not transmitted from the host device 30. Therefore, the printer 11 waits in the activated state for the initial processing completion notification “SetConfiguration” that is not transmitted from the host device 30. During this standby, the power of the secondary battery 14 is consumed by the CPU 24 that is being activated (charging activation is on).
また、ホスト装置30がバッテリー駆動時にUSBデバイス11Aへの供給電力が最大電力(電流値で500mA)未満の所定電力以下に制限する設定がなされている場合、プリンター11から要求された第2電力(電流値で500mA)での電源供給ができない。このため、ホスト装置30からプリンター11へ初期処理完了通知「SetConfiguration」が送信されない。この場合も、プリンター11内のCPU24は、ホスト装置30から送信されることのない初期処理完了通知「SetConfiguration」を起動状態のまま待機することになる。この待機中は起動中のCPU24により、二次電池14の電力が消費される。これらの場合、ホスト装置30から通信ケーブル35を通じて第1電力(電流値で100mA)が供給されるものの、起動中のCPU24が初期処理で消費する電力が第1電力を上回る場合、二次電池14の残量が徐々に低下してしまう。 Further, when the host device 30 is set to limit the power supplied to the USB device 11A to a predetermined power less than the maximum power (500 mA in current value) when the battery is driven, the second power requested from the printer 11 ( The power cannot be supplied at a current value of 500 mA). For this reason, the initial processing completion notification “SetConfiguration” is not transmitted from the host device 30 to the printer 11. Also in this case, the CPU 24 in the printer 11 waits for the initial processing completion notification “SetConfiguration” that is not transmitted from the host device 30 in the activated state. During this standby, the power of the secondary battery 14 is consumed by the activated CPU 24. In these cases, when the first power (100 mA in current value) is supplied from the host device 30 through the communication cable 35, but the power consumed by the starting CPU 24 in the initial process exceeds the first power, the secondary battery 14 The remaining amount of will gradually decrease.
ステップS20では、初期処理完了通知を受信したか否かを判断する。ここで、ホスト装置30は、初期処理において受信したプリンター情報(構成情報)中で要求された第2電力での電源供給を許容できるか否かを判断し、許容できる場合はそのプリンター情報を設定して初期処理完了通知「SetConfiguration」をプリンター11に送信する。そして、CPU24は、初期処理完了通知を受信しなければステップS21に進み、受信すればステップS22に進む。 In step S20, it is determined whether an initial processing completion notification has been received. Here, the host device 30 determines whether or not the power supply with the second power requested in the printer information (configuration information) received in the initial process can be permitted, and if so, sets the printer information. Then, an initial processing completion notification “SetConfiguration” is transmitted to the printer 11. Then, the CPU 24 proceeds to step S21 if it does not receive the initial process completion notification, and proceeds to step S22 if it is received.
初期処理完了通知を受信しない場合は、ステップS21において、タイムアウトか否かを判断する。すなわち、タイマー24Aの計時時間Tがタイムアウト時間T1に達したか否かを判断する。タイムアウトでなければステップS20に戻る。つまり、初期処理完了通知を受信するか(S20で肯定判定)、タイムアウト(S21で肯定判定)になるまで、ステップS20,S21の処理を繰り返す。 If the initial process completion notification is not received, it is determined in step S21 whether a timeout has occurred. That is, it is determined whether or not the time T of the timer 24A has reached the timeout time T1. If not timed out, the process returns to step S20. That is, the processes in steps S20 and S21 are repeated until an initial process completion notification is received (affirmative determination in S20) or a timeout occurs (positive determination in S21).
ステップS22では、第2電力(電流値で500mA)で充電する。つまり、ホスト装置30から電源供給される第2電力で二次電池14を充電する。
一方、タイムアウトになった場合(S21で肯定判定)は、ステップS23において、CPU24と制御IC22をオフにする(充電起動オフ)。つまり、CPU起動時点からの経過時間である計時時間Tがタイムアウト時間T1に達した場合、起動状態にあるCPU24及び制御IC22の電源を共にオフし、二次電池14の充電をその開始前に中止する(充電起動オフ)。例えばCPU24からのオフ指示に従って制御IC22は、第3スイッチ28をオフにすることによりCPU24の電源をオフにし、その後、自身の電源をオフにする。なお、ステップS13及びS22で二次電池14の充電開始後の充電中において、制御IC22は二次電池14の残量を監視し、二次電池14が満充電されると、第1スイッチ26をオフにすることで、二次電池14の充電を終了させる。
In step S22, the battery is charged with the second power (current value is 500 mA). That is, the secondary battery 14 is charged with the second power supplied from the host device 30.
On the other hand, if a time-out has occurred (Yes in S21), the CPU 24 and the control IC 22 are turned off (charge activation off) in step S23. That is, when the time T, which is the elapsed time from the time of starting the CPU, reaches the time-out time T1, both the CPU 24 and the control IC 22 in the activated state are turned off, and the charging of the secondary battery 14 is stopped before the start. (Charging start off) For example, in accordance with an off instruction from the CPU 24, the control IC 22 turns off the power of the CPU 24 by turning off the third switch 28, and then turns off its own power. During charging after the secondary battery 14 is started to be charged in steps S13 and S22, the control IC 22 monitors the remaining amount of the secondary battery 14, and when the secondary battery 14 is fully charged, the first switch 26 is turned on. By turning off, the charging of the secondary battery 14 is terminated.
以上詳述した本実施形態によれば、以下に示す効果を得ることができる。
(1)制御回路13は、電源スイッチ20Aがオフ状態でUSBコネクター12が接続している相手がUSBバッテリーチャージャー40(第1種の装置の一例)であれば、初期処理(エニュメレーション)を行わずにUSBコネクター12が受け取った電力で二次電池14を充電する。また、USBコネクター12が接続している相手がホスト装置30(第2種の装置の一例)であれば、制御回路13は初期処理を行い、初期処理が完了した後に、二次電池14を充電する。一方、USBコネクター12が接続している相手がホスト装置30であり、初期処理に失敗したときは、二次電池14の充電を行わない。よって、電源スイッチ20Aがオフ状態でUSBコネクター12が接続している相手がホスト装置30であり、初期処理に失敗したときは、制御回路13(特にCPU24)の電源をオフすることができ、電池14への充電をその開始前に中止できる。このため、初期処理が失敗しても長時間に亘って制御回路13が起動状態のまま放置されることによる電気の浪費や電池14の残量の低減を抑制することができる。
According to the embodiment described in detail above, the following effects can be obtained.
(1) If the power switch 20A is off and the USB connector 12 is connected to the USB battery charger 40 (an example of the first type device), the control circuit 13 performs initial processing (enumeration). Instead, the secondary battery 14 is charged with the power received by the USB connector 12. Further, if the other party to which the USB connector 12 is connected is the host device 30 (an example of the second type device), the control circuit 13 performs an initial process and charges the secondary battery 14 after the initial process is completed. To do. On the other hand, when the other party to which the USB connector 12 is connected is the host device 30 and the initial process fails, the secondary battery 14 is not charged. Therefore, when the power switch 20A is off and the USB connector 12 is connected to the host device 30 and the initialization process fails, the control circuit 13 (especially the CPU 24) can be turned off, and the battery 14 can be stopped before it starts. For this reason, even if the initial process fails, it is possible to suppress waste of electricity and reduction of the remaining amount of the battery 14 due to the control circuit 13 being left in the activated state for a long time.
(2)制御回路13は、USBコネクター12が接続している相手を判定する制御IC22(判定回路の一例)と、初期処理の少なくとも一部を実行するCPU24(処理回路の一例)とを備える。USBコネクター12が接続している相手がUSBバッテリーチャージャー40(第1種の装置の一例)と判定すれば、CPU24を電源オフ状態に維持する。また、USBコネクター12が接続している相手がホスト装置30(第2種の装置の一例)と判定すれば、CPU24を電源オン状態に移行させる。このため、電源オン状態に移行したCPU24はホスト装置30との間で初期処理を行うことができる。 (2) The control circuit 13 includes a control IC 22 (an example of a determination circuit) that determines a partner to which the USB connector 12 is connected, and a CPU 24 (an example of a processing circuit) that executes at least a part of the initial processing. If it is determined that the other party to which the USB connector 12 is connected is the USB battery charger 40 (an example of the first type device), the CPU 24 is maintained in a power-off state. If it is determined that the other party to which the USB connector 12 is connected is the host device 30 (an example of the second type device), the CPU 24 is shifted to the power-on state. Therefore, the CPU 24 that has shifted to the power-on state can perform initial processing with the host device 30.
(3)制御回路13は、ホスト装置30との初期処理においてタイムアウトが発生した場合に、初期処理に失敗したと判断する。このため、タイムアウトを考慮することなく初期処理完了通知を受信するまで待機する構成である場合に比べ、初期処理が失敗であるときの制御回路13の起動時間(電源オン時間)を短くすることができる。よって、初期処理を失敗して充電不可能であるにも拘らず、制御回路13が起動状態(電源オン状態)に放置され、二次電池14の電力が不要に消費される事態を抑制できる。 (3) The control circuit 13 determines that the initial process has failed when a timeout occurs in the initial process with the host device 30. For this reason, the startup time (power-on time) of the control circuit 13 when the initial process is unsuccessful can be shortened as compared with the case where the configuration waits until the initial process completion notification is received without considering the timeout. it can. Therefore, it is possible to suppress the situation where the control circuit 13 is left in the activated state (power-on state) and the power of the secondary battery 14 is unnecessarily consumed although the initial process fails and charging is impossible.
(4)制御回路13は、タイムアウトと判定する際に用いるタイムアウト時間T1を、ホスト装置30のBIOS起動所要時間(起動所要時間の一例)に応じて設定する。よって、USBコネクター12が接続しているホスト装置30が起動途中の状態にあっても、その起動後のホスト装置30と初期処理を行ってホスト装置30からの電源供給により第2電力(例えば電流値500mA)で二次電池14を充電することができる。 (4) The control circuit 13 sets the timeout time T1 used when determining the timeout, according to the BIOS startup required time (an example of the startup required time) of the host device 30. Therefore, even when the host device 30 to which the USB connector 12 is connected is in the middle of starting, the second power (for example, current) is supplied by supplying power from the host device 30 after performing initial processing with the host device 30 after the startup. The secondary battery 14 can be charged at a value of 500 mA).
(5)特にタイムアウト時間T1を、接続が想定される複数種のホスト装置30の起動所要時間のうち最長時間のものに所定のマージン時間を加えて設定している。よって、充電できるにも拘らず短過ぎるタイムアウト時間によりホスト装置30の起動途中にタイムアウトの発生により初期処理が失敗したと判断されたために二次電池14を充電できなくなる事態を極力抑えることができる。このため、二次電池14が充電される頻度を相対的に高めることができる。 (5) In particular, the timeout time T1 is set by adding a predetermined margin time to the longest time required for starting up a plurality of types of host devices 30 to be connected. Therefore, it is possible to suppress the situation where the secondary battery 14 cannot be charged as much as possible because it is determined that the initial process has failed due to the occurrence of a timeout during the startup of the host device 30 due to the too short timeout time even though the battery can be charged. For this reason, the frequency with which the secondary battery 14 is charged can be relatively increased.
(第2実施形態)
次に図6を参照して第2実施形態を説明する。本実施形態では、タイムアウトに加え、他の方法によっても、CPU24の起動をオフにする。なお、プリンター11の構成は第1実施形態と同様であり、CPU24が実行する充電処理の一部が異なるだけなので、第1実施形態と共通の構成及び共通の処理については同一の符号を用いてその説明を省略し、特に異なる部分についてのみ説明する。
(Second Embodiment)
Next, a second embodiment will be described with reference to FIG. In this embodiment, the activation of the CPU 24 is turned off by another method in addition to the timeout. The configuration of the printer 11 is the same as that of the first embodiment, and only a part of the charging process executed by the CPU 24 is different. Therefore, the same reference numerals are used for the same configuration and the same processing as those of the first embodiment. The description will be omitted, and only different parts will be described.
本実施形態では、初期処理の失敗を、第1実施形態と同様のタイムアウトの発生に加え、ホスト装置30のサスペンド状態(一時停止状態)への移行によって判断する。ホスト装置30の種類によってはUSB接続中においてSOF(スタートオブフレーム)信号を定期的(例えば1ミリ秒未満の所定時間毎)にプリンター11に送信する。SOF信号は、例えば10マイクロ秒〜1ミリ秒の範囲内の一定時間Toの間隔毎にホスト装置30からプリンター11へ送信される信号である。 In the present embodiment, the failure of the initial process is determined by the occurrence of a timeout similar to that in the first embodiment and the transition of the host device 30 to the suspended state (temporary suspension state). Depending on the type of the host device 30, an SOF (start of frame) signal is transmitted to the printer 11 periodically (for example, every predetermined time of less than 1 millisecond) during USB connection. The SOF signal is a signal transmitted from the host device 30 to the printer 11 at intervals of a predetermined time To within a range of 10 microseconds to 1 millisecond, for example.
このため、初期処理中においてもホスト装置30からプリンター11へSOF信号が送信される。そして、ホスト装置30は、初期処理においてプリンター11から受信したプリンター情報(構成情報)に含まれる要求電力情報(第2電力)を許可できない場合、プリンター情報の設定を行わず、サスペンド状態に移行する。このサスペンド状態への移行によって、ホスト装置30は、SOF信号の送信を停止する。 For this reason, the SOF signal is transmitted from the host device 30 to the printer 11 even during the initial processing. When the host device 30 cannot permit the required power information (second power) included in the printer information (configuration information) received from the printer 11 in the initial process, the host device 30 does not set the printer information and shifts to the suspended state. . By shifting to the suspended state, the host device 30 stops transmitting the SOF signal.
プリンター11内の制御回路13を構成するCPU24は、ホスト装置30とのUSB接続中においてホスト装置30から送られてくるはずのSOF信号が途絶えて送られてこなくなると、ホスト装置30がサスペンド状態へ移行し、初期処理が失敗したとみなし、CPU24等の起動をオフにする(充電起動オフ)。本例では、CPU24は、ホスト装置30から送られてくるはずのSOF信号が第2設定時間T2の間、途絶えて送られてこなくなると、ホスト装置30がサスペンド状態に移行したとみなし、CPU24の電源をオフにする(充電起動オフ)。第2設定時間T2は、例えば1〜10ミリ秒の範囲内でかつT2>Toを満たす一定時間に設定されている。つまり、SOF信号が途絶えて第2設定時間T2以上アイドル状態になった時点で、初期処理を失敗したと判断する。 When the SOF signal that should have been sent from the host device 30 during the USB connection with the host device 30 is interrupted, the CPU 24 that constitutes the control circuit 13 in the printer 11 stops the host device 30 from being suspended. Transition is made, and it is considered that the initial process has failed, and the activation of the CPU 24 and the like is turned off (charge activation off). In this example, when the SOF signal that should be sent from the host device 30 is not sent for the second set time T2, the CPU 24 considers that the host device 30 has shifted to the suspended state, and the CPU 24 Turn off the power (charging start off). The second set time T2 is set to, for example, a certain time that satisfies T2> To in a range of 1 to 10 milliseconds. That is, it is determined that the initial process has failed when the SOF signal stops and becomes idle for the second set time T2.
次に図6を参照して、本実施形態のプリンター11の作用を説明する。第1実施形態において図4で示したステップS11〜S18の各処理は本実施形態でも同様である。
ステップS19では、初期処理を行い、ホスト装置30からの要求に対してクラス情報(例えば「HID」)と要求電力情報(第2電力(電流値で500mA))とが含まれるプリンター情報を送信する。
Next, the operation of the printer 11 of the present embodiment will be described with reference to FIG. In the first embodiment, the processes in steps S11 to S18 shown in FIG. 4 are the same in this embodiment.
In step S19, initial processing is performed, and printer information including class information (for example, “HID”) and requested power information (second power (current value: 500 mA)) is transmitted in response to a request from the host device 30. .
ステップS20では、初期処理完了通知を受信したか否かを判断する。ここで、ホスト装置30は、初期処理において受信したプリンター情報(構成情報)中で要求された第2電力での電源供給を許可できるか否かを判断し、許可できる場合はそのプリンター情報を設定するとともに初期処理完了通知「SetConfiguration」をプリンター11に送信する。そして、プリンター11のCPU24は、初期処理完了通知を受信しなければステップS21に進み、受信すればステップS22に進む。 In step S20, it is determined whether an initial processing completion notification has been received. Here, the host device 30 determines whether or not the power supply with the second power requested in the printer information (configuration information) received in the initial process can be permitted, and if so, sets the printer information. At the same time, an initial processing completion notification “SetConfiguration” is transmitted to the printer 11. Then, the CPU 24 of the printer 11 proceeds to step S21 if the initial processing completion notification is not received, and proceeds to step S22 if received.
初期処理完了通知を受信しない場合(S20で否定判定)は、ステップS21において、タイムアウトか否かを判断する。すなわち、タイマー24Aの計時時間Tがタイムアウト時間T1に達したか否かを判断する。タイムアウトでなければステップS31に進む。 If the initial processing completion notification is not received (No in S20), it is determined in step S21 whether a timeout has occurred. That is, it is determined whether or not the time T of the timer 24A has reached the timeout time T1. If not timed out, the process proceeds to step S31.
ステップS31では、SOF信号の受信が第2設定時間T2以上ないか否かを判断する。つまり、CPU24は、USB接続中はホスト装置30から送られてくるはずのSOF信号の受信が第2設定時間T2以上途絶えたアイドル状態になったか否かを判断する。SOF信号の受信が途切れたアイドル状態が第2設定時間T2に達していなければステップS20に戻り、そのアイドル状態が第2設定時間T2以上継続すればステップS23に進む。 In step S31, it is determined whether or not the SOF signal is received for the second set time T2 or longer. That is, the CPU 24 determines whether or not the reception of the SOF signal that should have been sent from the host device 30 during the USB connection has been idle for a second set time T2 or longer. If the idle state where the reception of the SOF signal is interrupted does not reach the second set time T2, the process returns to step S20, and if the idle state continues for the second set time T2 or more, the process proceeds to step S23.
こうして初期処理完了通知を受信するか(S20で肯定判定)、タイムアウトになるか(S21で肯定判定)、SOF信号の受信が第2設定時間以上ないかの各判定処理のうちいずれか1つが成立するまで、ステップS20,S21,S31の各処理を繰り返す。 In this way, any one of the determination processes is established as to whether the initial process completion notification is received (Yes in S20), the time-out occurs (Yes in S21), or whether the SOF signal is received for the second set time or more. Until it does, each processing of step S20, S21 and S31 is repeated.
SOF信号の受信が第2設定時間T2以上途切れることなく(S31で否定判定)、初期処理完了通知を受信すれば、ステップS22に進んで第2電力で二次電池14を充電する。 If the reception of the SOF signal is not interrupted for the second set time T2 or longer (No determination in S31) and if the initial process completion notification is received, the process proceeds to step S22 and the secondary battery 14 is charged with the second power.
一方、USB接続中はホスト装置30から定期的に送られてくるはずのSOF信号が途絶えたアイドル状態が第2設定時間T2以上継続すると(S31で肯定判定)、初期処理の失敗とみなし、ステップS23に進んで、CPU24と制御IC22の電源をオフにする(充電起動オフ)。この場合、CPU24は起動時点からタイムアウト時間T1の経過を待つことなく初期処理の失敗をほぼリアルタイムに検出(判断)して、CPU24及び制御IC22の電源をオフし、初期処理を充電開始前に中止する。 On the other hand, if the idle state in which the SOF signal that should be periodically sent from the host device 30 is interrupted during the USB connection continues for the second set time T2 or more (affirmative determination in S31), it is regarded as a failure of the initial process, and the step Proceeding to S23, the CPU 24 and the control IC 22 are turned off (charging start-off). In this case, the CPU 24 detects (determines) the failure of the initial process almost in real time without waiting for the elapse of the timeout time T1 from the start point, turns off the power of the CPU 24 and the control IC 22, and cancels the initial process before starting the charging To do.
また、SOF信号を送信しないホスト装置である場合、ホスト装置30が第2電力での電源供給を許可できない場合、プリンター11のCPU24は、初期処理完了通知を受信することなく計時時間Tがタイムアウト時間T1に達することになる(S21で肯定判定)。この場合、ステップS23において、CPU24及び制御IC22の電源をオフにする(充電起動オフ)。 When the host device 30 does not transmit the SOF signal and the host device 30 cannot permit the power supply with the second power, the CPU 24 of the printer 11 does not receive the initial processing completion notification, and the time measurement time T is the timeout time. T1 is reached (affirmative determination in S21). In this case, in step S23, the power of the CPU 24 and the control IC 22 is turned off (charging start-off).
この第2実施形態によれば、第1実施形態と同様の効果が得られるうえ、更に以下に示す効果が得られる。
(6)プリンター11のCPU24は、USB接続中はホスト装置30から定期的に送られてくるはずのSOF信号が送られてこなくなって第2設定時間T2に亘り途絶えると、CPU24及び制御IC22の電源をオフにする。すなわち、SOF信号を第2設定時間T2に亘り受信しなくなると、初期処理の失敗と判断して、CPU24及び制御IC22の電源をオフにし、二次電池14の充電を止めることができる。このため、制御回路13が初期処理の失敗が分からず電源オン状態のまま放置される事態を回避できる。
According to the second embodiment, the same effects as those of the first embodiment can be obtained, and the following effects can be further obtained.
(6) When the CPU 24 of the printer 11 stops receiving the SOF signal that should be sent periodically from the host device 30 during the USB connection and stops for the second set time T2, the power of the CPU 24 and the control IC 22 is turned off. Turn off. That is, when the SOF signal is not received for the second set time T2, it is determined that the initial process has failed, the power of the CPU 24 and the control IC 22 can be turned off, and the charging of the secondary battery 14 can be stopped. For this reason, it is possible to avoid a situation in which the control circuit 13 is left in a power-on state without knowing the failure of the initial process.
(7)CPU24の起動時点からタイムアウト時間T1を待つことなく、初期処理に失敗した時点でほぼリアルタイムにCPU24及び制御IC22を電源オフ状態に移行させることができる。このため、初期処理が失敗であるときの制御回路13の電源オン時間(起動時間)をより短くすることができ、制御回路13が起動状態に放置されることによる二次電池14の残量の低減を一層抑制できる。 (7) The CPU 24 and the control IC 22 can be shifted to the power-off state almost in real time when the initial process fails without waiting for the timeout time T1 from the time when the CPU 24 is activated. For this reason, the power-on time (start-up time) of the control circuit 13 when the initial process is unsuccessful can be shortened, and the remaining amount of the secondary battery 14 due to the control circuit 13 being left in the start-up state can be reduced. Reduction can be further suppressed.
なお、上記各実施形態は以下のような形態に変更したり、これらを組み合わせたりすることもできる。
・ユーザーの動作環境に応じてタイムアウト時間を変更できるようにしてもよい。データの入力のために操作される操作部の一例としての操作スイッチ20Bを備え、制御回路13は、タイムアウトと判定する際に用いるタイムアウト時間T1を、操作スイッチ20Bの操作に基づき設定できる構成としてもよい。この場合、操作スイッチ20Bの操作によりタイムアウト時間T1を数値で入力設定してもよいし、タイムアウト時間T1の選択肢の中から所望の一つを選択する構成としてもよい。この構成によれば、操作スイッチ20Bの操作に基づいて、ユーザーが使用環境に合った適切なタイムアウト時間T1を設定することができる。よって、使用されるホスト装置30のBIOS起動所要時間に合っていない短過ぎるタイムアウト時間が変更不能な状態で設定されているために、充電できるにも拘らずホスト装置30の起動途中でタイムアウトと判断されてしまい充電されない不都合を減らすことができる。この結果、二次電池14が充電される頻度を高めることができる。
In addition, each said embodiment can also be changed into the following forms, or can also combine these.
-You may enable it to change timeout time according to a user's operating environment. An operation switch 20B as an example of an operation unit operated for data input is provided, and the control circuit 13 may be configured to set a timeout time T1 used when determining a timeout based on the operation of the operation switch 20B. Good. In this case, the timeout time T1 may be input and set as a numerical value by operating the operation switch 20B, or a desired one may be selected from the options of the timeout time T1. According to this configuration, it is possible for the user to set an appropriate timeout time T1 suitable for the usage environment based on the operation of the operation switch 20B. Therefore, since the timeout time that is too short that does not match the BIOS startup time of the host device 30 to be used is set in an unchangeable state, the host device 30 is determined to time out during startup even though it can be charged. Inconvenience that the battery is not charged can be reduced. As a result, the frequency with which the secondary battery 14 is charged can be increased.
・タイムアウト時間T1を一定値としたが可変としてもよい。制御回路13は、USBコネクター12が接続している相手が第2種の装置の一例であるホスト装置30であるときは、ホスト装置30から起動所要時間情報を取得するか、又はホスト装置30の起動所要時間を制御回路13内のタイマーで計時するかして取得し、その取得した起動所要時間に応じてタイムアウト時間T1を設定してもよい。この構成によれば、制御回路13は、取得した起動所要時間に応じたタイムアウト時間T1を設定できるので、ユーザーの使用環境に合った適切なタイムアウト時間T1を設定することができる。このため、ホスト装置30の起動所要時間に合っていない短過ぎるタイムアウト時間が設定されているために、ホスト装置30の起動途中でタイムアウトと判断されてしまい、充電できたにも拘らず充電されない不都合を減らすことができる。この結果、電池14が充電される頻度を高めることができる。また、制御回路13は、最大M個の起動所要時間のデータをメモリー25に記憶し、新規の起動所要時間を取得する度にM個を超える過去のデータのうち一番旧いデータを消去し、M個のうち最も長い起動所要時間に応じてタイムアウト時間を設定する。また、過去M個のうち予め設定された最長設定時間を超えるデータは採用せず、最長設定時間以下の起動所要時間のデータのうち最も長い起動所要時間に応じてタイムアウト時間T1を設定してもよい。これらの構成であれば、ユーザーがたまたま1回だけ起動所要時間の非常に長いホスト装置30をプリンター11に接続したために、そのホスト装置30の非常に長い起動所要時間に基づく長過ぎるタイムアウト時間が設定されることを回避しつつ、適切なタイムアウト時間T1を設定できる。 Although the timeout time T1 is a constant value, it may be variable. When the partner to which the USB connector 12 is connected is the host device 30 which is an example of the second type device, the control circuit 13 acquires the required start time information from the host device 30 or the host device 30 The required start time may be obtained by counting with a timer in the control circuit 13, and the timeout time T1 may be set according to the acquired required start time. According to this configuration, the control circuit 13 can set the timeout time T1 according to the acquired required startup time, and thus can set an appropriate timeout time T1 suitable for the use environment of the user. For this reason, since a timeout time that is too short that does not match the required startup time of the host device 30 is set, it is determined that a timeout has occurred during the startup of the host device 30, and charging is not performed despite being able to be charged. Can be reduced. As a result, the frequency with which the battery 14 is charged can be increased. In addition, the control circuit 13 stores the data of the maximum M required startup times in the memory 25, and erases the oldest data among the past data exceeding M each time a new startup required time is acquired. A timeout time is set according to the longest required startup time among the M. In addition, data exceeding the preset maximum set time among the past M pieces is not adopted, and the timeout time T1 is set according to the longest required start time among the data of the required start time less than the maximum set time. Good. With these configurations, since the host device 30 that happens to have a very long startup time is connected to the printer 11 only once, an excessively long timeout time based on the very long startup time of the host device 30 is set. It is possible to set an appropriate timeout time T1 while avoiding this.
・制御回路13は、二次電池14の残量又は残量の変化を示す値を計測し、二次電池14の残量又は残量の変化を示す値が閾値を超えると、初期処理に失敗したと判断してもよい。この場合、二次電池の残量の変化を示す値は、変化量でもよいし変化率でもよい。この構成によれば、制御回路13は、二次電池14の残量又は残量の変化を示す値(例えば変化量又は変化率)が閾値を超えたことをもって、初期処理に失敗したと判断する。このため、タイマー等の計時手段を用いなくても初期処理の失敗を判定することができる。また、残量の変化率を用いた場合、二次電池14の残量が相対的に少ないときは相対的に早めに初期処理の失敗と判断され、二次電池14の残量が相対的に多いときは相対的に遅めに初期処理の失敗と判断される。このため、二次電池14の残量が少ないにも拘らず、初期処理の失敗の判断が遅れて残量が極めて少なくなる事態を回避し易い。また、二次電池14の残量に応じてタイムアウト時間T1を設定した場合、例えば二次電池14の残量が閾値未満と少ない場合はタイムアウト時間T1を相対的に短く設定し、その残量が多い場合はタイムアウト時間T1を相対的に長く設定してもよい。 The control circuit 13 measures a value indicating the remaining amount of the secondary battery 14 or a change in the remaining amount, and if the value indicating the remaining amount of the secondary battery 14 or the change in the remaining amount exceeds a threshold value, the initial process fails. You may judge that you did. In this case, the value indicating the change in the remaining amount of the secondary battery may be a change amount or a change rate. According to this configuration, the control circuit 13 determines that the initial process has failed when a value indicating the remaining amount of the secondary battery 14 or a change in the remaining amount (for example, a change amount or a change rate) exceeds a threshold value. . For this reason, it is possible to determine the failure of the initial process without using a timer such as a timer. Further, when the remaining rate of change is used, when the remaining amount of the secondary battery 14 is relatively small, it is determined that the initial process has failed relatively early, and the remaining amount of the secondary battery 14 is relatively If there are many, it is determined that the initial processing has failed relatively late. For this reason, although the remaining amount of the secondary battery 14 is small, it is easy to avoid a situation where the determination of the failure of the initial process is delayed and the remaining amount becomes extremely small. Further, when the timeout time T1 is set according to the remaining amount of the secondary battery 14, for example, when the remaining amount of the secondary battery 14 is less than the threshold, the timeout time T1 is set relatively short, and the remaining amount is If there are many, the timeout time T1 may be set relatively long.
・タイムアウト時間T1は、接続が想定される複数種のホスト装置30のうち最も長い起動所要時間(BIOS起動所要時間)に応じた値に設定することが好ましいが、ホスト装置のBIOS起動所要時間と同じ時間又はBIOS起動所要時間よりも短い時間を設定してもよい。例えばBIOS起動所要時間の1/2又は1/3の時間でもよい。また、BIOS起動所要時間を考慮しないタイムアウト時間T1を設定してもよい。例えばタイムアウト時間T1をエニュメレーション所要時間以上、エニュメレーション所要時間に所定のマージン時間(例えば1〜10秒)を加えた時間以下の値に設定してもよい。 The timeout time T1 is preferably set to a value corresponding to the longest startup required time (BIOS startup required time) among a plurality of types of host devices 30 that are assumed to be connected. The same time or a time shorter than the BIOS startup time may be set. For example, it may be 1/2 or 1/3 of the BIOS startup time. Moreover, you may set timeout time T1 which does not consider BIOS starting required time. For example, the timeout time T1 may be set to a value not less than the enumeration required time and not more than a time obtained by adding a predetermined margin time (for example, 1 to 10 seconds) to the enumeration required time.
・計時時間Tの計時開始時期は、CPUの起動時点(充電起動オン時点)に限定されない。例えばUSB接続時点(例えばUSB接続検出時点)に、タイマー24Aの計時を開始してもよい。この場合、例えば制御IC22内のタイマー(例えばカウンター)により計時を行えば、CPUの起動前であっても計時を開始できる。また、CPU起動時点から所定時間経過時点にタイマーの計時を開始させてもよい。例えばプリンター情報(構成情報)の送信時点からタイマーによる計時を開始してもよい。 The timing for starting the timing T is not limited to the time when the CPU is activated (the time when charging is activated). For example, the timer 24A may start timing at the time of USB connection (for example, when USB connection is detected). In this case, for example, if the time is measured by a timer (for example, a counter) in the control IC 22, the time can be started even before the CPU is activated. Alternatively, the timer may be started when a predetermined time elapses from the CPU activation time. For example, the time measurement by the timer may be started from the transmission time point of the printer information (configuration information).
・第2実施形態において、ホスト装置30が、USB接続中に定期的にSOF信号をUSBデバイス11Aに送信することが前提であれば、図6に示すフローチャートにおいてタイムアウトであるか否かを判断する処理(S22)を廃止してもよい。 In the second embodiment, if it is assumed that the host device 30 periodically transmits an SOF signal to the USB device 11A during USB connection, it is determined whether or not a timeout has occurred in the flowchart shown in FIG. The process (S22) may be abolished.
・USB規格はUSB2.0に限定されることなく、USB3.0、USB3.1に適用してもよい。また、USB1.0やUSB1.1に適用してもよい。また、USB規格に限定されず、他の通信規格に適用してもよい。要するに、ホスト装置と電子機器との間で初期処理が行われ、初期処理完了通知(USB規格の「Set Configuration」に相当する通知)の受信をトリガーにして初期処理が完了し、この初期処理の完了をもってホスト装置から充電に必要な電力の供給を受ける構成であれば、他の通信規格でもよい。例えばIEEE1394、SCSI、ATAでもよい。また、通信方式は有線通信方式に限定されず、ホスト装置から電子機器への電源供給が可能な限りにおいて無線通信方式でもよい。 The USB standard is not limited to USB 2.0, but may be applied to USB 3.0 and USB 3.1. Moreover, you may apply to USB1.0 or USB1.1. Further, the present invention is not limited to the USB standard, and may be applied to other communication standards. In short, the initial processing is performed between the host device and the electronic device, and the initial processing is completed by receiving the initial processing completion notification (notification corresponding to “Set Configuration” of the USB standard) as a trigger. Any other communication standard may be used as long as it is configured to receive power necessary for charging from the host device upon completion. For example, IEEE1394, SCSI, or ATA may be used. The communication method is not limited to the wired communication method, and may be a wireless communication method as long as power can be supplied from the host device to the electronic device.
・電源スイッチ20Aは、プッシュ式に限定されず、トグル式でもよい。その他、電源のオンとオフを切り替え可能に操作されるスイッチであればよい。また、センサー式の電源スイッチでもよく、接触センサー式又は非接触センサー式の電源スイッチでもよい。 The power switch 20A is not limited to the push type, and may be a toggle type. In addition, any switch that can be operated so as to be able to switch the power on and off may be used. Further, a sensor type power switch may be used, and a contact sensor type or non-contact sensor type power switch may be used.
・制御回路を、ハードウェアで構成される制御IC22と、プログラムを実行するCPUによるソフトウェアとを備えた構成としたが、制御IC22やASIC等の電子回路によりハードウェアで実現したり、ソフトウェアのみにより実現したりしてもよい。 The control circuit is configured to include a control IC 22 configured by hardware and software by a CPU that executes a program. However, the control circuit may be realized by hardware using an electronic circuit such as the control IC 22 or ASIC, or only by software. It may be realized.
・プリンター(印刷装置)は、印刷専用機に限らず、コピー機能やスキャナー機能を備えた複合機であってもよい。さらに、プリンターは、シリアルプリンター、ラインプリンターの他、ページプリンターのいずれであってもよい。また、プリンターは、携帯型、小型、中型プリンター及び大型プリンターでもよい。例えばビジネス用プリンターや大判プリンターでもよい。 The printer (printing apparatus) is not limited to a dedicated printing machine, but may be a multifunction machine having a copy function and a scanner function. Furthermore, the printer may be any of a page printer in addition to a serial printer and a line printer. The printer may be a portable type, a small size, a medium size printer, or a large size printer. For example, a business printer or a large format printer may be used.
・電子機器は、プリンター(複合機を含む。)に限らず、スキャナー、プロジェクター、デジタルカメラ(撮影装置)、デジタルオーディオ装置(音響機器)などであってもよい。 The electronic device is not limited to a printer (including a multifunction device) but may be a scanner, a projector, a digital camera (imaging device), a digital audio device (acoustic device), or the like.
11…電子機器の一例としてのプリンター、12…通信回路の一例としてのUSBコネクター、13…制御回路、14…充電式の電池の一例としての二次電池、15…駆動回路、16…印刷機構、20A…電源スイッチ、20B…操作部の一例としての操作スイッチ、22…判定回路の一例としての制御IC、23…電源回路、24…処理回路の一例としてのCPU、25…メモリー、26…第1スイッチ、30…外部装置及び第2種の装置の一例としてのホスト装置、35…通信ケーブル、40…外部装置及び第1種の装置の一例としてのUSBバッテリーチャージャー、T1…タイムアウト時間の一例としての設定タイムアウト時間、T2…第2設定時間。 DESCRIPTION OF SYMBOLS 11 ... Printer as an example of an electronic device, 12 ... USB connector as an example of a communication circuit, 13 ... Control circuit, 14 ... Secondary battery as an example of a rechargeable battery, 15 ... Drive circuit, 16 ... Printing mechanism, 20A ... Power switch, 20B ... Operation switch as an example of an operation unit, 22 ... Control IC as an example of a determination circuit, 23 ... Power supply circuit, 24 ... CPU as an example of a processing circuit, 25 ... Memory, 26 ... First Switch, 30 ... host device as an example of external device and second type device, 35 ... communication cable, 40 ... USB battery charger as an example of external device and first type device, T1 ... as an example of timeout time Setting timeout time, T2 ... second setting time.
Claims (9)
制御回路と、
電源スイッチと、を備え、
前記電源スイッチがオフ状態で前記通信回路が外部装置と接続した場合に、前記制御回路は、前記通信回路が接続している相手が第1種の装置であれば、初期処理を行わずに前記通信回路が受け取った電力で充電式の電池に充電を行い、
前記通信回路が接続している相手が第2種の装置であれば、初期処理を行い、当該初期処理が完了した後に、前記電池に充電を行い、
前記通信回路が接続している相手が第2種の装置であり、初期処理に失敗したときは、前記電池に充電を行わない、ことを特徴とする充電装置。 A communication circuit connected to an external device for communication and receiving power supply;
A control circuit;
A power switch, and
When the communication circuit is connected to an external device in a state where the power switch is off, the control circuit can perform the initial processing without performing initial processing if the counterpart to which the communication circuit is connected is the first type device. Charge the rechargeable battery with the power received by the communication circuit,
If the other party to which the communication circuit is connected is a second type device, perform an initial process, and after completing the initial process, charge the battery,
The charging device is characterized in that the battery connected to the communication circuit is a second type device, and the battery is not charged when the initial process fails.
前記処理回路が動作する場合には、前記通信回路が初期処理前に受け取る電力以上の電力を消費し、
前記電源スイッチがオフ状態で前記通信回路が外部装置と接続した場合に、
前記判定回路は前記通信回路が初期処理前に受け取る電力によって動作して前記通信回路が接続している相手を判定し、
前記通信回路が接続している相手が第1種の装置と判定すれば、前記処理回路を電源オフ状態に維持し、
前記通信回路が接続している相手が第2種の装置と判定すれば、前記処理回路を電源オン状態に移行させることを特徴とする請求項1に記載の充電装置。 The control circuit includes a determination circuit that determines a partner to which the communication circuit is connected, and a processing circuit that executes at least a part of the initial processing.
When the processing circuit operates, consume more power than the power received by the communication circuit before initial processing,
When the communication circuit is connected to an external device when the power switch is off,
The determination circuit is operated by the power received by the communication circuit before initial processing to determine a partner to which the communication circuit is connected,
If the partner to which the communication circuit is connected is determined to be the first type device, the processing circuit is maintained in a power-off state,
2. The charging device according to claim 1, wherein if the counterpart to which the communication circuit is connected is determined to be a second type device, the processing circuit is shifted to a power-on state.
前記制御回路が前記タイムアウトの発生を判定する際に用いるタイムアウト時間は、前記操作部の操作に基づいて設定されることを特徴とする請求項3又は5に記載の充電装置。 It has an operation unit that is operated to input data,
6. The charging device according to claim 3, wherein a timeout time used when the control circuit determines occurrence of the timeout is set based on an operation of the operation unit.
Priority Applications (4)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2014110292A JP6277866B2 (en) | 2014-05-28 | 2014-05-28 | Charging device and electronic device |
| CN201510266645.4A CN105278650B (en) | 2014-05-28 | 2015-05-22 | Electronic equipment |
| CN201811060864.7A CN109308111B (en) | 2014-05-28 | 2015-05-22 | Electronic device |
| US14/724,493 US9665150B2 (en) | 2014-05-28 | 2015-05-28 | Electronic device with a control circuit to detect and establish a connection to host device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2014110292A JP6277866B2 (en) | 2014-05-28 | 2014-05-28 | Charging device and electronic device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2015226389A JP2015226389A (en) | 2015-12-14 |
| JP6277866B2 true JP6277866B2 (en) | 2018-02-14 |
Family
ID=54842829
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2014110292A Active JP6277866B2 (en) | 2014-05-28 | 2014-05-28 | Charging device and electronic device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP6277866B2 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP6631411B2 (en) | 2016-05-24 | 2020-01-15 | コニカミノルタ株式会社 | Maintenance support apparatus, image forming apparatus, maintenance support method, and computer program |
| JP7443074B2 (en) * | 2020-01-31 | 2024-03-05 | キヤノン株式会社 | Information processing device and control method |
Family Cites Families (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2002244775A (en) * | 2001-02-15 | 2002-08-30 | Matsushita Electric Ind Co Ltd | USB device |
| GB2402271B (en) * | 2003-05-27 | 2006-04-19 | Research In Motion Ltd | Method and apparatus for handling a charging state in a mobile electronic device |
| EP2562618A3 (en) * | 2004-02-17 | 2013-05-22 | Research In Motion Limited | Method and apparatus for handling a charging state in a mobile electronic device |
| US8352644B2 (en) * | 2009-11-23 | 2013-01-08 | Qualcomm Incorporated | Apparatus and methods for USB connection in a multi-processor device |
| JP2011139251A (en) * | 2009-12-28 | 2011-07-14 | Panasonic Corp | Electronic equipment |
| JP2012203765A (en) * | 2011-03-28 | 2012-10-22 | Kyocera Corp | Portable electronic apparatus, charge control method, and charge control program |
| JP2013078163A (en) * | 2011-09-29 | 2013-04-25 | Renesas Electronics Corp | Semiconductor device and electronic circuit device |
| JP2014021807A (en) * | 2012-07-20 | 2014-02-03 | Jvc Kenwood Corp | Electronic device and start-up control method |
-
2014
- 2014-05-28 JP JP2014110292A patent/JP6277866B2/en active Active
Also Published As
| Publication number | Publication date |
|---|---|
| JP2015226389A (en) | 2015-12-14 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US9665150B2 (en) | Electronic device with a control circuit to detect and establish a connection to host device | |
| US11223734B2 (en) | Information processing apparatus, method of controlling information processing apparatus, and non-transitory computer-readable recording medium | |
| US11165923B2 (en) | Information processing apparatus having at least one interface for electric power transfer, method of controlling information processing apparatus to transfer electric power to an external device, and non-transitory computer-readable recording medium | |
| US11226670B2 (en) | Information processing apparatus, method of controlling the same, and non-transitory storage medium storing program executable by the information processing apparatus | |
| US10824381B2 (en) | Image forming apparatus forming images based on received image data, terminal device transmitting image data to the image forming apparatus, image forming system including image forming apparatus and terminal device, and non-transitory computer readable medium | |
| US11209881B2 (en) | Information processing apparatus, control method of information processing apparatus, and program to transmit a power request to an external device | |
| JP7225850B2 (en) | Information processing device, control method for information processing device, and program | |
| JP2018006998A (en) | Communication device, control method, and program | |
| US20130061079A1 (en) | Image processing apparatus, method for controlling the same and storage medium | |
| US8817287B2 (en) | Image forming apparatus, method for controlling the same, and storage medium | |
| JP2016004516A (en) | Electronic device | |
| JP6277866B2 (en) | Charging device and electronic device | |
| JP2020166486A (en) | Information processing device, control method of information processing device, and program | |
| JP6432144B2 (en) | Printing device | |
| JP6364991B2 (en) | Electronics | |
| US9924059B2 (en) | Apparatus having power-saving function, method of processing information, and computer program product | |
| US20180267811A1 (en) | Electronic apparatus and control method of the same | |
| CN106796559B (en) | Method of controlling image forming apparatus connected to external equipment through external equipment interface unit, and image forming apparatus using the same | |
| US20250199731A1 (en) | Printing apparatus, control method for printing apparatus, and information processing apparatus | |
| JP2015214113A (en) | Image forming apparatus | |
| JP6101673B2 (en) | Image forming apparatus, terminal apparatus, image forming system, and computer program | |
| CN119872099A (en) | Printing apparatus, control method, storage medium, and computer program product | |
| US20160239447A1 (en) | Data acquisition system, electronic device, and data acquisition terminal | |
| JP2025006050A (en) | Printer | |
| US20190081500A1 (en) | Information processing apparatus and charging method therefor |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20170306 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20171219 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20171220 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20180101 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 6277866 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |