Quantcast
Channel: Seeedstudio Forum
Viewing all articles
Browse latest Browse all 6612

DSO203 GCC APP - Community Edition (2.51+SmTech1.8+Fixes)

$
0
0
marcosin wrote:Very good work!!! Image Image Image

I've a question: which is the fft frequency scale?

I've found only a little bug, in the trigger level label visualization, when i go in manual and return to automatic level the field remain dirty (a part of V1 text).


Thanks Marco. Glad you could check it out. Image

I noticed the trigger level display bug. Will have to check it...

The frequency scale on the FFT is actually dependent on the x scale sample time.
It's something like:

Nyquist_freq should be = (1.000.000.000.000 / _T_Scale) / 2
(_T_Scale is in nS)

The whole FFT graph (256 lines) x_scale should cover from 0 to the Nyquist_freq.
so each line in the FFT should be = Nyquist_freq / 256

... I have a build with that value and the top frequency from the FFT displayed.
I'll just fix the trigger level thing and release it...

here's the code for those calculations:
Code:     NFreq = (1000000000 / (_T_Scale)) / 2;
     NFreq *= 1000;
    
     Int2Str(NumStr, NFreq, F_UNIT, 4, UNSIGN);
     Print_Str(  248, 0, 0x0005, PRN, NumStr);
    
     PeakFreq = 0;
     imax = 0;
   
     for (i=0; i < (256); i++) {
      if (PeakFreq < arrout[i]) { 
         PeakFreq= arrout[i] ;
         imax = i;
      }
      }
 
     Int2Str(NumStr, ((NFreq / 256) * imax), F_UNIT, 4, UNSIGN);
      Print_Str(  92, 0, 0x0005, PRN, NumStr);


Statistics : Posted by pmos69 • on Fri Mar 02, 2012 8:09 am • Replies 231 • Views 23818

Viewing all articles
Browse latest Browse all 6612

Trending Articles