Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
learn:programmable-logic:tutorials:zybo-xadc-demo:start [2016/08/09 21:23] – Updated some Cmod specifics Arthur Brownlearn:programmable-logic:tutorials:zybo-xadc-demo:start [2022/10/04 11:38] (current) – external edit 127.0.0.1
Line 6: Line 6:
 ===== Overview ===== ===== Overview =====
  
-A project that instantiates the XADC IP Core and measures an analog voltage+===== Description ===== 
 + 
 +This simple XADC demo is a verilog project made to demonstrate usage of the Analog to Digital Converter hardware of the Zybo 
 +  * An XADC IP core is used to read the voltage differences of each of the four vertical pairs of pins - channels - of the XADC Pmod Port. 
 +  * The LED associated with a channel brightens when that channel's voltage increases. 
 +  * The four user switches control which XADC channels will be read. 
 + 
 +------- 
 ==== Features Used ==== ==== Features Used ====
  
Line 25: Line 33:
 ^ Pmod for XADC signals            |           |   X   | ^ Pmod for XADC signals            |           |   X   |
 ^ USB HID Host                     |    X      |       | ^ USB HID Host                     |    X      |       |
- 
- 
-===== Description ===== 
- 
-This simple XADC demo is a verilog project made to demonstrate the ADC functionality of the Zybo 
-  
-  * The LED associated with a specific channel brightens when the read voltage goes up. 
-  * The four user switches enable each XADC channel to be read from. 
- 
-This demo uses XADC ports 4 and 12 since they are the channels connected to pin 15 and 16. This can be seen in the schematic below. 
- 
-{{:cmod_a7:xadc_pinout.jpg?300|}} 
- 
-------- 
  
 ===== Prerequisites ===== ===== Prerequisites =====
Line 47: Line 41:
  
 ===Hardware=== ===Hardware===
-  * **Zybo board**+  * **Zybo Zynq board**
   * **Micro-USB cable**    * **Micro-USB cable** 
-  * **Breadboard** +  * **Wires and a voltage to measure**
-  * **Resistors** +
-  * **Wire**+
  
 ===Software=== ===Software===
-  * **Vivado Design Suite 2015.X** +  * **Vivado Design Suite 2016.X**
     * //Newer/older versions can be used, but the procedure may vary slightly//     * //Newer/older versions can be used, but the procedure may vary slightly//
  
Line 60: Line 52:
  
 ===== Downloads ===== ===== Downloads =====
-Zybo Support Repository -- [[https://github.com/Digilent/Zybo|GIT Repo]]+Zybo XADC Project Repository -- [[https://github.com/Digilent/Zybo-XADC/releases/download/v2016.4-1/Zybo-XADC-2016.4-1.zip|ZIP Archive]] [[https://github.com/Digilent/Zybo-XADC|GIT Repo]]
  
 ------- -------
-===== How to...  =====+===== Download and Launch the Zybo XADC Demo  =====
  
-==== 1. Generate the Project ====+>1) 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. Return to this guide when prompted to check for additional hardware requirements and setup.
  
->1.1) Download the repository linked in the download section and place it in the location of your choosing.  +>2) In order to use the demo, you will need to connect a circuit to the XADC Pmod Port in order to measure a voltage. The following example shows a voltage divider that produces each voltage between 0 and 1 Volt in increments of 0.1 Volts. This circuit uses a chain of ten 1KOhm resistors in series with two parallel 47KOhm resistors tied to the 3V3 and GND pins of the XADC Pmod header to create these voltages. Each of the 'n' pins, the lower row, of the XADC port are connected to ground.
- +
->1.2) Generate the **XADC** project in the Projects folder by following this guide before continuing: [[vivado:github|How to Generate a Project from Digilent's Github]] +
- +
-==== 2. Build the Project ==== +
- +
->2.1) 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. +
 > >
->Note: If you want, you can click each step by itself in the order of **Run Synthesis**, **Run Implementation** and then **Generate Bitstream**.+><WRAP round important 660px> 
 +===Important=== 
 +Voltages to be measured should only be in the range of 0 to 1 Volt. 
 +</WRAP>
 > >
->{{:basys3:buildflow.png?600|}}+>{{:learn:programmable-logic:tutorials:zybo-xadc-demo:zybo-xadc-ladder.jpg?nolink&500|}}
  
-==== 3. Program the Board ====+>3) Once you have connected your circuit to your Zybo, return to the Github Demo Projects tutorial to finish programming your board.
  
->3.1) Once you have generated your bit file, Click on the hardware manager and connect to your board by choosing the local server option. +===== Using the Zybo XADC Demo =====
-> +
->{{:basys3:device_connected.png?600|}}+
  
->3.2) Click program to load the project onto your Zybo.+>1) Each channel will control the brightness of an LED as shown in the following table.
  
-==== 4. Run the Project ====+| Channel Name ^ LED # ^ 
 +^ AD14 | LD0 | 
 +^ AD7 | LD1 | 
 +^ AD15 | LD2 | 
 +^ AD6 | LD3 |
  
-This portion will help you run the demo and observe all its features. The demo reads analog data in from pin 15 and sets the brightness on the red led linearly. Higher voltage = brighter led. +>2) Specific channels can be enabled and disabled by toggling the user switch that is adjacent to it's LED.
  
->4.1 Setting up the circuit +>3) Changing voltages through reconfiguring the circuit while the demo is running is fine. If you built the example circuit above, feel free to move jumpers around to test out the different nodes of the voltage divider.
->The pictures below used 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 3.3 volts. The brighter the led, the closer to 3.3 the voltage is. The voltages below are 2.3V, 1.1V and 0V. +
->{{:learn:programmable-logic:tutorials:cmod-a7-xadc-demo:xadc1.jpg?300|}} {{:learn:programmable-logic:tutorials:cmod-a7-xadc-demo:xadc2.jpg?300|}} {{:learn:programmable-logic:tutorials:cmod-a7-xadc-demo:xadc3.jpg?300|}}+
  
-{{tag>learn programmable-logic tutorial zybo}+{{tag>learn programmable-logic project zybo}}