Pulse Width Modulation (PWM) via Software

Pulse-width modulation is a technique that allows a microcontroller to control the speed of motors, brightness of LEDs, or average voltage without needing a DAC.

If you don't have a microcontroller with on-board PWM hardware, or have run out of PWM channels, how can PWM be simulated using software?

Sort:  

Congratulations @tacticalcadaver! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You published more than 70 posts. Your next target is to reach 80 posts.

You can view your badges on your Steem Board and compare to others on the Steem Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

To support your work, I also upvoted your post!

Vote for @Steemitboard as a witness to get one more award and increased upvotes!