1、Serial ports and COM ports refer to the physical interface form (hardware). TTL, RS-232, and RS-485 refer to the level standards (electrical signals).
2、When connecting devices, generally only GND, RX, and TX are connected. The Vcc or +3.3V power line is not connected to avoid conflicts with the power supply of the target device.
3、The PL2303 and CP2102 chips are USB to TTL serial chips that use USB to extend the serial port (TTL level).
4、The MAX232 chip is a dedicated bidirectional conversion chip between TTL level and RS-232 level, capable of converting TTL to RS-232 and vice versa.
5、The TTL standard has a low level of 0 and a high level of 1 (+5V level). The RS-232 standard has a positive level of 0 and a negative level of 1 (±15V level).
6、RS-485 is similar to RS-232 but uses differential signaling with negative logic. This will be skipped for now.
Serial Ports and COM Ports:
COM ports, or serial communication ports, are commonly referred to as serial ports. This is distinct from USB’s “Universal Serial Bus” and the hard disk’s “SATA”.
Generally, we encounter two types of physical standards: the D-type 9-pin connector and the 4-pin DuPont connector.
This is a common 4-pin serial port, often found on circuit boards, which may also have DuPont pins. Sometimes there is a fifth pin for the 3.3V power supply.
Since it is reserved on the circuit board, the protocol can vary widely depending on the specific device.
The following is a D-type 9-pin serial port (commonly referred to). It can be seen at the back of desktop computers.
Remember, this type of interface only has two protocols: RS-232 and RS-485. It will not be TTL level (unless for special applications).
We generally only connect the RXD and TXD pins, plus GND.
The image below shows a USB to TTL serial board, which can extend a serial port via USB. The chip is PL2303HX.
There is often confusion online regarding various serial ports, but this one can indeed be used to download programs to STC microcontrollers.
This is another type, using the CP2102 chip, which is also a USB to TTL serial port. It is said to be better than the PL2303, but I haven’t noticed a difference in actual use. This board also includes a +3.3V power pin to accommodate different target circuits.
All the above mentioned are USB to TTL serial ports. What if the target device has an RS-232 serial port (D-type 9-pin connector)?
Just connect a MAX232 chip to convert it.
You can also build a simple comparator circuit to achieve the TTL to RS-232 function, as shown in the diagram below.
How to convert RS-232 to TTL? This requires some thought. Of course, someone has already thought of making a finished product. Looking closely at the diagram, USB is converted to TTL serial via PL2303, and the four holes in the middle can be connected out, then converted to RS-232 level via MAX232, leading to the 9-pin serial port.
Below is another model: the level conversion still uses the MAX232.
You may come across something like this: it looks like it only has one chip inside.
But remember one thing, as long as it is a D-type 9-pin serial port, it will not be TTL level; unless specified otherwise, it is assumed to be RS-232.
Therefore, this cable, regardless of its internal structure, is a USB to RS-232 serial cable.
It is important to emphasize that the serial port of a device can be determined by the type of serial cable used, whether it is TTL or RS-232, thus deciding the connection method and whether a conversion circuit is needed.
END
This article is complete.
Click the button below ↓↓↓ to join the communication platform used by peers in the low-voltage industry.
Disclaimer: Quality content is valuable for sharing with everyone. Some content is sourced from the internet. If there is any infringement, please inform us, and we will handle it promptly. For cooperation and communication, please add WeChat ID: 18821279660.