This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:iot-open:embeddedcommunicationprotocols2:uart [2023/06/26 00:27] – ktokarz | en:iot-open:embeddedcommunicationprotocols2:uart [2024/05/27 14:26] (current) – ktokarz | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== UART ====== | ||
| + | {{: | ||
| + | UART name is an abbreviation of Universal Asynchronous Receiver Transmitter. It is one of the most often used communication methods, traditionally named serial interface or serial port. In contrast to previously presented interfaces, UART uses direct point-to-point communication. | ||
| + | UART is the communication unit implemented in microcontrollers rather than the communication protocol. It sends the series of bits via the TxD pin and receives a stream of bits with the RxD pin (figure {{ref> | ||
| + | |||
| + | <figure uart1> | ||
| + | {{ en: | ||
| + | < | ||
| + | </ | ||
| + | |||
| + | |||
| + | The transmission speed and bit duration must be the same at the transmitter and receiver to properly transmit data. Although the transmission speed can be freely chosen, some standard, commonly used baud rates exist. They differ from 300 to 115200 bits per second. Higher baud rates are also available in modern microcontrollers, | ||
| + | Start and stop bits are used to synchronise the receiver and transmitter. Sample transmission flow is present in figure {{ref> | ||
| + | |||
| + | <figure uart2> | ||
| + | {{ en: | ||
| + | < | ||
| + | </ | ||
| + | |||
| + | UART, namely Serial Port, is used in many modern microcontrollers to upload the executable program, debug, and as the standard input/ | ||
| + | < | ||
| + | Many modern PC computers (except industrial ones) do not have a serial port exposed, so USB to serial converters must be used. Some development boards have a USB-serial converter on board (e.g. Arduino Uno, NodeMCU, STM Nucleo, etc.) | ||
| + | </ | ||
| + | < | ||
| + | Even if a PC computer has a serial port, it is usually compatible with the RS-232 standard. It uses the same frame structure but different voltage levels (with opposite zero-one encoding, known as reverse logic). | ||
| + | </ | ||
| + | |||