Tag interface

RS232

The RS-232 standard interface (also known as EIA RS-232) is one of the commonly used serial communication interface standards. It was jointly established in 1970 by the Electronic Industries Association (EIA) in conjunction with Bell Systems, modem manufacturers and computer terminal manufacturers. Established, its full name is “Technical Standard for Serial Binary Data Exchange interface Between Data Terminal Equipment (DTE) and Data Communication Equipment (DCE)”.

Introduction

In serial communication, both parties are required to use a standard interface so that different devices can be easily connected for communication. The RS-232-C interface (also known as EIARS-232-C) is currently the most commonly used serial communication interface. (The “-C” in “RS-232-C” only indicates the version of RS-232, so it is the same as the abbreviation of “RS-232”).

It is a standard for serial communication formulated by the Electronic Industries Association (EIA) of the United States in conjunction with Bell Systems, modem manufacturers and computer terminal manufacturers in 1970. Its full name is “Technical Standard for Serial Binary Data Exchange Interface Between Data Terminal Equipment (DTE) and Data Communication Equipment (DCE)”. The standard stipulates that a 25-pin DB-25 connector is used for each connector. The signal content of each pin is specified, and the levels of various signals are also specified. Later, IBM’s PC simplified rs232 into a DB-9 connector, which became the de facto standard. The RS-232 port of industrial control generally only uses three lines of RXD, TXD, and GND.

Features

Less signal lines

The RS-232 bus specifies 25 lines, including two signal channels, namely the first channel (called the main channel) and the second channel (called the secondary channel). The RS-232 bus can be used to achieve full-duplex communication, usually the main channel is used, and the secondary channel is used less. In general applications, full-duplex communication can be realized by using 3 to 9 signal lines, and a simple full-duplex communication process can be realized by using three signal lines (receiving line, sending line and signal ground).

Flexible baud rate selection

The standard transmission rates specified by RS-232 are 50b/s, 75b/s, 110b/s, 150b/s, 300b/s, 600b/s, 1200b/s, 2400b/s, 4800b/s, 9600b/s, 19200b /s, can flexibly adapt to devices of different speeds. For slow peripherals, you can choose a lower transfer rate: conversely, you can choose a higher transfer rate.

Use negative logic to transfer

It is stipulated that the level of logic “1” is -5V ~ -15 V, and the level of logic “0” is +5 V ~ +15 V. The purpose of selecting this electrical standard is to improve the anti-interference ability and increase the communication distance. The noise tolerance of RS-232 is 2V. The receiver will recognize signals as high as +3V as logic “0”, and signals as low as -3 V as logic “1”.

Long transmission distance

Because RS-232 adopts serial transmission mode and converts the TTL level of the microcomputer to RS-232C level, the transmission distance is generally up to 30 m. If the optically isolated 20 mA current loop is used for transmission, the transmission distance can reach 1000 m. In addition, if you add a Modem to the RS-232 bus interface and transmit via wired, wireless or optical fiber, the transmission distance can be longer.

Two physical interfaces

A kind of connector of RS-232 interface is D13-25 25-pin plug socket, usually the plug is at the DCE end, and the socket is at the DTE end.

 

Disadvantage

(1) The signal level of the interface is high, which is easy to damage the chip of the interface circuit, and because it is incompatible with the TTL level, a level conversion circuit is needed to connect with the TTL circuit.
(2) The transmission rate is low. In asynchronous transmission, the baud rate is 20Kbps; therefore, in the CPLD development board, the integrated program baud rate 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. This common ground transmission is prone to common mode interference, so the anti-noise interference is weak.
(4) The transmission distance is limited, the maximum transmission distance standard value is 50 feet, in fact it can only be used at about 15 meters.

Communication mechanism

The following describes the principle of RS-232 serial communication with the communication process between the computer and the modem. Consider the interaction and working process of the RS-232 signal between the computer and the modem when the modem is in the answering mode. Assume that the modem is full-duplex and uses RS-232.

Standard specification work.

(1) In the initial state, RTS and CTS are continuously ON, and the rs232 pin status is set and monitored through the communication program. In the answering mode, the software in the computer has been monitoring the ringing indication (RI), waiting for the RI to send an ON signal.
(2) After the communication program on the computer receives the RI signal, it starts to count the ringing by the number of times the ringing indicator is ON/OFF. When the number of ringing set by the arrival process is reached, the communication program will be ready for the data terminal. (DTR) signal, forcing the modem to go off-hook.
(3) After waiting for 2s (FCC regulations), the modem automatically starts to send its response carrier. At this time, the modem sends out a modem ready (DSR) signal to inform the computer that it has completed all preparations and is waiting for the carrier signal.
(4) During the continuous sending of the DTR signal, the computer software monitors the DSR signal. When the DSR signal turns ON, the computer knows that the modem is ready to connect to the data link, and the computer immediately starts monitoring the data carrier monitor (CD) signal to confirm the existence of the data link.
(5) When the carrier of the source modem appears on the telephone line, the answering modem sends out a CD signal.
(6) Through the transmission data line (TD) and the receiving data line (RD), full-duplex communication is started. During the data link transmission, the computer monitors the CD to ensure the existence of the data link.
(7) Once the communication task is completed, the computer prohibits DTR, and the modem responds by removing its carrier tone, prohibiting CD and DSR. As the link is torn down, the modem will return to its initial state.
When the RS-232 serial communication distance is short (<12m), you can use a cable to directly connect to the standard rs232 port. If the distance is long, an additional modem (Mode) is required. The simplest and commonly used method is the three-wire connection, that is, ground. , Receive data, send data three-pin connection.

 

Mechanical properties

The interface used in the rs232 standard is a 9-pin or 25-pin D-type plug, and a 9-pin plug is commonly used.
The RS232C standard interface has 25 wires, and there are only 9 wires commonly used. They are:
(1) Received Line Signal Detection (RSD)-used to indicate that the DCE has connected the communication link and inform the DTE that it is ready to receive data. When the local MODEM receives the carrier signal sent by the MODEM at the other end of the communication link (remote), it makes the RLSD signal valid, and informs the terminal that it is ready to receive, and the MODEM demodulates the received carrier signal into digital data. ,Send to the terminal along the receive data line RXD. This line is also called the Data Carrier Detection (DCD) line.
(2) Received data (RXD)——Receive the serial data (DCE→DTE) sent from the MODEM through the RXD line terminal.
(3) Transmitted data (TXD)——Send serial data to MODEM (DTE→DCE) through TXD terminal.
(4) Data terminal ready (Data Terminal Ready, DTR)-valid (ON) state, indicating that the data terminal can be used.
(5) Ground wire-GND.
(6) Data Set Ready (Data Set Ready, DSR)-valid (ON) state, indicating that the communication device is in a usable state.
(7) Request to Send—It is used to indicate that DTE requests DCE to send data, that is, when the terminal wants to send data, make the signal valid (ON state) and request sending to the MODEM. It is used to control whether the MODEM should enter the sending state.
(8) Clear to Send (CTS)-used to indicate that the DCE is ready to receive the data sent by the DTE, and is a response signal to the request to send the signal RTS. When the MODEM is ready to receive the data from the terminal and send it forward, the signal is enabled to notify the terminal to start sending data along the sending data line TXD.
(9) Ringing indication (Ringing, R)-When the MODEM receives the ringing call signal sent by the exchange, it makes the signal valid (ON state) to notify the terminal that it has been called.

 

Electrical characteristics

On TXD and RXD: logic 1 (MARK)=-3~-15V; logic 0 (SPACE)=3~15V. On control lines such as RTS, CTS, DSR, DTR and DCD: signal valid (on, ON state, positive voltage)=3~15V; signal invalid (off, OFF state, negative voltage)=-3~-15V . [3]
The above regulations explain the definition of logic levels in the RS232C standard. For data (information code), the level of logic 1 (mark) is lower than -3V, and the level of logic 0 (empty sign) is higher than +3V; for control signals, the ON state (ON) is the electrical signal when the signal is valid. When the level is higher than 3V, the OFF state (OFF) means that the signal level is lower than -3V, that is, when the absolute value of the transmission level is greater than 3V, the circuit can be effectively checked, and the Voltage is between -3~3V. It is meaningless. Voltages lower than -15V or higher than 15V are also considered meaningless. Therefore, in actual work, ensure that the level is within ±(3~15)V. When connecting the system with rs232 bus, there is short-range communication and remote communication. There are two ways. Short-range communication refers to communication with a transmission distance of less than 15m, which can be directly connected with an RS232 cable; long-distance communication above 15m requires a modem.

HDMI

High Definition Multimedia interface (hdmi) is a fully digital video and sound transmission interface that can transmit uncompressed audio and video signals. hdmi can be used for set-top boxes, DVD players, personal computers, televisions, game consoles, integrated amplifiers, digital audio and televisions and other equipment. hdmi can send audio and video signals at the same time. Because the audio and video signals use the same wire, the installation difficulty of the system line is greatly simplified.

hdmi is designed to replace older analog signal video and audio transmission interfaces such as SCART or RCA terminals. It supports various TV and computer video formats, including SDTV, HDTV video images, plus multi-channel digital audio. Both HDMI and UDI without audio transmission function inherit DVI’s core technology “Transmission Minimized Differential Signal” TMDS, which is still an extension of DVI in essence. The video content of DVI, HDMI, and UDI is transmitted in real-time and dedicated line mode, which can ensure that there will be no blockage when the video traffic is large. The amount of data per pixel is 24 bits. The signal timing is very similar to

. The picture is sent line by line, and a specific blank time (similar to an analog scan line) is added after each line and each frame picture is sent, and the data is not “Micro-Packet Architecture”. It will not only update the changed part of the two frames before and after. Each picture will be completely resent when it is updated. When the specification was first formulated, its maximum pixel transfer rate was 165Mpx/sec, which was enough to support 1080p quality at 60 frames per second, or UXGA Resolution (1600×1200); later it was expanded to 340Mpx/sec in the HDMI 1.3 specification to match future possibilities Demand.

At the beginning, DisplayPort was developed for LCD monitors and adopted the “Micro-Packet Architecture” transmission architecture. Video content is transmitted in packets. This is obviously different from DVI, HDMI and other video transmission technologies. In other words, the emergence of HDMI replaces analog signal video, and the emergence of DisplayPort replaces DVI and VGA interfaces.

HDMI also supports uncompressed 8-channel digital audio transmission (sampling rate 192kHz, data length 24bits/sample), and any compressed audio stream such as Dolby Digital or DTS, as well as the 8-channel 1bit DSD signal used by SACD. In the HDMI 1.3 specification, support for ultra-high data volume uncompressed audio streams such as Dolby TrueHD and DTS-HD has been added.

The standard Type A HDMI connector has 19 pins, and another Type B connector that supports higher Resolution is defined, but no manufacturer uses the Type B connector. The Type B connector has 29 pins, allowing it to send an extended video channel to meet future high-quality requirements, such as WQSXGA (3200×2048).

Type A HDMI is backward compatible with the Single-link DVI-D or DVI-I interface used by most displays and graphics cards today (but does not support DVI-A), which means that the signal source using the DVI-D interface can be passed through the conversion cable Drive HDMI Display, but this conversion scheme does not support audio transmission and remote control functions. In addition, if there is no HDCP certified DVI display, you will not be able to watch the video data output from HDMI with HDCP encryption protection (all HDMI displays support HDCP, but most displays with DVI interfaces do not support HDCP), Type B HDMI connector It will also be backward compatible with the Dual-link DVI interface.