PWM Programming Help

Why don't you use one of the built in PWM outputs?

Bingo, he should be using analogWrite commands on the pins that support pwm outputs rather then trying to 'roll his own' PWM outputs.

Lefty