Sunday, November 6, 2016

Smallest Audio Spectrum analyzer "TI TMS320 DSP FFT Implementation" 96x16 OLED display

In this quick little demo i will show you real time 256 point audio band spectrum analyzer, i will be using ezdsp5502 board , which has TMS320VC5502 and for input signal sampling we are using onboard audio codec TLV320AIC3204B to sample input signal at 48Khz sampling rate. its  post is not going to be tutorial for FFT , the scope of this post is only to show how to get contentious input sampling ,FFT calculation and display on the little FFT Display.
with 48khz sampling  256 point FFT, we can see up to 22Khz singal in our 128 point FFT result ,  with resolution of 171 Hz for output point each point.


i have used ezdsp board and onboard codec, there was no extra hardware required. ezdsp schematic available online.  i am using my MDO3000 Arbgen to generate test signals. at around 2Vpp.


There is no magic in the firmware, i am setting up mcbsp in i2s mode , and initialize TLV320AIC3204 as I2S master , which give interrupt on every I2S word reception , i put all samples into buffer. and as buffer fills up , i calculate 256 point in place FFT , after this i calculate absolute value for each FFT point output. then plot the output to the OLED screen.


All source code is available on this github repo.


  1. Thank you very much for sharing.
    I recently got the C5502 eZdsp. Your site is one of the few resources I found related to this board.
    I have 2 requests:
    1) Can you please add this code to your Github repo?(I didn't find it there)
    2) Can you please point to some good resources/tutorials for this board?

    1. thank you for pointing it out.
      source code has been uploaded to the git.
      there is barely any martial available for specifically for VC5502 because this DSP is not supported by TI anymore. They don't even update library for it. please keep in mind lib supplied by TI may or may not work with this CPU.
      for reason take a look at this link,.

      i have written few library from scratch.
      this cpu does not even have TI CSS support so i have add xml files to the CSS.

      its better to go for C5515 or C5535.

      i have few other project some where in queue they may get published soon , you can visit some time later if you are interested

    2. Thank you for the code and the detailed explanation.

      I was also very hesitant about buying this board. But since I have bought it, I guess I have to make do with it!

      I found other posts from your site very interesting and inspiring as well. Please do keep sharing more such content.