|
Edited by jbh_ooi at 2022-4-14 14:35
UPDATE: I have found the solution to the problem, and will share it here for anyone who needs it.
I have found this blog page useful, and have drawn inspiration from the discussion which led to the solution.
https://www.eevblog.com/forum/te ... e-20mhz-usb-dso/75/
Important information required to set the time interval between the sample points which can be found from the image by ying, as well as the exported data:
- Sampling rate (from the image)
- CLOCK (time/div)
- SIZE (buffer size)
From the blog post, I noticed a trend in the sampling rates set by the oscilloscope. When time/div = 2 μs, the sampling rate is set to 48 MHz. Even if the time-base is faster (< 2 μs), the sampling rate is limited to 48 MHz. ying has helpfully compiled the sequences of time/div into different rows according to the sampling rates and buffer size.
To get the time interval between sample points, consider these variables:
- CLOCK (the current time/div)
- ONSET (the largest time/div in the 48 MHz sequence/row, ie. the last value in the cell)
- RATE (the current sample rate)
- SIZE (the current buffer size)
- DIV (the total number of divisions in your data)
Firstly:
SIZE = number of samples/div * DIV
Since the 48 MHz sampling rate is the scope limit, we wil consider the onset where this limitation starts. So:
number of samples/div = RATE * ONSET
Substituting and rearranging gives:
DIV = SIZE / (RATE * ONSET)
Total time = CLOCK * DIV
Finally:
Time interval = Total time / SIZE = CLOCK / (RATE * ONSET) --- [48 MHz]
For sample rates below the maximum rate, I suspect that the oscilloscope should be working optimally. In that case, ying's suggestion should work. Therefore:
Time interval = 1 / RATE --- [all other sample rates]
This has given me the correct results so far (I haven't tested all rows because I don't necessarily have data in those ranges). For example,
- CLOCK = 50.0 ns
- RATE = 48 MHz
- SIZE = 1016
- Time interval = 50.0 ns / (48 MHz * 2 μs) = 0.521 ns
Hence, the time axis will have values like 0, 0.521 ns, 1.042 ns, ..., 528.815 ns. 1016 time points in total.
Hope this helps everyone.
|
|