From WikiChip
pulse-width modulation

PWM signal vs analog signal.

Pulse-width modulation (PWM), also known as pulse-duration modulation (PDM) is a technique of modulating the duration of the HIGH and LOW pulses of a digital signal. A PWM signal is a way of representing an analog signal in a digital circuit. The application of pulse-width modulation varies greatly from communication and encoding to controlling the power delivered to an external device such as a motor or an LED. The purpose of pulse-width modulation is to vary the duty cycle according to Where the duty_cycle can be controlled by varying ton or toff.