The Wave DAC 8 will not adjust the voltage of a sine wave when I call the SetValue() function.

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

cross mob
BeEs_3215316
Level 1
Level 1

I am trying to adjust the output voltage of a sine wave using the WaveDac8 component by using the "void WaveDAC8_SetValue(uint8 value)" , but I continue to get the same voltage no matter what 0-255 value I use. I can use the regular Voltage Dac with same method to change the voltage and see results.

0 Likes
1 Solution

Regarding SetValue there is a discussion here

Re: WaveDAC8_SetValue() has no effect

But I believe that SetValue will simply set fixed value on WaveDAC output (no sine). To have sine amplitude changed, you need to update sine values in the WaveDAC internal buffer, which you can do either on-the-fly or by switching a pointer to another buffer, see #11 of the

http://www.cypress.com/forum/psoc-5-device-programming/wavedac8-amplitude-control-psoc5

The easy example for updating VDAC8 output can be found in #5 of the same thread (no WaveDAC used):

 

/odissey1

View solution in original post

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

Did you start the WaveformDAC and did you stop the clock? Otherwise you will not see a result.

Bob

0 Likes

I start the WaveformDAC and stop it as well as the clock, make the adjustment then reset them both. 

0 Likes

Stopping the wavedac disables (power down) the DAC.

Bob

0 Likes

I have removed the stop wavedac and it still does not change the amplitude. I see the signal but no changed amplitude

0 Likes

Regarding SetValue there is a discussion here

Re: WaveDAC8_SetValue() has no effect

But I believe that SetValue will simply set fixed value on WaveDAC output (no sine). To have sine amplitude changed, you need to update sine values in the WaveDAC internal buffer, which you can do either on-the-fly or by switching a pointer to another buffer, see #11 of the

http://www.cypress.com/forum/psoc-5-device-programming/wavedac8-amplitude-control-psoc5

The easy example for updating VDAC8 output can be found in #5 of the same thread (no WaveDAC used):

 

/odissey1

0 Likes