Hi all again

This is to announce the publication of a library which abstract the eight PWM channels available in Arduino DUE's ATSAM3X8E microcontroller.
The name of the library is
pwm_lib, and is openly available at:
https://github.com/antodom/pwm_lib.
Each ATSAM3X8E PWM channel can be used to generate a completely independent PWM signal directly on hardware. The motivation to develop this library was two fold. First, the current limitation of the Arduino standard library where it is not possible to change the PWM output period of the PWM signals generated using function analogWrite(). And second, to have a library for servos directly supported by the hardware, therefore, "lighter", in terms of code generated and computational load, than the Servo library available in the Arduino standard library.
The library provides two kind of objects associated with each PWM channel: pwm and servo objects. As those objects abstract the PWM channels available on the micro controller, using pwm_lib you can use, at most, eight independent pwm_lib objects in your application, each one with its own PWM characteristics (PWM signal period and pulse duration). In its current version, the maximum period for PWM signals you can get using pwm_lib is a period of 0.798915048 seconds (minimum frequency of 1.251697539 Hz).
Two examples comes with pwm_lib to illustrate its use:
basic_test.ino and
servo_test.ino, who illustrate respectively the use of pwm and servo objects. Example basic_test.ino uses two PWM objects for generating two independent PWM outputs with different PWM characteristics (period and duty). Example servo_test.ino uses a servo object to generated a PWM output for a typical servo.
More details about pwm_lib in
https://github.com/antodom/pwm_lib.
And, if in any doubt, drop me a line.
I hope it helps.