Tool/software: Code Composer Studio
//AM.c AM using table for carrier and baseband signals
#include "DSK6713_AIC23.h" //codec-dsk support file
#include "dsk6713.h"
#include "dsk6713_led.h"
#include "dsk6713_dip.h"
void comm_poll();
void output_left_sample(float out_data);
Uint32 fs=DSK6713_AIC23_FREQ_8KHZ; //set sampling rate
short amp = 1; //index for modulation
void main()
{
short baseband[20]={1000,951,809,587,309,0,-309,-587,-809,-951,-1000,-951,-809,-587,-309,0,309,587,809,951};//400Hz baseband
short carrier[20] ={1000,0,-1000,0,1000,0,-1000,0,1000,0,-1000,0,1000,0,-1000,0,1000,0,-1000,0}; //2kHz carrier
short output[20];
float output_left_sample[20];
short k;
comm_poll(); //init DSK, codec, McBSP
while(1) //infinite loop
{
for (k=0; k<20; k++)
{
output[k]= carrier[k] + ((amp*(baseband[k])*(carrier[k]/10)>>12));
output_left_sample(20*output[k]); //scale output
}
}
}
i have one problem:
Description Resource Path Location Type
#110 expression must have (pointer-to-) function type main.c /am line 24 C/C++ Problem