EE 476: Laboratory 6

Analog Mixer and delay line.


You will construct a system for digitally combining two analog audio inputs and to produce a digital delay line echo.


You will need to supply a portable stereo player. If this a problem for anyone, please talk to a staff member. The two analog (stereo) outputs from a walkman-like player will be used as inputs. Since uniform sampling rate is very desirable, you will need to use a HSO driven sample time or count cycles (and turn off interrupts) to ensure constant sample times.

You should build analog filters to suppress high frequencies and minimize aliasing. Probably a simple RC filter with a roll-off at around 1/5 of you final sampling rate will be sufficient. Since the input impedance of the A/D converters is so low, you should use an active filter or buffer the filter output. You will also need to offset the audio input so that it stays in the range of 0-5 volts. You should probably make the audio symmetric around 2.5 volts for A/D input.

You will need to store a lot of data to achieve a few tenths of a second echo time. Define a
dseg at 3000h , (or lower) but make sure that you do not overwrite the default interrupts at 7FE0h. You will need to define a circular buffer so that the last few thousand samples can be stored, then overwritten after they are used. Limit the stored samples to 8 bits each and initialize them to zero.

When you are actually producing an echo you need at each sample time, t, to calculate:
output(t) = input(t)*0.5 + storedvalue(t-delay)*0.5
storedvalue(t) = output(t)
Where storedvalue(t) is the new value inserted into the circular buffer.

Send the output to a port connected to a dac0808 D/A converter. The output of the D/A converter is a current and should be converted to a voltage using an op-amp (as shown on the dac0808 data sheet). Use an earphone to monitor the program output.


Produce a system that:

  • Converts the output back to an analog signal using a dac0808 digital-to-analog converter and associated op-amp for your earphone listening pleasure. You may want to lowpass filter the analog output to get rid of some of the switching transient noise. For extra credit, make the delay time variable in perhaps four steps from .05 to 1 second, and provide controls to vary the delay time.

    When you demonstrate the program to a staff member, you should exercise all the push button commands to produce the four different outputs.

    Your written lab report should include:

    Copyright Statement