Seven segment LED display

Please help.
Create a graphical interface using a MATLAB program to verify your digital circuit design, which must also satisfy the following programming requirements:
i. You need to allow the user to enter an integer in the range of 0-9 in command window.
ii. Display the corresponding binary inputs (A3, A2, A1, A0) and LED simulation in a MATLAB figure. The LED should display the same integer as the user enters.
iii. The program should have a command for user to exit the program.

回答 (1 件)

Vinai Datta Thatiparthi
Vinai Datta Thatiparthi 2020 年 9 月 16 日

1 投票

Hey!
"Allow the user to enter an integer..." and "...user to exit the program.."
Use the input function to request input from the user on the digit to be displayed.
digitToBeDisplayed = input('Enter an integer');
while ~strcmp(digitToBeDisplayed, 'x')
% Rest of the functions come here
end
"Display the corresponding binary inputs..."
Use the de2bi function to get the binary representation of the input decimal number.
"Simulate in a MATLAB figure..."
You could either use a hash-map to decide which LED segments need to be lit up for a given digit, or use a truth table based on the binary representations previously inferred.
You may use different figure properties to display all your information.
For further reference:
Hope this helps!

2 件のコメント

Ilmiat
Ilmiat 2020 年 9 月 17 日
Can you kindly give me the whole code for this? I really tried.
Yasir
Yasir 2024 年 11 月 27 日
can you kindly provide the seven segment diagram in simulink mathlab

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeArgument Definitions についてさらに検索

質問済み:

2020 年 9 月 13 日

コメント済み:

2024 年 11 月 27 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by