I want to make an RS232 to RS485 converter that is half duplex. I use MAX232 and MAX485 for this. But I don't want to control CS pin of MAX485 at RS232 side. Is there any way to make this control automatic? PS: Baud rate can be from 300bps to 115200bps.
However you have to control the RE (receiver Enable) and DE (Driver Enable) for bus control purpose. If you have dificulty control it on RS232 side, it is controlable from other sides, but you need one extra cable to do it!
RE Receiver Output Enable. A low level enables the receiver output, RO. A high level places it in a high impedance state.
DE Driver Output Enable. A high level enables the driver differential outputs, A and B. A low level places it in a high impedance state.
Take a look at the 3-transistor circuit in this thread:
Of course, if you need industrial standard (RS-232 -25 to -3 and +3 to +25V, and differential RS-485) it wasn't design for that purpose, but for "local" conversion without external power and without additional wires to switch between transmission and reception, it works and 115.2kbps is not a problem ..
I need industrial standard. I make two isolated power sources, one of them is for RS232 side and other is for RS485 side. Data lines are connected with opto-couplers. I can control both RE and DE pins of RS485 with RTS at RS232 side. But I saw some converters that manage this automatically. This is really nice feature for programmers. So I want to add this feature to my own converter. I don't know how I can detect if RS232 transmits data to control RE and DE pins.