DSPRelated.com
Code

Max Amplitude Sine Wave

Ron April 1, 2011 Coded in C for the TI C67x

Creates the largest amplitude sine wave without clipping. 2.5V P-P.

#define ARRAY_LEN  8
short index = 0;
int sample[ARRAY_LEN] = {0,23170,32767,23170,0,-23170,-32767,-23170};
interrupt void isr()	 
{
  	send_output(sample[index]); 
  	index = (++index) % ARRAY_LEN;
	return;	//interrupt servicing complete
}