Question: Use the 8051 to create a calculator program that operates using 8051 UART and a serial terminal. The most basic version of this project (worth
Use the 8051 to create a calculator program that operates using 8051 UART and a serial terminal.
The most basic version of this project (worth a maximum of 75% credit for this project) is a menu base calculator where the following arithmetic operations can be performed on 4-digit decimal data:
Addition
Subtraction
Multiplication
Division
Sample of program basic operation should appear as follows (user input is shown in bold):
Welcome to the 8051 Menu Based Calculator! Please select an option: 1. Addition 2. Subtraction 3. Multiplication 4. Division Enter your choice: 1 Addition has been selected. Please enter the augend: 10 Please enter the addend: 20 0010 + 0020 = 0030 Please select an option: 1. Addition 2. Subtraction 3. Multiplication 4. Division Enter your choice: 2 Subtraction has been selected. Please enter the minuend: 20 Please enter the subtrahend: 10 0020 - 0010 = 0010 Please select an option: 1. Addition 2. Subtraction 3. Multiplication 4. Division Enter your choice: 3 Multiplication has been selected. Please enter the multiplicand: 20 Please enter the multiplier: 10 0020 * 0010 = 0200 Please select an option: 1. Addition 2. Subtraction 3. Multiplication 4. Division Enter your choice: 4 Division has been selected. Please enter the dividend: 20 Please enter the divisor: 3 0020 / 0003 = 0006 R 0002 Please select an option: 1. Addition 2. Subtraction 3. Multiplication 4. Division Enter your choice: 5 INVALID OPTION #5!
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
