While attempting to make use of oversamping I've become quite confused about the maximum number of samples.
while using ps2000_get_timebase(...) with a timebase of 9, and an oversampling rate of 2. I get a maxsamples value just under 4000. Now if I try to set the number of samples to the value of maxsamples it returns 0, appearing to be out of range. To get the function to return in range, I must take the value for maxsamples that the get_timebase(...) returns and divide it by the oversampling rate. Resulting in just under 2000 samples.
My problem is that I could really use a higher oversampling rate, and 2000 samples.
Is this the correct operation of get_timebase with oversampling. It appears to in a 1/(oversampling rate)^2 reduction in maxsamples.
No, right now I'm strickly in the get_timebase(...) function.
If I pass it no_of_samples as 1, just to see what it returns as max_samples. It might return something like 896. If I then take that number and I re-run get timebase with no_of_samples = 896 it returns as out of range. If i then divide the 896 by the oversampling rate of 8 = 112 and I try to run get_timebase with that as no_of_samples, it still returns the 896 as the max_samples but the 112 is the largest Im able to use.
When this with a small value, like no_of_samples = 20, I get a large value for max_samples. But if i re-run the code with no_of_samples = max_samples, I get an out of range. The max I can get to return as in range is no_of_samples = max_samples/oversample.
I'm working with a 2205 with one channel disabled. So for a rough estimate, I think I should be able to get just less than 16000/oversample = max_samples. And I should be able to set no_of_samples to this value as well.
I have been trying this using the ps2000con.c example and not had the same problem.
I set no_of_samples = 2000 oversample = 4 and the function returned max_samples = 3968. I then re-ran it with no_of_samples = 3968, with no error. Are you changing anything else, such as the timebase?
I'm having same kind of problem as traegeaf. I'm trying to use oversampling but get_timebase function won't accept certain values I think it should. I made a loop to test what it does accept and what it doesn't. Result are as follows:
-timebase can be anything from 0 to 23. Over 23 will allways result in error no matter what other inputs are. Following oversample/no_of_samples relation is true for all timebases between 0 and 23.
-oversample and no_of_samples are related in following way:
Where no_of_samples is the maximum number that get_timebase function will accept with given oversample. Anything under that works too. Note that with oversample over 64 the function will allways return error. With 64 it will accept zero but nothing more. Oversample 1 will give ~8000 as expected (PicoScope 2203). However in overall I expected something more like:
The odd part is that with PicoScope6 oversampling seems to be working. I'm able to capture signal with any "Resolution Enhance" I want and the data is "enhanced".
I'm programming in VB.NET but tried the ps2000con.c example and it too had the same limits as above.
So if someone could please tell me if this is what I should expect or how to make this oversampling work...?
I belive the picoscope 6 software uses fast streaming mode, and uses a oversampling in the software to provide the added resolution.. The oversampling is pretty easy to do. You take how ever many samples more than required, run them through a filter, which will cause linearization between points providing the enhanced resolution, and then decimate the data to reduce the number of data points.
Thanks for the quick update. However as I ran the tests for this dll (2.0.7.6), I got the exact same results as with the version 2.0.7.2.
Now what did you mean when you said that the above table looks correct? Beacause according to that table, increasing resolution 4 or even 3 bits is not possible. I am in believe that PicoSCope 2203 is capable of resolution increase of 4 bits.