Question: 3 . 5 Lab 5 Calculator ( UART Application ) Lab Objectives To apply knowledge on the use of serial ports gained in lab 4

3.5 Lab 5 Calculator (UART Application)Lab Objectives To apply knowledge on the use of serial ports gained in lab 4 to solve adesign problemProblemYour group needs to develop a simple calculator program. Unlike theprevious labs, this lab will be done in C to provide some insight into howhigher level languages operate on microprocessors. The calculator will usethe serial routines from lab 4 to handle the data input and output interfacewith the user. All code for this program can only use base C instructions andthe functions developed in lab 4. Use of other libraries, for examplestring.h, stdlib.h and stdio.h, is prohibited in the solution of thisproblem.It can be useful to approach the problem it functionality tiers. Each tier isslightly more advanced than the previous one.For tier 1, the calculator needs to take in 2 four-digit numbers separated bya plus sign and return the answer after an equals sign.Examples: User enters, Program returns0001+0001=000020100+0020=001201234+5678=069129999+9999=19998Notice that the user is always entering four digits, even for values less than1000. Also, notice the result is always five digits. The four digit decimalvalues have a range of 0000 to 9999, giving the range of the sum to be0000 to 19998.For tier 2 functionality is removing the need to enter the leading zeros.Examples:1+1=00002100+20=00120
3 . 5 Lab 5 Calculator ( UART Application ) Lab

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!