Suggested by Texas Instruments, this circuit operates with frequencies that can reach some megahertz. The adjustment of the ideal operation is made in the trimpot and the optocoupler can be a 4N26.