change the wave type in waveDAC without wizzard

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

cross mob
Anonymous
Not applicable

 Hi, i making a aplication when i need to generate 3 independients wave forms, and controlate the type of this waves, the problem is that the unic mode that i find to change the wave type is in the wizzard but after i can´t modificate this. I hope that some body can say me if is this posible and how can i do it, becuase i searched in many archives .h and .c  i can´t find it. 

0 Likes
10 Replies
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored
        Do you want to generate 3 output signals at the same time, or do you want to switch between one of the three waveforms?   
0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored
        You cannot do the former with the WaveDAC8 component directly, since it supports only 2 waves at the same time. It might be an option to copy/clone the WaveDAC8 component and modify it to generate three waves. Or you have a look at http://www.cypress.com/?rID=39408&cache=0 and roll your own component.   
0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored
        To switch between different waveforms use the Wave1Setup() method of the WaveDAC8 component (just look at the data sheet).   
0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

The Wavedac is a pretty simple component, a LUT and DMA, w/o resorting to a custom

   

component you could easily create your own 3 waveform generator solution. The prime

   

issues you might have is synchronicity, if you want all 3 waveforms updated simultaneously.

   

That would be the case if they are all same period or a multiple thereof, integer harmonmically

   

related.

   

 

   

You are limited to 4 waveforms, if analog, because of the # IDACs/VDACs allowed.

   

 

   

Regards, Dana.

0 Likes
Anonymous
Not applicable
        I´m sorry I believe that I was not clear... The main idea is that I need control 3 waves but, i want can change the wave type of every waveDAC, namely, if i want that the wave DAC generate a sine wave and after in the same waveDAC i decide change to square or triangule wave.. I don´t know if it is posible because i need control 3 wave independents, one option is create my own table whit arrays but i dont if i can chage the frequency if I make this, and my principal point is that i want use the dma configurated in this mode. I dont if my idea is good or anyone can give some tip for do this...   
0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

Maybe you should read the AppNote concerning the WaveDAC8: http://www.cypress.com/?rID=54728

   

It always uses DMA internally. The DMA just transfers the bytes from the table containing the wave form definition to the DAC. So when you change this table, the component still uses the DMA.

   

So if you want to have 3 different waves at the same time, you can use 3 WaveDAC8 components. And then you can set each of them to a different waveform, whenever you want. You can also attach an interrupt to the wc1 output, to change the waveform exactly after one period of the waveform.

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

To be clear, do you want -

   

 

   

1) 3 simultanmeous waveforms, different envelopes ?

   

2) One waveform, with cholce of multiiples envelopes ?

   

3) If  1) do they have to be synchronous, because independant DMA processes are

   

NOT sychronous.

   

 

   

Regards, Dana.

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Posted again becuse spelling was so poor in prior post, ech....

   

 

   

    

   

          

   

To be clear, do you want -

   

 

   

1) 3 simultaneous waveforms, different envelopes ?

   

2) One waveform, with choice of multiple envelopes ?

   

3) If  1) do they have to be synchronous, because independent DMA processes are

   

NOT synchronous.

   

 

   

Regards, Dana.

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

One can use a single DMA request signal for trigger the DMA transfers. That way they don't run off from each other, but there will still be light skew between the different channels (look at the PSoC5 TRM for an exact explanation how multiple concurrent DMA transfers are scheduled).

0 Likes
Anonymous
Not applicable
        hello, i can find the solution to my problem making a LUT of triangle and sawtooth wave in matlab and insert in code like a array, and select like a principal wave the sine, i want to give thanks for all us because without your tips i can do it 😄   
0 Likes