This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM modulator

Hi, I'm working on my undergraduate thesis about Communication Systems Implementation using TMS320C6713 DSK, and I'm having trouble implementing a modulator. So far I've followed the suggestions on Chassaing's book, but when multiplying the sine waves (carrier and information), I've found that the output is not what was expected. I apologize if there is already a thread on the subject, and will thank anyone who can give some help in the matter.

  • Carlos,

    Welcome to the TI E2E forum. I hope you will find many good answers here and in the TI.com documents and in the TI Wiki Pages. Be sure to search those for helpful information and to browse for the questions others may have asked on similar topics.

    You have several good keywords to search on, so please let us know what you find from some of the other threads on this subject. Use the red search box in the upper-right corner and let us know what you find.

    Regards,
    RandyP

  • For AM you don't want 4-quadrant multiplication.  First, scale the modulation signal to lie between 0 and 1.  Then multiply it by the carrier sine (or cosine) signal, which should be balanced (+ and - values) around 0.  Of course, you need to multiply the two signals evaluated at corresponding *times*; if you have them represented in arrays but the array samples are not spaced so that they have the same time difference between adjacent elements for the two signals, you'll have to do some more work to properly align them.

  • Well, I finally solved the problem of implementing a simple AM modulator, basically what I did was use the support for sine functions through math.h library, and create 2 sine waves (I abandoned the tables to create them), and finally I multiplied them. I understand that this is somehow less efficient (correct me if I'm wrong), but it worked fine. The only problem is that when connecting an osciloscope to the output of the DSK I got what I expected, but when using CCS to graph the output the graph didn't correspond to the waveform observed using the osciloscope. I would be grateful if someone gave me some advice regarding the problem of graphing the output and its spectrum using CCS.

    //sine_intr.c Sine generation using sin() function

    #include <math.h>

    #include "DSK6713_AIC23.h"                     // codec support

    Uint32 fs=DSK6713_AIC23_FREQ_8KHZ;           //set sampling rate

    #define DSK6713_AIC23_INPUT_MIC 0x0015

    #define DSK6713_AIC23_INPUT_LINE 0x0011

    Uint16 inputsource=DSK6713_AIC23_INPUT_MIC; // select input

     

    #define SAMPLING_FREQ 8000

    #define PI 3.14159265358979

     

    float frequency = 2000.0;

    float amplitude = 3000.0;

    float frecuencia =400.0;

    float amplitud= 1500.0;

    float incremento;

    float angulo=0.0;

    float theta_increment;

    float theta = 0.0;

    float vector[100];

    float salida;

    short index=0;

    interrupt void c_int11()

    {

      theta_increment = 2*PI*frequency/SAMPLING_FREQ;

      theta += theta_increment;

      if (theta > 2*PI) theta -= 2*PI;

      incremento=2*PI*frecuencia/SAMPLING_FREQ;

      angulo +=incremento;

      if (angulo > 2*PI) angulo -= 2*PI;

     

      vector[index++]=(short)(amplitude*sin(theta)*(1+(amplitud/amplitude)*sin(angulo)));

      if(index>=100) index=0;

      output_left_sample((short)(amplitude*sin(theta)*(1+(amplitud/amplitude)*sin(angulo))));

      return;

    }

     

    void main()

    {

      comm_intr();

      while(1);

    }