Cloud9TN
Newbie level 2
Hi All,
I am attempting a project to play a small WAV file via my DAC. (Just an array of bytes of the data)
I have decoded a WAV file, removed the header and go to process the raw data.
Making assumptions (perhaps the WRONG ones), I figure I have a 12bit DAC so I saved the WAV as an 8bit (at some sample rate, lets say 8Khz). I was thinking I make my DAC handler feed data in at 2x the sample rate. Honestly, I was thinking just have my interrupt rate = sampling rate but after reading the DAC example (for my c8051f005 siLabs), I gathered it should be 2x.. (although I dont know why)
When I say feed I probably foolishly imagined I should pump those raw 8bit values from my WAV into the DAC.
Will this even remotely work? I looked at the siLabs DAC example and got completely confused. The talk of phase accumulation and amplitude modification kind of threw me for a loop. Is that even relevant when trying to output already formatted WAV data? Or will it be as simple as I imagined (PLEASE TELL ME YES)
Thanks for any help or insight you can give me on this subject. Sorry in advance for my ignorance and lack of knowledge on my part, but if it weren't for that, I wouldnt need your generous assistance. :-D
I am attempting a project to play a small WAV file via my DAC. (Just an array of bytes of the data)
I have decoded a WAV file, removed the header and go to process the raw data.
Making assumptions (perhaps the WRONG ones), I figure I have a 12bit DAC so I saved the WAV as an 8bit (at some sample rate, lets say 8Khz). I was thinking I make my DAC handler feed data in at 2x the sample rate. Honestly, I was thinking just have my interrupt rate = sampling rate but after reading the DAC example (for my c8051f005 siLabs), I gathered it should be 2x.. (although I dont know why)
When I say feed I probably foolishly imagined I should pump those raw 8bit values from my WAV into the DAC.
Will this even remotely work? I looked at the siLabs DAC example and got completely confused. The talk of phase accumulation and amplitude modification kind of threw me for a loop. Is that even relevant when trying to output already formatted WAV data? Or will it be as simple as I imagined (PLEASE TELL ME YES)
Thanks for any help or insight you can give me on this subject. Sorry in advance for my ignorance and lack of knowledge on my part, but if it weren't for that, I wouldnt need your generous assistance. :-D