How to interconnect single-chip serial communication rxd with txd

Source: Internet
Author: User

 

How to interconnect single-chip serial communication rxd with txd Category: 8051 2012-04-07
11: 35   Read by 348   Comment (0)   Favorites   Report

 

Reprinted from: http://blog.csdn.net/sdwuyulunbi/article/details/6632382

 

I believe many people are confused about how to connect rxd and txd when the microcontroller communicates with a computer or chip. In some circuit diagrams, some are the direct connection method and some are the cross connection method, which makes people confused.

First, we need to understand two concepts: DTE and DCE. DTE is an exponential data terminal device. A typical DTE is a computer and a single-chip microcomputer. DCE is a data communication device, and a typical DCE is a modem. Both rxd and txd In the RS232 serial port standards stand on the DTE standpoint, rather than the DCE. After understanding this, let's talk about the following wiring method.

When a single-chip microcomputer communicates with a computer through a serial port, the rxd of the single-chip microcomputer is connected to the txd of the computer, and the txd of the single-chip computer is connected to the rxd of the computer.

(1) Use the serial port for express connect. When the circuit is designed, the rxd of the single-chip microcomputer connects the txd of the board DB9, And the txd of the single-chip microcomputer connects the rxd of the board DB9. The specific implementation can be reversed at the 232 level conversion chip.

(2) Use the serial port crossover. When designing the circuit, because the serial port line has been crossed, the rxd of the single chip microcomputer connects the rxd of the circuit board DB9, And the txd of the single chip microcomputer connects the txd of the circuit board DB9 directly.

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

When a single-chip computer communicates with a serial device (such as a GPRS module or a carrier chip), rxd and txd are all reversed, that is, the rxd of the single-chip computer is connected to the txd of the single-chip computer and the rxd of the single-chip computer. (Except for the direct connection between rxd and single-chip microcomputer rxd, such as Huawei's em310)

The above is just my personal experience in the development process. If you have any questions, please kindly advise me.

 

-- Then, I checked the maxcompute information and found that datasheet says that maxcompute's Di (data input) is connected to 51 txd, maxcompute's Ro (r... output. This is obvious. 8051 is DTE, maxcompute is DCE, data is sent from txd of 51, and di input of maxcompute is processed. The same is true for the rxd method of 51. In case of any errors, thank you for pointing out.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.