PC: How does this command work in FPGA? scopesettings.channel1.averagecommand = 0x24;
how is the FPGA programmed - it only takes 10 samples from the signal? according to the sampling frequency from command 0x0D THX
The way the commands 0x24, 0x25, 0x26 and 0x27 are implemented in the FPGA is that they read data directly from the ADC busses. 0x24 => ADC1_A, 0x25 => ADC1_B, 0x26 => ADC2_A, 0x27 => ADC2_B. The data read is what is clocked by the last ADC clock signal, which is indeed based on the sampling frequency set with command 0x0D.
The averaging, or filtering, has to be done in the software to get a somewhat stable reading, since there is no synchronization on the actual sampling. The reading might be in the middle of a data transition and be complete rubbish.
As stated before the FPGA design is just as bad as the coding of the original firmware.