A commonly used device for encoding and decoding such asynchronous
bit streams is a Universal Asynchronous Receiver/Transmitter (UART) which
converts data bytes provided by software into a sequence of individual bits and,
conversely, converts such a sequence of bits into data bytes to be passed off to
software. The STM32 processors include (up to) five such devices called USARTs
(for universal synchronous/asynchronous receiver/transmitter) because
they support additional communication modes beyond basic asynchronous
communications. In this Chapter we will explore serial communication between
the (target) STM32 USART and a USB/UART bridge connected to a
host PC.
UARTs can also be used to interface to a wide variety of other peripherals.
For example, widely available GSM/GPRS cell phone modems and
Bluetooth modems can be interfaced to a micro-controller UART. Similarly
GPS receivers frequently support UART interfaces. As with the other interfaces
we’ll consider in future chapters, the serial protocol provides access to a
wide variety of devices.