UART: Hardware

The UART peripheral is comprised of a receiver and a transmitter, both driven by a baud rate generator. The receiver and the transmitter have their own shift registers, which carry their independent data. These mechanisms allow the UART to receive and transmit data simultaneously. Other components to note are the receive and transmit buffers. In the case of the receive buffer, data received is taken out of the shift register and placed into the buffer. This buffer is essentially a storage queue for unprocessed data. This allows the UART to receive data even if the previous data hasn’t been processed yet. The transmit buffer works similarly, except that data is taken out of the buffer and placed into the shift register. The buffer still acts as a storage queue, but in this case, the queue is full of data to be transmitted and waits until the current transmission is done before loading the next value.

Since UART is a serial communication system, serial ports are used to establish communication. However, the Launchpad does not have any serial ports. Most modern laptops don’t have serial ports (a DB-9 serial port is shown to the right) anymore, though some personal computers still have them. 

Instead, the Launchpad uses its microUSB port for UART communication. Additionally, in this course, we use MobaXTerm, which is a terminal on our laptop to establish a UART connection with the board. Since most laptops do not have a serial port, MobaXTerm instead uses a serial port driver (a low-level software) to mimic the behavior of a serial port for the user. When you open MobaXTerm on your computer and set up a serial port connection, to you, the USB port works just like a good old serial port. The below figure shows how your laptop and the board get connected using UART. The blue rectangles show hardware components and green ovals represent software programs involved in this transmission.

In this course, we study a simple UART project where pressing a key on your keyboard displays feedback sent from your board. For this to happen, the character has to go through many steps to reach the processor core. The below steps summarize the journey of a character from a laptop to the ARM CPU. In the above figure, the below steps are identified by S1 to S8 in the software or component they happen.