~~META: robots = noindex, nofollow ~~ ====== Cmod A7 XADC Demo ====== {{:cmod_a7:cmod_a7-obl-600.png?300|}} ---- ===== Description ===== This simple XADC demo is a verilog project made to demonstrate the ADC functionality of the Cmod-A7's Analog to Digital Converter. * The RGB LED brightens the RED LED when the read voltage goes up. * When BTN1 is pressed, the demo switches which xadc pin to 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 Cmod A7 Reference Manual and Schematics. These resources can be found on the Cmod A7 [[reference:programmable-logic:cmod-a7:start:|Resource Center]]. ---- ===== Inventory ===== * Cmod A7 with MicroUSB programming cable * Vivado installation compatible with the latest release of this demo (2020.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. ^ Board Variant ^ Release Tag ^ Release Downloads ^ Setup Instructions | | Cmod A7-15T | @#C0EEBD: 15T/XADC/2020.1-1 | {{https://github.com/Digilent/Cmod-A7/releases/download/15T/XADC/2020.1-1/Cmod-A7-15T-XADC-hw.xpr.zip}} | See //Using the Latest Release//, below | | Cmod A7-35T | @#C0EEBD: 35T/XADC/2020.1-1 | {{https://github.com/Digilent/Cmod-A7/releases/download/35T/XADC/2020.1-1/Cmod-A7-35T-XADC-hw.xpr.zip}} | See //Using the Latest Release//, below | | Cmod A7-15T | v2018.2-1 | [[https://github.com/Digilent/Cmod-A7-15T-XADC/releases/tag/v2018.2-1|Release ZIP Downloads]] | [[https://github.com/Digilent/Cmod-A7-15T-XADC/tree/v2018.2-1|v2018.2-1 Github README]] | | Cmod A7-35T | v2018.2-1 | [[https://github.com/Digilent/Cmod-A7-35T-XADC/releases/tag/v2018.2-1|Release ZIP Downloads]] | [[https://github.com/Digilent/Cmod-A7-35T-XADC/tree/v2018.2-1|v2018.2-1 Github README]] | | Cmod A7-15T | v2016.4-1 | [[https://github.com/Digilent/Cmod-A7-15T-XADC/releases/tag/v2016.4-1|Release ZIP Downloads]] | [[learn/programmable-logic/tutorials/github-demos/start|Using Digilent Github Demo Projects (Legacy)]] | | Cmod A7-35T | v2016.4-2 | [[https://github.com/Digilent/Cmod-A7-35T-XADC/releases/tag/v2016.4-2|Release ZIP Downloads]] | [[learn/programmable-logic/tutorials/github-demos/start|Using Digilent Github Demo Projects (Legacy)]] | **Note for Advanced Users:** //GitHub sources for this demo can be found in the [[https://github.com/digilent/cmod-a7/tree/15T/XADC/master|15T/XADC/master]] and [[https://github.com/digilent/cmod-a7/tree/35T/XADC/master|35T/XADC/master]] branches of the Cmod-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 Cmod A7 # Plug the Cmod 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 ===== The demo reads analog data in from pin 15 and sets the brightness on the red led linearly. 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|}} ---- ===== Additional Resources ===== All materials related to the use of the Cmod 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 here. For technical support, please visit the [[https://forum.digilent.com/forum/4-fpga/|FPGA]] section of the Digilent Forum. ----