Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

need help in code composer studio

Status
Not open for further replies.

strike04freedom14

Newbie level 2
Newbie level 2
Joined
Mar 7, 2012
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,301
i using code composer studio do my assignment.
i need to put this signal generator equation into the AM coding, so the frequency in the AM coding can be varied.
Problem is, this equation need to put where/which line in the AM coding, or need something change in the AM coding.


Sine wave = a*sin (2* PI * (sample/cycle))



AM Coding


//AM.c


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "DSK6713_AIC23.h"          //codec-dsk support file
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}; //400-Hz baseband
 short carrier[20] ={1000,0,-1000,0,1000,0,-1000,0,1000,0,-1000,0,1000,0,-1000,0,1000,0,-1000,0};                      //2-kHz carrier 
 short output[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_sample(20*output[k]);        //scale output
    }
  }
}




please help me...i really need some help....Thank
 
Last edited by a moderator:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top