• 0

# Analog Discovery's sample frequecies

## Question

Hi, I am new to this forum.

I would like to know the sample frequencies which can be set on Analog Discovery.

My engineer tried to set a sample frequency and the instrument acccepted with no errors.

However, then he read the frequency and noticed that the actual frequency was different from the one he tried to set.

The difference may be caused by limitations on the hardware.

I would be grateful if you could let me know the rules how the sample frequency is set.

Arito Maekawa

Edited by Josh

## Recommended Posts

• 0

Hello,

You are talking to the right person, software/hardware engineer : )

The sample rates are 100MHz/N, where N can be 1,2,3,4,...
For instance: 100MHz, 50MHz, 33MHz, 25MHz, 20MHz,16.666MHz, ...1Hz,
0.99999999Hz, 0.99999998Hz,...

The set and got frequency values should be simple deterministic like shown above.
Could you give examples or piece of code to reproduce the problem you are seeing?

##### Share on other sites
• 0

Thanks for your question, I've moved your question to the correct forum

##### Share on other sites
• 0

Hello,

I suppose you refer to the Waveform Generator.
Here the patterns (sine, square...) are digitally generated using device buffer and 100MHz DAC (on Analog Discovery). The frequency setting is realized by adjusting the buffer index step, which can be a fractional number. The requested and resulting frequency has a certain precision, like:
1MHz  = 1,000,000.000931322574615478515625
500kHz = 500,000.0004656612873077392578125
200kHz = 199,999.9978579580783843994140625

The Oscilloscope and Logic Analyzer, on Analog Discovery, can work at sample rates of 100MHz and integer divisions of this.

Exactly what frequencies did you try and measure?

##### Share on other sites
• 0

Dear Attila

Thank you very much for you comment.  However, I think I have mislead you.

When acquiring A/D data from AnalogIn of Analog Discovery, FDwfAnalogInFrequencySet command is used to set the sample frequency in advanvce.

However, if you read the frequency using FDwfAnalogInFrequencyGet command after setting the sample freauency, actual freauency is sometimes different from the one you tried to set, especially at high frequencies.

This fact tells us that there should be some limitations for setting sample frequencies, even if the instrument accepts any frequencies we try to set.

So, could you please let me know the rules how the sample frequencies are determined?

Arito Maekawa

##### Share on other sites
• 0

Hello,

The *Set functions work on try basis and *Get should be used to find out the actual applied value.
For a flexible application use *Info to find out the minimum, maximum values and the number of steps in some cases.
For most of the parameters the closest possible value is applied, except the AnalogInChannelRange sets equal or higher possible range to fit the requested range. The scope channels on Discovery have two steps and on EExplorer ~60.

The Scope/AnalogIn sample rate can be the DAC frequency or natural number division of this. The DAC frequency on Discovery is 100MHz, maximum value returned by FDwfAnalogInFrequencyInfo. The possible sample rates are 1e8/N.

##### Share on other sites
• 0

Dear Attila

According to the reply to *Info command, the possible step is 1Hz, as you stated.  And *Set command accepts any sample frequency of 1Hz step.  However, after setting the frequency using *Set command, *Get command does not always replies the same frequency.

Therefore, we suppose there are certain rules which are not opened.

What we would like to do is to set sample frequencies which are precisely integer multiple of the measurement frequencies for accurate measurement.

Would it be possible for you to ask your hardware engineer how to figure out the sample frequencies which can be set?

Thank you in anticipation.

Arito Maekawa

Edited by Arito Maekawa

##### Share on other sites
• 0

Dear Atilla

My software engineer has confirmed what you wrote about the sample frequency.
I think we can improve the accuracy on measurements.

What we have been developing is an audio analyzer software for amateur Amp.-builders in Japan.
Thank you again.  We are happy with your analog discovery!

Arito Maekawa

http://www.za.ztv.ne.jp/kygbncjy/tubeamp/FRAplus/FRAplus_intro.htm