[Matthias] sent us this project where he builds an AVR light controller. He had a halogen bike light laying around, but was unsatisfied with its lead-acid battery. He wanted to use a lithium ...
A search for switching regulators or controllers throws up thousands of ... “Getting Started with Core Independent Peripherals on AVR®” application note is a good place to get an overview ...