- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was wondering how does one play samples? The first thing I'd like to achieve is to play a sine wave from a waveform sample. I wonder if I can do that or is there a simpler way?
Store raw audio in EEPROM -> drive DMA with clock or PWM -> pipe DMA output to DAC
If there are any examples or application notes on this, I'd really appreciate that! Also, can I play audio from external memory (as in SD card)?
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
We do not have an example for PSoC5LP. But please have a look at the obsoleted AN regarding PSoC1, (Link:http://www.cypress.com/file/327276/download).You can follow same implementation.
Thanks,
Hima
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Excellent, thank you! I'd love to see more audio-related articles, PSoC is perfect for such tasks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I figured the easiest way to do it is to read wav (raw audio) from one of the memory locations (SRAM, EEPROM, etc.), pipe it through the DMA which is triggered (request) by clock signal to DAC: memory-->DMA-->DAC. However when using the DMA Wizard, it asks for two parameters I don't know: 'length' and 'source' in the transaction descriptor. How do I define the source and the length?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can use RAM-DMA-VDAC8 example http://www.cypress.com/comment/358351#comment-358351 The issue with DMA is max transfer length of 4095, so you have to chain DMA for long music samples (hint - at audio frequencies CPU is sufficient to play short sounds).
Another thread on same subject might be informative (but not instructive):