Switching between different voltage levels of UART\ RS232, 5V, 3V3 - Page 1
Forum section: electronics / projects

author: riyadh144
author_rank: Unknown
timestamp: September 01, 2018, 07:32:10 pm
content: I am trying to build a testing board that can support several of our platforms, each platform has different UART setup and they all need to be tested and sometimes used for the testing. I was thinking someone must have thought and developed a universal UART chip, but according to my search that doesn't exist.I came across LT1039 which has a tristate output which can be helpful to keep it in High Z mode if not used so RS232 level is solved, but I cannot find another chip with tristate that can handle TTL levels with.I am thinking of switching between these chips with a physical switch.https://www.eevblog.com/forum/projects/rs232c-and-cmosttl-one-connector/

author: David Hess
author_rank: Super Contributor
timestamp: September 01, 2018, 10:54:58 pm
content: Most RS-232 receivers deliberately have a TTL compatible input threshold so they do not misbehave with a disconnected input but this also allows them to accept TTL and CMOS level inputs. The only trick with this is that RS-232 drivers and receivers are always inverting so you might need to invert the output of the RS-232 receiver with like an XOR gate in logic input mode.If you need something with more performance or a better defined input threshold, then a differential input comparator like an LM311, LM393, or LM339 can be used as a universal receiver.Linear Technology makes some "multiprotocol" level translators which support RS-232 and other standards with the same IC but I do not know if they would be suitable.

author: riyadh144
author_rank: Unknown
timestamp: September 04, 2018, 08:49:30 pm
content: Receiver side is easy, but the output is the hard part, I want to be able to transmit at the rated voltage of the device.

author: David Hess
author_rank: Super Contributor
timestamp: September 04, 2018, 10:03:28 pm
content: I might just design a discrete variable voltage level shifter where the positive and negative levels are controlled rather than looking for integrated tristate drivers to use in parallel.

author: riyadh144
author_rank: Unknown
timestamp: September 04, 2018, 10:29:12 pm
content: That is possible, but how would I handle the inverting between RS232 and TTL, I think as you said xor could handle that.Fuck it I will try that

author: David Hess
author_rank: Super Contributor
timestamp: September 04, 2018, 10:36:16 pm
content: It would still require some way to convert between inverting and non-inverting operation but that is what an XOR gate is for.I think the big difficulty is with frequency response. What is the highest data rate? If the TTL data rate is like 10 megabaud, then things become more difficult.

author: riyadh144
author_rank: Unknown
timestamp: September 04, 2018, 11:33:05 pm
content: No, the maximum speed it will ever need to transfer over is 115200 baud rate. So I think we will be alrightHere is what I go, do you think this will do?

author: riyadh144
author_rank: Unknown
timestamp: September 04, 2018, 11:36:59 pm
content: That xor should be powered from 5V not 12V

author: David Hess
author_rank: Super Contributor
timestamp: September 05, 2018, 03:57:51 am
content: I am not sure what you are trying to do there. RS-232 drivers use current limited totem-pole outputs.