EE 451
Lab 2: Sampling and Aliasing in Real Time with the Motorola DSP56002 EVM

For experimentation in real-time signal processing, we will use the following equipment:

  1. Use the 56000 assembly-language program play.asm. To assemble this, first copy the files ada_init.asm and txrx_isr.asm from the C:\EVM directory to your directory. The codec is a complicated chip, and these pre-written routines do the work necessary to sample the input signal. This will be discussed further in lab.

    Assemble the program using the following command:
    ASM56000 -a -b -l lab2.asm

  2. Set the function generator to give a 2-volt peak-to-peak, 5 kHz sine wave. Connect the output with the mono cable to the input of the A/D converter. Connect the outputs of the D/A converter to two channels of an oscilloscope. Run the program EVM56K on the PC. Give the command load lab2, which will load the assembled program into the 56002. The command disassemble $40 should show you the instructions as loaded into the 56002.

    The first part of the program is the code included from the ada_init.asm program. Scroll down until you find the region of code whre the DSP samples the input data, and sends it to the D/A converter. Note that the code simply reads the data from one channel (the left) of the A/D converter, and writes that data to both the left and right channels.

    The command go $40 will run the program. The two outputs should look the same.

  3. Vary the frequency of the function generator, and observe the response of the D/A converter. Use several frequencies from a few hertz to 100 kHz. Record your observations.

  4. Connect your audio source to the input of the A/D. Listen to the output through headphones. Note the quality of the sound.

  5. Stop the 56002. Modify the program to put out the left channel every sample interval, but put out the right channel only every 12th sample interval. This output of the right channel will then have a sampling rate of 4 kHz. The easiest way to do this is with a DO instruction. Set up the DO instruction to execute the sampling code 12 times without the line
     move    b,x:TX_BUFF_BASE+1      ;transmit right 
    Then add code to write the data to the right channel, and finally loop back to the DO instruction.

    Re-connect the function generator to the A/D, and run this modified program. Vary the frequency of the function generator as you did in Part 3, and compare the two outputs of the D/A converter. Observe aliasing for high frequencies. At what frequency does aliasing begin? Be sure to sketch a few examples of what the output looks like. Do the for low frequencies where the signal is not aliased, for high frequencies where the signal is aliased, and for frequences just below and just above the frequency where aliasing begins.

  6. Modify the above program so both channels put out every 48th sample, giving a sampling frequency of 1 kHz. Observe the effect on different frequencies. Connect your audio source to the input of the A/D. Listen to the output through headphones. Note the quality of the sound.



Bill Rison, <rison@ee.nmt.edu >
Tue Sep 5 2000
Copyright © 2000, New Mexico Tech