EE 451 - LAB 7

A Simple Detector

Implement the detector discussed in Lab 6.

The 56002 has a number of pins which can be used for various I/O functions. When not used for specific functions, these pins can be used for general purpose I/O, much in the way that the pins on the 68HC12 are used. The 15 lines of Port B on the 56002 can be used as a host port (for parallel communications with a host computer). When not used for this function, you can use these pins for I/O. Read Sections 5.1 and 5.2 of the DSP56000 Digital Signal Processor User's Manual to see how to use Port B pins for general-purpose I/O.

Choose a pin on Port B which you will use to indicate whether the frequency is present or not. Look at the schematic for the 56002 board (available in the lab) to determine how to connect to this pin. Using the EVM program, set up this pin as an output. Verify with a logic probe that you can change the state of this pin.

Write 56002 code to implement the detector. To implement the detector, you can either square the output of the bandpass filter, or take its absolute value (with the ABS instruction). Pass this signal through a low-pass filter. It is probably easiest for programming purposes to use an IIR filter. A simple second-order IIR filter, with two zeros at -1 and two poles (of equal radius) to pass low frequency signals (pass signals with frequencies below 50 Hz and stop signals with frequencies above 500 Hz). For the poles try a radius of about 0.9 or 0.95, and an angle corresponding to about 25 Hz. Verify that the low-pass filter works.

Implement your low pass filter using the iir.asm macro you used last week.

Put the output from your bandpass filter to one channel of your D/A, and the output from the detector to the other. Use your function generator to produce a sine wave of the correct frequency. Verify that the detector works properly.

When the output from the detector is above some threshold value, bring a pin of Port B high. When the output from the detector is low, bring the Port B pin low.

Use a logic probe to verify that the selected output pin goes high when the selected frequency is present, and goes low when it is absent. For a 1 V P-P input signal, what are the lowest and highest frequencies which make the output pin go high? Compare this to your gain plot from last week's lab.

Bill Rison