Hi,
It's really not that complicated and there's plenty of code floating around the forum showing how it's done and discussions about how it works and how the values interact.
If you really can not find the info please enlighten us regarding the device used, clock frequency and desired PWM frequency?

/Henrik.