The circuit to create waveform like this is based upon a simple relay that is driven by a clock signal.
Pulse-width modulation (PWM) is the best conversion method to use for digitally-controlled variable DC voltage sources requiring high accuracy and resolution. Invented 50 years ago 1,2, the PWM ...