Itās a pity you made them over v1.7, and that Iām extremely busy at the moment
Would you consider forking the current github repo (https://github.com/pmos69/dso203_gcc) and adding some/all changes, even little by little? (thereās some overlap with latter changes in v1.8-v1.24)
If you fork the github repo, you can commit changes there and issue a pull request at any time so that changes can be merged in the current code.
PS:
Just did took a very quick look at some changes in the calibration and there are a few things I still donāt understand.
For example, in Balance() and Calibrat(), I donāt understand why you initialize a_Avg and b_Avg with anything other than 0, since they are not really averages but cumulative values and the averaging is only done at the end.
ex from Calibrat(): [code]ā¦
a_Avg = 2048; b_Avg = 2048;
for(i=0; i <4096; i++){
DataBuf[i] = __Read_FIFO(); // read into the 32-bit FIFO data
swap=0x300;
swap &= DataBuf[i];
if ((swap==0x100)||(swap==0x200))DataBuf[i]^=0x300; //swap 2 least significant digits of chB, fixes error in FPGA programming
a_Avg += (DataBuf[i] & 0xFF ); // cumulative DC average
a_Avg-=ADCoffset;
b_Avg += ((DataBuf[i]>>8) & 0xFF );
b_Avg-=ADCoffset;
From what I understand, all 4096 values in the buffer are added first in avg_a and avg_b, and at the end those cumulative values are divided by 4096 to get the average values.
If thatās the case, it doesnāt make sense to initialize avg_a and avg_b with anything other that 0.
It would make sense to initialize them to a value representing 0, if avg_a and avg_b were averages to begin with, and not cumulative values.
If one imagines, for example, that the buffer only had 1 value, and not 4096, I would presume the cumulative values for avg_a and avg_b would have to be equal to the values in the buffer, whatever the values in the buffer, and dividing the cumulatives by the number of samples (1) the averages would also also always be the same as the values in the buffer.
That does not happen in the current code.
As the math is done, if I imagine different buffer sizes with all constant values, the end result varies with the buffer size, even if the values in the buffers are all the same, and that doesnāt seem right.
Itās a fact the āerrorā tends to zero as the buffer size increases, but nonethelessā¦
Wow indeed. It would be great to get all these fixes into the base community edition. The UI chsnges seem well thought out as well.
On the subject of the avg offset it looks like the 2048 is there to give a 0.5 bit rounding offset per sample into the average value as it is divided by 4096.
It just preloads the starting point at 1/2 least significant bit. I actually didnāt give it a whole lot of thought, this is common practice when working with ADCās. Has to do with integer math, where most compilers will not round out a value. For example, if you start out at 0, then add 0.999, you will still get 0, however, subtract 0.001 and you will get -1. This creates a 1/2 LSB offset biased towards the negative. If you preload it at +0.5 then it takes an equal level to bring it positive as it does negative, effectively ācenteringā the zero level. This is also the reason the original author added ā512ā to the calibration calculations, these subsequently get divided by 1024, biasing the value to +1/2 LSB.
The original code initialized these @ 2048 (out of 4096 samples). I just changed it so it would work correctly when using the smaller buffer.
As I mentioned, I did not give this huge amount of thought at the time, it may be that the 1/2LSB offset is taken care in subsequent calculations, so you may be rightā¦
I found HEX binaries in root directory of archive, but if I tried to install any of them (i suppose there are three version to three different slots), no one is possible to install. Each try seems to be succesfull (fast unmount/mount and rename HEX to RDY extension) but nothing on DSO is overwritten. There is still previous one version of DSO active in slot1 and previously installed LOGIC analyzer in slot 3.
May be I missed something, or included HEX is wronlgy compiled a recompilation necessary. I want to start building of development environment for future improvement participation, but now I need to use DSO with best actual FWā¦
Thank you very much Wildcat. You fixed the triggering so now I can see occasional bursts of data on a serial line. This scope hase been practically useless to me until now.
You moved DSO Quad form almost unusable toy to quite nice DSO. I hope that we get soon merged FW of yours and Pmosās version with good buttons layout - each FW i tried used different mapping and for me it was necessary to print help card with buttons mapping. (I see Wildcat buttons mapping to be most effective - especially moving some fucntion from jogdials to big buttons is nice.
May be let discuss some definitive buttons functions layout and keep it across future versionsā¦
I was very disappointed by severity and amount of bugs in official firmware as very poor and incomplete doc.
So it is necessary strongly recommend to newcomers IMMEDIATELY switch to PMOS or WILDCAT version!!!
However per the last picture posted here, itās really a sub set of green CH4. This buggered me for a while. Long press of play/pause doesnāt seem to do anything.
Iāve been using the Wildcat version as my main app which functions very nicely as a scope.
I canāt seem to make sense of the signal generator part though. It sets the waveform and the amplitude OK but all the frequencies seem to be off by a factor of 4. E.g. when I set 1KHz I get a 250 microsecond period waveform on the display rather than the 1msec I was expecting. The timebase looks OK against normal external signals.