The RS-232 interface conforms to the serial data communication interface standard established by the electronic industry alliance of the United States (EIA). The original full name is eia-rs-232 (232 for short). It is widely used in the peripheral connection of computer serial interface. Connecting cable and mechanical, electrical characteristics, signal function and transmission process.
The data transmission rate specified in RS-232-C standard is 50, 75, 100, 150, 300, 600, 1200, 2400, 4800, 9600, 19200 baud per second.
RS-232 is one of the main serial communication interfaces. Because RS232 interface standard appeared earlier, there are inevitably shortcomings, mainly as follows:
(1) the signal level of the interface is high, which is easy to damage the chip of the interface circuit. The voltage of any signal line of RS232 interface is negative logic relation. That is: Logic "1" is - 3-15v; logic "0": + 3-15v, noise tolerance is 2V. That is to say, the receiver is required to recognize the signal higher than + 3V as logic "0", the signal lower than - 3V as logic "1", the TTL level of 5V as logic positive and 0 as logic negative. It is not compatible with TTL level, so it needs to use level conversion circuit to connect with TTL circuit.
(2) the transmission rate is low. When asynchronous transmission, the bit rate is 20kbps; therefore, in the 51cpld development board, the baud rate of integrated program can only be 19200, which is also the reason.
(3) the interface uses a signal line and a signal return line to form a common ground transmission form, which is easy to generate common mode interference, so the anti-noise interference is weak.
(4) the transmission distance is limited. The standard value of the maximum transmission distance is 50 feet. In fact, it can only be used for about 15 meters.
When the communication distance is tens of meters to thousands of meters, RS-485 serial bus is widely used. RS-485 adopts balanced transmission and differential reception, so it has the ability to suppress common mode interference. In addition, the bus transceiver has high sensitivity, which can detect the voltage as low as 200mV, so the transmission signal can be recovered from kilometers away.
RS-485 adopts half duplex operation mode, and only one point can be in transmission state at any time. Therefore, the transmission circuit must be controlled by enable signal.
RS-485 is very convenient for multi-point interconnection and can save many signal lines. RS-485 can be used to form a distributed system, which allows up to 32 drivers and 32 receivers to be connected in parallel. In view of the shortcomings of RS-232-C, the new standard RS-485 has the following characteristics:
(1) electrical characteristics of RS-485: Logic "1" is represented by the voltage difference between two lines + 2V ~ + 6V, and logic "0" is represented by the voltage difference between two lines - 6V ~ - 2V. The interface signal level is lower than RS-232-C, so it is not easy to damage the interface circuit chip, and this level is compatible with TTL level, so it is convenient to connect with TTL circuit.
(2) maximum data transmission rate: 10Mbps
(3) RS-485 interface adopts the combination of balanced driver and differential receiver, which has strong anti common mode interference ability, that is, good anti noise performance.
(4) the maximum transmission distance standard value of RS-485 interface is 4000 feet, which can actually reach 3000 meters.
(5) RS-232-C interface is only allowed to connect one transceiver on the bus, i.e. single station capability; while RS-485 interface is only allowed to connect up to 128 transceivers on the bus, i.e. multi station capability, so users can easily establish equipment network by using a single RS-485 interface.