Hello
After doing a program that can read from line in a music from Computer and playing it in line out of zeadboard, now i want to do one experience. I want to just output in lineout a 1khz sinewave that i generate in C code.
Well i tried to do it but although i think i'm doing a correct implementation of a sinewave when i output it, the sound doesn't match.
I think probably the problem is in the input data of the function Xil_Out32.
The code i think is relevant i leave it below.
u32 audio;
float aux;
for(i=0;i<10000;i++){
t// Write audio output to codec
taux=sin(((2*M_PI)/(512))*i)+1;//512khz sample rate 1000hz freq
taudio=aux*pow(2,32);
Xil_Out32(I2S_DATA_TX_L_REG, audio);
Xil_Out32(I2S_DATA_TX_R_REG, audio);
}
Anyone knows what i'm doing wrong?
Thank you