How I can generate Sine wave in CYBLE-014008-00 Chip?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

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

0 Likes
1 Solution
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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

View solution in original post

0 Likes
12 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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

0 Likes
Anonymous
Not applicable

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?

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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

0 Likes
Anonymous
Not applicable

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.

0 Likes
Anonymous
Not applicable

thankyou for your reply. But the link given is not working 🙂

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

The PSoC4 BLE hasn't got a DMA afaik.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Bob It also does not have DAC.

0 Likes
Anonymous
Not applicable

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.

0 Likes
Anonymous
Not applicable

Oh Yea it has IDACs and not VDAC 🙂

0 Likes
Anonymous
Not applicable

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.

0 Likes
Anonymous
Not applicable

PSoC 4XX8 BLE should support DMA and the Waveform DAC component.

   

What's the maximum ISR rate achievable with the CYBLE-014008-00?

0 Likes