Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 2 of 2

Thread: DFT using analog read in Teensy 3.2

  1. #1
    Junior Member
    Join Date
    Aug 2016
    Posts
    4

    DFT using analog read in Teensy 3.2

    I am pretty new to arduino and also teensy, I need to implement DFT using analog read(to read real-time values). I have seen FFT implementation but notDFT, I have used ADC library to calculate sample speed, it was fast. I need some pointers on implementing DFT continuously, I know FFT is faster and also available in toolkit. But need guidance on implementing DFT.

  2. #2
    Senior Member
    Join Date
    Jul 2014
    Posts
    2,221
    Quote Originally Posted by sushantvs View Post
    I am pretty new to arduino and also teensy, I need to implement DFT using analog read(to read real-time values). I have seen FFT implementation but notDFT, I have used ADC library to calculate sample speed, it was fast. I need some pointers on implementing DFT continuously, I know FFT is faster and also available in toolkit. But need guidance on implementing DFT.
    I guess you know what a DFT is, right? So simply define your complex rotation vector, multiply real,imag part with data vector, sum it up, that's it.
    Do it first in C. You get 16 bit data, right? use a 32 bit accumulator to avoid overflow.
    Once you are happy with the result, you may adventure to replace the complex multiplication with DSP instructions to get final performance.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •