Requirements installation

You first have to install Python and the associated developer tools. With Debian / Raspbian, you have to execute as super-user the following command (you have to adapt it to the distribution you use):
$ apt-get install python python-dev
When the installation is done, you have to install a Python library in order to control the GPIO. It's RPi.GPIO (version 0.4.0a or newer), available here : When you have downloaded the archive, you have to execute as super-user the following commands:
$ tar -xzf RPi.GPIO-0.4.0a.tar.gz 
$ cd RPi.GPIO-0.4.0a
$ python install
When library installation is done, you may delete previously downloaded archive (“RPi.GPIO-0.4.0a.tar.gz”) and untared folder (“RPi.GPIO-0.4.0a”).

See it in action

25%, 50% and 75% duty cycle
25% duty cycle 50% duty cycle 75% duty cycle
PiZyPwm presentation
Use with a digital oscilloscope

Download PiZyPwm library

PiZyPwm is distributed under the terms of the modified BSD license.
A “quick2wire” branch is available for the ones who use this expansion board.