Like someone suggested above. You should try to increase the frequency of your PWM. A 1khz square wave will have strong harmonics at 3khz, 5khz and 7khz. Thats right in the middle of the audio range. Then you start stepping thru the duty cycle, this will alternate between odd and even harmonics.
Easy fix unless I'm missing something
Change this
to thisCode:PWM 1, Duty, 1000
Code:PWM 1, Duty, 20000
Bookmarks