Hi,
There is a new example to convert a PWM to sine wave based on the ATmega8A
microcontroller. Everything is done in NGSpice and MCUSim.
I prepared it when I'd realized that it's not legal enough to distribute 3rd
party SPICE models within the repository. However, you still may use
MCUSim-0.2-preview1 for any purpose (with the limitations of the license)
except these models:
scripts/examples/ATMEGA8A-with-mosfet-switch/1N5819.LIB
scripts/examples/ATMEGA8A-with-mosfet-switch/NTA4001NT1.LIB
scripts/examples/ATMEGA8A-with-mosfet-switch/NTA4153N.REV0.LIB
scripts/examples/ATMEGA8A-with-mosfet-switch/NTR0202PL.REV0.LIB
There is a picture to attract your attention to the new example:
https://imgur.com/a/XSvNKeS
All of the details are there:
https://github.com/mcusim/MCUSim/tree/master/scripts/examples/ATMEGA8A-pwm-to-sine
P.S. Let me know if you're willing to maintain a FreeBSD (or even GNU/Linux?)
port of MCUSim. It'll be prepared in the near future.
Regards,
Dmitry