====== Nexys A7 GPIO Demo ====== {{:reference:programmable-logic:nexys-a7:demos:gpio1.jpg?600|}} ---- ===== Description ===== This project is a Vivado demo using the Nexys A7's switches, LEDs, RGB LED's, pushbuttons, seven-segment display, PWM audio output, PDM microphone and USB UART bridge, written in VHDL. When programmed onto the board, all sixteen of the switches are tied to their corresponding LEDs. Every time a switch is toggled, the LED directly above it will toggle with it. If the center push button is pressed, all the LEDs will be tied to ground. The two tri-color LEDs are set to gradually change colors at all times. The seven segment display counts up from 0 to 9 as long as no buttons are pressed. As long as BTNU is pressed, the first digit on the seven segment display is turned off. In the same manner, BTNL turns off the second digit, BTNR turns off the third, and BTND turns off the fourth. BTNC turns off the entire display and resets the counter. The microphone which is next to Pmod connector JC, records audio data and sends it to the mono audio output located at J8. To listen to the mics output, you will need to plug in headphones or a speaker. To use the USB-UART bridge feature of this demo, the Nexys A7 must be connected to a serial terminal on the computer it is connected to over the MicroUSB cable. For more information on how to set up and use a serial terminal, such as Tera Term or PuTTY, refer to this tutorial. Whenever the reset button or BTNC is pressed, the Nexys A7 sends the line “Nexys A7 GPIO/UART DEMO!” to the serial terminal. Whenever one of the D-pad buttons other than BTNC is pressed, the line “Button press detected!” is sent. ---- ===== Inventory ===== * Nexys A7 with a MicroUSB Programming Cable * Vivado 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.// * Headphones or Speakers with 3.5mm Audio Jack ---- ===== Download and Usage Instructions ===== The following releases of this demo can be used with instructions found in the corresponding READMEs in order to run the demo. Releases are only compatible with the version of the Xilinx tools specified in the release version number. 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 ^ | Nexys A7-100T | @#C0EEBD: 100T/GPIO/2022.1-1 | {{https://github.com/Digilent/Nexys-A7/releases/download/100T/GPIO/2022.1-1/Nexys-A7-100T-GPIO-hw.xpr.zip}} | See //Using the Latest Release//, below | | Nexys A7-50T | @#C0EEBD: 50T/GPIO/2022.1-1 | {{https://github.com/Digilent/Nexys-A7/releases/download/50T/GPIO/2022.1-1/Nexys-A7-50T-GPIO-hw.xpr.zip}} | See //Using the Latest Release//, below | | Nexys A7-100T | 100T/GPIO/2021.1-1 | {{https://github.com/Digilent/Nexys-A7/releases/download/100T/GPIO/2021.1-1/Nexys-A7-100T-GPIO-hw.xpr.zip}} | See //Using the Latest Release//, below | | Nexys A7-50T | 50T/GPIO/2021.1-1 | {{https://github.com/Digilent/Nexys-A7/releases/download/50T/GPIO/2021.1-1/Nexys-A7-50T-GPIO-hw.xpr.zip}} | See //Using the Latest Release//, below | | Nexys A7-100T | 100T/GPIO/2020.1-2 | {{https://github.com/Digilent/Nexys-A7/releases/download/100T/GPIO/2020.1-2/Nexys-A7-100T-GPIO-hw.xpr.zip}} | See //Using the Latest Release//, below | | Nexys A7-50T | 50T/GPIO/2020.1-2 | {{https://github.com/Digilent/Nexys-A7/releases/download/50T/GPIO/2020.1-2/Nexys-A7-50T-GPIO-hw.xpr.zip}} | See //Using the Latest Release//, below | | Nexys A7-100T | v2018.2-1 | [[https://github.com/Digilent/Nexys-A7-100T-GPIO/releases/tag/v2018.2-1|Release ZIP downloads]] | [[https://github.com/Digilent/Nexys-A7-100T-GPIO/tree/v2018.2-1|Github README]] | | Nexys A7-50T | v2018.2-1 | [[https://github.com/Digilent/Nexys-A7-50T-GPIO/releases/tag/v2018.2-1|Release ZIP downloads]] | [[https://github.com/Digilent/Nexys-A7-50T-GPIO/tree/v2018.2-1|Github README]] | **Note for Advanced Users:** //GitHub sources for this demo can be found in the [[https://github.com/digilent/nexys-a7/tree/100T/GPIO/master|100T/GPIO/master]] and [[https://github.com/digilent/nexys-a7/tree/50T/GPIO/master|50T/GPIO/master]] branches of the Nexys-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 Nexys A7 # Plug the microUSB programming cable into the Nexys A7's PROG/UART port and the headphones or speaker into the MONO AUDIO OUT port. ---- <-- {{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===== ====1. Switches and LEDs==== >For this section, all the switches are tied to their corresponding LED. Every time a switch is toggled, the LED directly above it will toggle with it. If the center push button is pressed, all the LEDs will be tied to ground . > >{{:nexys:nexys4:20141118_142412.jpg?300|}} {{:reference:programmable-logic:nexys-a7:demos:gpio10.jpg?300|}} ====2. Seven Segment Display==== >The 7-Segment display counts from 0 to 9 on each of its 8 digits. This count is reset when the center button is pressed. Also, single anodes of the 7-Segment display are blanked by holding BTNU, BTNL, BTND, or BTNR. Holding the center button blanks all the 7-Segment anodes. > >{{:reference:programmable-logic:nexys-a7:demos:gpio0.jpg?400|}} {{:reference:programmable-logic:nexys-a7:demos:gpio1.jpg?400|}} {{:reference:programmable-logic:nexys-a7:demos:gpio2.jpg?400|}} {{:reference:programmable-logic:nexys-a7:demos:gpio3.jpg?400|}} {{:reference:programmable-logic:nexys-a7:demos:gpio4.jpg?400|}} ====3. Tri-Color LEDs==== >The two tri-color LEDs are set to gradually change colors at all times. The user cannot affect them in this demonstration. ====4. Microphone to PWM Output==== >The microphone which is next to Pmod connector JC, records audio data and sends it to the mono audio output located at J8. To listen to the mics output, you will need to plug in headphones or a speaker. ---- ===== Additional Resources ===== All materials related to the use of the Nexys A7 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. ----