PWM (Pulse Width Modulation) is a technique used by microcontrollers to simulate analog output using digital signals. It has been widely adopted since the 1980s for motor control, LED dimming, power regulation, and audio signal generation.
Microcontrollers generate PWM by rapidly switching a digital output on and off: