Professional Documents
Culture Documents
Lab 1
Lab 1
{c,h} */
/* file location is \\eceserv2\students\realtimefiles\C6713Boiler */
#include "dsk6713_aic23.h"
#include "math.h"
extern far void vectors(); // this is needed to find the vecs.asm file for int
processing
void init_DSK(void);
void init_Mcbsp1(void);
void init_Ints(void);
void main()
{
init_DSK();
init_Mcbsp1();
//init_IRQ() not used here but in sineirq lab
/* initialize everything */
//pi = 3.1415926;
pi = atan(1.0)*4.0;
//
lstep = 2.0*pi*f1/fs;
rstep = 2.0*pi*f2/fs;
//
AIC_data.two = 0; // initialize both channels to 0, not needed since values are
// assigned below, before output
while(1)
{
AIC_data.lr[0] = (short)(15000.0*sin(thetal));
AIC_data.lr[1] = (short)(15000.0*sin(thetar));
while(!MCBSP_xrdy(DSK6713_AIC23_DATAHANDLE));
MCBSP_write(DSK6713_AIC23_DATAHANDLE, AIC_data.two);
thetal += lstep;
thetar += rstep;
} // end main