Jump to content
  • 0

How to get a negative value with PMODAD1


Billel

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.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

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

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...