Patent ID: 8084893

Claim:
A semiconductor device for controlling a switching power supply, comprising: a power supply terminal to be externally connected to a capacitor; a current inflow terminal to which a voltage obtained by half-wave rectification or full-wave rectification of an AC voltage of a power source is to be input; a starter circuit configured to cause a starting current to flow from the current inflow terminal to the power supply terminal so as to charge the capacitor externally connected to the power supply terminal; a control unit which controls the starter circuit to turn on so as to charge the capacitor with the starting current and controls the starter circuit to turn off to perform brown-out detection; a comparator which detects a brown-out state while the starter circuit is turned off; and a brown-out detection unit configured to receive an output signal from the comparator and an output signal from the control unit as inputs and to detect the brown-out state based on the inputs, wherein the brown-out detection is performed while the starter circuit is turned off, so that the current inflow terminal for the starter circuit is used in common as a voltage detection terminal for detection of the brown-out state.