This application note describes the PIC16HV785, a programmable lithium and nickel battery charger that provides an unprecedented level of configurability for charging lithium ion/lithium polymer battery packs. Its precise, 10-bit analog-to-digital converter and high-frequency pulse-width modulator enable the PIC16HV785 to provide optimum control of charging algorithms for lithium battery chemistries. Special features include an internal voltage regulator and an internal clock oscillator that reduce external component count.