====== Cora Z7 XADC Demo ====== {{:reference:programmable-logic:cora-z7:demos:cora_xadc_2.jpg?600|}} ---- ===== Description ===== This project demonstrates how to use the Cora Z7's ZYNQ FPGA's analog-to-digital core (referred to as the XADC) with a ZYNQ processor. * A channel select index can be incremented by pressing button 0 and decremented by pressing button 1 * RGB LED 0 is used to show the sign of the selected analog input * A serial terminal connection is used to view the voltage value ---- ===== Inventory ===== * Cora Z7 with a MicroUSB Programming Cable * Vivado and Vitis 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.// * Serial Terminal application to receive messages printed by the demo * //See [[programmable-logic:guides:serial-terminals:start]] for more information.// * 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. **Note:** //Releases for FPGA demos from before 2020.1 used a different git structure, and used a different release tag naming scheme.// ^ Board Variant ^ Release Tag ^ Release Downloads ^ Setup Instructions ^ | Cora Z7-07S | @#C0EEBD: 07S/XADC/2022.1-1 | {{https://github.com/Digilent/Cora-Z7/releases/download/07S/XADC/2022.1-1/Cora-Z7-07S-XADC-hw.xpr.zip}} \\ {{https://github.com/Digilent/Cora-Z7/releases/download/07S/XADC/2022.1-1/Cora-Z7-07S-XADC-sw.ide.zip}} | See //Using the Latest Release//, below | | Cora Z7-10 | @#C0EEBD: 10/XADC/2022.1-1 | {{https://github.com/Digilent/Cora-Z7/releases/download/10/XADC/2022.1-1/Cora-Z7-10-XADC-hw.xpr.zip}} \\ {{https://github.com/Digilent/Cora-Z7/releases/download/10/XADC/2022.1-1/Cora-Z7-10-XADC-sw.ide.zip}} | See //Using the Latest Release//, below | | Cora Z7-07S | 07S/XADC/2021.1-1 | {{https://github.com/Digilent/Cora-Z7/releases/download/07S/XADC/2021.1-1/Cora-Z7-07S-XADC-hw.xpr.zip}} \\ {{https://github.com/Digilent/Cora-Z7/releases/download/07S/XADC/2021.1-1/Cora-Z7-07S-XADC-sw.ide.zip}} | See //Using the Latest Release//, below | | Cora Z7-10 | 10/XADC/2021.1-1 | {{https://github.com/Digilent/Cora-Z7/releases/download/10/XADC/2021.1-1/Cora-Z7-10-XADC-hw.xpr.zip}} \\ {{https://github.com/Digilent/Cora-Z7/releases/download/10/XADC/2021.1-1/Cora-Z7-10-XADC-sw.ide.zip}} | See //Using the Latest Release//, below | | Cora Z7-07S | 07S/XADC/2020.1-2 | {{https://github.com/Digilent/Cora-Z7/releases/download/07S/XADC/2020.1-2/Cora-Z7-07S-XADC-hw.xpr.zip}} \\ {{https://github.com/Digilent/Cora-Z7/releases/download/07S/XADC/2020.1-2/Cora-Z7-07S-XADC-sw.ide.zip}} | See //Using the Latest Release//, below | | Cora Z7-10 | 10/XADC/2020.1-2 | {{https://github.com/Digilent/Cora-Z7/releases/download/10/XADC/2020.1-2/Cora-Z7-10-XADC-hw.xpr.zip}} \\ {{https://github.com/Digilent/Cora-Z7/releases/download/10/XADC/2020.1-2/Cora-Z7-10-XADC-sw.ide.zip}} | See //Using the Latest Release//, below | | Cora Z7-07S | v2018.2-1 | [[https://github.com/Digilent/Cora-Z7-07S-XADC/releases/tag/v2018.2-1|Release ZIP downloads]] | [[https://github.com/Digilent/Cora-Z7-07S-XADC/tree/v2018.2-1| v2018.2-1 Github README]] | | Cora Z7-10 | v2018.2-1 | [[https://github.com/Digilent/Cora-Z7-10-XADC/releases/tag/v2018.2-1|Release ZIP downloads]] | [[https://github.com/Digilent/Cora-Z7-10-XADC/tree/v2018.2-1| v2018.2-1 Github README]] | | Cora Z7-07S | v2017.4-2 | [[https://github.com/Digilent/Cora-Z7-07S-XADC/releases/tag/v2017.4-2|Release ZIP downloads]] | [[https://github.com/Digilent/Cora-Z7-07S-XADC/tree/2017.4-2| v2017.4-2 Github README]] | | Cora Z7-10 | v2017.4-2 | [[https://github.com/Digilent/Cora-Z7-10-XADC/releases/tag/v2017.4-2|Release ZIP downloads]] | [[https://github.com/Digilent/Cora-Z7-10-XADC/tree/v2017.4-2| v2017.4-2 Github README]] | **Note for Advanced Users:** //GitHub sources for this demo can be found in the [[https://github.com/digilent/cora-z7/tree/07S/XADC/master|07S/XADC/master]] and [[https://github.com/digilent/cora-z7/tree/10/XADC/master|10/XADC/master]] branches of the Cora-Z7 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#baremetal_release_no_build&noheader}} {{page>programmable-logic:guides:using-github-releases#baremetal_release_workaround_before_programming&noheader}} --> Set up the Cora Z7 # Plug the microUSB programming cable into the Cora Z7's PROG/UART port. Set up your circuit. In our case, we used 8 1k ohm resistors in series. ---- <-- {{page>programmable-logic:guides:using-github-releases#baremetal_release_programming&noheader}} At this point, the demo is now running on your board. Refer to the [[#description|Description]] section of this document for more information on what it does. ---- Additional steps beyond here present how you can use the other archive provided in the release, containing the hardware project, to rebuild the Vivado project, and use a newly exported XSA file to update the platform in Vitis. ---- {{page>programmable-logic:guides:using-github-releases#baremetal_update_specification&noheader}} <-- ---- ===== Functionality ===== ==== 1. Pushbuttons ==== The channel select index can be incremented by pressing button 0 and decremented by pressing button 1. The following channels can be selected: ^ Analog Input/s ^ Index | | VP/VN Dedicated Differential Input | 0 | | Shield Header A6-A7 Differential Input | 1 | | Shield Header A8-A9 Differential Input | 2 | | Shield Header A10-A11 Differential Input | 3 | | Shield Header A0 Single-Ended Input | 4 | | Shield Header A1 Single-Ended Input | 5 | | Shield Header A2 Single-Ended Input | 6 | | Shield Header A3 Single-Ended Input | 7 | | Shield Header A4 Single-Ended Input | 8 | | Shield Header A5 Single-Ended Input | 9 | ==== 2. XADC & RGB LED ==== **Warning:** Take care not to drive analog inputs below the Cora's ground or above 1.0V (for differential inputs) or above 3.3V (for single-ended inputs). Differential inputs operating in Bipolar mode provide negative readings when the negative input pin of the pair has a higher voltage than the positive, however, this does NOT imply that these inputs can safely be driven below the system ground. RGB LED 0 is used to show the sign of the selected analog input. If the voltage read by the selected input is greater than 0.5 Volts, the RGB LED is green; if the voltage read is less than -0.5 Volts, the RGB LED is red. The value is also displayed on the Serial Terminal Emulator connection. {{:reference:programmable-logic:cora-z7:demos:cora_xadc_term1.png?400|}} {{:reference:programmable-logic:cora-z7:demos:cora_xadc1.jpg?400|}} {{:reference:programmable-logic:cora-z7:demos:cora_xadc_term3.png?400|}} {{:reference:programmable-logic:cora-z7:demos:cora_xadc3.jpg?400|}} ---- ===== Additional Resources ===== All materials related to the use of the Cora Z7 can be found on its [[..:start|Resource Center]]. For a walkthrough of the process of creating a simple baremetal software project in Vivado and Vitis, see [[programmable-logic:guides:getting-started-with-ipi]]. Information on important parts of the GUIs, 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.