DSO firmware version 3.3

BenF,

your code works great and it makes me very very very happy. Thanks a lot!!! It fixed (almost) all problems I had with previous DSO Nano.

In case you or somebody else is working on FFT, I’m attaching my FFT code I made long time ago used for some my PC DOS Sound card oscilloscope program (worked at real time). It is written based on Digital signal processing course on Electrotechnical Facultity at Begrade (prof. Miodrag Popovic), Serbia. I think it is pretty optimized. Use 2^N buffer (I suggest N=256 for this screen). Unfortunately I forgot theory details. You can use it completely as it is, modify it or find some ideas. Looking at it now, “(x != 0.0)” tests need to be replaced with “(fabs(x) < 1e-N)”.

Also, I suggest to write your FFT code on some test desktop app, to test it and figure out what is going on before move it to DSO (don’t forget to use window “functions”). FFT theory is very interesting. I guess you can use input/output txt files and Excel or similar program for visualization if you don’t have GUI routines.

If anyone isplanning to start with FFT, the additional memory need to be considered (probably there no big free memory on DSO), and/or used some alternative algorithm. For example, input sequence can be real part, and some another additional array could contain im complex part, instead to have additional array with complex structure {re, im}. Also, maybe real/doube is not availabe or too slow on this CPU so integers need to be used, which requires much more care.

By the way, I don’t think that FFT is realy needed for this osiloscope. The osciloscope mode is what the most of people really need (including me). But it is fancy to have it. So, making the FFT is for someone who just have enough time and enjoy to make it.

Regards,
Dejan
my_fft_code.zip (7.44 KB)