摘要 |
PURPOSE: To obtain a power-supply control method in which a power supply can be controlled optimally even when a transformer to be used or a control method to be used is changed by a method wherein an increase or a decrease in the ON-width of a PWM signal in the feedback control operation and the forward control operation of a power-supply transformer is controlled differently. CONSTITUTION: A power-supply control circuit is initialized, and data on a register or the like is set ($10). Then, four access operations of a PWM signal are detected, and the number of detections is judged, by using a register update sequence (S12), while 1 is being added (S11). When it is judged that the four access operations have been continued, an interrupt register is cleared (S13), and U/D information is sampled so as to be saved in a flag register (S14). The information is compared with the last information (S15). When both are identical, an increase or a decrease in the pulse width of the PWM signal is controlled differently according to the U/D information. In addition, when the information differs from the last information, the number of interrupt operations of a U/D stop flag is set (S17, S18), and a procedure is returned to a start at the number of operations. |