Patent ID: 7405539

Claim:
A battery charger for charging a battery, comprising: a charging regulation circuit having an input terminal, a control terminal, and an output terminal, wherein the input terminal is for being coupled to a power supplier, the output terminal is coupled to a node N 1 , the control terminal is coupled to a node N 5 , and the charging regulation circuit outputs a charging current whose amount is regulated based on a regulation signal at the control terminal; a first current sensing unit having a first and a second input terminals and a first and a second output terminals, wherein the first input terminal is coupled to the node N 1 , the first output terminal is coupled to a node N 2 for being coupled to the battery, the second input terminal is inputted by a first reference signal, the second output terminal is coupled to a node N 3 , and the first current sensing unit senses a current level on a path from the node N 1 to the node N 2 and outputs an error signal at the second output terminal based on the current level and the first reference signal; an operational amplifier having a positive input terminal coupled to the node N 2 , a negative input terminal coupled to a node N 4 , and an output terminal coupled to the node N 5 for generating the regulation signal; a comparator for comparing a second reference signal with the voltage of the node N 2 , and generating an enabling signal; a first switch unit for electrically coupling the second output terminal of the first current sensing unit to the node N 5 when the enabling signal is not active; a second switch unit for electrically coupling the output terminal of the operational amplifier to the node N 5 when the enabling signal is active; and a third switch unit for electrically coupling the comparator to the second reference signal when the enabling signal is active, or for electrically coupling the comparator to the node N 4 when the enabling signal is not active; and a reference voltage generator having an input terminal coupled to the node N 3 and an output terminal coupled to the node N 4 , comprising: an ADC for converting the error signal outputted by the first current sensing unit to a digital signal; and a DAC for converting the digital signal to a reference voltage, wherein the DAC decreases the reference voltage when the enabling signal is active and the error signal indicates that the current level on the path from the node N 1 to the node N 2 is greater than the first reference signal: wherein the voltage at the node N 2 reflects the battery voltage of the battery.