Beginner Lab 7: Universal Asynchronous Receiver Transmitter (UART) Polling Mode
Objective
- Configure Universal Asynchronous Receiver Transmitter (UART) via Serial Communication Module (SERCOM) peripheral on the PIC32CM LS00 Curiosity Nano+ Touch Evaluation Kit for serial communication.
- Implement UART communication in polling mode without using interrupts.
- Develop embedded C code to transmit and receive characters through the UART interface.
- Implement an echo-back mechanism to send received characters back to the terminal.
Overview
This lab introduces fundamental UART communication using the PIC32CM LS00 Curiosity Nano+ Touch Evaluation Kit. The UART peripheral is configured to operate at 9600 bps, with data transmission and reception implemented using a polling‑based approach. The lab emphasizes direct interaction with UART registers, reinforcing the importance of data sheet interpretation and low‑level peripheral configuration. Character echo‑back is used to observe real‑time UART communication behavior. This moderate‑difficulty exercise builds essential skills required for debugging, communication, and interface development in embedded applications.
Lab Activities
- Configure the UART peripheral on the PIC32CM LS00 Curiosity Nano+ Touch Evaluation Kit for operation at 9600 bps.
- Implement polling-based UART transmit and receive functions.
- Receive characters from a serial terminal and echo them back to the sender.
- Verify UART communication functionality using a serial console.
Expected Outcomes
Upon completion of this lab, the following skills will be acquired:
- Configure UART peripherals using MPLAB® Code Configurator (MCC).
- Implement polling-based UART communication without interrupts.
- Calculate and apply baud rate settings for serial communication.
- Demonstrate successful transmission, reception, and echo-back of UART data.
Lab Source Files and Solutions
This ZIP file contains the completed solution project for this lab. It also contains the source files needed to perform the lab as per the following step-by-step instructions (see the "Lab Index" section on this page).
for this lab.
Lab Index
- Step 1: UART, Baud Rate and Polling Mechanism
- Step 1.1 - Understanding UART
- Step 1.2 - Understanding Baud Rate
- Step 1.3 - Understanding Polling Mechanism
- Step 2: Configuration of MCC
- Step 2.1 - Configuration of MPLAB® Code Configurator (MCC)
- Step 3: Generate Code
- Step 3.1 - Generate Code
- Step 4: Add Application Code to the Project
- Step 4.1 - Add Application Code to the Project
- Step 5: Build, Program and Observe the Output
- Step 5.1 - Hardware Setup
- Step 5.2 - Building the Project
- Step 5.3 - Programming and Observing the Output