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

Thanks Marco. Glad you could check it out. :slight_smile:



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);<e>[/code]</e></CODE></r>