This application note presents the design equations, schematics and source code for a 5.5W power LED driver using the PIC16F785 MCU. The application, as shown, can be connected to operate as a buck-boost converter or a boost converter. The PIC16F785 makes a great choice for this application because it combines an MCU with many on-chip analog peripherals.