第 1 章 RS232协议基本内容介绍

目录

1.1. RS232是什么
1.2. RS232引脚接口的种类
1.3. RS232引脚接口的名称和功能
1.4. RS232引脚的接法
1.5. RS232的流控制协议
1.5.1. RTS/CTS和DTR/DSR之间的对比
1.6. RS232时序图

摘要

TODO:整理帖子内容

【整理】嵌入式外设之RS232

http://www.camiresearch.com/Data_Com_Basics/RS232_standard.html#anchor1155404

1.1. RS232是什么

RS232,就是我们常说的,串口。

也常被叫做,UART。

最早的是25针的,后来有了简化版的9针的。目前最常用的就是9针的。

最早采用RS232协议的产品是调制解调器Modem和电传打字机。

RS-232 - A standard defining the signals between two devices, defining the signal names, their purpose, voltage levels, connectors and pinouts. This is a specific interface standard that allows for equipment interoperability. While two pieces of hardware may have UARTs, you don't know that they'll connect without damage, or communicate properly unless you know they have the same pinout and voltage standards, or include a converter or specially wired cable specific to the interconnection of these two specificl devices. To avoid the need for special converters or cables, the manufacturers may choose to follow the RS-232 standard. You know, then, that a standard RS-232 cable will connect the two. However, neither the UART, nor the RS-232 standard define what is sent on the TX and RX lines. Generally, when people use RS-232, they use a simple 8 bit NRZ encoding with one start bit and one stop bit. Most equipment today manufactured uses this encoding, but there's no requirement to do so. You can find older equipment that includes parity bits, or uses 7 or 9 bits. The UART can be configured to support these various protocols on its TX and RX lines. UARTs do not typically interface directly with RS-232. You will need to convert the output of the UART to the +/-12V standard that RS-232 requires. A complete RS-232 interface will typically involve both a UART and an RS-232 level converter. Further, the RS-232 standard includes the definition of several other signalling pins besides TX and RX, which you may need to use depending on the equipment you need to connect to. These will also need to be level converted, and your UART may, or may not, support these signals. If it does not you will have to control them with your software/firmware directly. So while a UART may help you implement an RS-232 interface, it is not an RS-232 interface itself.