1
\$\begingroup\$

I have been using this converter call it converter A to communicate an MCU through its UART pins RX TX. And I wouldn't call this RS232 because RS232 is about physical layer and voltage levels as explained below:

enter image description here

But now there's a driver which for communication requires this RS232 TTL module call it converter B. Is this still the same type I have or different? I mean is the converter A and B same type? If so, why confusing naming them as RS232?

\$\endgroup\$
4
  • 1
    \$\begingroup\$ I'm not going to spend a lot of time reading. But RS-232 (version -D and later, for example) does specify both the physical layer and also the data link layer. These days, the physical layer is costly (it costs money to provide the voltages and noise immunity) but the async approach in the data link layer is still useful. So, the two different layers get often conflated together. Not sure what else to add. Just be wary, is all. \$\endgroup\$ Nov 23, 2023 at 12:20
  • 1
    \$\begingroup\$ You correctly interpret what RS232 is but as you’ve noted there is confusion with RS232 supposedly meaning async/uart data. The module you refer to uses a logic level interface aka’TTL’. There’s a zillion other terms used incorrectly by vendors and it just proliferates. \$\endgroup\$
    – Kartman
    Nov 23, 2023 at 12:21
  • 1
    \$\begingroup\$ @periblepsis The RS-232 standard specifically does not define the link layer. Not any version of the standard. Just like RS-485 or RS-422 or LVDS do not define anything else than logic levels, not how to send bits of data. \$\endgroup\$
    – Justme
    Nov 23, 2023 at 19:15
  • 1
    \$\begingroup\$ @Justme Thanks for the correction. I should have checked before writing. Only excuse I have is that I got all my information from a book called "Technical Aspects of Data Communication" by John E. McNamara (both 2nd and 3rd/1988 editions.) And it appears he doesn't only discuss EIA-232-D there, but includes UART details as well, now that I pull the book from the shelf to look. I must have conflated things. Need to kick myself a few times for this. ;) \$\endgroup\$ Nov 23, 2023 at 20:29

2 Answers 2

2
\$\begingroup\$

No, it is not OK to call an UART as RS-232, because they are two completely different things, located at different layer on OSI model for networking. RS-232 would be the physical layer, and UART would be the data link layer.

Which means, UART can be used with other physical layers too, such as RS-485, RS-422, etc.

Some people mix RS-232 physical layer with UART, because technically all RS-232 ports were implemented with UARTs, and when you just want the UART many chips are still called 232 like FT232 because it is a USB UART which can be used to implement an RS-232 port.

Both those modules are just 3.3V TTL/CMOS level UART modules. They have nothing to do with RS-232. Or rather, they can be thought as typical computer RS-232 serial ports but with the RS-232 part left off, which is what might explain why they are called incorrectly.

RS-232 is a standard for physical electrical interface. It defines things like voltage levels and connector.

What it does not define is the logical bit serial protocol, line code, or encoding.

Those are defined by the UART. The UART uses logic level voltages, and these logic level voltages are converted to RS-232 voltage levels with a level conversion PHY when making an RS-232 interface. But in your case, you do not need RS-232 and need only the logic level UART signaling.

\$\endgroup\$
3
\$\begingroup\$

You are correct, those 0/5 V levels are not 'RS232' physical layer, which uses up to +/- 15 V. Many people say RS232, when they mean UART, the protocol, regardless of which physical layer is used to transport it. RS232 is perhaps the best known and oldest of the serial links, so it has become the Thermos, Hoover or BandAid word to describe them.

The CH340 you link to, and just about every other cheap 'TTL RS232' converter, outputs and accepts the TTL-like levels you have illustrated. However, there is one caveat, the levels are often 0 and 3.3 V, rather than 0 and 5 V. TTL is really a 0/3.3 V signal, it doesn't guarantee a 5 V output, and rarely gets near it, except with an external pullup.

Some modules are switchable 3.3/5 V output. I don't know whether 3.3 V modules will accept 5 V signals without damage. With luck they'll specify whether they do or not. I would hope that 5 V modules would accept 3.3 V highs as inputs, it's on the edge of a CMOS high specification, though solidly high for 'TTL'.

In this poorly specified realm, especially on products acquired through AlliBayZon, it's caveat emptor, though chances are everything will just work. This is OK for hobbyists, where failure is an option. Professionals will buy through proper channels, read data sheets, and won't get caught out.

\$\endgroup\$
6
  • \$\begingroup\$ I would not call 0V/5V logic level signals with the term RS-232-alike, because they are not within RS-232 specs. Sure, the UART waveforms, transmitted as logic signals or RS-232 signals, may look alike, if inversion, slew rate, and voltage levels are ignored. \$\endgroup\$
    – Justme
    Nov 23, 2023 at 13:27
  • 1
    \$\begingroup\$ The first datasheet actually calls it "TTL-232" as a shortcut to explain "232 timing on TTL voltage levels." It then goes on to say it's available in 3.3V or 5V models. I couldn't get the datasheet for the second. \$\endgroup\$ Nov 23, 2023 at 13:28
  • 1
    \$\begingroup\$ @Justme how do you interpret 'RS232-like'? I would interpret that as not RS232, but similar in some respects. \$\endgroup\$
    – Neil_UK
    Nov 23, 2023 at 13:29
  • \$\begingroup\$ @Neil_UK You can leave an UART as logic levels, or you can use a PHY after the UART for any electrical standard you want - be it RS-232, RS-485, CAN, LVDS, LVPECL or whatever. Even if bit frame waveforms look similar on all interfaces, no other interface looks RS-232-alike except the RS-232 signals itself. \$\endgroup\$
    – Justme
    Nov 23, 2023 at 14:51
  • \$\begingroup\$ RS-232 also doesn't require +/-15V, that's just the maximum allowed standard compliant voltage transmitted out when a standard compliant receiver is connected. \$\endgroup\$
    – Justme
    Nov 24, 2023 at 8:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.