Mandar Joshi
Member level 2

I am using STK600 (ATmega2560). I have configured timer 1 for 8-bit fast PWM and system clock is 4 MHz and PWM frequency is 15625 Hz. My wav file is sampled at 3906 Hz and it 8-bit unsigned PCM mono wav file.
First I connected speaker directly between PWM o/p pin and GND. This produces humming sound noise in background, it remains as long as playback is active.
Then I connected low pass RC filter such that R=680 Ohm and C=0.01uF i.e. cut off is 23405 Hz. But still noise appears. The original wav file doesn't produce any noise on PC. What could be the reason? Do I need to change filter?
I can post code if required. What could be the reason behind noise? Because original wav file doesn't contain any noise. Is it because other components present on STK600?
First I connected speaker directly between PWM o/p pin and GND. This produces humming sound noise in background, it remains as long as playback is active.
Then I connected low pass RC filter such that R=680 Ohm and C=0.01uF i.e. cut off is 23405 Hz. But still noise appears. The original wav file doesn't produce any noise on PC. What could be the reason? Do I need to change filter?
I can post code if required. What could be the reason behind noise? Because original wav file doesn't contain any noise. Is it because other components present on STK600?