I am designing a Raspberry PI (RPi) shield, that uses one of the UARTs (TTL) on the RPi, to talk to a MAX1487 chip. This enables the RPi to talk RS485 using the built in UART. I have this working on a bread board now.
I want to add the ability to switch the port from RS485 to RS232 in software on the RPi. Ideally they would both use the same DB9 port.
The MAX1487 (RS485 chip) has an enable pin for the TX and RX that I can use to enable or disable the the RX/TX of the chip. I can use one of the GPIO pins for this. Now I am looking for a chip to do the RS232 part that also has an enable and disable pin.
Preferably I would like to use one chip that has both RS232 and RS485 build into it with a single GPIO pin to switch between the two but I haven’t found a chip that does this yet.
I like making my life complicated…
My questions are:
- Is there a TTL to RS232 with an enable pin for the RX/TX pins ?
- Is there a single chip that does TTL to both RS485 and RS232 ?
- How would you do both RS485 and RS232 on the same port using the RPi UART?
No, I can not just use USB to RS232/RS485 converters.