Control Seven Segment Display with Push Buttons

Design Challenge 1

Design Challenge:

Use Push Buttons to Control a Seven-Segment Display

Introduction

In this challenge you will be asked to use push buttons to control the seven-segment display on your FPGA board. Each digit of the seven-segment display is composed of 7 LEDs arranged in a “figure 8” pattern with another LED for the decimal point. When the buttons are not pressed, all of the LEDs should be on. When a button is pressed, a digit should turn off.

Before you begin, you should:
  • Have the Xilinx® ISE WebPACK™ installed.
  • Have your FPGA board set up.
  • Have completed Project 1 and Project 2 or understand how to use a switch to control an LED.
  • Know how to use an assignment statement in Verilog to make connections.
  • Know how to use switches to provide inputs to digital systems.
  • Know how LEDs show the outputs of a digital system.
  • Know how to use UCF to map I/Os of a system to physical devices on-board.
After you're done, you should:
  • Be able to build simple digital systems that get information from the environment and display that information using physical devices, such as LEDs or Seven-Segment Displays.

Inventory:

Qty Description
1 Digilent® Nexys™4, Nexys™3, Nexys™2, or Basys™2 FPGA Board
1 Xilinx ISE Design Suite: WebPACK (14.6 Recommended)
1 Digilent Adept

Seven-Segment Display

Seven-segment displays (7sd) are some of the most common electronic display devices in use. They can be used to display any decimal digit by illuminating particular segments and leaving other segments dark. 7sd devices are constructed from seven LEDs that have been arranged in a “figure 8” pattern, as shown in Fig. 1 below. These LEDs function identically to individual LEDs by emitting light when a small current passes through them.

The Digilent board uses a common anode display, which means all of the anode connections for a given digit are tied together in a common circuit node. To illuminate a given segment in a given digit, a '1' must be applied to the digit's anode and a '0' applied to the segment's cathodes.

Figure 1. Seven-segment display diagram.

When working with Digilent boards, the anodes are controlled by transistors while the cathodes are connected to the FPGA directly. Applying a '1' to the anode pin allows electricity to flow through the transistor to the anodes of the LEDs. When a cathode pin is driven to '0', the circuit is complete and causes the LED to illuminate. Figure 2 below shows the schematic for a seven-segment display.

Figure 2. 7sd schematic.

Hint: System Diagram

Use the buttons to control the anode wires to turn the seven-segment display on and off. Figure 3 below shows the system diagram.

Figure 3. System diagram.

  • Other product and company names mentioned herein are trademarks or trade names of their respective companies. © 2014 Digilent Inc. All rights reserved.