GithubHelp home page GithubHelp logo

basys-3-gpio's Introduction

Basys 3 General Input/Output Demo

Description

This project is a Vivado demo using 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.

To use the USB-UART bridge feature of this demo, the Basys 3 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 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.

Button Function
BTNC Turns off the entire seven-segment display and resets the counter
Prints "BASYS3 GPIO/UART DEMO!" through theUSB-UART bridge
BTNU Turns off the first digit on seven-segment display
Prints "Button press detected!" through the USB-UART bridge
BTNL Turns off the second digit on seven-segment display
Prints "Button press detected!" through theUSB-UART bridge
BTNR Turns off the third digit on seven-segment display
Prints "Button press detected!" through the USB-UART bridge
BTND Turns off the fourth digit on seven-segment display
Prints "Button press detected!" through the USB-UART bridge

Requirements

Demo Setup

  1. Download and extract the most recent release ZIP archive from this repository's Releases Page.
  2. Open the project in Vivado 2018.2 by double clicking on the included XPR file found at "<archive extracted location>/vivado_proj/Basys-3-GPIO.xpr".
  3. In the Flow Navigator panel on the left side of the Vivado window, click Open Hardware Manager.
  4. Plug the Basys 3 into the computer using a MicroUSB cable.
  5. Open a serial terminal emulator (such as TeraTerm) and connect it to the Basys 3's serial port, using a baud rate of 9600.
  6. In the green bar at the top of the Vivado window, click Open target. Select Auto connect from the drop down menu.
  7. In the green bar at the top of the Vivado window, click Program device.
  8. In the Program Device Wizard, enter "<archive extracted location>vivado_proj/Basys-3-GPIO.runs/impl_1/GPIO_demo.bit" into the "Bitstream file" field. Then click Program.
  9. The demo will now be programmed onto the Basys 3. See the Description section of this README to learn how to interact with this demo.

Next Steps

This demo can be used as a basis for other projects, either by adding sources included in the demo's release to those projects, or by modifying the sources in the release project.

Check out the Basys 3's Resource Center to find more documentation, demos, and tutorials.

For technical support or questions, please post on the Digilent Forum.

Additional Notes

For more information on how this project is version controlled, refer to the Digilent Vivado Scripts Repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.