JP2010044480A - Hardware reset method for control circuit, and electronic apparatus - Google Patents

Hardware reset method for control circuit, and electronic apparatus Download PDF

Info

Publication number
JP2010044480A
JP2010044480A JP2008206644A JP2008206644A JP2010044480A JP 2010044480 A JP2010044480 A JP 2010044480A JP 2008206644 A JP2008206644 A JP 2008206644A JP 2008206644 A JP2008206644 A JP 2008206644A JP 2010044480 A JP2010044480 A JP 2010044480A
Authority
JP
Japan
Prior art keywords
power
reset
control circuit
power supply
command
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.)
Granted
Application number
JP2008206644A
Other languages
Japanese (ja)
Other versions
JP5206213B2 (en
Inventor
Hiroyuki Motoyama
浩之 本山
Jinichi Takizawa
仁一 滝沢
Minoru Nagaoka
稔 長岡
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2008206644A priority Critical patent/JP5206213B2/en
Publication of JP2010044480A publication Critical patent/JP2010044480A/en
Application granted granted Critical
Publication of JP5206213B2 publication Critical patent/JP5206213B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To propose a hardware reset method for a control circuit, allowing a hardware reset based on a reset instruction even when operation when the reset instruction is issued is set to power-off operation of turning off a power supply by a manual changeover switch. <P>SOLUTION: The power-off operation is started when the reset instruction is issued when the dip switch 5 is set to the power-off operation, so that power supply voltage gradually falls. Here, when the issued reset instruction is a reset instruction issued by a CPU 3 itself, the hardware reset is executed. Before the power supply voltage during the fall reaches a prescribed value, the power supply voltage is made to return to an original value. As a result, the hardware reset of the CPU 3 can be performed without turning off the power supply. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、電源スイッチなどの1つの操作スイッチを操作したときに行なわれる動作を、制御回路のハードウエアリセットを行うためのリセット動作および電源をオフにする電源オフ動作のいずれか一方の動作に設定することが可能な電子機器における制御回路のハードウエアリセット方法、および、電子機器に関する。   According to the present invention, an operation performed when one operation switch such as a power switch is operated is changed to one of a reset operation for performing a hardware reset of the control circuit and a power off operation for turning off the power. The present invention relates to a hardware reset method for a control circuit in an electronic device that can be set, and the electronic device.

プリンタなどの電子機器の電源供給回路は、交流電圧を直流電圧に変換してモータ等の駆動系には24Vを供給し、CPUなどの制御系には5V或いは3.3Vを供給している。このような電源供給回路は整流用や電源電圧の降下防止用のためのコンデンサを備えているので、電源スイッチが操作されることによって電源をオフする電源オフ動作が行われると、電源電圧は電源供給回路に含まれる静電容量によって一定時間をかけて下降し、しかる後に電源がオフになる。特許文献1には、このような電源供給装置の電源供給回路から残留電荷を短時間で放出する技術が記載されている。特許文献2には、このような電源供給回路の放電時定数を大きくする技術が記載されている。   A power supply circuit of an electronic device such as a printer converts an AC voltage into a DC voltage, supplies 24 V to a drive system such as a motor, and supplies 5 V or 3.3 V to a control system such as a CPU. Since such a power supply circuit includes a capacitor for rectification and prevention of a drop in the power supply voltage, when the power supply is turned off by operating the power switch, the power supply voltage is The power supply is lowered over a certain period of time due to the capacitance included in the supply circuit, and then the power is turned off. Japanese Patent Application Laid-Open No. 2004-151561 describes a technique for discharging residual charges in a short time from a power supply circuit of such a power supply device. Patent Document 2 describes a technique for increasing the discharge time constant of such a power supply circuit.

情報機器に中には、電源スイッチを操作することによって、電源をオフする電源オフ動作と、制御回路をハードウエアリセットするリセット動作とを選択的に行うことができるように構成されているものがある。例えば、特許文献3に記載されている情報機器では、電源スイッチが押し込まれてから所定時間内にその押し込みが解除されると電源オフ動作が行われ、所定時間以上押し込みが継続されるとリセット動作が行われる。
特開2007−202247号公報 特開平07−141064号公報 国際公開W02004/021154号
Some information devices are configured so that a power-off operation for turning off the power and a reset operation for hardware resetting the control circuit can be selectively performed by operating a power switch. is there. For example, in the information device described in Patent Document 3, the power-off operation is performed when the power switch is pressed and the pressing is released within a predetermined time, and the reset operation is performed when the pressing is continued for a predetermined time or more. Is done.
JP 2007-202247 A Japanese Patent Application Laid-Open No. 07-144104 International Publication No. W02004 / 021154

プリンタなどの電子機器においては、ディップスイッチなどの手動切換スイッチによって、電源スイッチを操作したときに行われる動作を電源オフ動作およびリセット動作のいずれか一方の動作に設定するものが提案されている。   In an electronic device such as a printer, a device that sets an operation performed when a power switch is operated to one of a power-off operation and a reset operation by a manual changeover switch such as a dip switch has been proposed.

このようなプリンタでは、手動切換スイッチによって電源オフ動作が行われるように設定されている場合には、電源スイッチが操作されて所定の制御指令が発行されると、電源オフ動作が行われて電源がオフになる。一方、手動切換スイッチによってリセット動作が行われるように設定されている場合には、電源スイッチが操作されて所定の制御指令が発行されると、リセット動作が行われて制御回路がハードウエアリセットされる。すなわち、電源のオフを指示する制御指令とハードウエアリセットを指示する制御指令とは同じ所定の制御指令であり、手動切換スイッチによってその動作が決定されている。   In such a printer, when it is set so that the power-off operation is performed by the manual changeover switch, when the power switch is operated and a predetermined control command is issued, the power-off operation is performed and the power is turned off. Turns off. On the other hand, when it is set so that the reset operation is performed by the manual changeover switch, when the power switch is operated and a predetermined control command is issued, the reset operation is performed and the control circuit is hardware reset. The That is, the control command for instructing to turn off the power and the control command for instructing the hardware reset are the same predetermined control commands, and their operations are determined by the manual changeover switch.

ここで、制御回路で修復不可能なエラーが発生したと判断された場合や、メモリ上でファームウエアの更新が行われた場合などには、制御回路が自らハードウエアリセットを指示する制御指令を発行することがある。しかし、手動切換スイッチで設定されている動作が電源オフ動作の場合には、制御回路がハードウエアリセットを行おうとしても電源オフ動作が行われてしまうので、リセット動作を行うことができないという問題がある。   Here, when it is determined that an error that cannot be repaired has occurred in the control circuit, or when firmware has been updated in the memory, the control circuit issues a control command for instructing the hardware reset itself. May be issued. However, if the operation set with the manual selector switch is a power-off operation, the power-off operation will be performed even if the control circuit attempts to perform a hardware reset, so the reset operation cannot be performed. There is.

本発明の課題は、このような点に鑑みて、リセット指令(電源スイッチの操作による制御指令、制御回路が自らハードウエアリセットを指示する制御指令)が発行されたときの動作が手動切換スイッチによって電源をオフする動作に設定されている場合でも、電源をオフせずリセット指令に基づいてハードウエアリセットを行うことができるプリンタなどの電子機器における制御回路のハードウエアリセット方法、および、プリンタなどの電子機器を提案することにある。   In view of the above, the problem of the present invention is that the operation when a reset command (a control command by operating a power switch, a control command by which the control circuit instructs a hardware reset itself) is issued by a manual switch. A hardware reset method for a control circuit in an electronic device such as a printer capable of performing a hardware reset based on a reset command without turning off the power even when the power is set to be turned off. To propose electronic equipment.

上記課題を解決するために、本発明は、制御回路のハードウエアリセットまたは電源オフを行うためのリセット指令が発行されたときに、前記ハードウエアリセットを行うリセット動作および前記電源オフにする電源オフ動作のいずれか一方の動作が行われるように手動切換スイッチによって設定することが可能になっており、前記電源オフ動作が行われると電源電圧が一定時間をかけて降下して電源がオフになる電子機器における制御回路のハードウエアリセット方法であって、
前記リセット指令が発行されると、
前記手動切換スイッチの設定を確認し、
前記手動切換スイッチによって前記電源オフ動作が行われるように設定されている場合には、電源オフ動作を開始し、
前記リセット指令が、所定の制御指令が前記制御回路に入力されることによって発行されたものか、または、前記制御回路が自ら発行したものか、を判定し、
前記制御回路が自ら前記リセット指令を発行している場合には、前記電源オフ動作によって降下中の前記電源電圧が所定値に達する前に、前記リセット動作を開始するとともに、前記電源電圧を元の値に復帰させることを特徴とする。
In order to solve the above problems, the present invention provides a reset operation for performing a hardware reset and a power-off for turning off the power when a reset command for performing a hardware reset or power-off of a control circuit is issued. It can be set by a manual changeover switch so that either one of the operations is performed. When the power-off operation is performed, the power supply voltage drops over a certain period of time and the power is turned off. A hardware reset method for a control circuit in an electronic device,
When the reset command is issued,
Check the manual switch setting,
In the case where the power-off operation is set to be performed by the manual changeover switch, the power-off operation is started,
Determining whether the reset command is issued when a predetermined control command is input to the control circuit, or whether the control circuit is issued by itself;
When the control circuit issues the reset command itself, the reset operation is started before the power supply voltage that is dropping due to the power-off operation reaches a predetermined value, and the power supply voltage is It is characterized by returning to a value.

本発明によれば、リセット指令が発行されると手動切換スイッチの設定が確認され、手動切換スイッチの設定が電源オフ動作になっている場合には電源オフ動作が開始される。また、そのリセット指令が、所定の制御指令が制御回路に入力されることによって発行されたものか、または、制御回路が自ら発行したものかが判定され、リセット指令を制御回路が自ら発行している場合にはリセット動作が開始される。そして、リセット指令を制御回路が自ら発行している場合には、電源オフ動作によって降下中の電源電圧が所定値に達する前に、電源電圧を元の値に復帰させる。すなわち、電源オフ動作が行われると、電子機器の電源供給回路に含まれている静電容量によって電源電圧は一定時間をかけて漸次に下降していくので、電源電圧が制御回路にハードウエアリセットを行わせるのに必要な所定値よりも低くなる前に電源電圧を元の値に戻す。この結果、電源をオフにすることなくハードウエアリセットを行うことができるので、制御回路を初期化状態に移行させることができる。従って、制御回路で復帰不可能なエラーが発生した場合やファームウエアの更新を行った場合などに、制御回路の要求によるリセット指令が発行された場合には、手動切換スイッチの設定にかかわらずハードウエアリセットを行うことができる。   According to the present invention, when the reset command is issued, the setting of the manual changeover switch is confirmed, and when the setting of the manual changeover switch is the power-off operation, the power-off operation is started. In addition, it is determined whether the reset command is issued when a predetermined control command is input to the control circuit, or is issued by the control circuit itself, and the reset command is issued by the control circuit itself. If it is, the reset operation is started. When the control circuit issues the reset command itself, the power supply voltage is returned to the original value before the power supply voltage that is dropping due to the power-off operation reaches a predetermined value. In other words, when the power is turned off, the power supply voltage gradually decreases over a certain period of time due to the capacitance contained in the power supply circuit of the electronic device, so the power supply voltage is reset to the control circuit by hardware. The power supply voltage is returned to the original value before becoming lower than a predetermined value necessary for performing the operation. As a result, a hardware reset can be performed without turning off the power, and the control circuit can be shifted to the initialized state. Therefore, if an unrecoverable error occurs in the control circuit or if a firmware update is performed, etc., if a reset command is issued due to a request from the control circuit, the hardware will not be affected regardless of the manual switch setting. Wear reset can be performed.

また、本発明は、リセット指令が発行されたときに、電源のオフを開始する制御回路のハードウエアリセット方法であって、
前記リセット指令を前記制御回路が自ら発行している場合、または所定の設定がされている場合には、
前記電源のオフを開始した後、降下中の前記電源の電圧が所定値に達する前に、前記制御回路のハードウエアリセットを開始するとともに、前記電源の電圧を復帰させることを特徴とする。
Further, the present invention is a hardware reset method for a control circuit that starts turning off a power supply when a reset command is issued,
When the control circuit issues the reset command itself, or when a predetermined setting is made,
A hardware reset of the control circuit is started and the voltage of the power supply is restored after the power supply is turned off and before the voltage of the power supply being lowered reaches a predetermined value.

本発明によれば、リセット指令が発行されると電源オフが開始される。また、そのリセット指令が、制御回路が自ら発行している場合、または所定の設定がされている場合には、電源オフによって降下中の電源電圧が所定値に達する前に、リセット動作が開始されるとともに、電源電圧を元の値に復帰させる。電源オフが行われると、制御回路および基板に含まれている静電容量成分によって電源電圧は所定時間をかけて漸次に下降していく。このとき、電源電圧が制御回路の動作電圧の下限値に降下するまでの期間において、制御回路の動作を継続しながら電源電圧を元の値に戻す制御が可能である。この期間においてハードウエアリセットを行えば、電源を完全にオフにすることなく、ハードウエアリセットを行うことができることになる。すなわち、本来、制御回路の電源オフを行うためのリセット指令ではあるが、電源を完全にオフすることなく、制御回路を継続的に動作可能な電圧を維持しつつ、ハードウエアリセットを行うことができる。電源オフとハードウエアリセットのいずれも可能となる。   According to the present invention, when a reset command is issued, power off is started. In addition, when the reset command is issued by the control circuit itself or when a predetermined setting is made, the reset operation is started before the power supply voltage dropping due to power-off reaches a predetermined value. In addition, the power supply voltage is restored to the original value. When the power is turned off, the power supply voltage gradually decreases over a predetermined time due to the electrostatic capacity component included in the control circuit and the substrate. At this time, during the period until the power supply voltage drops to the lower limit value of the operating voltage of the control circuit, it is possible to control the power supply voltage to the original value while continuing the operation of the control circuit. If a hardware reset is performed during this period, the hardware reset can be performed without completely turning off the power. In other words, it is originally a reset command for powering off the control circuit, but it is possible to perform a hardware reset while maintaining a voltage that allows the control circuit to operate continuously without completely turning off the power. it can. Both power off and hardware reset are possible.

制御回路が自ら発行する場合とは、メモリ上のファームやデータの書換えを行ったり、メモリエラーになったりした場合などの後に、制御回路の命令でハードウエアリセットのトリガとなる信号を発生させる場合である。所定の設定は、ディップスイッチやメモリスイッチなどで設定可能である。   The case where the control circuit issues itself is when a signal that triggers a hardware reset is generated by an instruction of the control circuit after a firmware or data rewrite in the memory or when a memory error occurs. It is. The predetermined setting can be set with a dip switch, a memory switch, or the like.

本発明において、前記所定の制御指令は接続されている外部機器からコマンドとして制御回路入力されることもあるが、前記所定の制御指令は、操作スイッチを手動操作することによって前記制御回路に入力されるものとすることができる。   In the present invention, the predetermined control command may be input as a command from a connected external device as a command, but the predetermined control command is input to the control circuit by manually operating an operation switch. Can be.

本発明において、ハードウエアリセットが行われたことを制御回路が初期化状態に移行した後に認識するためには、前記リセット指令を前記制御回路が自ら発行していると判定された場合には、この判定結果を不揮発性メモリに書き込み、前記電源電圧が元の値に復帰すると、前記不揮発性メモリから前記判定結果を読み出して、前記判定結果に基づいて前記電源電圧を維持することが望ましい。このようにすれば、電源電圧が維持されるのでハードウエアリセットが終了した後に、電子機器を使用することができる。   In the present invention, in order to recognize that the hardware reset has been performed after the control circuit shifts to the initialization state, when it is determined that the control circuit is issuing the reset command itself, When the determination result is written in the nonvolatile memory and the power supply voltage returns to the original value, it is desirable to read the determination result from the nonvolatile memory and maintain the power supply voltage based on the determination result. In this way, since the power supply voltage is maintained, the electronic device can be used after the hardware reset is completed.

次に、本発明は、制御回路のハードウエアリセットまたは電源オフを行うためのリセット指令が発行されたときに、前記ハードウエアリセットを行うリセット動作および前記電源オフにする電源オフ動作のいずれか一方の動作が行われるように手動切換スイッチによって設定することが可能になっており、前記電源オフ動作が行われると電源電圧が一定時間をかけて降下して電源がオフになる電子機器であって、
前記リセット指令が発行されたときに、
前記手動切換スイッチの設定を確認する設定確認手段と、
前記手動切換スイッチによって前記電源オフ動作を行うことが設定されている場合に、前記リセット指令に基づいて前記電源オフ動作を行う電源オフ手段と、
前記リセット指令が、所定の制御指令が前記制御回路に入力されることによって発行されたものか、または、前記制御回路が自ら発行したものかを判定する判定手段と、
前記手動切換スイッチによって前記リセット動作を行うことが設定されている場合、または、前記リセット指令を前記制御回路が自ら発行している場合に前記リセット指令に基づいて前記リセット動作を行うリセット手段と、
前記手動切換スイッチにより電源オフ動作を行うことが設定されているときに前記リセット指令を前記制御回路が自ら発行している場合に、前記電源オフ動作によって降下中の前記電源電圧が所定値に達する前に当該電源電圧を元の値に復帰させる復帰手段と
を備えていることを特徴とする。
Next, the present invention provides either one of a reset operation for performing the hardware reset and a power off operation for turning off the power when a reset command for performing hardware reset or power off of the control circuit is issued. The electronic device can be set by a manual changeover switch so that the power is turned off, and when the power-off operation is performed, the power supply voltage drops over a certain time and the power is turned off. ,
When the reset command is issued,
Setting confirmation means for confirming the setting of the manual selector switch;
Power off means for performing the power off operation based on the reset command when the manual switch is set to perform the power off operation;
Determining means for determining whether the reset command is issued when a predetermined control command is input to the control circuit, or whether the control circuit is issued by itself;
When the manual changeover switch is set to perform the reset operation, or when the control circuit issues the reset command itself, a reset unit that performs the reset operation based on the reset command;
When the control circuit issues the reset command by itself when it is set to perform the power-off operation by the manual changeover switch, the power supply voltage that is dropping due to the power-off operation reaches a predetermined value. And a return means for returning the power supply voltage to the original value.

本発明によれば、リセット指令が発行されると設定確認手段によって手動切換スイッチの設定が確認され、手動切換スイッチの設定が電源オフ動作になっている場合には電源オフ手段によって電源オフ動作が開始される。また、そのリセット指令が、所定の制御指令が制御回路に入力されることによって発行されたものか、または、制御回路が自ら発行したものかが判定手段によって判定され、リセット指令を制御回路が自ら発行している場合にはリセット手段によってリセット動作が開始される。そして、リセット指令を制御回路が自ら発行している場合には、電源オフ動作によって降下中の電源電圧が所定値に達する前に、復帰手段が電源電圧を元の値に復帰させる。すなわち、電源オフ動作が行われると、電子機器の電源供給回路に含まれている静電容量によって電源電圧は一定時間をかけて漸次に下降していくので、電源電圧が制御回路にハードウエアリセットを行わせるのに必要な所定値よりも低くなる前に電源電圧を元の値に戻す。この結果、電源をオフにすることなくハードウエアリセットを行うことができるので、制御回路を初期化状態に移行させることができる。従って、制御回路で復帰不可能なエラーが発生した場合やファームウエアの更新を行った場合などに、制御回路の要求によるリセット指令が発行された場合には、手動切換スイッチの設定にかかわらずハードウエアリセットを行うことができる。   According to the present invention, when the reset command is issued, the setting confirmation means confirms the setting of the manual changeover switch, and when the setting of the manual changeover switch is the power-off operation, the power-off means performs the power-off operation. Be started. Further, it is determined by the determining means whether the reset command is issued when a predetermined control command is input to the control circuit, or is issued by the control circuit itself, and the reset command is issued by the control circuit itself. If issued, the reset operation is started by the reset means. Then, when the control circuit issues the reset command itself, the return means returns the power supply voltage to the original value before the power supply voltage that is dropping due to the power-off operation reaches a predetermined value. In other words, when the power is turned off, the power supply voltage gradually decreases over a certain period of time due to the capacitance contained in the power supply circuit of the electronic device, so the power supply voltage is reset to the control circuit by hardware. The power supply voltage is returned to the original value before becoming lower than a predetermined value necessary for performing the operation. As a result, a hardware reset can be performed without turning off the power, and the control circuit can be shifted to the initialized state. Therefore, if an unrecoverable error occurs in the control circuit or if a firmware update is performed, etc., if a reset command is issued due to a request from the control circuit, the hardware will not be affected regardless of the manual switch setting. Wear reset can be performed.

また、本発明の電子機器は、
制御回路と、
前記制御回路へ電圧を供給する電源と、
前記制御回路をハードウエアリセットするリセット指令を発生するリセット指令発生手段と、
前記電源のオンオフを制御する電源制御手段とを備える電子機器であって、
前記リセット指令発生手段からリセット指令が前記制御回路に入力されると、
前記制御回路は、前記電源制御手段に前記電源をオフするオフ指令を出力した後、自らのハードウエアリセットを開始するとともに、
前記電源制御手段に前記電源をオンするオン指令を出力することを特徴とする。
The electronic device of the present invention is
A control circuit;
A power supply for supplying a voltage to the control circuit;
Reset command generating means for generating a reset command for hardware resetting the control circuit;
An electronic device comprising power control means for controlling on / off of the power,
When a reset command is input to the control circuit from the reset command generation means,
The control circuit, after outputting an off command to turn off the power to the power control means, starts its own hardware reset,
An on command to turn on the power is output to the power control means.

本発明によれば、リセット指令発生手段からリセット指令が発行されると、電源制御手段によって電源オフ動作が開始される。そして、リセット動作が開始される。電源オフ動作によって降下中の電源電圧が所定値に達する前に、電源制御手段が電源電圧を元の値に復帰させる。すなわち、電源オフ動作が行われると、電子機器の電源供給回路に含まれている静電容量によって電源電圧は一定時間をかけて漸次に下降していくので、電源電圧が制御回路にハードウエアリセットを行わせるのに必要な所定値よりも低くなる前に、電源制御手段に前記電源をオンするオン指令を出力し、電源電圧を元の値に戻す。この結果、電源をオフにすることなくハードウエアリセットを行うことができるので、制御回路を初期化状態に移行させることができる。従って、制御回路で復帰不可能なエラーが発生した場合やファームウエアの更新を行った場合などに、制御回路の要求によるリセット指令が発行された場合には、ハードウエアリセットを行うことができる。   According to the present invention, when a reset command is issued from the reset command generation unit, the power-off operation is started by the power control unit. Then, the reset operation is started. Before the power supply voltage that is dropping due to the power-off operation reaches a predetermined value, the power supply control means restores the power supply voltage to the original value. In other words, when the power is turned off, the power supply voltage gradually decreases over a certain period of time due to the capacitance contained in the power supply circuit of the electronic device, so the power supply voltage is reset to the control circuit by hardware. Before the value becomes lower than a predetermined value necessary for performing the operation, an on command to turn on the power is output to the power control means, and the power supply voltage is returned to the original value. As a result, a hardware reset can be performed without turning off the power, and the control circuit can be shifted to the initialized state. Therefore, a hardware reset can be performed when a reset command is issued in response to a request from the control circuit when an unrecoverable error occurs in the control circuit or when firmware is updated.

本発明において、前記所定の制御指令は接続されている外部機器からコマンドとして制御回路入力されることもあるが、手動操作することによって前記所定の制御指令を前記制御回路に入力する操作スイッチを備えていることが望ましい。   In the present invention, although the predetermined control command may be input as a command from a connected external device as a command, an operation switch for inputting the predetermined control command to the control circuit by manual operation is provided. It is desirable that

本発明において、ハードウエアリセットが行われたことを制御回路が初期化状態に移行した後に認識するためには、前記手動切換スイッチにより電源オフ動作を行うことが設定されているときに前記リセット指令を前記制御回路が自ら発行していると判定された場合には、この判定結果を不揮発性メモリに書き込む記憶保持手段と、前記電源電圧が元の値に復帰すると、前記不揮発性メモリから前記判定結果を読み出して、前記判定結果に基づいて前記電源電圧を維持する維持手段とを備えていることが望ましい。このようにすれば、電源電圧が維持されるのでハードウエアリセットが終了した後に、電子機器を使用することができる。   In the present invention, in order to recognize that the hardware reset has been performed after the control circuit shifts to the initialization state, the reset command is set when the manual switch is set to perform the power-off operation. When the control circuit determines that the control circuit has issued itself, the storage holding means for writing the determination result to the nonvolatile memory and the determination from the nonvolatile memory when the power supply voltage returns to the original value. It is desirable to provide a maintaining means for reading the result and maintaining the power supply voltage based on the determination result. In this way, since the power supply voltage is maintained, the electronic device can be used after the hardware reset is completed.

本発明によれば、リセット指令が発行されると手動切換スイッチの設定が確認され、手動切換スイッチの設定が電源オフ動作になっている場合には電源オフ動作が開始される。また、そのリセット指令が、所定の制御指令が制御回路に入力されることによって発行されたものか、または、制御回路が自ら発行したものかが判定され、リセット指令を制御回路が自ら発行している場合にはリセット動作が開始される。そして、リセット指令を制御回路が自ら発行している場合には、電源オフ動作によって降下中の電源電圧が所定値に達する前に、電源電圧を元の値に復帰させる。すなわち、電源オフ動作が行われると、電子機器の電源供給回路に含まれている静電容量によって電源電圧は一定時間をかけて漸次に下降していくので、電源電圧が制御回路にハードウエアリセットを行わせるのに必要な所定値よりも低くなる前に電源電圧を元の値に戻す。この結果、電源をオフにすることなくハードウエアリセットを行うことができるので、制御回路を初期化状態に移行させることができる。従って、制御回路で復帰不可能なエラーが発生した場合やファームウエアの更新を行った場合などに、制御回路の要求によるリセット指令が発行された場合には、手動切換スイッチの設定にかかわらずハードウエアリセットを行うことができる。   According to the present invention, when the reset command is issued, the setting of the manual changeover switch is confirmed, and when the setting of the manual changeover switch is the power-off operation, the power-off operation is started. In addition, it is determined whether the reset command is issued when a predetermined control command is input to the control circuit, or is issued by the control circuit itself, and the reset command is issued by the control circuit itself. If it is, the reset operation is started. When the control circuit issues the reset command itself, the power supply voltage is returned to the original value before the power supply voltage that is dropping due to the power-off operation reaches a predetermined value. In other words, when the power is turned off, the power supply voltage gradually decreases over a certain period of time due to the capacitance contained in the power supply circuit of the electronic device, so the power supply voltage is reset to the control circuit by hardware. The power supply voltage is returned to the original value before becoming lower than a predetermined value necessary for performing the operation. As a result, a hardware reset can be performed without turning off the power, and the control circuit can be shifted to the initialized state. Therefore, if an unrecoverable error occurs in the control circuit or if a firmware update is performed, etc., if a reset command is issued due to a request from the control circuit, the hardware will not be affected regardless of the manual switch setting. Wear reset can be performed.

以下に、図面を参照して、本発明を適用した電子機器におけるプリンタの例の実施の形態を説明する。   Embodiments of an example of a printer in an electronic apparatus to which the present invention is applied will be described below with reference to the drawings.

図1はプリンタに搭載されている電源制御部を示す概略ブロック図である。   FIG. 1 is a schematic block diagram showing a power control unit mounted on a printer.

電源制御部(制御回路)1はプリンタに電力を供給するための電源供給回路(電源制御手段および電源)2を制御するものであり、CPU3を中心に構成されている。CPU3の入力側には、電源スイッチ (操作スイッチ) 4とディップスイッチ(手動切換スイッチ)5が接続されている。CPU3は出力用のポートとしてリセット用出力ポート6と電源制御用出力ポート7を有している。リセット用出力ポート6にはリセットIC8が接続されており、リセットIC8の出力はCPU3に入力されるようになっている。電源制御用出力ポート7にはオア回路9が接続されており、このオア回路9にはディップスイッチ5からの信号も入力されている。オア回路9の出力側には電源供給回路2が接続されている。電源供給回路2は、交流電圧を直流電圧に変換するとともに、プリンタに搭載されているモータ等の駆動系には24Vを供給し、CPU3(制御回路)などの制御系には3.3Vを供給する。   A power supply control unit (control circuit) 1 controls a power supply circuit (power supply control means and power supply) 2 for supplying power to the printer, and is configured around a CPU 3. A power switch (operation switch) 4 and a dip switch (manual changeover switch) 5 are connected to the input side of the CPU 3. The CPU 3 has a reset output port 6 and a power supply control output port 7 as output ports. A reset IC 8 is connected to the reset output port 6, and the output of the reset IC 8 is input to the CPU 3. An OR circuit 9 is connected to the power control output port 7, and a signal from the DIP switch 5 is also input to the OR circuit 9. A power supply circuit 2 is connected to the output side of the OR circuit 9. The power supply circuit 2 converts AC voltage into DC voltage, supplies 24 V to a drive system such as a motor mounted on the printer, and supplies 3.3 V to a control system such as a CPU 3 (control circuit). To do.

CPU3は、設定確認手段10、判定手段11、電源オフ手段12、リセット手段13、復帰手段14、記憶保持手段15および維持手段16を備えている。また、CPU3には不揮発性メモリ17が接続されている。   The CPU 3 includes a setting confirmation unit 10, a determination unit 11, a power-off unit 12, a reset unit 13, a return unit 14, a memory holding unit 15, and a maintaining unit 16. In addition, a nonvolatile memory 17 is connected to the CPU 3.

電源スイッチ4は押しボタン式のスイッチであり、操作者が電源スイッチ4を押し込むことにより所定の信号が(所定の制御指令)がCPU3に入力される。   The power switch 4 is a push button type switch. When the operator pushes the power switch 4, a predetermined signal (predetermined control command) is input to the CPU 3.

ディップスイッチ5は、CPU3でリセット指令が発行されたときの動作を、CPU3のハードウエアリセットを行うリセット動作および電源をオフにする電源オフ動作のいずれか一方の動作に設定する。ディップスイッチ5がONになっている場合にはリセット動作が設定されており、ディップスイッチ5からはHIGH状態の設定信号が出力されている。ディップスイッチ5がOFFになっているときには電源オフ動作が設定されており、ディップスイッチ5からはLOW状態の設定信号が出力されている。   The dip switch 5 sets the operation when the reset command is issued by the CPU 3 to one of a reset operation for performing a hardware reset of the CPU 3 and a power-off operation for turning off the power. When the DIP switch 5 is ON, the reset operation is set, and the DIP switch 5 outputs a HIGH state setting signal. When the DIP switch 5 is OFF, the power-off operation is set, and the DIP switch 5 outputs a setting signal for the LOW state.

設定確認手段10は、ディップスイッチ5から入力されている信号を検出することにより、ディップスイッチ5による設定を確認する。   The setting confirmation means 10 confirms the setting by the dip switch 5 by detecting the signal input from the dip switch 5.

判定手段11は、リセット指令が、所定の信号がCPU3に入力されることによって発行されたものか、または、CPU3が自ら発行したものかを判定する。すなわち、リセット指令には、電源スイッチ4が操作されて所定の信号がCPU3に入力されることによってCPU3で発行されるものがある。また、外部機器から入力されたコマンドによって電源スイッチ4が操作されたときと同様の所定の信号がCPU3に入力され、この所定の信号に基づいてCPU3で発行されるものがある。さらに、CPU3において修復不可能なエラーが発生したと判断された場合や、ファームウエアの更新が行われた場合などに、CPU3が自ら発行するものがある。ここで、リセット指令が、所定の信号がCPU3に入力されることによって発行されたものか、または、CPU3が自ら発行したものか、のいずれかはCPU3自身によって把握されている。   The determination unit 11 determines whether the reset command is issued when a predetermined signal is input to the CPU 3 or is issued by the CPU 3 itself. That is, some reset commands are issued by the CPU 3 when the power switch 4 is operated and a predetermined signal is input to the CPU 3. In addition, there is a type in which a predetermined signal similar to that when the power switch 4 is operated by a command input from an external device is input to the CPU 3 and issued by the CPU 3 based on the predetermined signal. Furthermore, there are cases where the CPU 3 issues itself when it is determined that an unrecoverable error has occurred in the CPU 3 or when firmware has been updated. Here, it is known by the CPU 3 itself whether the reset command is issued when a predetermined signal is input to the CPU 3 or issued by the CPU 3 itself.

電源オフ手段12は、ディップスイッチ5の設定が電源オフ動作になっている場合に、リセット指令に基づいて電源オフ動作を行う。CPU3はプリンタに電力の供給が必要な間は電源制御用出力ポート7からHIGH状態のPSC信号を出力しているので、電源オフ動作が開始されると、このPSC信号をLOW状態にする。   The power-off means 12 performs the power-off operation based on the reset command when the setting of the dip switch 5 is the power-off operation. Since the CPU 3 outputs the PSC signal in the HIGH state from the power control output port 7 while the power supply to the printer is necessary, the CPU 3 sets the PSC signal to the LOW state when the power-off operation is started.

リセット手段13は、ディップスイッチ5の設定がリセット動作になっている場合、または、リセット指令をCPU3が自ら発行している場合に、リセット指令に基づいてリセット動作を行う。すなわち、リセット指令が発行されると、CPU3はリセット用出力ポート6から所定のパルス(HIGH)のMR信号を出力する。MR信号がリセットIC8に入力されると、リセットIC8は所定のパルス(LOW)のRESET信号をCPU3に入力する。RESET信号がCPU3に入力されると、CPU3によって自己のハードウエアリセットが行われる。なお、CPU3が自己のハードウエアリセットをすると、CPU3の初期化に伴って電源制御用出力ポート7から出力されているHIGH状態のPSC信号はLOW状態に変化する。   The reset means 13 performs a reset operation based on the reset command when the setting of the dip switch 5 is a reset operation or when the CPU 3 issues a reset command by itself. That is, when a reset command is issued, the CPU 3 outputs a predetermined pulse (HIGH) MR signal from the reset output port 6. When the MR signal is input to the reset IC 8, the reset IC 8 inputs a RESET signal having a predetermined pulse (LOW) to the CPU 3. When the RESET signal is input to the CPU 3, the CPU 3 resets its own hardware. When the CPU 3 resets its own hardware, the HIGH state PSC signal output from the power control output port 7 changes to the LOW state as the CPU 3 is initialized.

復帰手段14は、ディップスイッチ5の設定が電源オフ動作になっている場合であって、リセット指令をCPU3が自ら発行している場合に、電源オフ動作によって降下中の電源電圧が所定値に達する前に、電源電圧を元の値に復帰させる。より具体的には、電源電圧が所定値に達する前に、電源オフ動作によってLOW状態になっているPSC信号をHIGH状態にする。ここで、所定値は、CPU3を含むロジック回路に、その動作に必要な3.3Vを供給し続けることができる電圧であり、本例では9Vとなっている。   In the return means 14, when the setting of the dip switch 5 is the power-off operation, and the CPU 3 issues a reset command itself, the power supply voltage that is falling due to the power-off operation reaches a predetermined value. Before, the power supply voltage is restored to the original value. More specifically, before the power supply voltage reaches a predetermined value, the PSC signal that is in the LOW state by the power-off operation is set to the HIGH state. Here, the predetermined value is a voltage capable of continuing to supply 3.3V necessary for the operation to the logic circuit including the CPU 3, and is 9V in this example.

記憶保持手段15は、ディップスイッチ5の設定が電源オフ動作になっている場合に、判定手段11によってCPU3が自らリセット指令を発行したものと判定されたときに、この判定結果を不揮発性メモリ17に書き込む。この書込みは電源オフ動作の開始前、或いは、電源オフ動作が開始されて電源電圧が降下している間に行われる。   When the setting of the DIP switch 5 is in the power-off operation, the memory holding unit 15 displays the determination result when the determination unit 11 determines that the CPU 3 has issued a reset command by itself. Write to. This writing is performed before the start of the power-off operation or while the power-supply voltage is dropping after the power-off operation is started.

維持手段16は、電源電圧が元の値に復帰すると、記憶保持手段15が不揮発性メモリ17に書き込んでいた判定結果を読み出して、この判定結果に基づいて電源電圧を維持する。具体的には、電源制御用出力ポート7から出力されるPSC信号をHIGH状態にする。   When the power supply voltage returns to the original value, the maintaining means 16 reads the determination result written in the nonvolatile memory 17 by the storage holding means 15 and maintains the power supply voltage based on this determination result. Specifically, the PSC signal output from the power control output port 7 is set to the HIGH state.

図2はオア回路9から電源供給回路2に入力される電圧維持信号の状態を示す説明図である。オア回路9は、ディップスイッチ5がオンになっており、ディップスイッチ5からHIGH状態の設定信号が入力されている場合には、HIGH状態の電圧維持信号を出力する。また、電源制御用出力ポート7からHIGH状態のPSC信号が出力されている場合には、HIGH状態の電圧維持信号を出力する。オア回路9から電源供給回路2にHIGH状態の電圧維持信号が入力されている間は電源供給回路2は電源電圧を維持する。一方、オア回路9は、ディップスイッチ5がOFFでLOW状態の設定信号が出力されており、且つ、電源制御用出力ポート7からLOW状態のPSC信号が出力されている場合には、LOW状態の電圧維持信号を出力する。オア回路9から電源供給回路2にLOW状態の電圧位置信号が入力されると、電源供給回路2によって電源電圧は維持されなくなり、電源がオフになる。ここで、電源供給回路2は整流用や電源電圧の降下防止用のコンデンサなどを備えているので、電源供給回路2に含まれる静電容量によって電源電圧は一定時間をかけて漸次に下降し、しかる後に電源がオフになる。   FIG. 2 is an explanatory diagram showing the state of the voltage maintenance signal input from the OR circuit 9 to the power supply circuit 2. The OR circuit 9 outputs a HIGH state voltage maintenance signal when the DIP switch 5 is ON and a HIGH state setting signal is input from the DIP switch 5. Further, when a high-level PSC signal is output from the power supply control output port 7, a high-level voltage maintaining signal is output. While the HIGH voltage maintaining signal is input from the OR circuit 9 to the power supply circuit 2, the power supply circuit 2 maintains the power supply voltage. On the other hand, the OR circuit 9 is in the LOW state when the DIP switch 5 is OFF and the LOW state setting signal is output, and the power control output port 7 outputs the LOW state PSC signal. Outputs a voltage maintenance signal. When a voltage position signal in the LOW state is input from the OR circuit 9 to the power supply circuit 2, the power supply voltage is not maintained by the power supply circuit 2, and the power is turned off. Here, since the power supply circuit 2 includes a capacitor for rectification and prevention of a drop in the power supply voltage, the power supply voltage gradually decreases over a certain time due to the capacitance included in the power supply circuit 2. After that, the power is turned off.

(ディップスイッチの設定がリセット動作になっている場合のリセット動作)
図3は、ディップスイッチ5の設定がリセット動作になっている場合に、リセット指令が発行されたときの各信号の出力状態を示す表である。
(Reset operation when the DIP switch setting is reset)
FIG. 3 is a table showing the output state of each signal when the reset command is issued when the setting of the dip switch 5 is the reset operation.

まず、ディップスイッチ5がONに設定されており、ディップスイッチ5からHIGH状態の設定信号がオア回路9に入力されている。リセット指令が発行される前の状態では、MR信号はLOW状態であり、PSC信号はHIGH状態であり、RESET信号はHIGH状態である。OR回路から電源供給回路2に入力されている電圧維持信号はHIGH状態になっており、電源電圧は維持されている。   First, the DIP switch 5 is set to ON, and the HIGH state setting signal is input from the DIP switch 5 to the OR circuit 9. In a state before the reset command is issued, the MR signal is in the LOW state, the PSC signal is in the HIGH state, and the RESET signal is in the HIGH state. The voltage maintaining signal input from the OR circuit to the power supply circuit 2 is in a HIGH state, and the power supply voltage is maintained.

電源スイッチ4が操作されることにより所定の信号がCPU3に入力されてリセット指令が発行されたり、CPU3が自らリセット指令を発行したりすると、設定確認手段10によりディップスイッチ5の設定が確認される。ディップスイッチ5ではリセット動作が設定されているので、リセット動作が開始される。すなわち、リセット手段13は所定のパルス(HIGH)のMR信号を出力する。するとリセットIC8から所定のパルス(LOW)のRESET信号がCPU3に入力される。この結果、CPU3のハードウエアリセットが行われる。また、PSC信号はLOW状態に変化する。   When the power switch 4 is operated, a predetermined signal is input to the CPU 3 and a reset command is issued, or when the CPU 3 issues a reset command itself, the setting confirming means 10 confirms the setting of the dip switch 5. . Since the dip switch 5 is set to the reset operation, the reset operation is started. That is, the reset means 13 outputs an MR signal having a predetermined pulse (HIGH). Then, a RESET signal having a predetermined pulse (LOW) is input from the reset IC 8 to the CPU 3. As a result, the hardware reset of the CPU 3 is performed. Further, the PSC signal changes to the LOW state.

ここで、PSC信号がLOW状態に変化しても、ディップスイッチ5からHIGH状態の設定信号がオア回路9に入力されているのでHIGH状態の電圧維持信号が電源供給部に入力される。従って、電源がオフになることなく、リセット動作が行われる。   Here, even if the PSC signal changes to the LOW state, since the HIGH state setting signal is input from the DIP switch 5 to the OR circuit 9, the HIGH state voltage maintaining signal is input to the power supply unit. Therefore, the reset operation is performed without turning off the power.

(ディップスイッチの設定が電源オフ動作になっている場合の電源オフ動作)
図4は、ディップスイッチ5の設定が電源オフ動作になっている場合に、所定の信号がCPU3に入力されることによってリセット指令が発行されたときの各信号の出力状態を示す表である。
(Power off operation when the DIP switch setting is set to power off)
FIG. 4 is a table showing the output state of each signal when a reset command is issued by inputting a predetermined signal to the CPU 3 when the setting of the dip switch 5 is the power-off operation.

まず、ディップスイッチ5がオフに設定されており、ディップスイッチ5からLOW状態の設定信号がオア回路9に入力されている。リセット指令が発行される前の状態では、MR信号はLOW状態であり、PSC信号はHIGH状態であり、RESET信号はHIGH状態である。OR回路から電源供給回路2に入力されている電圧維持信号はHIGH状態になっており、電源電圧は維持されている。   First, the dip switch 5 is set to OFF, and a LOW state setting signal is input to the OR circuit 9 from the dip switch 5. In a state before the reset command is issued, the MR signal is in the LOW state, the PSC signal is in the HIGH state, and the RESET signal is in the HIGH state. The voltage maintaining signal input from the OR circuit to the power supply circuit 2 is in a HIGH state, and the power supply voltage is maintained.

電源スイッチ4が操作されることなどにより所定の信号がCPU3に入力され、CPU3でリセット指令が発行されると、設定確認手段10によりディップスイッチ5の設定が確認される。ディップスイッチ5では電源オフ動作が設定されているので、電源オフ手段12は電源オフ動作を開始する。すなわち、PSC信号をLOW状態にする。なお、MR信号はLOW状態のままでありRESET信号もHIGH状態のままであり、いずれもパルスを発生させない。   When a predetermined signal is input to the CPU 3 by operating the power switch 4 or the like and a reset command is issued by the CPU 3, the setting confirmation means 10 confirms the setting of the dip switch 5. Since the power-off operation is set in the dip switch 5, the power-off means 12 starts the power-off operation. That is, the PSC signal is set to the LOW state. Note that the MR signal remains in the LOW state and the RESET signal also remains in the HIGH state, and neither generates a pulse.

ここで、PSC信号がLOW状態になると、ディップスイッチ5からもLOW状態の設定信号がオア回路9に入力されているので、LOW状態の電圧維持信号が電源供給部に入力される。従って、電源供給回路2によって電源電圧は維持されなくなり、電源はオフになる。   Here, when the PSC signal is in the LOW state, the LOW state setting signal is also input to the OR circuit 9 from the DIP switch 5, and therefore the LOW state voltage maintaining signal is input to the power supply unit. Accordingly, the power supply voltage is not maintained by the power supply circuit 2 and the power supply is turned off.

(ディップスイッチの設定が電源オフ動作になっている場合のリセット動作)
ディップスイッチ5の設定が電源オフ動作になっている場合に、リセット指令をCPU3が自ら発行したときのリセット動作を説明する。図5はリセット動作を示すフローチャートである。図6は各信号の出力状態を示す表である。図7はリセット指令が発行されてからハードウエアリセットが行われている間のタイミングチャートである。
(Reset operation when the DIP switch is set to power off)
A reset operation when the CPU 3 issues a reset command by itself when the setting of the dip switch 5 is the power-off operation will be described. FIG. 5 is a flowchart showing the reset operation. FIG. 6 is a table showing the output state of each signal. FIG. 7 is a timing chart during a hardware reset after a reset command is issued.

まず、ディップスイッチ5がオフに設定されており、ディップスイッチ5からLOW状態の設定信号がオア回路9に入力されている。リセット指令が発行される前の状態では、MR信号はLOW状態であり、PSC信号はHIGH状態であり、RESET信号はHIGH状態である。OR回路から電源供給回路2に入力されている電圧維持信号はHIGH状態になっており、電源電圧は維持されている。   First, the dip switch 5 is set to OFF, and a LOW state setting signal is input to the OR circuit 9 from the dip switch 5. In a state before the reset command is issued, the MR signal is in the LOW state, the PSC signal is in the HIGH state, and the RESET signal is in the HIGH state. The voltage maintaining signal input from the OR circuit to the power supply circuit 2 is in a HIGH state, and the power supply voltage is maintained.

CPU3でリセット指令が発行されると(ステップST1)、設定確認手段10によりディップスイッチ5の設定が確認される(ステップST2)。また、判定手段11はリセット指令が、所定の信号がCPU3に入力されることによって発行されたものか、または、CPU3が自ら発行したものかを判定する(ステップST3)。このリセット指令はCPU3が自ら発行しているものと判定されるので、判定結果は、記憶保持手段15によって不揮発性メモリ17に書き込まれる(ステップST4)。   When a reset command is issued by the CPU 3 (step ST1), the setting confirmation means 10 confirms the setting of the dip switch 5 (step ST2). Further, the determination unit 11 determines whether the reset command is issued when a predetermined signal is input to the CPU 3 or issued by the CPU 3 itself (step ST3). Since it is determined that this reset command is issued by the CPU 3 itself, the determination result is written in the nonvolatile memory 17 by the memory holding means 15 (step ST4).

ここで、ディップスイッチ5では電源オフ動作が設定されているので、電源オフ手段12は、電源オフ動作を開始する(ステップST5)。電源オフ動作が開始されるとPSC信号はLOW状態になる。PSC信号がLOW状態になると、ディップスイッチ5からもLOW状態の設定信号がオア回路9に入力されているので、LOW状態の電圧維持信号が電源供給部に入力される。従って、電源供給回路2によって電源電圧は維持されなくなり、図7に示すように、電源電圧は24Vから漸次に下降する。   Here, since the power-off operation is set in the dip switch 5, the power-off means 12 starts the power-off operation (step ST5). When the power off operation is started, the PSC signal becomes LOW. When the PSC signal is in the LOW state, the LOW state setting signal is also input from the DIP switch 5 to the OR circuit 9, and therefore the LOW state voltage maintaining signal is input to the power supply unit. Therefore, the power supply voltage is not maintained by the power supply circuit 2, and the power supply voltage gradually decreases from 24V as shown in FIG.

また、リセット指令はCPU3が自ら発行しているので、リセット手段13はリセット動作を開始する(ステップST6)。リセット動作が開始されると、リセット手段13は所定のパルス(HIGH)のMR信号を出力する。するとリセットIC8から所定のパルス(LOW)のRESET信号がCPU3に入力される。この結果、CPU3のハードウエアリセットが行われる。なおPSC信号はLOW状態で維持されている。   Further, since the reset command is issued by the CPU 3 itself, the reset means 13 starts the reset operation (step ST6). When the reset operation is started, the reset means 13 outputs an MR signal having a predetermined pulse (HIGH). Then, a RESET signal having a predetermined pulse (LOW) is input from the reset IC 8 to the CPU 3. As a result, the hardware reset of the CPU 3 is performed. The PSC signal is maintained in the LOW state.

ここで、電源電圧が降下して所定値の9Vになる前に、復帰手段14はPSC信号をLOW状態からHIGH状態に戻す(ステップST7)。これにより、オア回路9にはHIGH状態のPSC信号が入力されるので、オア回路9からはHIGH状態の電源維持信号が電源供給回路2に入力される。従って、電源供給回路2が電源電圧を維持し、図7に示されるように、電源電圧は上昇して、元の値に復帰する。   Here, before the power supply voltage drops to a predetermined value of 9 V, the return means 14 returns the PSC signal from the LOW state to the HIGH state (step ST7). As a result, a HIGH state PSC signal is input to the OR circuit 9, so that a HIGH state power supply maintenance signal is input from the OR circuit 9 to the power supply circuit 2. Therefore, the power supply circuit 2 maintains the power supply voltage, and the power supply voltage rises and returns to the original value as shown in FIG.

ハードウエアリセットが終了すると(ステップST8)、CPU3は初期化状態に移行している。従って、MR信号はLOW状態であり、PSC信号はLOW状態であり、RESET信号はHIGH状態であり、OR回路から電源供給回路2に入力されている電圧維持信号はLOW状態になっている。CPU3を含むロジック回路には3.3Vが供給されている。   When the hardware reset is completed (step ST8), the CPU 3 has shifted to the initialization state. Therefore, the MR signal is in the LOW state, the PSC signal is in the LOW state, the RESET signal is in the HIGH state, and the voltage maintenance signal input from the OR circuit to the power supply circuit 2 is in the LOW state. The logic circuit including the CPU 3 is supplied with 3.3V.

ここで、復帰手段14は電源電圧が元の値に復帰すると不揮発性メモリ17から判定結果を読み込む(ステップST9)。また、読み込んだ判定結果によってリセット指令をCPU3が自ら発行したことによりハードウエアリセットが行われた後の状態であることが確認できるので(ステップST10)、PSC信号をHIGH状態にする(ステップST11)。この結果、電源供給回路2によって電源電圧が維持される。   Here, when the power supply voltage returns to the original value, the return means 14 reads the determination result from the nonvolatile memory 17 (step ST9). Further, since the CPU 3 has issued a reset command by the read determination result, it can be confirmed that the hardware reset has been performed (step ST10), so that the PSC signal is set to the HIGH state (step ST11). . As a result, the power supply voltage is maintained by the power supply circuit 2.

なお、ステップST2において、ディップスイッチ5の設定がリセット動作になっている場合には、リセット動作が行われる(ステップST12)。また、ステップST3で所定の信号がCPU3に入力されることによってリセット指令が発行された場合には、電源オフ動作が行われる(ステップ13)。   In step ST2, when the setting of the dip switch 5 is the reset operation, the reset operation is performed (step ST12). If a reset command is issued by inputting a predetermined signal to the CPU 3 in step ST3, a power-off operation is performed (step 13).

また、本例のプリンタでは、ディップスイッチ5の設定が電源オフ動作になっている場合には、電源の投入時に、電源スイッチ4の押し込み時間が5秒を超えなければ電源をオンにすることができないようになっている。このため、ステップST10においてリセット指令をCPU3が自ら発行したことが確認されない場合には、ディップスイッチ5の設定が確認される(ステップST14)。   Further, in the printer of this example, when the setting of the dip switch 5 is the power-off operation, the power is turned on when the power switch 4 is not pushed in for more than 5 seconds when the power is turned on. I can't do it. For this reason, when it is not confirmed in step ST10 that the CPU 3 has issued the reset command itself, the setting of the dip switch 5 is confirmed (step ST14).

ステップST14でディップスイッチ5の設定が電源オフ動作になっている場合には電源スイッチの押し込み時間が確認される(ステップST15)。そして、電源スイッチの押し込み時間が5秒を超えると、PSC信号をHIGH状態にして(ステップST11)、電源電圧を維持する。ステップST14でディップスイッチ5の設定がリセット動作になっている場合には、ステップST11に移行し、PSC信号をHIGH状態にして電源電圧を維持する。   In step ST14, when the setting of the dip switch 5 is the power-off operation, the power switch push-in time is confirmed (step ST15). When the power switch push-in time exceeds 5 seconds, the PSC signal is set to the HIGH state (step ST11), and the power supply voltage is maintained. If the setting of the dip switch 5 is reset in step ST14, the process proceeds to step ST11 where the PSC signal is set to the HIGH state and the power supply voltage is maintained.

(本形態による効果)
以上、本例によれば、リセット指令が発行されるとディップスイッチ5の設定が確認され、ディップスイッチ5の設定が電源オフ動作になっている場合には電源オフ動作が開始される。また、そのリセット指令が、所定の信号がCPU3に入力されることによって発行されたものか、または、CPU3が自ら発行したものかが判定され、リセット指令をCPU3が自ら発行している場合にはリセット動作が開始される。そして、リセット指令をCPU3が自ら発行している場合には、電源オフ動作によって降下中の電源電圧が所定値に達する前に、電源電圧を元の値に復帰させる。すなわち、電源オフ動作が行われると、プリンタの電源供給回路2に含まれている静電容量によって電源電圧は一定時間をかけて漸次に下降するので、電源電圧がCPU3にハードウエアリセットを行わせるのに必要な所定値よりも低くなる前に元の値に戻す。この結果、電源をオフにすることなくハードウエアリセットを行うことができるので、CPU3を初期化状態に移行させることができる。従って、CPU3で復帰不可能なエラーが発生した場合やファームウエアの更新を行った場合などに、CPU3の要求によるリセット指令が発行された場合には、ディップスイッチ5の設定にかかわらずハードウエアリセットを行うことができる。
(Effects of this embodiment)
As described above, according to this example, when the reset command is issued, the setting of the dip switch 5 is confirmed, and when the setting of the dip switch 5 is the power-off operation, the power-off operation is started. If the reset command is issued when a predetermined signal is input to the CPU 3 or issued by the CPU 3 itself, the reset command is issued by the CPU 3 itself. The reset operation is started. When the CPU 3 issues a reset command itself, the power supply voltage is returned to the original value before the power supply voltage that is dropping due to the power-off operation reaches a predetermined value. That is, when the power-off operation is performed, the power supply voltage gradually decreases over a certain time due to the capacitance included in the power supply circuit 2 of the printer, so that the power supply voltage causes the CPU 3 to perform a hardware reset. It returns to the original value before it becomes lower than the predetermined value required for the above. As a result, a hardware reset can be performed without turning off the power, so that the CPU 3 can be shifted to the initialized state. Therefore, when an unrecoverable error occurs in the CPU 3 or when firmware is updated, a hardware reset is issued regardless of the setting of the DIP switch 5 when a reset command is issued in response to a request from the CPU 3. It can be performed.

また、本例によれば、ディップスイッチ5により電源オフ動作を行うことが設定されているときに、リセット指令をCPU3が自ら発行していると判定された場合には、この判定結果を不揮発性メモリ17に書き込み、電源電圧が元の値に復帰すると不揮発性メモリ17から判定結果を読み出している。従って、不揮発性メモリ17に書き込んだ判定結果によって、CPU3が初期化状態に移行した後に、CPU3がハードウエアリセットが行われたことを認識することができる。また、不揮発性メモリ17から読み出した判定結果に基づいて電源電圧を維持しているので、ハードウエアリセットが終了した後に、プリンタを使用することができる。   Further, according to this example, when it is determined that the power-off operation is set by the DIP switch 5, when it is determined that the CPU 3 issues the reset command itself, the determination result is non-volatile. When the data is written in the memory 17 and the power supply voltage returns to the original value, the determination result is read from the nonvolatile memory 17. Therefore, the CPU 3 can recognize that the hardware reset has been performed after the CPU 3 shifts to the initialization state based on the determination result written in the nonvolatile memory 17. In addition, since the power supply voltage is maintained based on the determination result read from the nonvolatile memory 17, the printer can be used after the hardware reset is completed.

プリンタに搭載されている電源制御部を示す概略ブロック図である。It is a schematic block diagram which shows the power supply control part mounted in the printer. オア回路から電源供給回路に入力される電圧維持信号の状態を示す表である。It is a table | surface which shows the state of the voltage maintenance signal input into a power supply circuit from an OR circuit. リセット指令が発行されたときの各信号の出力状態を示す表である。It is a table | surface which shows the output state of each signal when a reset instruction | command is issued. リセット指令が発行されたときの各信号の出力状態を示す表である。It is a table | surface which shows the output state of each signal when a reset instruction | command is issued. ハードウエアリセットが行われる際のフローチャートである。It is a flowchart when a hardware reset is performed. ハードウエアリセットが行われる際の各信号の出力状態を示す表である。It is a table | surface which shows the output state of each signal when a hardware reset is performed. ハードウエアリセットが行われる際のタイミングチャートである。It is a timing chart when a hardware reset is performed.

符号の説明Explanation of symbols

1・電源制御部、2・電源供給回路、3・CPU(制御回路)、4・電源スイッチ(操作スイッチ)、5・ディップスイッチ(手動切換スイッチ)、6・リセット用出力ポート、7・電源制御用出力ポート、8・リセットIC、9・オア回路、10・設定確認手段、11・判定手段、12・電源オフ手段、13・リセット手段、14・復帰手段、15・記憶保持手段、16・維持手段、17・不揮発性メモリ 1. Power supply control unit 2. Power supply circuit 3. CPU (control circuit) 4. Power switch (operation switch) 5. Dip switch (manual changeover switch) 6. Reset output port 7. Power control Output port, 8 · reset IC, 9 · OR circuit, 10 · setting confirmation means, 11 · determination means, 12 · power off means, 13 · reset means, 14 · return means, 15 · memory retention means, 16 · maintenance Means, 17. Nonvolatile memory

Claims (8)

制御回路のハードウエアリセットまたは電源オフを行うためのリセット指令が発行されたときに、前記ハードウエアリセットを行うリセット動作および前記電源オフにする電源オフ動作のいずれか一方の動作が行われるように手動切換スイッチによって設定することが可能になっており、前記電源オフ動作が行われると電源電圧が一定時間をかけて降下して電源がオフになる電子機器における制御回路のハードウエアリセット方法であって、
前記リセット指令が発行されると、
前記手動切換スイッチの設定を確認し、
前記手動切換スイッチによって前記電源オフ動作が行われるように設定されている場合には、電源オフ動作を開始し、
前記リセット指令が、所定の制御指令が前記制御回路に入力されることによって発行されたものか、または、前記制御回路が自ら発行したものか、を判定し、
前記リセット指令を前記制御回路が自ら発行している場合には、前記電源オフ動作によって降下中の前記電源電圧が所定値に達する前に、前記リセット動作を開始するとともに、前記電源電圧を元の値に復帰させることを特徴とする制御回路のハードウエアリセット方法。
When a reset command for issuing a hardware reset or power off of the control circuit is issued, one of the reset operation for performing the hardware reset and the power off operation for turning off the power is performed. This is a hardware reset method for a control circuit in an electronic device that can be set by a manual changeover switch, and when the power-off operation is performed, the power supply voltage drops over a certain time and the power is turned off. And
When the reset command is issued,
Check the manual switch setting,
In the case where the power-off operation is set to be performed by the manual changeover switch, the power-off operation is started,
Determining whether the reset command is issued when a predetermined control command is input to the control circuit, or whether the control circuit is issued by itself;
When the control circuit issues the reset command itself, the reset operation is started before the power supply voltage dropping due to the power-off operation reaches a predetermined value, and the power supply voltage is restored to the original value. A hardware reset method for a control circuit, wherein the value is reset to a value.
請求項1に記載されている制御回路のハードウエアリセット方法において、
前記所定の制御指令は、操作スイッチを手動操作することによって前記制御回路に入力されることを特徴とする制御回路のハードウエアリセット方法。
In the control circuit hardware reset method according to claim 1,
The control circuit hardware reset method, wherein the predetermined control command is input to the control circuit by manually operating an operation switch.
請求項1または2に記載されている制御回路のハードウエアリセット方法において、
前記リセット指令を前記制御回路が自ら発行していると判定された場合には、この判定結果を不揮発性メモリに書き込み、
前記電源電圧が元の値に復帰すると、前記不揮発性メモリから前記判定結果を読み出して、前記判定結果に基づいて前記電源電圧を維持することを特徴とする制御回路のハードウエアリセット方法。
In the hardware reset method of the control circuit according to claim 1 or 2,
If it is determined that the reset command is issued by the control circuit, the determination result is written in a nonvolatile memory.
When the power supply voltage returns to the original value, the determination result is read from the nonvolatile memory, and the power supply voltage is maintained based on the determination result.
制御回路のハードウエアリセットまたは電源オフを行うためのリセット指令が発行されたときに、前記ハードウエアリセットを行うリセット動作および前記電源オフにする電源オフ動作のいずれか一方の動作が行われるように手動切換スイッチによって設定することが可能になっており、前記電源オフ動作が行われると電源電圧が一定時間をかけて降下して電源がオフになる電子機器であって、
前記リセット指令が発行されたときに、
前記手動切換スイッチの設定を確認する設定確認手段と、
前記手動切換スイッチによって前記電源オフ動作を行うことが設定されている場合に、前記リセット指令に基づいて前記電源オフ動作を行う電源オフ手段と、
前記リセット指令が、所定の制御指令が前記制御回路に入力されることによって発行されたものか、または、前記制御回路が自ら発行したものかを判定する判定手段と、
前記手動切換スイッチによって前記リセット動作を行うことが設定されている場合、または、前記リセット指令を前記制御回路が自ら発行している場合に前記リセット指令に基づいて前記リセット動作を行うリセット手段と、
前記手動切換スイッチにより電源オフ動作を行うことが設定されているときに前記リセット指令を前記制御回路が自ら発行している場合に、前記電源オフ動作によって降下中の前記電源電圧が所定値に達する前に当該電源電圧を元の値に復帰させる復帰手段と
を備えていることを特徴とする電子機器。
When a reset command for issuing a hardware reset or power off of the control circuit is issued, one of the reset operation for performing the hardware reset and the power off operation for turning off the power is performed. An electronic device that can be set by a manual changeover switch, and when the power-off operation is performed, the power supply voltage drops over a certain period of time and the power is turned off.
When the reset command is issued,
Setting confirmation means for confirming the setting of the manual selector switch;
Power off means for performing the power off operation based on the reset command when the manual switch is set to perform the power off operation;
Determining means for determining whether the reset command is issued when a predetermined control command is input to the control circuit, or whether the control circuit is issued by itself;
When the manual changeover switch is set to perform the reset operation, or when the control circuit issues the reset command itself, a reset unit that performs the reset operation based on the reset command;
When the control circuit issues the reset command by itself when it is set to perform the power-off operation by the manual changeover switch, the power supply voltage that is dropping due to the power-off operation reaches a predetermined value. An electronic device comprising: a return unit that previously returns the power supply voltage to the original value.
請求項4に記載されている電子機器において、
手動操作することによって前記所定の制御指令を前記制御回路に入力する操作スイッチを備えていることを特徴とする電子機器。
In the electronic device according to claim 4,
An electronic device comprising an operation switch for inputting the predetermined control command to the control circuit by manual operation.
請求項4または5に記載されている電子機器において、
前記手動切換スイッチにより電源オフ動作を行うことが設定されているときに前記リセット指令を前記制御回路が自ら発行していると判定された場合には、この判定結果を不揮発性メモリに書き込む記憶保持手段と、
前記電源電圧が元の値に復帰すると、前記不揮発性メモリから前記判定結果を読み出して、前記判定結果に基づいて前記電源電圧を維持する維持手段とを備えていることを特徴とする電子機器。
The electronic device according to claim 4 or 5,
When it is determined that the power supply OFF operation is set by the manual changeover switch and the control circuit issues the reset command itself, the determination result is stored in the nonvolatile memory. Means,
An electronic apparatus comprising: a maintaining unit that reads the determination result from the nonvolatile memory and maintains the power supply voltage based on the determination result when the power supply voltage returns to the original value.
リセット指令が発行されたときに、電源のオフを開始する制御回路のハードウエアリセット方法であって、
前記リセット指令を前記制御回路が自ら発行している場合、または所定の設定がされている場合には、
前記電源のオフを開始した後、降下中の前記電源の電圧が所定値に達する前に、前記制御回路のハードウエアリセットを開始するとともに、前記電源の電圧を復帰させることを特徴とする制御回路のハードウエアリセット方法。
A hardware reset method for a control circuit that starts turning off power when a reset command is issued,
When the control circuit issues the reset command itself, or when a predetermined setting is made,
A control circuit which starts a hardware reset of the control circuit and restores the voltage of the power supply before starting the power-off and before the voltage of the power supply being lowered reaches a predetermined value Hardware reset method.
制御回路と、
前記制御回路へ電圧を供給する電源と、
前記制御回路をハードウエアリセットするリセット指令を発生するリセット指令発生手段と、
前記電源のオンオフを制御する電源制御手段とを備える電子機器であって、
前記リセット指令発生手段からリセット指令が前記制御回路に入力されると、
前記制御回路は、前記電源制御手段に前記電源をオフするオフ指令を出力した後、自らのハードウエアリセットを開始するとともに、前記電源制御手段により前記電源をオンするオン指令を出力することを特徴とする電子機器。
A control circuit;
A power supply for supplying a voltage to the control circuit;
Reset command generating means for generating a reset command for hardware resetting the control circuit;
An electronic device comprising power control means for controlling on / off of the power,
When a reset command is input to the control circuit from the reset command generation means,
The control circuit, after outputting an off command to turn off the power to the power control means, starts its own hardware reset and outputs an on command to turn on the power by the power control means. Electronic equipment.
JP2008206644A 2008-08-11 2008-08-11 Hardware reset method for control circuit and electronic device Expired - Fee Related JP5206213B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008206644A JP5206213B2 (en) 2008-08-11 2008-08-11 Hardware reset method for control circuit and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008206644A JP5206213B2 (en) 2008-08-11 2008-08-11 Hardware reset method for control circuit and electronic device

Publications (2)

Publication Number Publication Date
JP2010044480A true JP2010044480A (en) 2010-02-25
JP5206213B2 JP5206213B2 (en) 2013-06-12

Family

ID=42015835

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008206644A Expired - Fee Related JP5206213B2 (en) 2008-08-11 2008-08-11 Hardware reset method for control circuit and electronic device

Country Status (1)

Country Link
JP (1) JP5206213B2 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004021673A (en) * 2002-06-18 2004-01-22 Dainippon Printing Co Ltd Automatic reset device, automatic reset method, program, and storage medium
JP2005254621A (en) * 2004-03-11 2005-09-22 Seiko Epson Corp Power supply controller and control method
JP2007319422A (en) * 2006-05-31 2007-12-13 Olympia:Kk Game machine and method for automatic settlement for game machine, and program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004021673A (en) * 2002-06-18 2004-01-22 Dainippon Printing Co Ltd Automatic reset device, automatic reset method, program, and storage medium
JP2005254621A (en) * 2004-03-11 2005-09-22 Seiko Epson Corp Power supply controller and control method
JP2007319422A (en) * 2006-05-31 2007-12-13 Olympia:Kk Game machine and method for automatic settlement for game machine, and program

Also Published As

Publication number Publication date
JP5206213B2 (en) 2013-06-12

Similar Documents

Publication Publication Date Title
KR101070601B1 (en) Enhanced write abort mechanism for non-volatile memory
CN104427177A (en) Image forming apparatus having power save function, and control method thereof
EP2455814A3 (en) Image forming apparatus and power control method thereof
JP5206213B2 (en) Hardware reset method for control circuit and electronic device
JP2015170332A (en) NAND flash module control method
CN108511009B (en) Memory power supply circuit, control device and memory power supply method
JP2015205438A5 (en) Printing apparatus and printing apparatus control method
US20120079291A1 (en) Data backup system, storage system utilizing the data backup system, data backup method and computer readable medium for performing the data backup method
JP4305423B2 (en) Power saving control method and electronic device having power saving function
JP2009025947A (en) Backup system
JP2009247153A (en) Power supply relay controller and power supply relay control method
JP2009223384A (en) Information processor
JP2009181624A (en) Nonvolatile semiconductor memory device
JP2008119939A (en) Printer
JP2007124781A (en) Power supply device, uninterruptible power supply device and power output control method
JP2005339151A (en) Programmable controller
JP6066872B2 (en) Disk unit
JP5428969B2 (en) Image forming apparatus
JP2010152975A (en) Electronic apparatus and method of controlling hard disk drive
JP4233515B2 (en) Data processing device
JP2007044927A (en) Printer
JP2012160140A (en) Electronic equipment and system management program
JP2005173662A (en) Electronic equipment
JP2007018288A (en) Arithmetic processor and power saving mode changeover method therefor
JP2010268620A (en) Power supply control circuit, electronic apparatus, power supply circuit control method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110620

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20121106

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20121218

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: 20130122

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130204

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20160301

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 5206213

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees