This is a very common form of configuration for communication between microcontrollers.
Many people are confused about how to connect RXD and TXD when the microcontroller communicates with a computer or chip. Because in some circuit diagrams, some are straight connection methods, and some are cross connection methods, which makes people a little confused. First of all
, we need to understand two concepts, namely DTE and DCE. DTE refers to data terminal equipment, and typical DTE is a computer and a microcontroller. DCE refers to data communication equipment, and a typical DCE is a MODEM. RXD and TXD in the RS232 serial port standard are both from the perspective of DTE, not DCE. After understanding this, the following wiring method will be easy to understand.
When the microcontroller communicates with the computer through the 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 a serial port straight-through cable. 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 a serial port crossover cable. When designing the circuit, because the serial port line has 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 directly connected.
This can explain why some circuits use the direct connection method and some circuits use the cross connection method, because the serial port lines used are different.
--------------------------------------------------------------------------------------------------------------------------------------------
Therefore, when two microcontrollers communicate, the RxD (TxD) of one microcontroller should be connected to the TxD (RxD) of the other microcontroller.
Keywords:MCU
Reference address:UART serial communication between two microcontrollers
Many people are confused about how to connect RXD and TXD when the microcontroller communicates with a computer or chip. Because in some circuit diagrams, some are straight connection methods, and some are cross connection methods, which makes people a little confused. First of all
, we need to understand two concepts, namely DTE and DCE. DTE refers to data terminal equipment, and typical DTE is a computer and a microcontroller. DCE refers to data communication equipment, and a typical DCE is a MODEM. RXD and TXD in the RS232 serial port standard are both from the perspective of DTE, not DCE. After understanding this, the following wiring method will be easy to understand.
When the microcontroller communicates with the computer through the 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 a serial port straight-through cable. 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 a serial port crossover cable. When designing the circuit, because the serial port line has 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 directly connected.
This can explain why some circuits use the direct connection method and some circuits use the cross connection method, because the serial port lines used are different.
--------------------------------------------------------------------------------------------------------------------------------------------
Therefore, when two microcontrollers communicate, the RxD (TxD) of one microcontroller should be connected to the TxD (RxD) of the other microcontroller.
Previous article:MCU controlled 220VAC disconnection
Next article:A Brief Discussion on the Application Program Architecture of Single Chip Microcomputer
- Popular Resources
- Popular amplifiers
Recommended Content
Latest Microcontroller Articles
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
He Limin Column
Microcontroller and Embedded Systems Bible
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
MoreSelected Circuit Diagrams
MorePopular Articles
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
MoreDaily News
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
- Melexis launches ultra-low power automotive contactless micro-power switch chip
- Melexis launches ultra-low power automotive contactless micro-power switch chip
- Molex leverages SAP solutions to drive smart supply chain collaboration
- Pickering Launches New Future-Proof PXIe Single-Slot Controller for High-Performance Test and Measurement Applications
- Apple faces class action lawsuit from 40 million UK iCloud users, faces $27.6 billion in claims
- Apple faces class action lawsuit from 40 million UK iCloud users, faces $27.6 billion in claims
- The US asked TSMC to restrict the export of high-end chips, and the Ministry of Commerce responded
- The US asked TSMC to restrict the export of high-end chips, and the Ministry of Commerce responded
Guess you like
- The final battle of 5G RF front-end: mmWave
- ST MEMS Creative Competition Post 10 - Discussion and help on MLC issues
- Please help me with protel 99se video tutorial, please help me with detailed tutorial, thank you
- [Industrial Equipment Edge Intelligence Solution] Part 1: RSL10 Development Environment Construction
- Connecting SensorTile.box using python
- A new salesperson who just entered the automotive electronics industry asks the experts for some advice
- Selected answers to basic FPGA questions
- Questions about bq protection circuit
- About BL9341DC24V-3.3V
- Ultra-wideband? Ultra-wideband!