CPRE 288 Laboratory
Lab 6: Serial Communications Using UART
Lecture - Lab Connection
In lecture, you have studied the use of the UART. In this lab, you will use the UART to perform simple serial communication with your desktop computer.
Prelab
- Read the lab description as well as the data sheet for the TM4C123GH datasheet related to UART (Chapter 14). Tiva TM4C123GH6PM datasheet
- Draft the code. The code need not be complete, and you don't have to compile or execute it before coming to the lab. Attempt to draft some code to show your TA.
Answer the following questions in preparation for the lab (refer to the Tiva datasheet (datasheet)and/or textbook as needed):
- What UART registers are relevant to this lab? [2
points]
- What is the value to be loaded into the IBRD and FBRD registers
for a baud of 9600? [2 points]
- How many UARTs are there on the TM4C123GH6PM? Which one
will you use to communicate between the microcontroller and your Desktop computer? [1 point]
Reference Files
Download the following files to your project folder on your U: drive.
- Timer.c/Timer.h: The file that contains utility
functions for the cyBOT platform.
- lcd.c/lcd.h: The program file with a number of LCD functions.
- uart.c/uart.h: Skeleton code files for you to implement.
- uart_extra_help.c/uart_extra_help.h/Lab6_template_extra_help.c: Optional alternative extra help version of the skeleton code files. Gives extra guidance on formating your code, and navigating the datasheet for Lab 6.
Lab 6 Description
- Lab 6 Manual: A detailed description of the objectives to complete for Lab 6
Cautions
Turn the power to the Cerebot board and iRobot off before charging. The Cerebot board consumes power and the battery will not charge if the robot is in full_mode (which it enters after calling oi_init, turing the power LED yellow). The robot is charging when the robot's power LED is pulsing red and both green LEDS on the dock are lit.
Reference Files
Files | Description |
---|---|
Tiva TM4C123GH6P datasheet.pdf | Information about the TM4C123GH6P |
Documentation on printf | Documentation for the lprintf and printf function. |
Online Feedback Form | Tell us what you think of the lab (feedback forms) |