AnsweredAssumed Answered

problem with generation of sine wave

Question asked by Deer90 on Mar 9, 2013
Latest reply on Mar 17, 2013 by ponikvar.dusan
Hello, I am trying to generate sinusoid signal via DAC. I can´t use look up table of sine values, because user will enter amplitude. So values of sine are first computed in program and than stored in buffer:

sine[i] = (sin(2*PI*i/number_of_samples)+1)*((amplitude+1)/2);

But it isn´t generate anything. It is very strange because values are stored correctly. There is some problem with sine function. When I delete sin(), DAC works. Do you know why it doesn´t work with computing sin(x)? Thank you for answeres.

Outcomes