An SMPS application using PIC16F785 from Microchip, app note here (PDF).
In this application note, we will examine a typical buck topology intelligent SMPS design using the PIC16F785.
The design presented here shows an alternative single-chip approach to adding intelligence to SMPS designs. The basic design is really unchanged. There are current and voltage feedback loops, a counter-based PWM is used to generate the reference voltage to the voltage loop, and the microcontroller uses the reference voltage to modify the operation of the system in response to conditions sensed through the ADC.