Proton BASIC Compiler - Proton Fast 8-bit FFT


  • PicŪ Basic


  • Proton Fast 8-bit FFT

    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 newer 18FxxKxx devices that are capable of 16mips using a 64MHz oscillator.

    There are several example programs using the FFT routine downloadable from here: Proton_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 version 3.5.3.0 onwards of the proton compiler and use a 18F25K20 device, the same as used by the Amicus18 board. However, with 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.

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

    Here is a video of the standard FFT routine displaying its spectrum on an alphanumeric LCD, as simulated in the Isis simulator:



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

    Note that the DSN can only be used with a full version of the Proteus package that supports 18F devices.

    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

    Note that the DSN can only be used with a full version of the Proteus package that supports 18F devices.
  • Recent Activity

    Mellbreak-21950

    Interrupt and SHout problem

    Thread Starter: run75

    Hi Everyone! I am really beginner in doing Pitz program and I have one problem with that. I would like to use interrapt for IR in RA2 pin while I...

    Mellbreak Today, 16:43 Go to last post