Microchip logo
  • All
  • Products
  • Documents
  • Applications Notes


Buck-Boost LED Driver Using the PIC16F785 MCU
Stephen Bowling
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 a MCU with many on-chip analog peripherals. This application is similar to the circuit described in Microchip?s application note AN874 and you can refer to this document for more design information. This application note builds on the application described in AN874 and adds the following features: ¥ The on-chip op amp of the PIC16F785 is used to amplify the voltage across the current sensing resistor. This allows a much smaller sensing resistor to be used and reduces power dissipation. ¥ The PIC16HV785 device can be used, which eliminates the requirement for an external 5V regulator when operating from higher supply voltages. ¥ This application has unused analog resources which could be used to control another LED driver, power supply, or battery charging circuit.
lighting, LED, power supply, switchmode, white, SMPS, current
Application Notes & Source Code
 Last Updated
  AN1047 Source Code - AN1047 - Buck-Boost LED Driver Using the PIC16F785 MCU
Silicon Products