I have not tried it with straight PWM, but take a look at the SOUND command. It should help you a bit with the freqs.