Analog-Digital Conversion, Signal Processing

I’m using the built in XADC (xilinx analog-digital converter) on the J1 section of the arduino header to read a signal. It seems to take just over 0.1 ms per reading. Why does it take so long? Is there anywhere else on the board that also does ADC that might be faster? I’m hoping to be able to get down to nanoseconds.

Do you mean reading the Python API takes 0.1ms per sample? There will be a software overhead with this. In the base overlay, the XADC is controller from software running on a MicroBlaze.

XADC is 1MSps so this would be the fastest speed you could capture. You would need to build a new design to do this.


I’m not sure what you mean by reading the API (I’m very new at this). I’m using the arduino_analog attribute of the arduino class from the pynq library. When I start a log, it records a value every 0.1 ms (so 10^4 sps). I can set it to record slower but not faster. Are you saying I would have to build a new overlay to speed it up?

When you run the Python code (The Python “API” for the ADC), e.g. read(), it actually downloads an executable to the MicroBlaze processor. The executable runs on the MicroBlaze to read the XADC< and writes a result back to memory. The Python code then reads and returns the result.

There are a few ways you could speed this up depending on what you need to do, and your ability to write software/design hardware.

What are you trying to do?


I have a signal generator connected to the ADC. I’m trying to find the peaks in a signal where the signal frequency is up to 100 MHz. Ideally I’d like to be able to find the peaks while streaming.

XDAC is 1Msps (1MHz)
According to Nyquist you would need to sample at equal to/greater than 2* highest frequency of input signal. i.e. > 200MHz
XADC won’t be able to do this.