Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

RS232 communication interface

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

In our desktop computer, the ordinary city has a 9-pin serial interface, this serial interface is called RS232 interface, it has a relationship with UART communication, but because today's notebook computers do not have this 9-pin serial port, so and MCU communication more and more trend in the use of USB virtual serial port, so the content of this section as an understanding of the content, everyone knows that there is such a thing on the line.

Let's first look at this standard serial port, which is divided into 9 pins and 9 holes in physical structure. We also call it male head and female head in custom, as shown in Figure 11-3.

Figure 11-3 RS232 Communication Interface

RS232 interface has a total of 9 pins, the identification is: 1, carrier detection DCD;2, accept data RXD;3, send data TXD;4, data terminal ready DTR;5, signal ground SG;6, data ready DSR;7, request to send RTS;8, clear CTS;9, ring alert RI. We want this serial port and our microcontroller to stop communication, we only need to care about the 2-pin RXD, 3-pin TXD and 5-pin GND.

Although the name of these three pins and our microcontroller serial port name, but it is not directly connected to the microcontroller and communication, this is why? As we understand more and more, we have to gradually understand that not all circuits are mostly 5V for high level and 0V for low level. In terms of RS232 specification, it is an inverse logic, also known as negative logic. Why is it called negative logic? Its TXD and RXD voltages,-3V~-15V voltage represents 1,+3~+15V voltage represents 0. A low level represents a 1, while a high level represents a 0, so it is called negative logic. Therefore, the 9-pin RS232 serial port of the computer cannot be directly connected to the microcontroller, and a level conversion chip MAX232 is required to complete, as shown in Figure 11-4.

Figure 11-4 MAX232 Transition Diagram

This chip can complete the standard RS232 serial level conversion into UART 0V/5 V level that our microcontroller can recognize and accept. From here everyone seems to be a little clear, in fact RS232 serial port and UART serial port, their agreement type is the same, but the level specification differences, and MAX232 this chip plays is the role of two people, it converts UART level into RS232 level, also converts RS232 level into UART level, thus completing the communication connection between RS232 interface and microcontroller UART.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report