- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Every One,
I want to use a wave DAC but unfortunately there is no wavedac available. But now i want to generate a sine with certain frequency and amplitude. I found an IDAC and timer in it. Can any body help me in solving my problem?
Looking forward for your suggestions.
Best Regards
Awais
Solved! Go to Solution.
- Labels:
-
BLE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It depends on frequency of your sine. You can build up a sine-table in flash. With the help of the timer interrupt send a value to the DAC.
You may use a few thousand interrupts per second and you will need at least 20 to 30 points of your table. There are some math tricks to use only a quarter of the total 2*PI table, but that only saves some flash, not increasing the frequency.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It depends on frequency of your sine. You can build up a sine-table in flash. With the help of the timer interrupt send a value to the DAC.
You may use a few thousand interrupts per second and you will need at least 20 to 30 points of your table. There are some math tricks to use only a quarter of the total 2*PI table, but that only saves some flash, not increasing the frequency.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Bob for your reply.
I want to generate a frequency wave upto 10kHz.
"sine-table in flash" means a look up table?
Is there also any example project or any application note available that can help me?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10kHz would mean an interrupt frequency of at least 100k which is far too much for a PSoC4-BLE.
Another strategy could be: Generate a square wave (using a PWM) followed by an external analog low pass filter.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Surely you must be able to use a DMA channel with the trigger_in driven from your sample rate timer, and set the DMA to transfer a single word per trigger (from a waveform table in memory to DAC).
See: http://www.cypress.com/forum/psoc-creator-software/problem-writing-data-memory-dac-using-dma-0 as a starting point.
Creator 3.3 has a PSoC4 ADC/DMA example which can't be too different from a DAC version.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thankyou for your reply. But the link given is not working 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The PSoC4 BLE hasn't got a DMA afaik.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Bob It also does not have DAC.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oh, now I'm confused. I'm very new to CyBLE and PSoC but the CYBLE 014008 datasheet says it has 2 x current DACs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oh Yea it has IDACs and not VDAC 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have just created a design using PSoC Creator 3.3 and selected a CYBLE-014008-00 module. The component library includes both a DAC and DMA, and you can drag them into your design. However, you're right, there is no DMA available in the actual device.
This is the module that I am using too. But luckily I have no use for the DMA.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
PSoC 4XX8 BLE should support DMA and the Waveform DAC component.
What's the maximum ISR rate achievable with the CYBLE-014008-00?