Implementation of XADC in PYNQ Z1

HI !

How are you ? I have a problem with the XADC and the Pynq Z1

I used the base bitstream to read value from the A0 port with use the Arduino functions. The problem is the velocity of the XADC. I has around 5460 samples per second. I see in the datasheet that the XADC can get 1 MSPS…

How can get this sample rate ? I need implements my design in Vivado and build a new bitstream ?? Or, I can modified my Python code to get this rate ?

This is my code

import time 
from pynq.overlays.base import BaseOverlay
base = BaseOverlay("base.bit") 
from pynq.lib.arduino import Arduino_Analog
from pynq.lib.arduino import ARDUINO_GROVE_A1
analog0 = Arduino_Analog(base.ARDUINO,ARDUINO_GROVE_A1)
a =[]
t_end = time.time() + 1 
while time.time() < t_end:
    a.append( analog0.read_raw()[0])

I need around 250K - 500K samples per second.

I cannot found information in the website with the use of XADC and Pynq .

Thanks in advance

Jota

1 Like