Point:
1, serial port, COM port refers to the physical interface form (hardware). TTL, RS-232, and RS-485 refer to the level standard (electrical signal).
2. When connecting the device, generally only connect GND RX TX. Will not connect Vcc or +3.3v power cable to avoid power supply conflict with the target device.
3, PL2303, CP2102 chip is a USB to TTL serial port chip, use USB to expand the serial port (TTL level).
4. The MAX232 chip is a dedicated bidirectional conversion chip with TTL level and RS232 level. It can be TTL to RS-232 or RS-232 to TTL.
5, TTL standard is low level is 0, high level is 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 signal negative logic. I skipped it here.
Serial port, COM port:
The COM port is the serial communication port, referred to as the serial port. This is different from the "Universal Serial Bus" of USB and the "SATA" of the hard disk.
Generally we see two physical standards. D-type 9-pin plug, and 4-pin DuPont head.
This is a common 4-pin serial port that is common on circuit boards and often has DuPont pins on top. There is also a fifth pin, 3.3V power supply.
Since it is reserved on the circuit board, there are many different protocols, depending on the specific device.
The following is the D-type 9-pin serial port (common saying). It can be seen behind a desktop computer.
Keep in mind that there are only two protocols for this interface: RS-232 and RS-485. It will not be TTL level (unless special application).
We usually only take two pins of RXD TXD, plus GND.
The picture below is a small board of USB to TTL serial port, which can be extended by USB. The chip is PL2303HX.
Internet often confuses various serial ports, but this is indeed a program that can be downloaded to STC microcontrollers.
This is another kind of CP2102 chip, which is also a USB to TTL serial port. It is said to be better than the PL2303, and it is not felt in actual use. This small board has more +3.3V power supply to adapt to different target circuits.。
The above is a USB to TTL serial port. If the target device is an RS-232 serial port (D-type 9-pin interface)?
Then connect a MAX232 converter.
You can also use a simple comparator circuit to implement TTL to RS-232 function, as shown below.
RS-232 to TTL tricks? This requires you to move your mind. Of course, some people thought of making a finished product. Looking closely at the picture below, USB is converted to a TTL serial port by PL2303. The middle four holes can be extracted, and then converted to RS-232 level by MAX232, and 9-pin serial port is taken out.
Here's another: the level conversion is still using the MAX232.
You might buy this: it looks like there is only one chip inside.
But keep in mind that as long as it is a D-type 9-pin serial port, it will not be TTL level. Unless otherwise specified, it defaults to RS-232.
So this line, no matter what the structure inside, is the line of USB to RS-232 serial port.
What you want to emphasize is that the serial port of a device can determine whether it is TTL or RS-232 according to the serial port cable that is pulled out, thus determining the link mode and whether the circuit needs to be converted.
Postcode:518100
Tel:0086 13923792185
Whatsapp: +8613923792185
Email:robert@micmetering.com
Address: Floor 6, Zone A, Building B, Qinghu Science Park, Longhua, Shenzhen, China
Hotline
Hotline
Back to Top