Basys 3 Abacus Demo

Overview

Description

This Abacus demonstration project implements several arithmetic operations using the Basys3's switches, LEDs, pushbuttons, and 7-segment display.

  • Subtraction, multiplication, division, and modulo operations are selected with the pushbuttons.
  • Results are displayed on the seven segment display.
  • Operands are taken from the switches and displayed on the LEDs.

Features Used

Not Used Used
16 user switches X
16 user LEDs X
5 user pushbuttons X
4-digit 7-segment display X
4 Pmod connectors X
XADC Analog input X
12-bit VGA output X
USB-UART Bridge X
Serial Flash for application data X
USB HID Host with mouse X
USB HID Host with keyboard X

Prerequisites

Hardware

  • Basys3 FPGA board
  • Micro-USB cable

Software

  • Vivado Design Suite 2016.X
    • Newer versions can be used, but the procedure may vary slightly

Downloads

Basys3 Abacus Project Repository – ZIP Archive GIT Repo


Download and Launch the Basys3 Abacus Demo

Follow the Using Digilent Github Demo Projects Tutorial. This is an HDL design project, and as such does not support Vivado SDK, select the tutorial options appropriate for a Vivado-only design. All you will need to use the Abacus is your programmed Basys3, as such, you can continue to programming your board immediately when prompted to return to this page to check for additional requirements.

Using the Basys3 Abacus Demo

1. Setting Inputs

The abacus can preform 4 arithmetic functions on two 8-bit numbers. Switches 15-8 represent input A. Switches 7-0 represent input B. The abacus works by setting the slide switches to your desired operands and then selecting an operation with the buttons. The result will be displayed on the 7 segment display. On startup, the display will read 0.

 "This is a caption"

2. Subtraction - BTNU

Subtraction is activated while BTNU is pressed. This function uses the formula A - B. The 7-segment display will show the difference and sign until the user releases BTNU. The result will then start to scroll across the display.



The abacus calculating 4-2 and 2-4

3. Multiplication - BTND

Multiplication is activated while BTND is pressed. This function uses the formula A * B. The 7-segment display will show the product until the user releases BTND. The display will then return to whatever >was last scrolling.



The abacus calculating 3*3

4. Division - BTNR

Division is activated while BTNR is pressed. This function uses the formula A / B. The 7-segment display will show the quotient until the user releases BTNR. The display will then return to whatever was last scrolling.



The abacus calculating 16 / 2

5. Modulo/Remainder - BTNL

Modulo is activated while BTNL is pressed. This function uses the formula A % B. The 7-segment display will show the remainder until the user releases BTNL. The display will then return to whatever was last scrolling.



The abacus calculating 17 % 2