# Amplitude Modulation

Function: Implement an audio, Amplitude Modulator on the C54x DSK Plus.

Location: ftp://ftp.ti.com/pub/tms320bbs/c5xxdskfiles/Ammod.exe
By: Thomas Millikan

> #### Scramble Application Code: dskpammd.exe

> Starting off:
> The file "dskpammd.exe" can be downloaded from the ftp site listed above to provide a demonstration of Amplitude Modulation . First save "dskpammd.exe." into it’s own directory. Then run the executable (in DOS or Windows) allowing it to explode into the following files:

            dskpammd.exe    - The original file that was downloaded
            Ac01init.asm    - Initializes the analog interface on the DSK Plus
            Main.asm        - Main assembly program
            Main.lst        - list file containing variable names for debugger
            Main.obj        - object file for main assembly program (executable)
            Readme.txt      - In depth explanation of the assembly code
            Coeffs.asm      - Initializes coefficients for the filters
            Vectors.asm     - Initializes the C542 interrupt vector table

> By downloading and running the files in "dskpammd.exe" you can learn how Amplitude Modulation (AM) and filters are necessary in the transmission and modulation of signals. "Dskpammd.exe" also lends insight into the generation of digital sinusoidal signals.

> Load Main.obj onto the DSK and run it to modulate the voice/music introduced through the input mini-jack. The signal introduced through the input mini-jack is filtered using a FIR bandpass filter. The filtered signal is modulated using a digital sinusoidal carrier signal, and then sent out through the output mini-jack. (see the TMS320C54x DSKPlus User’s Guide page 1-4 for jack locations)

> Theory:
> Let us start with our input signal, x(t). First we apply a bandpass FIR filter (See FIR filtering for more detail) to x(t), effectively limiting it’s frequency content from 200Hz to 1800Hz. When we Fourier Transform x(t) into the frequency domain we obtain the following graph:

>     Where: The gray area shows the frequency content of x(t), and the white
>            area is a reflection of our input signal that develops from the
>            absolute value of X(w) when we transform it.

> Now, let’s go back to the time domain. After we filter the signal , we modulate it. In Amplitude Modulation (AM) the signal x(t) is first put on a sinusoidal carrier signal, Cos(wc* t), of frequency wc (Hz). In other words the input signal is modulated or multiplied by the carrier frequency. Refer to the following graphic:

> When y(t) = x(t) * Cos(wc* t), the relationship between the frequency content of y(t) and the frequency content of x(t) can be understood by the Fourier relationship:

### |Y(w)|=1/2[X(w-wc)+X(w+wc)]

>     where:
>             |Y(w)|   = The absolute value of the output
>             |X(w)|   = The absolute value of the input
>             w        = (Hz)
>             wc       = The carrier frequency of the sinusoidal

> If we transform the signal y(t) into the frequency domain and graph it, the graph would look like the following:

> As you can see from the graph, Amplitude Modulation shifts the frequency content of the signal to a higher frequency. On the right half we have our signal, and on the left half we have another reflection of the signal.

> The new signal, y(t), is output through the out mini-jack on the DSK. The frequency content of the output signal is the right half of the above graph. The vertical line at 2000 represents our carrier frequency. Our signal has now been modulated to a higher frequency. If we wanted to recapture our original signal, we would apply a bandpass filter with cutoff frequencies at 2200Hz and 3800Hz. (See FIR filtering and Frequency Scrambler for more details on recapturing the original signal)

> Our new signal can be heard by attaching a speaker to the "out" jack of the DSK Plus. You will hear the carrier frequency (2000Hz) as well as the original signal and it’s reflection.