My project wants to play audio from SD card with minimum power and smallest size (for toy usage). I am using SimpleSDAudio library in ATmega328p now. (SimpleSDAudio – Hackerspace Ffm)
I want to use 2 PWM for 16-bit mono playback (reduce the noise), the library is required to use pin 9 and 10. However, the SD card SS pin is fixed in the pin 10.
How can I use 2 PWMs output for ATmega328p using SimpleSDAudio library?
Any comments and suggestions are welcome.
Thank you very much!!
Here is a clue, it will not. Is your thinking that you have one PWM output for the upper 8 bits and another for the lower 8 bits and then you smooth them and then mix them together in to proportion 1:256? This mixing would have to be done with an accuracy of greater than 0.39% requiring accurate and stable resistors.
This would mean that the lower PWM has a maximum output of 19.5mV with a step size of 76.6uV, way too small not to be swamped by digital noise.