Modify fftex2.asm
to implement a real-time 512-point FFT which
takes 512 points of the signal from the ADC as input and
calculates the FFT of the 512-point signal. Build upon this
real-time 512-point FFT and design a real-time spectrum
analyzer by sending the power spectrum of the calculated FFT
through the DAC in some useful fashion,
(e.g., periodically outputting the power
spectrum). Specifically:
-
Input a real time waveform and compute the FFT of the input
data.
-
Compute the power spectrum P as follows:
FFT2N2
FFT
2
N
2
-
Output one-sided power spectrum data as a time domain
sequence through the DAC device for display on the
oscilloscope.
Several considerations need to be taken on displaying the power
spectrum on the scope.
-
Trigger: For each power spectrum, one can
output a strong pulse (e.g., two
samples with +2 and -2 volts) for the purpose of scope
synchronization. Alternatively, the second DAC channel
can be used to send a separate trigger signal.
-
Calibration: The frequency scale needs to be
calculated based on the sampling frequency (
f
s
=48 kHz
f
s
48 kHz
).
-
Display: Consider windowing your data before
the FFT. What will this accomplish?
Implement the real-time power spectrum analyzer with your own
ingenious modifications. Measure power spectra for signals
(sine, triangle, square, random noise) between 50 Hz and 20
kHz. Report what you observe. Does the real-time spectrum
analyzer behave as you expect? Discuss the limitations of the
spectrum analyzer.