====== Nexys A7 XADC Demo ====== {{:reference:programmable-logic:nexys-a7:demos:nexys_xadc.jpg?600|}} ---- ===== Description ===== This project is a Vivado demo using the Nexys A7-100T's analog-to-digital converter circuitry, switches, LEDs, and seven-segment display, written in Verilog. When programmed onto the board, 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 between the selected channel's pins gets larger. The seven-segment display shows the voltage difference between the selected channel's pins in volts. SW0 and SW1 select which XADC channel is displayed. See the Nexys A7's [[programmable-logic/nexys-a7/reference-manual|Reference Manual]] for more information about how the Artix 7 FPGA's XADC is connected to header JXADC. ---- ===== Inventory ===== * Nexys A7 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, Breadboard and a Circuit to Test ---- ===== Download and Usage Instructions ===== The following releases of this demo can be used with instructions found in the corresponding READMEs in order to run the demo. Releases are only compatible with the version of the Xilinx tools specified in the release version number. 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. **Note:** //The latest release tags for each variant and branch are highlighted in green.// ^ Board Variant ^ Release Tag ^ Release Downloads ^ Setup Instructions ^ | Nexys A7-100T | @#C0EEBD: 100T/XADC/2022.1-1 | {{https://github.com/Digilent/Nexys-A7/releases/download/100T/XADC/2022.1-1/Nexys-A7-100T-XADC-hw.xpr.zip}} | See //Using the Latest Release//, below | | Nexys A7-50T | @#C0EEBD: 50T/XADC/2022.1-1 | {{https://github.com/Digilent/Nexys-A7/releases/download/50T/XADC/2022.1-1/Nexys-A7-50T-XADC-hw.xpr.zip}} | See //Using the Latest Release//, below | | Nexys A7-100T | 100T/XADC/2021.1-1 | {{https://github.com/Digilent/Nexys-A7/releases/download/100T/XADC/2021.1-1/Nexys-A7-100T-XADC-hw.xpr.zip}} | See //Using the Latest Release//, below | | Nexys A7-50T | 50T/XADC/2021.1-1 | {{https://github.com/Digilent/Nexys-A7/releases/download/50T/XADC/2021.1-1/Nexys-A7-50T-XADC-hw.xpr.zip}} | See //Using the Latest Release//, below | | Nexys A7-100T | 100T/XADC/2020.1-1 | {{https://github.com/Digilent/Nexys-A7/releases/download/100T/XADC/2020.1-1/Nexys-A7-100T-XADC-hw.xpr.zip}} | See //Using the Latest Release//, below | | Nexys A7-50T | 50T/XADC/2020.1-1 | {{https://github.com/Digilent/Nexys-A7/releases/download/50T/XADC/2020.1-1/Nexys-A7-50T-XADC-hw.xpr.zip}} | See //Using the Latest Release//, below | | Nexys-A7-100T | v2018.2-1 | [[https://github.com/Digilent/Nexys-A7-100T-XADC/releases/tag/v2018.2-1|Release ZIP downloads]] | [[https://github.com/Digilent/Nexys-A7-100T-XADC/tree/v2018.2-1|Github README]] | | Nexys A7-50T | v2018.2-1 | [[https://github.com/Digilent/Nexys-A7-50T-XADC/releases/tag/v2018.2-1|Release ZIP downloads]] | [[https://github.com/Digilent/Nexys-A7-50T-XADC/tree/v2018.2-1|Github README]] | **Note for Advanced Users:** //GitHub sources for this demo can be found in the [[https://github.com/digilent/nexys-a7/tree/100T/XADC/master|100T/XADC/master]] and [[https://github.com/digilent/nexys-a7/tree/50T/XADC/master|50T/XADC/master]] branches of the Nexys-A7 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 #^ {{page>programmable-logic:guides:using-github-releases#hardware_only_release_before_programming&noheader}} --> Set up the Nexys A7 # Plug the Nexys A7 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. <-- ---- ===== Functionality ===== ==== 1. LEDs and Switches ==== The demo reads analog data from each enabled XADC channel (set using sw0 and sw1). 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. The switch selections for each channel can be seen in the table below: |<60% 20% 20% 20%>| ^ Channel ^ Pin ^ SW0 / SW1 Positions | | AD2P/N | XA3 | Down / Down ^ | AD3P/N | XA1 | Up / Down ^ | AD10P/N | XA2 | Down / Up ^ | AD11P/N | XA4 | Up / Up ^ ==== 2. Setting up the Circuit ==== As seen in the image to the right, this demo was tested using a resistor ladder to show the different brightness values the demo puts out. This demo can be used to measure any voltage between 0 and 1 volt. The circuit uses a chain of eight 1KOhm resistors in series tied to the 3V3 and GND pins of the XADC header to create these voltages. {{:reference:programmable-logic:nexys-a7:demos:nexys_xadc.jpg?400|}} ---- ===== Additional Resources ===== All materials related to the use of the Nexys A7 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 there. For technical support, please visit the [[https://forum.digilent.com/forum/4-fpga/|FPGA]] section of the Digilent Forum. ----