Home > Common Problem > What are the sending and receiving data ends of the serial port?

What are the sending and receiving data ends of the serial port?

藏色散人
Release: 2020-05-17 09:30:57
Original
6561 people have browsed it

What are the sending and receiving data ends of the serial port?

What are the sending and receiving data ends of the serial port?

The sending and receiving data terminals of the serial port are "TXD" and "RXD".

TXD Transmit data Transmit(tx) Data abbreviation

RXD Receive data Receive(rx) Data abbreviation

TXD Network definition: Transmit Data: used on RS232 and UART links.

RXD Network definition: Receive Data: used on RS232 and UART links.

TXD and RXD are terms used in microcontrollers.

Detailed explanation on how to connect RXD and TXD in microcontroller serial port communication:

First of all, you need to understand two concepts, namely DTE and DCE. DTE refers to data terminal equipment. A typical DTE is a computer and a microcontroller. DCE refers to data communication equipment, and a typical DCE is MODEM. RXD and TXD in the RS232 serial port standard are based on DTE, not DCE. After understanding this, it will be easy to understand the following wiring method.

When the microcontroller communicates with the computer via serial port, the RXD of the microcontroller is connected to the TXD of the computer, and the TXD of the microcontroller is connected to the RXD of the computer.

(1) Use serial port straight line. When designing the circuit, the RXD of the microcontroller is connected to the TXD of the circuit board DB9, and the TXD of the microcontroller is connected to the RXD of the circuit board DB9. The specific implementation can be reversed at the 232 level conversion chip.

(2) Use serial port crossover cable. When designing the circuit, because the serial port lines have been crossed, the RXD of the microcontroller is connected to the RXD of the circuit board DB9, and the TXD of the microcontroller is connected to the TXD of the circuit board DB9. They can be connected directly.

This can explain why some circuits use the direct connection method and some circuits use the cross connection method, because the serial lines used are different.

When the microcontroller communicates with serial devices (such as GPRS modules, carrier chips, etc.), always connect RXD and TXD in reverse, that is, the RXD of the microcontroller is connected to the TXD of the device, and the TXD of the microcontroller is connected to the RXD of the device. (Except those whose RXD is specifically marked to be directly connected to the microcontroller RXD, such as Huawei's EM310)

The above is the detailed content of What are the sending and receiving data ends of the serial port?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template