First of all the 0ohm resistor is strange... But I will explain the circuit's functionality after considering this resistor as not connected
the NC is considered to be a wire. This is the only way the circuit will actually work. I have seen similar circuits before
- when no data is being sent, TXD2 is idle and hence will equal to 5V (TTL UART ideal state)
- 5V on the npn transistor will yield 0V on its collector, that is RE_bar and DE. which means that the receiver is enabled and transmitter is disabled, which is exactly what we need. MAX485 will now convert whatever on the bus to the RXD2 wire.
- when data is being sent, we have 2 cases: sending a logical 0 (0V) and logical 1 (5v):
a. when 5V is sent, as explained before, the transmitter is disabled, and A and B outputs are in high-impedance. But because of pull-ups and pull-downs on the A and B wires, A will be 0v, and B will be 5V which is a logical 1 RS485 signal. So it is "like" sending data except that the pull-ups and pull-downs are the ones driving the bus and not the max485 transceiver.
b. when 0V is sent, the transistor switches off. The transmitter is enabled, and 0V gets into DI. which outputs a 0V RS485 signal on A and B lines (that is A:5V , B:0V)
RS485 is a multidrop bus, which means that a number of nodes are connected to the same bus and, in this case, they all have the potential to "talk" at the same time. For a device to take control of the bus and be able to talk, the RS485 transceiver (in your case the MAX3160) has to have its transmit enable pin be enabled. All the other devices on the bus need to have them disabled. If more than one device is enabled to transmit, data can become garbled because one device might be trying to drive the bus in one state and another device trying to drive the bus in a different state.
You enable the device to take control of the bus by setting the DE pin high. Once it is high, anything on the DI pin is transmitted on to the bus. It is important to note that all other devices on the bus should have their DE pins low.
The other enable pin on the transceiver is usually called the ~RE pin. Note that this is low for anything on the bus to be reflected on the RO pin. That looks like it's the R1OUT on your Max device.
A lot of the time, you see the ~RE and DE pins connected together and to a GPIO on the micro. This GPIO determines whether you are listening to what other nodes on the bus are saying or talking on the bus yourself.
All this is not to be confused with flow control which is often used on devices such as modems that are relatively dumb and have relatively small data buffers. This is a method of each device saying it is ready to send more data out or ready to receive data in. This can be done in hardware with RTS/CTS pins and can also be done in software with XON/OFF messages. There are lots of good resources on line that explain this very well and I still dip in and out of these every now and again because it can get confusing!
It's probably worth noting that there are various methods of deciding who is allowed to talk on the bus at any one time. There always needs to be a method of knowing who is the one master at any one moment in time.
So, to listen on the bus, ensure ~RE (R1OUT) and DE are low. To transmit on to the bus, DE should be high. If ~RE is high at the same time, you will not get what is being transmitted, send back to the Rx pin of the UART on your micro.
Best Answer
It's the document serial number of the standard. Same reason why the HTTP protocol is also known as RFC2616 and the Javascript programming language is also known as ECMA262.
The numbers themselves have no meaning. For example while EIA232 specifies the electrical characteristics of a digital serial communications system, EIA222 specifies standards for antenna masts and RS225 is a standard for RF connectors.
Wikipedia has an incomplete list of popular RS/EIA standards: https://en.wikipedia.org/wiki/EIA_standards