Patent ID: 8004257

Claim:
A voltage regulator, comprising: a first error amplifier circuit for amplifying a difference between a first reference voltage and a voltage that is based on an output voltage of an output transistor, outputting the amplified difference, and controlling a gate of the output transistor; and an overcurrent protection circuit for detecting an overcurrent flowing through the output transistor and limiting a current of the output transistor, the overcurrent protection circuit comprising: an output current detection transistor for feeding a detection current in accordance with an output current of the output transistor, the output current detection transistor having a gate controlled by an output voltage of the first error amplifier circuit; a voltage generation circuit for generating a voltage based on the detection current from the output current detection transistor; a second error amplifier circuit for amplifying a difference between the voltage generated by the voltage generation circuit and a voltage that is set by a second reference voltage and a voltage based on the output voltage, and for outputting the amplified difference, the second reference voltage being supplied from a temperature detection circuit in which an output voltage thereof changes in accordance with temperature; and an output current limiting transistor for controlling a gate voltage of the output transistor, the output current limiting transistor having a gate that is controlled by an output of the second error amplifier circuit.