A quick Google search presented
this.
It seems like a good tutorial. Although I'm sure you already did a Google search before posting on Chief.
An interesting tutorial on a software based PWM tutorial.
I have not had experience with it myself, however I do own a Pi and after my exams finish tomorrow I may play around with it a little bit!