Differences Between RS-232, RS-422, and RS-485

Differences Between RS-232, RS-422, and RS-485
Today’s Optoelectronics

Interesting, Informative, and In-Depth Optoelectronic Technology and Science News

Sharing makes the world a warmer place; others become better because of your sharing! Welcome to share valuable content!Today’s Optoelectronics changes because of you; feel free to leave comments and share… Together, let’s use technology to illuminate the world and warm people’s hearts…

Serial communication is the most basic communication method faced by electronic engineers, with RS-232 being the simplest among them. However, many beginners often struggle to understand the relationship and differences between UART and RS-232, RS-422, and RS-485. This article will discuss these concepts to help clarify their relationships.

Communication issues, like traffic problems, can have various situations such as high speed, low speed, congestion, and interruptions. If we compare serial communication to traffic, UART can be likened to a station, and a frame of data is like a car. Cars on the road must obey traffic rules. In the city, the speed limit is generally 30 or 40, while on highways it can reach 120. The path the car takes and the speed limit depend on the protocol specifications. Common serial protocols include RS-232, RS-422, and RS-485; what are the subtle differences between them? Let’s explore below.

1. What is UART?

UART stands for Universal Asynchronous Receiver/Transmitter, commonly referred to as UART. It is a key module for asynchronous communication between devices. UART handles the serial/parallel and parallel/serial conversion between the data bus and serial port and specifies the frame format. As long as both parties use the same frame format and baud rate, they can complete the communication process using just two signal lines (Rx and Tx) without sharing a clock signal, which is why it is also called asynchronous serial communication.

Differences Between RS-232, RS-422, and RS-485

By adding a suitable level converter, such as SP3232E or SP3485, UART can also be used for RS-232 or RS-485 communication or connected to a computer’s port. UART is widely used in applications such as mobile phones, industrial control, and PCs.

Differences Between RS-232, RS-422, and RS-485

UART uses asynchronous, serial communication.

Serial communication refers to transmitting data sequentially one bit at a time over a transmission line. Its characteristics include simple communication lines, allowing communication with simple cables, reducing costs, and being suitable for long-distance communication, although it has slower transmission speeds.

Asynchronous communication uses one character as the transmission unit, and the time interval between two characters is not fixed; however, the time interval between two adjacent bits within the same character is fixed.

The data transmission rate is expressed in baud rate, which indicates the number of binary bits transmitted per second. For example, if the data transmission rate is 120 characters per second, and each character is 10 bits (1 start bit, 7 data bits, 1 parity bit, and 1 stop bit), the baud rate would be 10 × 120 = 1200 characters per second = 1200 baud.

The data communication format is illustrated in the following diagram:

Differences Between RS-232, RS-422, and RS-485

The meanings of the various bits are as follows:

Start Bit: A logical “0” signal is sent first to indicate the start of the transmission character. Data Bits: Can be 5 to 8 bits of logical “0” or “1”, such as ASCII code (7 bits) or extended BCD code (8 bits). Parity Bit: After adding this bit to the data bits, the number of “1” bits should be even (even parity) or odd (odd parity). Stop Bit: This is a character data end marker, which can be 1, 1.5, or 2 bits of high level. Idle Bit: In a logical “1” state, indicating that there is currently no data transmission on the line.

Note: Asynchronous communication is character-based, and the receiving device can correctly receive data as long as it stays synchronized with the sending device within the transmission time of one character after receiving the start signal. The arrival of the next character’s start bit recalibrates the synchronization (achieved by detecting the start bit for self-synchronization of the clocks of the sender and receiver).

Differences Between RS-232, RS-422, and RS-485

2. RS-232 Standard

RS-232 is a serial physical interface standard established by the Electronic Industry Association (EIA) in the United States. RS is an abbreviation for “Recommended Standard,” and 232 is the identification number. RS-232 specifies the electrical and physical characteristics, only affecting the data transmission path; it does not include data processing methods. It should be noted that many people often mistakenly refer to RS-232, RS-422, and RS-485 as communication protocols, which is incorrect; they are merely mechanical and electrical interface standards regarding UART communication (at most, they pertain to the physical layer of network protocols).

This standard specifies a 25-pin DB-25 connector and defines the signal content for each pin of the connector, as well as the voltage levels for various signals. Later, IBM simplified RS-232 to a DB-9 connector for PC use, making it the de facto standard today. In industrial control, the RS-232 port generally only uses three lines: RXD (2), TXD (3), and GND (5).

Differences Between RS-232, RS-422, and RS-485

In the early days, since PCs were equipped with RS-232 interfaces, we chose RS-232 whenever we needed to use UART. However, now personal computers, including laptops and desktops, no longer come with RS-232 interfaces; we see that there are no DB9 connectors on computer motherboards. Therefore, development boards now choose TTL UART or directly use UART-to-USB converters on the development boards.

In embedded systems, the serial port generally refers to the UART port, but we often confuse it with the COM port, as well as the relationships between RS-232, TTL, etc. In fact, UART and COM refer to the physical interface forms (hardware), while TTL and RS-232 refer to the voltage standards (electrical signals).

UART has 4 pins (VCC, GND, RX, TX) and uses TTL levels, where low level is 0 (0V) and high level is 1 (3.3V or above).

Differences Between RS-232, RS-422, and RS-485

3. RS-485/RS-422 Standards

The RS-232 interface can achieve point-to-point communication, but this method cannot realize networking functions. To solve this problem, a new standard, RS-485, was developed. RS-485 uses differential transmission for data signals, also known as balanced transmission, using a pair of twisted wires, defining one wire as A and the other as B.

Typically, the positive level between the sending driver A and B is +2 to +6V, representing one logical state, and the negative level is -2 to +6V, representing another logical state. There is also a signal ground C; RS-485 has an “enable” terminal, which is optional in RS-422.

The electrical performance of RS-422 is identical to that of RS-485. The main differences are: RS-422 has 4 signal lines: two for sending and two for receiving. Since RS-422 separates receiving and sending, it can receive and send simultaneously (full duplex). Because full duplex requires separate channels for sending and receiving, RS-422 is suitable for communication between two stations, star networks, and ring networks, but cannot be used for bus networks; RS-485 only has 2 signal lines, so it can only operate in half-duplex mode, commonly used in bus networks.

Differences Between RS-232, RS-422, and RS-485

RS-485’s electrical characteristics: Logic “1” is represented by a voltage difference of +(2~6)V between the two wires; Logic “0” is represented by a voltage difference of -(2~6)V. The interface signal levels are lower than those of RS-232-C, making it less likely to damage the interface circuit’s chips, and the levels are compatible with TTL levels, facilitating connections with TTL circuits.

The maximum data transmission rate for RS-485 is 10Mbps.

RS-485 interfaces use a combination of balanced drivers and differential receivers, enhancing common-mode interference immunity, i.e., better noise resistance.

The maximum communication distance for RS-485 is approximately 1219M, with a maximum transmission rate of 10Mb/S. The transmission rate is inversely proportional to the transmission distance; at a transmission rate of 100Kb/S, the maximum communication distance can be achieved. If longer distances need to be covered, RS-485 repeaters are required. The RS-485 bus generally supports a maximum of 32 nodes; with special RS-485 chips, it can reach 128 or 256 nodes, and a maximum of 400 nodes can be supported.

Due to the earlier emergence of the RS-232 interface standard, it inevitably has some shortcomings, mainly four points:

(1) The signal voltage levels of the interface are relatively high, easily damaging interface circuit chips, and because the 232 level is not compatible with TTL levels, level conversion circuits are needed to connect to TTL circuits;

(2) The transmission rate is relatively low; in asynchronous transmission, the baud rate is 20Kbps. Nowadays, with new UART chips, the baud rate has reached 115.2Kbps (1.832M/16);

(3) The interface uses one signal line and one signal return line to form a common-ground transmission form, which is prone to common-mode interference, thus having weak noise immunity;

(4) The transmission distance is limited, with a maximum standard transmission distance of 50 meters, but in practice, it can only be used at around 15 meters;

(5) RS-232 only allows one-to-one communication, without considering the formation of a serial bus. (This point is crucial; in many control scenarios, it is one-to-many. If the master device needs to communicate point-to-point with each slave device, the wiring on-site becomes a spider web.)

Differences Between RS-232, RS-422, and RS-485

The unbalanced serial communication interfaces RS-423, RS-449

Differences Between RS-232, RS-422, and RS-485

Differences Between RS-232, RS-422, and RS-485

The balanced serial communication interface RS-422

RS-422 (EIA RS-422-A Standard) is the serial connection standard for Apple’s Macintosh computers. RS-422 uses differential signals, while RS-232 uses unbalanced reference-ground signals. Differential transmission uses two wires to send and receive signals, providing better noise immunity and longer transmission distances compared to RS-232. In industrial environments, better noise resistance and longer transmission distances are significant advantages.

Differences Between RS-232, RS-422, and RS-485

Differences Between RS-232, RS-422, and RS-485

Differences Between RS-232, RS-422, and RS-485

Differences Between RS-232, RS-422, and RS-485

4. Comparison Between RS-232 and RS-485

1. Anti-interference: The RS-485 interface uses a combination of balanced drivers and differential receivers, providing good noise immunity. The RS-232 interface uses a signal line and a signal return line to form a common-ground transmission form, which is prone to common-mode interference.

2. Transmission distance: The maximum transmission distance for the RS-485 interface is standard at 1200 meters (at 9600bps), but can actually reach 3000 meters. RS-232 has limited transmission distance, with a maximum standard transmission distance of 50 meters, but practically can only be used at around 15 meters.

3. Communication capability: The RS-485 interface allows connection of up to 128 transceivers on the bus, enabling users to easily establish a device network using a single RS-485 interface. RS-232 only allows point-to-point communication.

4. Transmission rate: RS-232 has a lower transmission rate, with a baud rate of 20Kbps in asynchronous transmission. RS-485 has a maximum data transmission rate of 10Mbps.

5. Signal lines: The RS-485 interface forms a half-duplex network, generally requiring only two signal lines. The RS-232 port generally uses RXD, TXD, and GND three lines.

6. Electrical voltage levels: RS-485 logic “1” is represented by a voltage difference of +(2-6)V between the two wires; logic “0” is represented by a voltage difference of -(2-6)V. In RS-232-C, any signal line’s voltage is in a negative logic relationship: logic “1” is -5 to -15V; logic “0” is +5 to +15V.

5. Comparison Between RS-422 and RS-485

The electrical performance of RS-485 is identical to that of RS-422. The main differences are:

1. RS-422 has 4 signal lines: two for sending (Y, Z) and two for receiving (A, B). Since RS-422 separates receiving and sending, it can receive and send simultaneously (full duplex).

2. RS-485 only has two data lines: sending and receiving are both A and B. Since RS-485 shares two lines for receiving and sending, it cannot receive and send simultaneously (half duplex).

The RS-485 standard employs balanced transmission and differential reception data transceivers to drive the bus, with specific specifications required:

The receiver’s input resistance RIN ≥ 12kΩ

The driver can output a common-mode voltage of ±7V

The input capacitance ≤ 50pF

In the case of 32 nodes, with a 120Ω termination resistor, the driver must still output at least 1.5V (the size of the termination resistor relates to the parameters of the twisted pair used).

The input sensitivity of the receiver is 200mV (i.e., (V+) – (V-) ≥ 0.2V indicates signal “0”; (V+) – (V-) ≤ -0.2V indicates signal “1”).

Differences Between RS-232, RS-422, and RS-485

Because of the long distance, multi-node (32 nodes), and low transmission line costs, EIA RS-485 has become the preferred standard for data transmission in industrial applications.

(1) RS-485’s electrical characteristics: The sending end represents logic “0” with a voltage difference of +(2~6)V between the two wires; it represents logic “1” with a voltage difference of -(2~6)V. The receiving end considers A higher than B by more than 200mV as logic “0” and A lower than B by more than 200mV as logic “1”;

(2) The maximum data transmission rate for RS-485 is 10Mbps. However, since RS-485 often needs to communicate with the RS-232 port of a PC, the practical maximum is generally 115.2Kbps. Higher rates can reduce the transmission distance for RS-485, so it is often around or below 9600bps;

(3) RS-485 interfaces use a combination of balanced drivers and differential receivers, providing good noise immunity;

(4) The maximum transmission distance standard for RS-485 is 1200 meters (at 9600bps), but can actually reach 3000 meters. The RS-485 interface allows connection of up to 128 transceivers on the bus, which means RS-485 has multi-machine communication capabilities, allowing users to easily establish a network using a single RS-485 interface. The RS-485 interface forms a half-duplex network, generally requiring only two signal lines, so RS-485 interfaces typically use twisted pair transmission. The international standard for RS-485 does not specify a connector standard, so terminal blocks or DB-9, DB-25 connectors can be used.

When using the RS-485 interface, the maximum allowable cable length for data signal transmission from the generator to the load depends on the specific transmission line gauge; this length is mainly limited by signal distortion and noise. The maximum cable length and signal rate relationship curve is obtained using 24AWG copper twisted telephone cable (with a gauge of 0.51mm), with inter-wire bypass capacitance of 52.5PF/M and terminal load resistance of 100 ohms (as cited from GB11014-89 Appendix A). When the data signal rate drops below 90Kbit/S, assuming the maximum allowable signal loss is 6dBV, the cable length is limited to 1200m. In practice, it is possible to achieve greater cable lengths. Different cable gauges will yield different maximum cable lengths. For example, when the data signal rate is 600Kbit/S, using 24AWG cable, the maximum cable length is 200m; using 19AWG cable (with a gauge of 0.91mm) can allow for lengths greater than 200m; using 28AWG cable (with a gauge of 0.32mm) will limit the length to less than 200m.

For long-distance communication with RS-485, it is advisable to use shielded cables and connect the shield layer as the ground.

6. Three Factors Affecting RS-485 Bus Communication Speed and Reliability

1. Signal Reflection in Communication Cables

During communication, two signal factors cause signal reflection: impedance discontinuity and impedance mismatch.

Impedance discontinuity occurs when a signal suddenly encounters a very low or no impedance at the end of the transmission line, causing reflection at that point, as illustrated. This principle of signal reflection is similar to light reflecting when transitioning from one medium to another. To eliminate such reflection, a termination resistor matching the cable’s characteristic impedance must be connected at the cable’s end to maintain impedance continuity. Since signals can travel both ways on the cable, a matching termination resistor can also be connected at the other end of the communication cable.

Differences Between RS-232, RS-422, and RS-485

Theoretically, as long as a termination resistor matching the cable’s characteristic impedance is connected at the end of the transmission cable, signal reflection should not occur. However, in practical applications, due to the characteristic impedance of the transmission cable being related to the communication baud rate and other environmental factors, the characteristic impedance cannot be perfectly equal to the termination resistor, hence some signal reflection will still exist.

The other cause of signal reflection is the impedance mismatch between the data transceiver and the transmission cable. This type of reflection mainly manifests when the communication line is idle, leading to data chaos in the entire network.

The impact of signal reflection on data transmission is fundamentally due to the reflected signal triggering the receiver’s input comparator, causing the receiver to receive incorrect signals, leading to CRC errors or errors in the entire data frame.

In signal analysis, the parameter used to measure the strength of the reflected signal is the RAF (Reflection Attenuation Factor). Its calculation formula is as follows:

RAF=20lg(Vref/Vinc) (1)

Where: Vref—voltage magnitude of the reflected signal; Vinc—voltage magnitude of the incident signal at the connection point of the cable and transceiver or termination resistor.

The specific measurement method is illustrated in the figure. For example, if the peak-to-peak value of the incident signal sine wave at 2.5MHz is +5V, and the reflected signal’s peak-to-peak value is +0.297V, then at a communication rate of 2.5MHz, the reflection attenuation factor of this communication cable is:

RAF=20lg(0.297/2.5)=-24.52dB

Differences Between RS-232, RS-422, and RS-485

To mitigate the impact of reflected signals on communication lines, noise suppression and bias resistor methods are typically used. In practical applications, for relatively small reflected signals, the bias resistor method is often used for simplicity and convenience. The principle of how adding a bias resistor improves communication reliability in communication lines.

2. Signal Attenuation in Communication Cables

The second factor affecting signal transmission is signal attenuation during transmission through the cable. A transmission cable can be viewed as an equivalent circuit composed of distributed capacitance, distributed inductance, and resistance, as illustrated.

Differences Between RS-232, RS-422, and RS-485

The distributed capacitance C of the cable is mainly generated by the two parallel conductors of the twisted pair. The resistance of the conductors has a negligible effect on the signal and can be ignored. The signal loss is mainly due to the LC low-pass filter formed by the distributed capacitance and distributed inductance of the cable. The attenuation coefficients of the LAN standard two-core cables used by PROFIBUS (the standard cable selected by Siemens for the DP bus) at different baud rates are shown in Table 1.

The attenuation coefficients of the cable

Differences Between RS-232, RS-422, and RS-485

3. Pure Resistive Load in Communication Cables

The third factor influencing communication performance is the size of the pure resistive load (also called DC load). Here, the pure resistive load mainly consists of terminal resistors, bias resistors, and RS-485 transceivers.

Differences Between RS-232, RS-422, and RS-485

When describing the EIA RS-485 specifications, it was mentioned that the RS-485 driver can output at least 1.5V differential voltage with 32 nodes and a configuration of 150Ω termination resistors. The input resistance of one receiver is 12kΩ, and the entire network’s equivalent circuit is illustrated. According to this calculation, the load capacity of the RS-485 driver is:

RL = (32 input resistors in parallel + 2 terminal resistors = ((12000/32) × (150/2)) / ((12000/32) + (150/2)) ≈ 51.7Ω

Currently commonly used RS-485 drivers include MAX485, DS3695, MAX1488/1489, and SN75176A/D used by Holip, among which some RS-485 drivers can have load capacities up to 20Ω. Not considering other factors, according to the relationship between driving capacity and load, the maximum number of nodes that a driver can support will far exceed 32.

When communication baud rates are relatively high, bias resistors are essential on the line. The connection method for bias resistors is illustrated. Their purpose is to pull the voltage on the bus away from 0 volts when there is no data (idle state), as illustrated. This way, even if relatively small reflected signals or interference occur in the line, the data receivers attached to the bus will not malfunction due to these signals.

Differences Between RS-232, RS-422, and RS-485

Through the following example, we can calculate the size of the bias resistor:

Terminal resistor Rt1=Rr2=120Ω;

Assuming the maximum peak-to-peak value of the reflected signal Vref ≤ 0.3Vp-p, then the negative half-cycle voltage Vref ≤ 0.15V; the reflected current Iref caused by the reflected signal at the terminal resistor ≤ 0.15/(120||120)=2.5mA. The hysteresis voltage value of a typical RS-485 transceiver (including SN75176) is 50mV, thus:

(Ibias-Iref) × (Rt1||Rt2) ≥ 50mV

Therefore, we can calculate the bias current generated by the bias resistor Ibias ≥ 3.33mA

+5V=Ibias(Rpull-up + Rpull-down + (Rt1||Rt2)) (2)

Using equation (2), we can calculate Rpull-up = Rpull-down = 720Ω

In practical applications, there are two methods for adding bias resistors to the RS-485 bus:

(1) Distributing the bias resistors evenly across each transceiver on the bus. This method adds bias resistors to each transceiver connected to the RS-485 bus, providing each transceiver with a bias voltage.

(2) Using a pair of bias resistors on a section of the bus. This method is effective for significant reflected signals or interference signals on the bus. It is important to note that the addition of bias resistors increases the load on the bus.

7. Relationship Between RS-485 Bus Load Capacity and Communication Cable Length

When designing the network configuration composed of the RS-485 bus (bus length and number of loads), three parameters should be considered: pure resistive load, signal attenuation, and noise margin. The pure resistive load and signal attenuation have already been discussed, and now we will discuss noise margin. The noise margin of RS-485 bus receivers should be at least greater than 200mV. The previous discussions assumed a noise margin of 0. In practical applications, to improve the bus’s anti-interference capability, the system’s noise margin should ideally be better than what is specified in the EIA RS-485 standard. The relationship between the number of loads on the bus and the communication cable length can be seen from the following formula:

Vend=0.8(Vdriver-Vloss-Vnoise-Vbias)(3)

Where: Vend is the signal voltage at the end of the bus, which is defined as 0.2V during standard measurement; Vdriver is the output voltage of the driver (which depends on the number of loads. When the number of loads is between 5 to 35, Vdriver=2.4V; when the number of loads is less than 5, Vdriver=2.5V; when the number of loads exceeds 35, Vdriver ≤ 2.3V); Vloss is the signal loss during transmission through the bus (which depends on the specifications and length of the communication cable), calculated based on the attenuation coefficient provided in Table 1, using the formula attenuation coefficient b=20lg(Vout/Vin) yields Vloss=Vin-Vout=0.6V (note: communication baud rate is 9.6kbps, cable length is 1km; if the rate increases, Vloss will also increase); Vnoise is the noise margin, which is defined as 0.1V during standard measurement; Vbias is the bias voltage provided by the bias resistors (typical value is 0.4V).

In equation (3), multiplying by 0.8 ensures that the communication cable does not enter a fully loaded state. From equation (3), it can be seen that the size of Vdriver is inversely proportional to the number of loads on the bus, while the size of Vloss is inversely proportional to the cable length; the other parameters depend only on the type of driver used. Therefore, once the RS-495 driver has been selected, the number of loads on the bus is directly related to the maximum distance signals can be transmitted at a constant communication baud rate. The specific relationship is: within the allowable range of the bus, the more loads there are, the shorter the signal transmission distance; the fewer loads there are, the farther the signal can be transmitted.

8. The Impact of Distributed Capacitance on RS-485 Bus Transmission Performance

The distributed capacitance of the cable is mainly generated by the two parallel conductors of the twisted pair. In addition, there is also distributed capacitance between the conductors and ground, which is small but cannot be ignored in analysis. The impact of distributed capacitance on bus transmission performance mainly arises because the signals transmitted on the bus are fundamental wave signals, which can only express “1” and “0”. In special bytes, such as 0x01, the signal “0” allows sufficient charging time for the distributed capacitance, while when the signal “1” arrives, due to the charge in the distributed capacitance, it may not discharge in time, causing (Vin+) – (Vin-) to still be greater than 200mV, resulting in the receiver misinterpreting it as “0”, ultimately leading to CRC errors and errors in the entire data frame transmission. The specific process is illustrated.

Differences Between RS-232, RS-422, and RS-485

Due to distributed effects on the bus, data transmission errors occur, leading to reduced overall network performance. Two methods can solve this issue:

(1) Reducing the data transmission baud rate;

(2) Using cables with low distributed capacitance to improve the quality of the transmission line.

Simply connecting the A and B ends of each interface with a twisted pair without grounding the RS-485 communication link can work in some cases but poses risks to the system. The RS-485 interface transmits signals differentially and does not require a reference point for detecting the signal system; it only needs to detect the potential difference between the two wires. However, it should be noted that the transceiver can only operate normally when the common-mode voltage does not exceed a certain range (-7V to +12V). When the common-mode voltage exceeds this range, it can affect communication reliability or even damage the interface. As illustrated, when transmitter A sends data to receiver B, the output common-mode voltage from transmitter A is VOS, and due to the ground potential difference VGPD between the two systems, the common-mode voltage at the receiver’s input can reach VCM=VOS+VGPD. The RS-485 standard specifies that VOS ≤ 3V, but VGPD can vary widely (dozens of volts), potentially accompanied by strong interference signals that cause the receiver’s common-mode input VCM to exceed normal limits, introducing interference currents on the signal line that affect normal communication or damage the equipment.

Source: Compiled from the Internet

PreviousHighlightsReview

Differences Between RS-232, RS-422, and RS-485

Any PCB can warp; what to do if it happens?

What will life be like in the 5G era?

The three major trends and ten key technologies of China’s smart manufacturing in 2019

3290 pieces of foldable light and shadow screens assist the 70th anniversary National Day celebration! Each piece is a standard Chinese core

How does Alibaba, which doesn’t deeply understand manufacturing, build an industrial knowledge graph?

Could this be the next generation of FPGA?

Experts analyze power MOSFETs; this is valuable material!

This explains “characteristic impedance” and “impedance matching”!

The difference and identification between NPN and PNP!

Why are the rated voltage and rated power of resistors both important?

After reflection, crosstalk, and jitter, what has happened to my signal?

The Ministry of Industry and Information Technology reveals that it will issue temporary 5G licenses this year, highlighting the market potential of compact optical modules

Wireless communication frequency allocation table (including the latest 5G NR)

In 2019, where is the communication road headed?

5G front-haul and mid/backhaul solutions based on Super-PAM4

Comparison of products for 100G QSFP28 optical modules

Hurry up and take a look! Development trends for 25G/100G high-speed optical module packaging technology

Get to know the 100G QSFP28 PSM4 (Silicon Photonics) in one minute.

Differences Between RS-232, RS-422, and RS-485

Differences Between RS-232, RS-422, and RS-485

Leave a Comment