Differences

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

Link to this comparison view

Next revision
Previous revision
learn:programmable-logic:tutorials:nexys-4-xadc-demo:start [2016/07/08 21:16] – created Sam Klearn:programmable-logic:tutorials:nexys-4-xadc-demo:start [2022/10/04 11:38] (current) – external edit 127.0.0.1
Line 2: Line 2:
 NOTE: This project is currently  under construction. NOTE: This project is currently  under construction.
  
-====== Nexys4 XADC Demo ======+====== Nexys 4 XADC Demo ======
  
 {{:nexys:nexys4:overview1.png?300|}} {{:nexys:nexys4:overview1.png?300|}}
  
------ +===== Overview ===== 
-===== Features Used =====+ 
 +==== Description ==== 
 + 
 +This simple XADC Demo project demonstrates a simple usage of the Nexys 4's  
 +XADC port capability. The behavior is as follows: 
 +  
 +  * The 16 User LEDs increment from right to left as the voltage difference on the selected XADC pins gets larger. 
 +  * The two seven segment displays show the voltage difference on the AD11 pins in volts. 
 +  * sw0 and sw1 select which channel to read from  
 + 
 +==== Features Used ====
  
 |              ^ Not Used             ^ Used        ^ |              ^ Not Used             ^ Used        ^
Line 30: Line 40:
 ^ 10/100 Ethernet PHY   |  X  |    | ^ 10/100 Ethernet PHY   |  X  |    |
  
-===== Description =====+===== Prerequisites =====
  
-This simple XADC Demo project demonstrates a simple usage of the Nexys4's  +===Hardware=== 
-XADC port capability. The behavior is as follows: +  * **Nexys 4 FPGA board** 
-  +  * **Micro-USB cable** 
-  * The 16 User LEDs increment from right to left as the voltage difference on the selected XADC pins gets larger. +  * **Wires and a voltage to measure** 
-  * The two seven segment displays show the voltage difference on the AD11 pins in volts. +
-  * sw0 and sw1 select which channel to read from +
  
-===== How to Build and Program =====+===Software=== 
 +  * **Vivado Design Suite 2016.4**  
 +    * //Newer versions can be used, but the procedure may vary slightly// 
 +  * **Nexys 4 Support Files**  
 +    * These files will describe GPIO interfaces on your board and make it easier to select your FPGA board and add GPIO IP blocks.  
 +    * Follow the Wiki guide: [[vivado:boardfiles|Vivado Board Files for Digilent 7-Series FPGA Boards]] on how to install Board Support Files for 
  
-You will need...\\+-----
  
-1. Vivado installed on your computer\\ +===== Downloads ===== 
-2. Nexys4 board from digilent\\ +Nexys 4 XADC Demo Project Repository -- [[https://github.com/Digilent/Nexys-4-XADC/releases/download/v2016.4-1/Nexys-4-XADC-2016.4-1.zip|ZIP Archive]] [[https://github.com/Digilent/Nexys-4-XADC|GIT Repo]]
-3. Wires and a voltage to measure\\+
  
 +-------
  
-==== 1. Download the Project ====+===== Download and Launch the Nexys 4 XADC Demo =====
  
-Download the project zip file here. {{:nexys:nexys4:nexys4xadc.zip|XADCdemo}} Once you have downloaded the project, unzip it in the location of your choosing.+>Follow the [[:learn:programmable-logic:tutorials:github-demos:start|Using Digilent Github Demo Projects]] Tutorial. This is an HDL design project, and as such does not support Vivado SDK, select the tutorial options appropriate for a Vivado-only design. As you will not need to set up your circuit to be measured until after the board is programmed, you do not need to return to this guide when prompted to check for extra hardware requirements and setup.
  
-==== 2. Load the Vivado Project ==== +===== Using the Nexys 4 XADC Demo =====
- +
-In your now unzipped project, open the file Nexys4XADC.xpr. This should open your project in Vivado.  +
- +
-*The screenshots below are from another project but should look relatively the same and will work for our purposes. +
- +
- +
-{{:basys3:gpio_load.png?600|}} +
- +
-==== 3. Synthesize, Implement and Generate Bitstream ==== +
- +
-To complete this step all that you need to do is click **Generate Bitstream** on the left hand menu towards the bottom. Vivado will run through both Run Synthesis and Run Implementation before it generates the bitstream automatically. If you want, you can click each step by itself in the order of **Run Synthesis**, **Run Implementation** and then **Generate Bitstream**. +
- +
-{{:basys3:buildflow.png?600|}} +
- +
-==== 4. Connect and Program the Nexys4 ==== +
- +
-Once you have generated your bit file, Click on the hardware manager and connect to your board by choosing the local server option. +
- +
-{{:basys3:device_connected.png?600|}} +
- +
-After your board is connected, just click program to load the GPIO demo onto your Nexys4. +
- +
-===== Running the Nexys4 XADC Demo =====+
  
 This portion will help you run the demo and observe all its features. This portion will help you run the demo and observe all its features.
  
-==== 1. Applying a voltage to the XADC port ==== +==== 1. Applying a Voltage to the XADC Port ====
- +
-For this demo, the AD11P and AD11N 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.+
  
-{{:nexys:nexys4:xadc11.jpg?300|}}  {{:nexys:nexys4:xadc10.jpg?300|}}+>For this demo, the AD11P and AD11N 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. 
 +> 
 +>{{:nexys:nexys4:xadc11.jpg?300|}}  {{:nexys:nexys4:xadc10.jpg?300|}}
  
  
 ==== 2. Seven Segment Display and LEDs ==== ==== 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.+>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. 
 +> 
 +>{{:nexys:nexys4:xadc4.jpg?300|}} {{:nexys:nexys4:xadc6.jpg?300|}}
  
-{{:nexys:nexys4:xadc4.jpg?300|}} {{:nexys:nexys4:xadc6.jpg?300|}} 
  
 +==== 3. Selecting a Channel ====
  
-==== 3. Selecting a channel ====+>To display a different channel on the display and LEDs, select a channel from the table below and set switches sw0 and sw1 to the appropriate position.
  
-To display a different channel on the display and LEDs, change sw0 and sw1 to the desired channel.+|  Channel Number  ^  SW0 Position  ^  SW1 Position  ^ 
 +^  AD2   |  Down (0)  |  Down (0)  | 
 +^  AD3   |  Up (1)    |  Down (0)  | 
 +^  AD10  |  Down (0)  |  Up (1)    | 
 +^  AD11  |  Up (1)    |  Up (1)    |
  
-{{tag>learn programmable-logic tutorial nexys-4}}+{{tag>learn programmable-logic project nexys-4}}