mod digital wraite to pwm