Jump to content
  • 0

ADC example code for Nexys4-DDR Artix-7 using Vivado


you

Question

Hi guys.

Am a newbie here, i am doing a software oscilloscope project using Nexys4-DDR Artix-7 using Vivado.

I have tried to figure out how to start with the programming, am sorry to say that it is really difficult to me. 

I am thinking the most important part is to programme the ADC to read analog data, e.g. sine wave and pass it to PC.

Not Sure if anyone have any ADC example project code that i can take reference to? 

Thanks very much for your helps.

Appreciate it and Thanks 

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

Hey you,

Tommy is right, the XADC will measure 0 to 1 V (single-ended) or -.5 to .5 V deferentially. The pins themselves can tolerate up to 2V but will saturate the ADC at 1V. It would be interesting to see if they could measure 1-2V by setting the N pin to 1 V and the P pin to 1-2V. 

Pin max ratings

http://www.xilinx.com/support/documentation/data_sheets/ds181_Artix_7_Data_Sheet.pdf

XADC guide

http://www.xilinx.com/support/documentation/user_guides/ug480_7Series_XADC.pdf

-Sam

Link to comment
Share on other sites

Hi you,

Sorry for taking a little while to get back to you. I would recommend checking out our wiki where we have a demo for the XADC on the Nexys 4 DDR here.

Let me know if you have any more questions.

Thanks,
JColvin

Hi Colvin,

Thanks so much for the reference, May i check what is the max input voltage the ADC can take?

Thanks and Regards

Jeff

Link to comment
Share on other sites

Hey you,

Tommy is right, the XADC will measure 0 to 1 V (single-ended) or -.5 to .5 V deferentially. The pins themselves can tolerate up to 2V but will saturate the ADC at 1V. It would be interesting to see if they could measure 1-2V by setting the N pin to 1 V and the P pin to 1-2V. 

Pin max ratings

http://www.xilinx.com/support/documentation/data_sheets/ds181_Artix_7_Data_Sheet.pdf

XADC guide

http://www.xilinx.com/support/documentation/user_guides/ug480_7Series_XADC.pdf

-Sam

Hi Sam,

Thanks for your explanation and help. i have tested it out for unipolar mode using the code provided by JColvin, https://reference.digilentinc.com/nexys4-ddr:xadcdemo, it works well.

I have also built a circuit to limit the input voltage.

However, in my project, i would need to measure sine waves which requires bipolar mode, may i check how should i change the code to use the bipolar mode?

Thanks and Regards

Jeff

Link to comment
Share on other sites

Hi you,

I believe the XADC on the Nexys4 DDR measures voltages from 0 to 1V.

Good luck,

Tommy

Hi Tomy,

Thanks for your explanation and help. i have tested it out for unipolar mode using the code provided by JColvin, https://reference.digilentinc.com/nexys4-ddr:xadcdemo, it works well with voltage below 1V.

I have also built a circuit to limit the input voltage.

Thanks and Regards

Jeff

Link to comment
Share on other sites

However, in my project, i would need to measure sine waves which requires bipolar mode, may i check how should i change the code to use the bipolar mode?

The way we tackled that was setting a 1V sin wave to be offset .5 V which gave us the ability to just use unipolar mode. However, it should be as easy as opening the xadc wizard and change the modes on the channel sequencer page by checking Bipolar but I have never tried it before. I was looking at the following Xilinx documents

http://www.xilinx.com/support/documentation/ip_documentation/xadc_wiz/v3_0/pg091-xadc-wiz.pdf

http://www.xilinx.com/support/documentation/user_guides/ug480_7Series_XADC.pdf

-Sam

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...