0% found this document useful (0 votes)
39 views4 pages

Fpga Project: Submitted in Fulfillment of The Requirements For The

Jad Rizk designed a project to add two numbers displayed on 7-segment displays and show the result. The project uses four 7-segment displays, five LEDs, two buttons, and five switches. Each number is counted up to five using the buttons and displayed on its own 7-segment display. The LEDs light up in order as each number increases. Users can see the sum on the displays by enabling one switch. Other switches allow enabling or resetting each number individually. The goal is to add and display numbers up to ten on the 7-segment displays.

Uploaded by

TheJr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views4 pages

Fpga Project: Submitted in Fulfillment of The Requirements For The

Jad Rizk designed a project to add two numbers displayed on 7-segment displays and show the result. The project uses four 7-segment displays, five LEDs, two buttons, and five switches. Each number is counted up to five using the buttons and displayed on its own 7-segment display. The LEDs light up in order as each number increases. Users can see the sum on the displays by enabling one switch. Other switches allow enabling or resetting each number individually. The goal is to add and display numbers up to ten on the 7-segment displays.

Uploaded by

TheJr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Electrical Department

2019 / 2020

FPGA PROJECT

Submitted in fulfillment of the requirements for the

FPGA MIDTERM

Major: Electrical Engineering Power

By :

Jad Rizk
________________________________________________

Adding Two Numbers and Displaying Them Project

Advisor:

Dr. Georges EL NASHEF Course’s Professor


Objective:
Adding two numbers and show the result on a seven-segment display.
(Name of the project is jad, so the entity)
Algorithm:
KEY (in)SW (in)
HEX0,HEX1,HEX2,HEX4 (OUT)
LEDR (OUT)
SIGNALS : Add_nb1, Add_nb2
countup_nb1, countup_nb2, enable_nb1,enable_nb2, enable_sum, reset1,2

countup_nb1<= KEY(0), countup_nb2<= KEY(1);


enable_nb1 <= SW(0), enable_nb2 <= SW(1);
enable_sum <=SW(2);
reset1 <= SW(3), reset2 <= SW(4);

D
Enable_nb1==’
1’

Enable_nb2==’
1’

B
YES
count_nb1==’1

Add_nb1++

Show Add_nb1 on HEX 4


C
TURN ON LEDR++
From (10 to 6)

count_nb2==’1 YES

Add_nb2++

Show Add_nb1 on HEX 2

TURN ON LEDR++
(from 1 to 5)

A
A

YES NO
B Reset1==’1’

YES
C Reset2==’1

NO

NO
add_nb1==’0110 Add_nb1=’0000’ B

YES

NO
add_nb2==’0110 Add_nb2=’0000’ C

YES

Sum  add_nb1 + add_nb2

NO YES
D Enable_sum==’1’

Show SUM on HEX0 and HEX1

D
Description:
In my project I used
Four seven-segments displays,
Five switches,
The ten leds,
The two keys.

This project has a role of calculating two numbers, (addnb1 and addnb2). Each
number will be displayed on a seven-segment display; HEX4 will show the first
number and HEX2 will show the second.
Each number will count up (+1) on every click of the key buttons; KEY(0)
reserved for the growth of the first number (add_nb1) and KEY(1) will be for
the second number (add_nb2).
In addition, with each count up, the leds will turn on in order. To be mentioned
that the five leds starting from the left are reserved for addnb1, and those
starting from the right are for addnb2.
To be clear, here is a description for this part:
While add nb1=’0001’, LEDR(10) will be turned on,
While add nb1=’0010’, instead of LEDR(10) is on, LED(9) will be turned on
also,
While add nb1=’0011’, in addition of LEDR(10) and LEDR(9)are turned on,
LEDR(8) will be on,
It’s similar to the loading process
For add_nb1 it will be like this way
For add_nb2 it will be in the opposite
That’s why I did not let any of the two numbers to exceed the number five,
‘0110.
Moreover, to see the sum, we are supposed to enable the third switch; SW(2), so
we are able to see the sum on HEX0 if it’s one digit, and on HEX1 in plus if it’s
two digit (to get clear our max sum will be 10, we already discussed it).
Furthermore, to let the system get to function; to count up, we are supposed to
enable the two switches; SW(0) to enable counting up the first number and
SW(1) for the second number.
Additionally, we can reset any of the numbers we are wishing to by enabling
SW(3) to reset the first number and SW(4) for the second.
Also, each of the numbers will reset automatically by achieving the number five.
And here was a total description for my project I hope that is clear.

Submitted by: Jad Rizk

You might also like