i need some help with RS-232 /RS-485 disconnection detection .
i want to recognize if someone is disconnect the RS-232/RS-485 cable between my device to the "client"
i tried to find some software solutions but i didn't find any ...so now im looking for an hardware solution.
i have a processor with a free GPIOs so maybe if someone can help my with a way to get an "interrupt" or something that will detect if someone disconnect the RS-232/RS-485 cable between my device to the "client".
RS-232 can use handshake signals to detect presence/disconnection of the peer. There's no similar option for RS-485, you need to monitor connection state on the protocol level (which would be also the safer way for RS-232, because it can detect software induced connection loss).
RS-232 can use handshake signals to detect presence/disconnection of the peer. There's no similar option for RS-485, you need to monitor connection state on the protocol level (which would be also the safer way for RS-232, because it can detect software induced connection loss).
Unfortunately I can not change the frequency that i send data.(system issue)
i have 2 devices that connect with 3 wires TXD, RXD ,GND . my device send each 10 seconds data to the other device and the other device gives an answer to my device.
i want the that ill have the ability to detect if someone disconnect the cable from my device or form the other device ( i mean disconnect the cable between the 10 seconds communication window).
thanks for the help , can you please give me more details ?
you say that i need to use a comparator. so one of the comparator leg (such as V+) ill connect to the RX...and what ill need to connect to the V- leg ( compere the RX to what? ...i know when there is no data transition on the line the voltage is 0V)..
At the hardware side, considering the the volatage levels ranging from -2v to +2v are not allowed on this electrical standard, you could use this fact to create an circuit that monitors that.
At the software side, if some flow control pins are not being used, you could connect them through a loopback circuit ( input/output ), in order to detect the presence of the device connected.
Comparaot output: 1 = idle or transmitting "high"; 0 = disconnected or transmitting "low"
UART communication is idle high. With RS232 high means a signal voltage below -2V.
The comparator output shows when there is no "high" --> RS232 not idle. Either transmitting a "Low" or disconnected. Your software shoud have timeout to decide if it is disconnected or transmitting.
loss of signal (LOS ) functionality is accomplished by designing the Rx so that the minimum input high level is slightly negative (-10mV to -25mV), rather than the +200mV used for standard RS-485 and RS-422 Rx.
Then have the server use a parallel chip to detect the disconnect or short to 0V across the line.
Comparaot output: 1 = idle or transmitting "high"; 0 = disconnected or transmitting "low"
UART communication is idle high. With RS232 high means a signal voltage below -2V.
The comparator output shows when there is no "high" --> RS232 not idle. Either transmitting a "Low" or disconnected. Your software shoud have timeout to decide if it is disconnected or transmitting.