I'm developing a spectrum analyzer for the 8bit Atmega32 that outputs onto a LCD display. The maximum sampling frequency is 40kHz, and maximum frequency is hence 20kHz, adhering to fs > 2B. At the moment, I am generating a signal internally, then applying the FFT to this signal and viewing the spectrum on the LCD.
Please note this is written in pseudo-code:
#define SIG_N 128 //Number of samples in signal buffer
#define FFT_N 64 //2*Output bins
uint_8 signal[SIG_N];
uint_8 spektrum[FFT_N];
for (int i = 0; i < SIG_N; i++){
signal[i] = 255*sin(2*3.14*f*i / SIG_N);
}
computeFFT(signal,spektrum,FFT_N); //arbitrary method computes signal outputs spektrum
The output spectrum currently has FFT_N/2 = 32 bins, each representing 1Hz. Therefore the highest frequency my spectrum currently represents (i've tested this) - 32Hz. How can I increase the "frequency width" of these bins, in so that each bin represents 625Hz? Remember, I cannot increase the size of FFT_N beyond 64~128 as I have memory restrictions.