Improvements to menu program

It is not an essay to write but to write a program using a C code and show steps that were made by taking screenshots
Task 1: Improvements to menu program
Create a new menu program based on the code developed in worksheet 3 task 4 that uses a
function to implement one of the menu options 3, 4 or 5. The function must have a suitable name
indicating its purpose. All user input and the display of the results must be performed in the
function. The program should ensure that only valid inputs are processed, any invalid values
should produce an appropriate error response or message.

Task 2: Integer to 7-segment converter function
Create and test a C function that will take an integer value in the range 0-15 and convert it to a
binary pattern containing the segment data for a 7-segment display. The segment data should be
returned as an unsigned char that can be passed to the put_7_seg() function to generate the
simulated display.
Task 3: Using simulated lights and switches
Write a C program that uses a do while loop containing the get_switches()and
put_leds() functions to continuously read an 8 bit input value and then output it to the
simulated LEDs. The loop must terminate when the ‘Q’ key is pressed.
Task 4: Multiplying two numbers
Write a C program using the simulated switches which treats the 8 input switches as two
separate 4-bit numbers. Bits 0 to 3 will represent one number and bits 4 to 7 will represent the
second. The two numbers are to be multiplied and the result displayed in binary on the
simulated LEDs.

Latest Assignments