Have you seen the HPWM and PWM commands in the PBP manual? examples included theirin.