3
\$\begingroup\$

I was reading a blog about someone's application to ingest a TTL signal to a device and got perplexed.

The author connects what appears to be a 3.3V TTL signal directly to a RS232 port (and it apparently works!). Shouldn't it just read 0 and undefined since 232 is 1: [-3,-25] and 0: [3,25]? Does the undefined maybe count as a change that essentially acts as not 0?

Am I missing some simplification or principle?

The blog is here

\$\endgroup\$
5
  • \$\begingroup\$ Many modern devices supply/accept RS-232 protocols (FTDI devices, for example) use standard logic-level inputs/outputs. They are NOT compatible with the RS-232 signalling and would need extra circuitry and power supply rails (or means to generate them) in order to achieve true RS-232 signalling. The protocol is right. Just not the voltage levels. That could be one explanation. Only "faux" RS-232 is being used. Of course, if it is true RS-232 then: bidirectional and receiver only? \$\endgroup\$
    – jonk
    Commented Oct 9, 2020 at 18:37
  • \$\begingroup\$ Please state exactly what your target equipment is \$\endgroup\$ Commented Oct 9, 2020 at 19:24
  • \$\begingroup\$ @jonk from the blog, the author literally just connects the 3.3V (per the datasheet) PPS into the RS232 serial port of a RHEL machine and it works. What is "faux" RS-232? He plugged it into pin 1 which appears to be the DCD line which does make it receiver only, but there isnt any other circuitry or passive elements. \$\endgroup\$
    – bchang32
    Commented Oct 9, 2020 at 19:25
  • \$\begingroup\$ @ChrisStratton, my device is a PXIe 8840 controller running on RHEL so very similar to the blogs. \$\endgroup\$
    – bchang32
    Commented Oct 9, 2020 at 19:27
  • \$\begingroup\$ Look in your kernel boot messages / dmesg and you'll see if you have a 16550 - probably. Of course that's the UART, the RS232 transceiver is something else. But it's probably going to work. And incidentally, you want to use that and not USB for your PPS hack! \$\endgroup\$ Commented Oct 9, 2020 at 19:28

1 Answer 1

6
\$\begingroup\$

Many (if not most?) RS232 receivers actually will accept unipolar signals not reaching officially valid logic levels.

However RS232 line drivers and receivers have by tradition essentially always been inverting, so if you want to use this trick with an MCU or whatever following usual conventions, you need an inverter. (A very few UARTs have a mode bit which applies inversion)

Way back when, for casual experiments I'd sometimes use the 1489 line receiver which did not require the extra supplies, but then lacking those supplies, for the transmit path just use a TTL NAND gate, which had only minimal differences from the pinout of a 1488 anyway.

Utilizing beyond-specification behavior is the kind of thing you can do for personal experiments in tame electrical environments where unreliable operation isn't the end of the world. It's not something you do in a product, or where failure has consequences.

Keep in mind that charge-pump RS232 level shifters have been inexpensive for decades now. And with most computers not having actual RS232 ports any more, unless you are dealing with equipment it's typically simpler to just get a "logic-level USB-UART cable" (as commonly sold for Arduino/pi projects) to connect to your PC, than a "USB-RS232 Serial" adapter. The former typically has a header or discrete wires, the latter a 9 pin D-shaped connector shell.

\$\endgroup\$
8
  • 1
    \$\begingroup\$ to my knowledge some older notebooks (>=20 years ago) started to use lower, non standard levels for RS232, which also saved a bit of energy... and a lot of stuff around tolerated that. \$\endgroup\$
    – schnedan
    Commented Oct 9, 2020 at 18:12
  • \$\begingroup\$ If it accepts unipolar signals, what are the levels for 1 (less than 1 V?)? I am trying to essentially replicate the blog (where I have a BNC PPS that needs to interface with devices which fortunately have COM/RS232 lines). So from your second paragraph, sounds like either way im stuck only reading half the values (0 and unknown if I dont have an inverter or 1 and unknown if I use an inverter) \$\endgroup\$
    – bchang32
    Commented Oct 9, 2020 at 18:24
  • \$\begingroup\$ And these lower, non-standard levels might work fine for a 100cm connection to a modem or printer, but definitely not on 100m of copper cable. The old standard with much higher voltages was intended for long runs of wire. I'd still use an interface chip today though, even if levels have dropped and/or become partially unipolar. \$\endgroup\$
    – rdtsc
    Commented Oct 9, 2020 at 18:28
  • \$\begingroup\$ You won't find a formal definition of what illicit signals work (at least short of the data sheet of a specific receiver chip), but (over short-moderate distance) TTL ones practically seem to. A PPS signal won't make any sense to a UART, if it's actually an MCU GPIO pin hiding behind the line receiver, then it might work. Or were you hoping to use a UART's break detect feature? Generally you get better answers when you post what you are actually trying to do in your question... \$\endgroup\$ Commented Oct 9, 2020 at 18:28
  • 1
    \$\begingroup\$ @bchang32 for sake of efficiency, please state exactly what your device is. The 16550 is the standard UART in PC compatibles from about the AT onwards, originally as a distinct chip, later as an equivalent integrated into multi-function chips. It even shows up as a functional block in many non-x86 SoCs since the programming interface is well known and supported. \$\endgroup\$ Commented Oct 9, 2020 at 19:24

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.