Real Time FFT Display

Real Time FFT Display and Tone Decoder

This Fast Fourier Transform (FFT) is performed using 8-bit fixed point arithmetic, making it very fast to execute, especially if used with one of the PIC18FxxKxx devices that are capable of 16MIPs using a 64MHz oscillator.

There are several example programs using the FFT routine downloadable from here: Positron8_FFT_8_Bit.zip

  • 128 element FFT yielding a 64 element result displayed as bars on an alphanumeric LCD.

  • 64 element FFT yielding a 32 element result displayed as bars on an alphanumeric LCD.

  • 32 element FFT yielding a 16 element result displayed as bars on an alphanumeric LCD.

  • 16 element FFT yielding an 8 element result displayed as bars on an alphanumeric LCD.

  • A simple tone decoder with LCD and LED outputs.

All the example programs are for use with the Positron8 BASIC Compiler and use a 18F25K20 device, the same as used by the Amicus18 board. However, with simple changes, there is no reason why it could not be implemented with 14-bit core devices, albeit with reduced performance because of the lack of hardware multiply within these devices.

The actual FFT routine performs its task in 1ms to 6ms depending on how many elements it needs to calculate, making it, pretty much, real time.

Here is a video of the standard FFT routine displaying its spectrum on an alphanumeric LCD:

The Isis DSN file for the above simulation can be downloaded from here: DSN file for FFT Using_18F25K20.zip

Because of its speed of execution, here is an example of the FFT being used as a simple tone decoder for a single frequency, however, it could just as well decode multiple frequencies such as DTMF:

The Isis DSN file for the above simulation can be downloaded from here: DSN file for FFT_Tone_Decode.zip