Uart interface introduction and understanding

UART (Universal Asynchronous Receiver/Transmitter) Universal Asynchronous Receiver.

The UART is a chip for controlling computers and serial devices. One thing to note is that it provides an RS-232C data terminal device interface so that the computer can communicate with a modem or other serial device that uses the RS-232C interface.

As part of the interface, the UART also provides the ability to convert parallel data transferred from within the computer into an output serial data stream. Converts serial data from outside the computer to bytes for use by devices that use parallel data within the computer. A parity bit is added to the output serial data stream, and a parity is received for the data stream received from the outside. A start and stop flag is added to the output data stream, and the start and stop flag is deleted from the received data stream. Handles interrupt signals from the keyboard or mouse (the keyboard and mouse are also serial devices). It can handle the synchronization management of computers and external serial devices. Some of the more upscale UARTs also provide buffers for input and output data. The newer UART is now the 16550, which stores 16 bytes of data in its buffer before the computer needs to process the data. The usual UART is 8250. Now if you buy a built-in modem, there will usually be a 16550 UART inside the modem.

The UART is a general purpose serial data bus for asynchronous communication. The bus bidirectional communication enables full duplex transmission and reception. In embedded designs, the UART is used to communicate with the PC, including communication with the monitor debugger and other devices such as EEPROM.

The UART uses a transmission line to sequentially transfer data one bit, using characters as the transmission unit.

The time interval between two characters in communication is not fixed, but the time interval between two adjacent bits in the same character is fixed.

The data transfer rate is expressed by the baud rate, which refers to the number of times the carrier parameter changes per unit time, or the number of bits transmitted per second.

For example, if 240 characters are transmitted per second, and each character contains 10 bits (1 start bit, 1 stop bit, 8 data bits), the baud rate is 2400Bd.

Transmission timing is as follows

Uart interface introduction and understanding

In the UART, there are two states on the signal line, which are distinguished by logic 1 (high level) and logic 0 (low level).

When idle, the data line should remain at a logic high state

The meaning of each of them is as follows

Start Bit: A logic 0 signal is sent first, indicating the beginning of the transmitted character.

Data Bits: Can be 5~8-bit logic 0 or 1. For example, ASCII code (7-bit), extended BCD code (8-bit) small-end transmission

Parity Bit: When the data bit is added to this bit, the number of bits in 1 should be even (even parity) or odd (odd parity).

Stop Bit: It is the end of a character data. Can be 1 bit, 1.5 bit, 2 bit high level

Idle bit: In the logic 1 state, there is no data transmission on the current line.

Simply put: (UART and COM)

Embedded in the serial port, generally refers to the UART port, but we often do not know the difference between it and the COM port, and RS232, TTL and other relationships, in fact, UART, COM refers to the physical interface form (hardware), and TTL, RS-232 refers to the level standard (electrical signal).

The UART has 4 pins (VCC, GND, RX, TX), with a TTL level, a low level of 0 (0V), and a high level of 1 (3.3V or more).

Uart interface introduction and understanding

The COM port is the commonly used port on our desktop (below), 9 pins, using RS232 level, it is a negative logic level, it defines +5~+12V as low level, and -12~-5V High level

Uart interface introduction and understanding

30v Power Adapter

30v Power Adapter,30v switching power adapter, 30vdc power supply ,dc power supply 30v 10a,30v power supply

ShenZhen Yinghuiyuan Electronics Co.,Ltd , https://www.yhypoweradapter.com