It does not really help when you post the same question to multiple, unrelateds forums (your question is neither a "known problem" nor is it related to "device programming").
Answer should be handled here: http://www.cypress.com/forum/psoc-5-architecture/questions-waveform-generation-psoc-5-lp
The algorithm for generating an array that outputs a sine wave is simple. You can do it in a spreadsheet with the formula =SIN(2*PI()*A1/61)*0.75 where 61 represents the number of samples in a single wave cycle and 0.75 represents amplitude.
If you do many of these in C I think you will soon see certain problems. First, you cannot have 4096 arrays without running out of memory so you would want to re-use arrays after summing the values of two of them.
Second, let's say your array lengths are 128 samples. For any wavelengths that do not have integer multiples of cycles in 128 will not cross at zero on sample  when the output wraps back to sample . Thus you will be getting severe crossover distortion on those frequencies. Below is a snippet of code that pre-generates two sine waves of different frequencies and amplitude and sums the two sine waves. I'm not saying it's a solution; indeed, I think it shows what problems you might have. You might want to look for analog solutions in hardware.
#define PI 3.14159265
#define AMPLITUDE1 1
#define AMPLITUDE2 0.5
float sinwave1, sinwave2;
for (i=0; i < 128; i++) sumofwaves[i] = 0.0;
for(i = 0; i < 128; i++)
sinwave1[i] = (i*2*PI/128) * AMPLITUDE1; // End point wraps at zero to next waveform
sinwave2[i] = (i*2*PI/61) * AMPLITUDE2 ; // Notice that the ends will NOT cross at zero
sumofwaves[i] += sinwave1[i] + sinwave2[i];
ouput (sumofwaves); // Some function that will output your signal
#define PI 3.14159265
We learnt the trick
#define PI (4*atan(1.0)) // this is a constant evaluated at compile-time with best precision
I was trying to generate a single sine wave, but I failed. The result showed me a 4V dc voltage(Possibly because I set the DAC scale: 0-4.08v) Could you please have a look at my code to see if there is something wrong? I also tried your equation sinewave[i] = (i*2*Pi/800)*Amplitude; (I assumed I need 800 samples per period) , but the results were the same. Maybe I thought was totally wrong? I spent lots time in debugging but couldn't figure it out.
#define TABLE_SIZE 1000//amount of samples
#define TWO_PI (3.14159 * 2)
#define Amplitude 1
#define MaxFreq 400
#define Freq_1 200
#define SamplePerPeriod 800//Based on the maximum frequency
float Samples [TABLE_SIZE];
float TimeIncrement = (1/MaxFreq)/SamplePerPeriod;
int DigitalResults [TABLE_SIZE];
float t[TABLE_SIZE];//index of each sampling time point
float ADCIncrement = (2*Amplitude)/255;
for (i = 0; i < TABLE_SIZE; i++)
t[i] = i*TimeIncrement;
Samples[i] = Amplitude*sin(TWO_PI*Freq_1*t[i] );
//Samples[i] = ((i*TWO_PI)/SamplePerPeriod)*Amplitude;
DigitalResults[i] = (int)((Samples[i]+Amplitude)/ADCIncrement);
CyDelayUs(1); //the time interval is 3.13us
You could try to create the tables with the data in a first loop, and then use a second loop to send them to the DAC. That way you can put as breakpoint after the first loop (or send it via UART to the PC) and check that the values in there are indeed correct.