Overview

A simple four BCD digit counter, which counts up when a button is held down, and can be reset.

Controls

Left Button - Hold to count.
Right Button - Press to reset.

Display

The counter displays a four digit decimal number using Binary-Coded Decimal (BCD). A set of 16 LEDs is separated into four groups of four, each showing the BCD representation of the corresponding digit.

Clock Prescaler

A clock prescaler takes the signal for the system clock, and outputs a signal with a lower frequency, allowing for multiple clock signals to be used, without having to slow down the system clock.

Button Debouncer

Buttons use a pair of metal plates to detect when it is pressed. These plates can 'bounce', making contact multiple times, causing multiple signals to be sent when a button is only pressed once. A debouncer was included for both buttons in the project to correct this error.

Counter

The Counter is used to hold a number, and count up when enabled. The number of bits used to represent the number can be specified, as can the minimum and maximum values. In this case, it stored a 4 bit number, and had minimum and maximum values of 0 and 9 respectively.

Fourcounter

The Fourcounter contains four instances of the counter, which allows for a maximum value of 9999 to be displayed. It also incorporates all of the previously mentioned components, and controls the whole system.

Grading

This project was part of the 'Intermediate Digital Design' module of my degree programme, and received a grade of 97%.

Built With

  • basys-3
  • fpga
  • vhdl
  • xilinx-vivado
Share this project:

Updates