Assignment 2: Raspberry Pi UART and GPIO solution

$24.99

Original Work ?
Category: You will Instantly receive a download link for .ZIP solution file upon Payment

Description

5/5 - (4 votes)

The Raspberry Pi is endowed with a rich set of memory mapped IO devices. In this assignment, you will write a simple program that will introduce you to memory mapped IO, and a small fraction of what the Pi can do, including: serial IO through a universal asynchronous receiver transmitter (UART, aka a serial port), and general purpose IO (GPIO) pins. Objective Implement an ARM assembly language program that accepts and executes a few simple commands via a serial terminal, including turning on the ACT LED on and off, and echoing strings back to the serial terminal. Details/Deliverables Your assembly language program should to do the following. 1. Write a command prompt to the serial terminal via the mini UART. 2. Read input from the serial terminal via the mini UART. 3. Parse the input string and execute the appropriate command. 4. Display an error message if the command is not recognized. 5. Implement the following commands: (a) led {on|off} : turn the Raspberry Pi’s ACT LED on or off, and (b) echo “” : write back to the UART interface. 6. Repeat the above for additional commands indefinitely. Evaluation 1 Command prompt written to UART 2pts 2 Execute led on command. 2pts 3 Execute led off command. 2pts 4 Execute echo ”¡string¿” command. 3pts 5 Error message for unimplemented commands. 2pts 6 Loop back to command prompt. 1pts 7 APCS compliant functions. 3pts 8 Good code structure; use of functions. 5pts 9 Well documented code. 5pts Total 25pts You may work individually, or with a partner, but no larger groups. Late work After the deadline and up to 24hrs late: -5pts. After 24hrs and up to 48hrs late: -15pts. Over 48hrs late: -25pts, i.e., no assignment will be accepted beyond 48hrs after the deadline. Plagiarism Work must me the sole work of the individual(s) submitting the work. You may find that the task for this assignment is similar to work found elsewhere. Nevertheless, you should go through the process yourself, and submit your own work. If you do borrow from other sources, cite the source and clearly indicate what you have borrowed, keeping in mind the design must be substantially your own. If you cite your sources, worst case you may receive a reduced grade for borrowing too much. If you borrow, but do not cite, that is plagiarism and academic misconduct, and carries severe penalties as determined by the Faculty of Science. As a guideline, consider the 20-minute rule. Talk with your colleagues and consult other sources (cite them please). Wait at least 20 minutes, then do your work to be sure that it is your own. Less then 20 minutes usually means that you are merely copying work from the original source.