when im in the office ill check with the book, but theres an actual pwm command that does it all for you, im looking to do the same but with RGB leds (hence my posting on the 3 hardware pwm pics) to fade through the rainbow... i shall try an example shortly.

Chris