how to design a pwm
First of all you need a clock circuit which you can build using to 2 CMOS NAND gates ar 555. Secondly, you need a circuit that will be trigged by this clock and will have ability of changing width of pulses. This can be realised with CMOS CD4528 but instead of connecting only resistor in its RC tank you will connect this resistor through C-MOS switch (eg CD4066). You can use as many switches with different resistors as you wish. Each combination will give you different pulse width.
Alternatively you can use P-MOSFET transistor as variable resistor or digital potentiometers IC (eg Dallas DS1804-50, 50k, 100 steps) to control the value of R.
There are thousands way of doing this, it is just the matter of your imagination....
Other thing is how would you like to control the width of pulses?