Patent ID: 8188719

Claim:
A voltage regulator, comprising: a first power supply terminal; a second power supply terminal; an output terminal; a reference voltage circuit; a first resistor and a second resistor that are connected in series between the output terminal and the second power supply terminal; a first error amplifier circuit for outputting a voltage indicating a comparison result, the first error amplifier circuit including: an inverting input terminal connected to an output terminal of the reference voltage circuit; and a non-inverting input terminal connected to a connection point between the first resistor and the second resistor; an output transistor having a gate voltage that is controlled by an output of the first error amplifier circuit so that the output terminal has a constant voltage value, the output transistor being provided between the first power supply terminal and the output terminal; a phase compensation capacitor including one terminal connected to the output terminal; a second error amplifier circuit including: a non-inverting input terminal connected to the connection point between the first resistor and the second resistor; and an output terminal and an inverting input terminal that are connected to each other; and a switch circuit configured to: connect the phase compensation capacitor to an output of the second error amplifier circuit until a predetermined time period elapses after one of power-on and turn-on of the voltage regulator; and connect the phase compensation capacitor to the connection point between the first resistor and the second resistor after the predetermined time period has elapsed.