Home > other >  UART, Modbus, RS485
UART, Modbus, RS485

Time:09-27




The relationship between UART and RS485:
Communication problems, and the traffic is the same, a serial port communication, we can use public transportation to analogy here,
"Bus run" it can be simply divided into two parts: 1, the station; 2, highway,
Which determines what there filling station (people), how to send (shift),
When the car on the road, should follow the rules of the road traffic, the bridge is across the bridge of the rules, the rules of the high speed with high speed and has nothing to do with the station,

Return to a serial port communication, in fact, UART is equivalent to the station, and RS485 is corresponding to the rules of the road,

In a sense, it can be said that, on a line, there is only the current RS485 specifies the current to flow in what kind of lines and fluid style; Current was explained in UART and assembled into data, and turn it into a CPU can directly read and write, in the form of

UART can understand like this: each SOC chip, internal will have UART controller, which is above "station", but often say UART refers to, a serial communication protocol, rules on the data frame format, baud rate, etc.,
RS485: is the electrical characteristics of data communication, is the concept of the physical layer, the corresponding physical device with RS485 drive chip, the CPU through the UART transmission over voltage signal driven into RS485 logic,

UART is general Asynchronous transceiver Transmitter (Universal Asynchronous Receiver/Transmitter), since it is "machine", obviously, it is a device, to perform a specific function of the hardware, it itself is not a deal, so what functions to complete it? It is one of the most basic functions, serial and parallel data conversion between,


Protocol is divided into hardware and software agreement,
And communication protocol software belongs to, it contains a header format, surrounded by the MODBUS communication protocol of application layer, is mainly used to send and receive the package format, and RS232 and RS485 serial interface is the physical, it can support many kinds of communication protocol, the MODBUS is just one of them,

Example, a person go to macau from Hong Kong, from Hong Kong to Macao can walk waterway, waterway is RS485, vehicle and ship can respectively as application layer MODBUSRTU.

Modbus is a kind of agreement, you must have the hardware for the realization of the platform, and different hardware platforms have different electrical characteristics and connection ways, such as RS232, RS485. Can compare the Modbus to English, RS232 compared to indians, RS485 compared to americans, the indians between when I speak English, understood as the Modbus communication based on RS232, between americans speak English, understood as the Modbus communication based on RS485,

Conclusion: the modbus is an application layer protocol, he is to build in a serial port, network cable, etc, on the basis of the underlying transport uart just a serial port protocol,


Sentence: three different objects, are agreement, is a kind of rules, but there are only three so relationship, because should be in data transmission,
A look at their history see,