Audio spectrum analyzer using Atmega32
When speaking about spectrum we know that there is a Fourier transform involved. Probably this is the trickiest part of the business. Vinod felt like he needed to refresh his Fourier transform knowledge and made a small spectrum analyzer that displays frequencies from 0 to 10kHz. His choice was Atmega32 microcontroller running at 16MHz, text LCD and audio input circuit that adjusts incoming voltage to fit AVR’s ADC input.
He programmed spectrum bars as custom characters on LCD and was able to display 16 points. His choice was to use DFT which is actually slower than FFT but easier to implement especially when you are just stepping in to spectrum area. Speed is critical here as in order to calculate 32 points it needs to calculate 512 sines and cosines. Obviously this would kill avr if not using look-up tables. With some tricks he was able to calculate 120 32-point DFT operations per second. With such speed vinod had no problem displaying spectrum at 30 frames/sec speed. Source code is written in C and is easy to follow.

