This sim is showing a bit bang approach to creating a sine wave by filtering a pulse train with an RC filter.
Red is an ideal sinusoidal wave.
Green is a filtered pulse train from a classical method for generating a PWM signal using a sine wave & high frequency triangle wave as inputs for a comparator.
Blue is a filtered pulse train from manually set pulse trains to simulate a microcontroller’s bit bang output. This should also be possible by frequently micromanaging a PWM signal on (nearly) every counter overflow to update the pulse width.