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 [2017/05/26 20:24] – Updated for github tutorial rework Arthur Brownlearn:programmable-logic:tutorials:zybo-xadc-demo:start [2022/10/04 11:38] (current) – external edit 127.0.0.1
Line 1: Line 1:
  
-====== Arty XADC Demo ======+====== Zybo XADC Demo ======
  
-{{:arty:img_1586.jpg?direct&500|}}+{{:zybo:zybo_revb-box-600.png?direct&500|}}
  
 ===== Overview ===== ===== Overview =====
  
-==== Description ====+===== Description =====
  
-This simple XADC Demo project demonstrates a simple usage of ARTY's XADC pin capability. The behavior is as follows: +This simple XADC demo is a verilog project made to demonstrate usage of the Analog to Digital Converter hardware of the Zybo 
-  * The 8 User LEDs increment from top right to left then bottom left to right as the voltage difference on the selected XADC pins gets larger. +  * 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 four switches select which channel to read from.+  * 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 ====
  
-|                                    ^ Not Used  ^ Used  ^ +|                                  ^ Not Used  ^ Used  ^ 
-^ 4 User Switches                    |           |  X    | +^ 4 user switches                  |           |   X   | 
-^ 4 User LEDs                        |           |  X    | +^ 4 user LEDs                      |           |   X   | 
-^ 4 User RGB LEDSs                   |           |  X    | +^ 5 user push buttons              |    X      |       | 
-^ 4 User Push Buttons                |  X        |       | +^ USB-UART Bridge                  |    X      |       | 
-^ 4 Pmod Connectors                  |  X        |       | +^ Micro SD card connector          |    X      |       | 
-^ XADC Analog Input                  |           |  X    | +^ HDMI Sink and HDMI Source        |    X      |       | 
-^ USB-UART Bridge                    |  X        |       | +^ 16 Bit VGA port                  |    X      |       | 
-^ Serial Flash for Application Data  |  X        |       |+^ Audio codec w/ three 3.5mm jacks |    X      |       | 
 +^ User EEPROM                      |    X      |       | 
 +^ 10/100/1000 Ethernet PHY         |    X      |       | 
 +^ 512MiB 800Mt/s DDR3 Memory       |    X      |       | 
 +^ Serial Flash                     |    X      |       | 
 +^ Five Pmod ports                  |    X      |       | 
 +^ Pmod for XADC signals            |           |   X   | 
 +^ USB HID Host                     |    X      |       |
  
 +===== Prerequisites =====
  
- +===Skills=== 
-===== Prerequisites =====+  * **Basic familiarity with Vivado** 
 +    *  //This experience can be found by walking through our "Getting Started with Vivado" guide//
  
 ===Hardware=== ===Hardware===
-  * **Arty FPGA board** +  * **Zybo Zynq board** 
-  * **Micro-USB cable**+  * **Micro-USB cable** 
   * **Wires and a voltage to measure**   * **Wires and a voltage to measure**
  
 ===Software=== ===Software===
-  * **Vivado Design Suite 2016.4**  +  * **Vivado Design Suite 2016.X** 
-    * //Newer versions can be used, but the procedure may vary slightly// +    * //Newer/older versions can be used, but the procedure may vary slightly//
-  * **Digilent Board Support Files for Vivado** +
-    * Follow the [[vivado:boardfiles|Vivado Board Files for Digilent 7-Series FPGA Boards]] guide on how to install Board Support Files for Vivado.+
  
 ----- -----
  
 ===== Downloads ===== ===== Downloads =====
 +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]]
  
-Arty XADC Project Repository -- [[https://github.com/Digilent/Arty-XADC/releases/download/v2016.4-1/Arty-XADC-2016.4-1.zip|ZIP Archive]] [[https://github.com/Digilent/Arty-XADC|GIT Repo]] +-------
- +
------- +
 ===== Download and Launch the Zybo XADC Demo  ===== ===== Download and Launch the Zybo XADC Demo  =====
  
-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. The voltages you will be measuring do not need to be connected to the Arty before programming, so you do not need to return to this guide until you finish the tutorial.+>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.
  
-===== Using the Arty XADC Demo ==== +>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. Applying a voltage to the XADC pins ==== +
- +
->A0-A5 are single ended analog pins while A6-A7, A8-A9, and A10-A11 are differential ports. This demo measures voltages compared to the board ground on single ended pins and voltage differences applied across differential pairs.+
 > >
 ><WRAP round important 660px> ><WRAP round important 660px>
Line 63: Line 65:
 Voltages to be measured should only be in the range of 0 to 1 Volt. Voltages to be measured should only be in the range of 0 to 1 Volt.
 </WRAP> </WRAP>
 +>
 +>{{:learn:programmable-logic:tutorials:zybo-xadc-demo:zybo-xadc-ladder.jpg?nolink&500|}}
  
-==== 2. LEDs ====+>3) Once you have connected your circuit to your Zybo, return to the Github Demo Projects tutorial to finish programming your board.
  
->The LEDs turn on from right to left then wrap around the bottom as the input voltage increases. +===== Using the Zybo XADC Demo ===== 
-> + 
->{{:arty:img_1585.jpg?direct&200|}}{{:arty:img_1586.jpg?direct&200|}}{{:arty:img_1587.jpg?direct&200|}}+>1) Each channel will control the brightness of an LED as shown in the following table. 
 + 
 +| Channel Name ^ LED # ^ 
 +^ AD14 | LD0 | 
 +^ AD7 | LD1 | 
 +^ AD15 | LD2 | 
 +^ AD6 | LD3 | 
 + 
 +>2) Specific channels can be enabled and disabled by toggling the user switch that is adjacent to it's LED.
  
-==== 3. Selecting a channel ====+>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.
  
-To display a different channel on the display and LEDs, change the user switches to the desired channel, as seen in the table below.+{{tag>learn programmable-logic project zybo}}
  
-| Channel Pin/s ^ SW0 ^ SW1 ^ SW2 ^ SW3 ^ 
-^ A0 ^ Down ^ Down ^ Down ^ Down | 
-^ A1 ^ Up ^ Down ^ Down ^ Down | 
-^ A2 ^ Down ^ Up ^ Down ^ Down | 
-^ A3 ^ Up ^ Up ^ Down ^ Down | 
-^ A4 ^ Down ^ Down ^ Up ^ Down | 
-^ A5 ^ Up ^ Down ^ Up ^ Down | 
-^ A6-A7 ^ Down ^ Up ^ Up ^ Down | 
-^ A8-A9 ^ Up ^ Up ^ Up ^ Down | 
-^ A10-A11 ^ Down ^ Down ^ Down ^ Up | 
  
-{{tag>learn programmable-logic tutorial example arty}}