This is an old revision of the document!
Basys 3 General I/O Demo
Description
This demo contains a Vivado project which uses the Basys 3's switches, LEDs, pushbuttons, seven-segment display, VGA connector, USB HID Host port 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.
- A computer monitor attached to the Basys 3 with a VGA cable displays a series of moving patterns. If a mouse is attached to the USB port when the demo starts running, a cursor is displayed on the screen and can be moved with the mouse.
- 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.
- Whenever the reset button or BTNC is pressed, the Basys 3 sends the line “BASYS3 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
- Basys 3 with a MicroUSB Programming Cable
- Vivado installation compatible with the latest release of this demo (2020.1)
- See Installing Vivado, Vitis, and Digilent Board Files for installation instructions.
- Serial Terminal application to receive messages printed by the demo
- See Installing and Using a Terminal Emulator (Redirect) for more information.
- USB Mouse
- Monitor with VGA port & VGA cable
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.
| Release Tag | Release Downloads | Setup Instructions |
|---|---|---|
| GPIO/2020.1-1 | Release ZIP Downloads | See Using the Latest Release, below |
| v2018.2-3 | Release ZIP downloads | v2018.2-3 Github README |
| v2018.2-2 | Release ZIP downloads | v2018.2-2 Github README |
| v2018.2-1 | Release ZIP downloads | v2018.2-1 Github README |
Note for Advanced Users: All demos for the Basys 3 are provided through the Basys-3 repository on Github. Further documentation on the structure of this repository can be found on this wiki's Digilent FPGA Demo Git Repositories (Redirect) page.
Instructions on the use of the latest release can be found in this dropdown:
- Using the Latest Release
-
This page has been moved, the new location is Using a Digilent FPGA Github Demo's Releases (2020.1).
- Set up the Basys 3
-
Plug the Basys 3 into the computer via the microUSB programming cable.
Plug one end of the VGA cable into a video monitor and the other into the Basys 3 VGA port.
Plug the USB Mouse into the Basys 3.
This page has been moved, the new location is Using a Digilent FPGA Github Demo's Releases (2020.1).At this point, the demo is now running on your board. Refer to the Description and Functionality sections of this document for more information on what it does.
Functionality
1. Switches and LEDs
2. Buttons and 7-Segment Delay
The seven segment display is counting all digits from 0 to 9 when no buttons are pressed. If BTNU is pressed, the first digit on the seven segment display is turned off. 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.
![]()
![]()
![]()
3. VGA Monitor
4. USB Mouse
To see the USB mouse portion of the demo, plug a USB mouse into the J2 USB port on the Basys3 with the monitor still connected. On the screen, you should be able to see your mouse pointer and move it around.
5. UART Communication
To see the UART communication channel, open a terminal program on your computer set to 9600 baud, 8 data bits, no parity bit and 1 stop bit. On reset or BTNC, the Basys3 will print BASYS3 GPIO/UART DEMO! to the terminal. On a button press other than BTNC, the terminal will print Button press detected!
Additional Resources
All materials related to the use of the Basys 3 can be found on its Resource Center.
For a walkthrough of the process of creating a simple HDL project in Vivado, see Getting Started with Vivado for Hardware-Only Designs (Redirect). 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 FPGA section of the Digilent Forum.
{{tag>project basys-3}}










