Learn VC serial port programming, understand the standard of serial protocol is necessary, in fact, the serial port relative to other interfaces (such as USB interface) is very simple.
RS232 Serial port Standard is the United States EIA (Electronic Industry Federation) and Bell and other companies developed a communication protocol. It is suitable for the data transmission rate within the 0~20000BIT/S range of communication. RS232, as a standard, is widely used in computer and peripherals of a common communication interface, including a wide range of peripheral applications, such as: Printers, data acquisition module, test equipment and a variety of control loops, and even RS232 serial interface can also be used for simple connections between computers.
RS232 Serial Interface Features:
A wide range of applications, almost every computer has one or more RS232 serial interface, although the latest computer appears more USB such serial interface, but the RS232 serial interface can do a lot of USB does not work, and the RS232 serial interface is difficult to develop the USB interface is much simpler. For some laptops that do not have a RS232 serial interface, you can connect RS232 serial devices with usb-rs232 conversion lines.
The connection distance is up to 50~100 feet, while the USB connection is up to 16 feet, and the PC's parallel printer interface has a maximum connection distance of 10~15 feet.
For two-way connections, at least 3 wires are required, while parallel connections generally require at least 8 data lines.
Electrical characteristics of RS232 serial interface
The lower definition of the logical level on the data line Txd and RXD:
Logical 1:-3v~-15v
Logical 0:+3v~+15v
On the control lines of RTS, CTS, DSR, DTR and DCD:
Signal valid (ON): +3v~+15v
Invalid signal (OFF): -3v~-15v
Because the RS232 level definition and most SCM system (all kinds of peripherals are based on a single chip computer system) use the TTL level standard does not match, so the general SCM system and the connection between the RS232 usually add a switch between the two levels of the chip, such as the commonly used MAX232 belong to this kind of level conversion chip.
RS232 Serial Interface Connector form
Since RS232 does not define the physical characteristics of the connectors, there are many connectors such as DB-25, DB-15 and DB-9, of which DB-9 is the most widely used PC, and at present almost all RS232 serial interfaces are of this type, So here just to introduce the DB-9 form of the RS232 serial interface pin definition and shape, this information is also introduced in another article: "RS232 DB-9 pin serial pin definition"