By adding a flyback winding to a buck-regulator switching converter (see the figure), which is essentially a 5-V supply with a 200-mA output capability, a 12-V output (VPP) can be produced. Simply put, the flyback winding on the main inductor (forming transformer T1) enables an additional low-dropout linear regulator (IC2) to create the 12-V output voltage that's needed to program EEPROMs. The required input voltage is 8 to 16 V.
Typically, integrating the 12-V supply with the main 5-V supply is desirable in terms of size and cost. But some of those schemes have drawbacks.
For instance, a standard flyback converter with a multiwinding transformer must store large amounts of energy in the core, which requires a bulky transformer. However, when stepping down to 5 V from a relatively high-voltage battery pack, the buck converter with the flyback winding is your best choice. Compared with standard flyback converters, the stepdown/flyback approach uses a smaller transformer, while also offering considerably higher efficiency.
The circuit's main regulator includes most functions that are necessary for buck regulation, including a p-channel power MOSFET for use as the switching transistor. The transformer's winding polarities assure that current flows in the 12-V secondary only during the primary's discharge cycle—a condition that applies 5 V plus one diode drop across the primary. This primary excitation, which is constant regardless of the input voltage level, assures good accuracy and good load regulation for the 12-V output, provided that a fairly heavy load on the 5-V output is maintained.
A light minimum load on the 12-V output also should be maintained to keep it from creeping up. Returning the secondary winding to 5 V rather than to ground results in fewer transformer windings and more power delivered to the 12-V load. The 12-V output can be switched on and off by using the SHDN input to IC2.