• 0
Billel

How to get a negative value with PMODAD1

Question

Hello

I'm using the PMODAD1 ip core given by digilent and try to build a project using basys3 FPGA board. first i have create a simple 1 kHz sin wave with +/- 1V amplitude from Digilent Analog Descovery2 and use a PMODAD1 at 50 kHz sampling rate. when I read the integer value from the AD1 I got only the positive values, my question is:

1. Is the exemple given with the IP core is using 12-bits ADC?

2. What should I do to read a positive and negative value from the AD1?

I'm using the c programme given as exemple withe PMODAD1 IP core.

Thanks.

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hey Billel,

Unfortunately looking the datasheet  of the AD here, it looks like it does not have a bi polar mode. However since your signal has a peak to peak value of 2, you can bias its ground to 1 V. So your sin wave signal should look like a sin wave going from 0 to 2V. Then in your logic you can subtract 1 V from all of your reading to receive negative values. 

Since you are working with the basys you could also use the XADC core which has a bipolar mode if you are not attached to the PmodAD1. However you will again need to transform your input to have a peak to peak voltage of 1 V.

- Sam

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now