Write a program for the microcontroller that will enable a


Task 1:

Using the lab kit, design a circuit for the processor to control the output of a connected 7-segment LED display device. You will be provided with a standard common anode 7-segment display of the type FND-507 (or similar). You will also be provided with a 74LS47 BCD to 7-segment decoder/driver (datasheet). Your first task will be to design a suitable interface between the microcontroller and the 7-segment display using the 74LS47 decoder/driver chip and any other necessary components (noting that you will be responsible for replacing any components damaged as a result of inappropriate interfacing).

You should then write a program for the microcontroller that will enable a sequence of digits to be displayed onto the 7-segment display according to user selection. When the system is started the 7-segment display should be initially blank and a menu should be displayed on the Nerd Kit LCD display.

This menu should allow the user to select one of three functions:

Function 1: The first menu option should cause the 7-segment display to show a sequence of numbers starting at 0 and counting up sequentially to 9, after which the value displayed should revert back to 0 and then continue counting up again. Each value should be displayed for -Is before the display switches to the next value. The counting should continue until any keypress is detected on the keypad at which point it should stop, the 7-segment display should be cleared, and the LCD display should once again show the main menu.

Function 2: This function should exhibit the same behaviour as function 1, except that the count should start at 9 and count downwards, resetting back to 9 after reaching 0.

Function 3: Selecting the third menu option should prompt the user to enter a sequence of 5 single digit numeric values. Once the 5 values have been entered, these values should be displayed sequentially in a loop, in the same order in which they were entered by the user, until a key is pressed, at which point the 7-segment display should be cleared, and the LCD display should once again show the main menu.

Even though the 'user interface' is limited to the LCD screen and keypad, marks will be given for making this as 'user-friendly' as possible.

Note: You can use your solution to Assignment 1 Task 1 as the basis (design) for this task, appropriately modified for the supplied components.

Task 2:

For this task you will need to add an additional menu option (function) to the program developed for Task 1.

Function 4: This function will be a "Reaction Speed Test". When this menu option is selected the LCD display should indicate to the user that once the test begins, they should press a key on the keypad as soon as they see the digit "0" displayed on the 7-segment LED display. They should then be prompted to press any key to start the test.

4 (a) Preparation: Once a subsequent keypress is detected, the 7-segment display should display a countdown "3", "2", "1".

4 (b) Test: Immediately after the countdown, a random sequence of single digit numeric values should be displayed (in the range 0 - 9) at intervals.

o Once a keypress is detected, if the "0" digit was not displayed at the time then the LCD display should indicate that this was a failed attempt.

o If a "0" digit was displayed at the time of the keypress, then the LCD display should report the time in milliseconds between the point when the "0" was displayed and the point when the keypress was detected.

o A further keypress after this should clear the 7-segment LED display and revert back to the main menu.

Note: You can use your solution to Assignment 1 Task 2 as the basis for the timing aspects of this task.

Request for Solution File

Ask an Expert for Answer!!
Other Engineering: Write a program for the microcontroller that will enable a
Reference No:- TGS02922339

Expected delivery within 24 Hours