pwm

PWM is a form of signal modulation where the widths of the pulses correspond to specific data values encoded at one end and decoded at the other.

Pulses of various lengths (the information itself) will be sent at regular intervals (the carrier frequency of the modulation).

how to generate a pwm signal like this ?
please it's very important to my school project

please help