Starting from:

$29.99

Assignment 2: Raspberry Pi UART and GPIO based on J. Kawash - 2014


Assignment 2: Raspberry Pi UART and GPIO
based on J. Kawash - 2014

Background
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 “<string” : write <string 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.

More products