- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi everyone, I am working on a project that needs to generate multiple sine waves at the same time to drive a tweeter. The background is that I would like to convert an image into sound waves. Each pixel is going to be designed a specific sine wave with its specific amplitude and frequency.If I would like to convert an image in 64x64 resolution, the amount of sine waves I need to generate is 4096.
Here comes the question, I have looked up a technical document about waveform generation by using WaveDAC8 but the closet example project was actually adding two different sine waves together by using two DAC in parallel. I know its impossible to add thousands of sine waves by using thousands of DACs in PSoC 5 LP. Thus I looked into the limitation of WaveDAC and the result was that I could generate 4 waves at maximum at the same time. An application engineer suggested me to program an algorithm to add those thousands of sine waves together before feeding them into a DMA,then use the DMA channel to transfer the final result to a WaveDAC8.Is this feasible?
If it is feasible, can anyone help me further or share me related technical documents? I have no idea how to add those sine waves before feeding them into a DMA in coding and how can I set the WaveDAC by then. What I can do so far is creating a table of amplitudes and a table of frequencies that corresponding to image pixels through MATLAB coding.
Many thanks!
Lingo
Solved! Go to Solution.
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When I understand this right each pixel color is assigned to a specific frequency. They you look at all pixels at once, combine the frequencies into one waveform and then want to generate this waveform. Probably if two pixels have the same color the amplitude for that particular frequency ist higher.
This sounds as if you want to do an inverse FFT. From the image you can the amplitudes for each of the involved frequencies. Inverse FFT than can create you the waveform. You store this waveform into memory, and then use DMA with WaveDAC8 to create the actual signal.