RS485-RS232 through code

Yep I think we're on the same page now :slight_smile:

So the only issues are converting the voltage levels, transferring the bits/bytes and detecting when to turn off the TX pin, all of which have been covered I think although possibly lost in the noise.

To summarise...

Tx to the controller should work by tying B to 3v3 and transmitting 0-5v on A (or swap A and B if the logic is inverted).
Rx from the controller might be a problem because the voltage levels will vary depending on the chip they use, termination resistor etc.
The data can be transferred bit by bit and a timer used to detect the end of the PC transmission so the Tx pin can be turned off.
The data can also be transferred by receiving all the bytes then retransmitting them. In this case you either have to know the protocol or you can still use a timer.

All the above may fail for various reasons so I think it's time to write some code and see what works.


Rob