as shown in the picture, can anyone explain the capacitor and diode in detail? Thank you! enter image description here


1 Answer 1


RS232 logic levels are (from memory)

  • high: -12 to -3 V.
  • low: +3 to +12 V.

Since your level shifter is interfacing with a device with only a single-ended, positive supply there is a problem sending out a high signal on RX-RS232.

The trick here is to steal some power from the TX signal of the other device when it is high (negative). The diode charges the capacitor to a negative voltage and this is used to bias the RX line negative if the TX-TTL signal is high (which will turn the PNP transistor off).

enter image description here

When the TX-TTL signal is high and the PNP turned off there is a potential divider formed between the three 10k resistors, 1, 2 & 3. The best that can be obtained from this arrangement is that the RX line will be a little more positive (due to the diode drop) than \$ \frac {2}{3}V_{TX} \$. If VTX is weak (close to -3 V) this circuit may not work as the voltage to the other device's RX will be out of specification.

  • 2
    \$\begingroup\$ I've written up a little something here. Feel free to use, borrow, whatever you find useful from it. \$\endgroup\$
    – jonk
    Jul 3, 2018 at 17:36
  • \$\begingroup\$ More like a technical treatise with history of serial comms and personal projects thrown in. +1, as usual. \$\endgroup\$
    – Transistor
    Jul 3, 2018 at 17:40
  • \$\begingroup\$ What can I say? ;) \$\endgroup\$
    – jonk
    Jul 3, 2018 at 17:46
  • 1
    \$\begingroup\$ I first used the MAX232 in about 1993. No messing about! \$\endgroup\$
    – Transistor
    Jul 3, 2018 at 19:09
  • 1
    \$\begingroup\$ To those who've only experienced the MAX232 and subsequent devices for RS-232 support, I encourage them to try out an MC1488 and MC1489, someday, and see what RS-232 IC life was like before. Jim T. designed those in the mid 1960's, working at Motorola SPD (Phoenix.) The MAX232 arrived in 1987! Amazingly late, being about two decades later and arguably when RS-232 was already on its way out. We could have used it at least a decade earlier, I think. Very late in coming. \$\endgroup\$
    – jonk
    Jul 3, 2018 at 21:47

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.