Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
programmable-logic:basys-3:demos:xadc [2022/09/12 12:59] – changed forum.digilentinc.com to forum.digilent.com Jeffreyprogrammable-logic:basys-3:demos:xadc [2023/08/24 22:11] (current) – Move to direct file links for downloads Arthur Brown
Line 1: Line 1:
 +====== Basys 3 XADC Demo ======
  
 +{{:basys3:xadc4.jpg?500|}}
 +
 +----
 +===== Description =====
 +
 +This simple XADC Demo project demonstrates a simple usage of the Basys3'
 +XADC port capability. The behavior is as follows:
 + 
 +  * Voltage levels between 0 and 1 Volt are read off of the JXADC header.
 +  * The 16 User LEDs increment from right to left as the voltage difference on the selected XADC pins gets larger.
 +  * The two 7-segment displays show the voltage difference on the AD6, AD7, AD14, AD15 pins in volts.
 +  * SW0 and SW1 select which XADC channel is displayed.
 +
 +----
 +
 +==== A Note About The XADC Port ====
 +
 +On the Basys3, the XADC Pmod connector houses 4 differential analog pairs. The corresponding XADC channels are 6, 7, 14, and 15. Below is a picture of the pinout of the Pmod Header.
 +
 +{{:basys3:xadcpinout1.png?300|}}
 +
 +The differential pairs are grouped by columns. Looking at the number above, 1 corresponds to XA1_P and XA1_N, column 2 routes to XA2_P and XA2_N, 3 routes to XA3_P and XA3_N, and 4 routes to XA4_P and XA4_N. Below is from the Basys3 schematics that will show the internal connections of these signals.
 +
 +{{:basys3:basys3xadcinternal.png?400|}}
 +
 +From the schematic we can see XA1 is connected to XADC channel 6, XA2 is connected to XADC channel 14, XA3 is connected to XADC channel 7, and XA4 is connected to XADC channel 15. 
 +
 +----
 +===== Inventory =====
 + 
 +  * Basys 3 with a MicroUSB Programming Cable
 +  * Vivado installation compatible with the latest release of this demo (2022.1)
 +    * //See [[programmable-logic:guides:installing-vivado-and-vitis|Installing Vivado, Vitis, and Digilent Board Files]] for installation instructions.//
 +  * Wires and a circuit to measure
 +
 +----
 +===== Download and Usage Instructions =====
 +
 +First and foremost, releases - consisting of a set of files for download - are only compatible with a specific version of the Xilinx tools, as specified in the name of the release (referred to as a //release tag//). In addition, releases are only compatible with the specified variant of the board. For example, a release tagged "20/DMA/2020.1" for the Zybo Z7 is only to be used with the -20 variant of the board and Vivado 2020.1.
 +
 +The latest release version for this demo is highlighted in green.
 +
 +**Note:** //Releases for FPGA demos from before 2020.1 used a different git structure, and used a different release tag naming scheme.//
 +
 +^ Release Tag              ^ Release Downloads                                                                          ^ Setup Instructions  ^
 +| @#C0EEBD: XADC/2022.1-1  | {{https://github.com/Digilent/Basys-3/releases/download/XADC/2022.1-1/Basys-3-XADC-hw.xpr.zip}}  | See //Using the Latest Release//, below  |
 +| XADC/2021.1-1            | {{https://github.com/Digilent/Basys-3/releases/download/XADC/2021.1-1/Basys-3-XADC-hw.xpr.zip}}  | See //Using the Latest Release//, below  |
 +| XADC/2020.1-2            | {{https://github.com/Digilent/Basys-3/releases/download/XADC/2020.1-2/Basys-3-XADC-hw.xpr.zip}}  | See //Using the Latest Release//, below  |
 +| v2018.2-3                | [[https://github.com/Digilent/Basys-3-XADC/releases/tag/v2018.2-3|Release ZIP downloads]]  | [[https://github.com/Digilent/Basys-3-XADC/tree/v2018.2-3| v2018.2-3 Github README]]  |
 +
 +**Note for Advanced Users:** //GitHub sources for this demo can be found in the [[https://github.com/digilent/Basys-3/tree/XADC/master|XADC/master]] branch of the Basys-3 repository. Further documentation on the structure of this repository can be found on this wiki's [[programmable-logic:documents:git]] page.//
 +----
 +Instructions on the use of the latest release can be found in this dropdown:
 +
 +--> Using the Latest Release #^
 +
 +<WRAP group>
 +
 +{{page>programmable-logic:guides:using-github-releases#hardware_only_release_before_programming&noheader}}
 +
 +--> Set up the Basys 3 #
 +
 +Plug the Basys 3 into the computer using the microUSB cable. The circuit and wires can be attached after the demo is already running. 
 +
 +----
 +<--
 +
 +{{page>programmable-logic:guides:using-github-releases#hardware_only_release_programming&noheader}}
 +
 +At this point, the demo is now running on your board. Refer to the [[#description|Description]] and [[#functionality|Functionality]] sections of this document for more information on what it does.
 +</WRAP>
 +
 +<--
 +----
 +
 +===== Functionality =====
 +
 +==== 1. Applying a voltage to the XADC port ====
 +
 +>For this demo, the AD6, 7, 14 and 15  pins are used on the JXADC header. We hooked up a signal generator to our pins. All of the other pins were grounded to avoid coupling.
 +>
 +>{{:basys3:xadc3.jpg?300|}}{{:basys3:xadc4.jpg?300|}}
 +
 +==== 2. Seven Segment Display and LEDs ====
 +
 +>The 7-Segment display shows the current voltage across the selected XADC pins. The LEDs turn on from right to left as the input voltage increases.
 +>
 +>{{:basys3:xadc1.jpg?300|}}{{:basys3:xadc2.jpg?300|}}
 +
 +==== 3. Selecting a Channel ====
 +
 +>To display a different channel on the 7-segment display and LEDs change SW0 and SW1 to select the desired channel as seen in the table below.
 +
 +|<40% 20% 20%>|
 +^ Channel Number ^ SW0 / SW1 Positions |
 +| XA1 | Down / Down ^
 +| XA2 | Up / Down ^
 +| XA3 | Down / Up ^
 +| XA4 | Up / Up ^
 +
 +----
 +
 +===== Additional Resources =====
 +
 +All materials related to the use of the Basys 3 can be found on its [[..:start|Resource Center]].
 +
 +For a walkthrough of the process of creating a simple HDL project in Vivado, see [[programmable-logic:guides:getting-started-with-vivado]]. Information on important parts of the GUI, and indirect discussion of the steps required to modify, rebuild, and run this demo in hardware can also be found here.
 +
 +For technical support, please visit the [[https://forum.digilent.com/forum/4-fpga/|FPGA]] section of the Digilent Forum.