Jump to content
  • 0

Basys 3 - binary output pin for temperature sensor


DigilentStudio

Question

Muthupriya Somasundaram posted this question on the Getting started with Vivado and Basys3 video:

 

 
Hi,

I registered in the digilentic forum, but i couldn't able to post any question.
I am using a temperature sensor to measure the environment temperature and connected the sensor output to XADC.
Now,form which pin do i need to get the binary output and the output will be in how many bits?

Thanks in advance!

Regards,
Priya
 
 

 

Link to comment
Share on other sites

13 answers to this question

Recommended Posts

Hi,

 

In  XADC Demo project, the AD6, 7, 14 and 15 pins are used.

 

May I know AD6,7,14 and 15 referring to which Pmod from the attached Pindiagram and can I supply voltage from the basys 3 board to the circuit using Pin 6 &  12 or should I need to use external power supply.

Because when I try to execute basys3xadc.zip, it failing at synthesis because of clock value.

Thanks in advance for your help.

 

Regards,

Priya

PinDiagram.png

Link to comment
Share on other sites

Hi Priya,

I've done some digging into the demo to figure out the pin locations. Below I have a picture of the XDC file from the demo, which you can view when you open the demo project in Vivado. 

In the first comment you can see it says Pmod Header JXADC, this indicates the Pmod header the demo is using. This corresponds to the far right column in your table. In the un-commented lines is given all of the pin locations, as well as corresponding variable names. For example, to find AD6, I look at the first line in the image and the variable in the curly brackets is vauxp6. This corresponds to pin J3 in the same line. In the table you attached pin J3 is jXADC1. "Pin 1" is the pin in the top row on the far right corner of the Pmod header. 

As far as failing on synthesis, I downloaded the demo and it didn't fail. Can you post the error that you got when it failed on synthesis?

I hope this helps,

Kaitlyn Franz

Capture.JPG

Link to comment
Share on other sites

Hi Franz,

Thanks a lot for your reply :). I can able to run the program now!!

Say i need to edit the value of JXADC pmod (for example if i need to multiply the value by 10) where do i need to do the changes?

Sorry! i pretty new to the HDL coding.

Thanks in advance for your help..

Regards,

Priya

 

 

 

 

 

Link to comment
Share on other sites

Priya,

There are a number of places you could edit the value depending on your desired usage. All screenshots refer to the XADCdemo.v file.

The first screenshot block of code uses an existing IP to convert the input values from the XADC Pmod header into a binary representation. The binary output is the wire data. If you wanted to modify the binary value you can modify it by changing data. Say you want to multiply data by ten then, data*10.

 

The second and third screenshots show a block of code that converts the binary value data, to a 6 digit decimal representation, i.e. dig0 - dig6. If you wanted to multiply by ten here you would shift the digits left. The ones place becomes the tens place, the tens place becomes the one hundredths place, and so on. To do this you would make dig 6 equal to dig5, dig5 equal to dig4 and so on until dig0, which should be equal to zero. 

Kaitlyn

xadc1.PNG

xadc2.PNG

xadc3.PNG

Link to comment
Share on other sites

Hi Kaitlyn,

Thanks for your reply. I tried working on it but i couldn't able to do it and ending up in errors. 

I would be really grateful if you help me to edit the code.

Actually i just need to multiple the data from XADC Pmod and need to display that value in 7 segment like "Temp" followed by the value

I am sorry if i am troubling.. i am pretty new to both FPGA and HDL.

Thanks a lot for support! 

 

Regards,
Priya

 

 

Basys3XADC.xpr

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...